Bug 80370
| Summary: | malloc segfaults if clearenv() has been called | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Public Beta | Reporter: | Chaskiel Grundman <cg2v> |
| Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | Brian Brock <bbrock> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | phoebe | CC: | aleksey, fweimer, mitr |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2003-01-07 11:22:19 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: | |||
Still happening in Phoebe (glibc-2.3.1-21): (gdb) bt #0 0x42072d52 in posix_memalign () from /lib/i686/libc.so.6 #1 0x42072bd5 in posix_memalign () from /lib/i686/libc.so.6 #2 0x42070205 in malloc () from /lib/i686/libc.so.6 #3 0x080483b3 in main () #4 0x42015970 in __libc_start_main () from /lib/i686/libc.so.6 P.S. Possibly related - bug 81259 (a different crash in malloc) glibc-2.3.1-21 is way too old, please upgrade. This particular bug is fixed since 2.3.1-23 (ATM we're at 2.3.1-32). Any chances of a new glibc being available on up2date? |
Description of problem: malloc segfaults if an application calls clearenv() before the first malloc() Version-Release number of selected component (if applicable): 2.2.93-5 How reproducible: always Steps to Reproduce: 1.Compile the following test program: #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { void *x; clearenv(); x=malloc(100); printf("we didn't die\n"); } 2. Run it. Actual results: Program received signal SIGSEGV, Segmentation fault. 0x420764f6 in ptmalloc_init () from /lib/i686/libc.so.6 (gdb) where #0 0x420764f6 in ptmalloc_init () from /lib/i686/libc.so.6 #1 0x42076305 in malloc_hook_ini () from /lib/i686/libc.so.6 #2 0x420730f5 in malloc () from /lib/i686/libc.so.6 #3 0x080483c9 in main () #4 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6