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/12113] Segmentation fault in dynamic loader on AVX enabled OS and CPU with AVX


http://sourceware.org/bugzilla/show_bug.cgi?id=12113

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-13 23:26:30 UTC ---
(In reply to comment #13)
> (In reply to comment #9)
> > Offset is good for up to 128byte alignment:
> > 
> > tcb-offsets.h:#define RTLD_SAVESPACE_SSE 128
> > 
> > But tcbhead_t is only aligned at 16byte. No matter
> > how much padding you add, rtld_savespace_sse can only
> > be guaranteed to be aligned at alignment of tcbhead_t.
> 
> I don't doubt that the patch does the job.
> 
> I don't like aligning the struct member.  The struct itself (tcbhead_t) should
> get the alignment element.  Otherwise we might silently introduce holes in the
> structure which are glossed over by the alignment of the struct element.
>

I posted an updated patch to increase TCB_ALIGNMENT to 32.

> 
> > This test happens to make tcbhead_t only aligned at
> > 16byte, not 32byte. My patch aligns tcbhead_t at maximum
> > register size so that rtld_savespace_sse is properly aligned.
> 
> And what is it about this test that does it?  There seems to be nothing
> special.  Any alignment introduced by this is incidental, based on the current
> implementation having specific sizes.

That is true. This test happens to align TCB at 16byte by chance.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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