This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/2990] getpwuid() (specifically _dl_make_fptr) causes a segfault when using electric fence


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]