This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2990] getpwuid() (specifically _dl_make_fptr) causes a segfault when using electric fence
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 3 Aug 2006 18:36:04 -0000
- Subject: [Bug libc/2990] getpwuid() (specifically _dl_make_fptr) causes a segfault when using electric fence
- References: <20060801171527.2990.jeffmax@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2006-08-03 18:36 -------
What you are seeing is not a glibc bug, but an ElectricFence (mis)feature, see
man efence.
glibc relies on malloc etc. results being sufficiently aligned to satisfy
alignment requirement of any standard C object (see e.g.
http://www.opengroup.org/onlinepubs/009695399/functions/malloc.html
). On IA-64 that's long double with __alignof (long double) == 16.
glibc malloc internally guarantees alignment of MALLOC_ALIGNMENT, which is
2 * sizeof (size_t). Your testcase actually could get away even with 8 byte
alignment, but ElectricFence defaults to 4 byte alignment for the reasons
mentioned in its man page.
So, you need to run the testcase with EF_ALIGNMENT=16 or EF_ALIGNMENT=8.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://sourceware.org/bugzilla/show_bug.cgi?id=2990
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.