Bug 86420
| Summary: | malloc on bigmem SMP kernel returns EINVAL | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Bob Nataly <bnataly> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED NOTABUG | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i686 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-10-03 19:56:00 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Bob Nataly
2003-03-21 19:05:56 UTC
Setting the environment variable MALLOC_CHECK_ = 1 or 2 eliminates this problem. I don't know why, as MALLOC_CHECK_ is only supposed to be a debugging aid and is not supposed to effect the behavior of the actual malloc function call. However, obviously it does, as malloc is no longer setting errno to EINVAL. You mean that malloc returns non-NULL and sets errno to EINVAL? That is completely legal. With the exception of a few routines named in the standards (I remember ATM only some math functions, there are a few others I think), errno has defined value only after function fails (typically returns -1, in the case of malloc NULL). So, unless malloc returns NULL, you shouldn't look what value errno has, it can have any. |