This is the mail archive of the libc-alpha@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]

Re: Ruby testsuite failures because of pointer mangling on 32-bit ARM?


From: Andrew Pinski <pinskia@gmail.com>
Date: Tue, 10 Dec 2013 17:13:30 -0800

> On Tue, Dec 10, 2013 at 2:36 PM, David Miller <davem@davemloft.net> wrote:
>> From: pinskia@gmail.com
>> Date: Tue, 10 Dec 2013 11:57:03 -0800
>>
>>> Hmm, shouldn't ruby be using makecontext/restore context instead of
>>> setjmp/longjmp for this purpose?  I think we should declare this as
>>> a bug in ruby.
>>
>> I honestly think that what Ruby is doing is quite reasonable.
> 
> How so, jmp_buf is supposed to be an opaque structure.  If a program
> depends on the context of an opaque structure, then it is a bug in the
> program rather than the library which changes what the opaque
> structure contains.

Addressing jmpbuf specifically, changing jmpbuf's layout would break
every GDB binary out there.

There are countless programs which want to see the frame pointer and
use jmpbuf plus target-specific implementations to fetch that value.

But that's not what Ruby is doing here, it is copying the stack frame
of a thread into another location and then using it in some way.  In
fact I do not see any code in Ruby that actually looks into the jmpbuf
contents at all.


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