Ruby testsuite failures because of pointer mangling on 32-bit ARM?
Carlos O'Donell
carlos@redhat.com
Tue Dec 10 19:46:00 GMT 2013
On 12/10/2013 12:25 PM, Will Newton wrote:
> On 10 December 2013 10:30, Will Newton <will.newton@linaro.org> wrote:
>> On 10 December 2013 01:49, Carlos O'Donell <carlos@redhat.com> wrote:
>>
>> Hi Carlos,
>>
>>> I've had one report that the pointer mangling support on 32-bit ARM
>>> that was added in October might be causing the Ruby [1] testsuite
>>> to fail.
>>>
>>> Could you try running the ruby testsuite yourself using the new
>>> 32-bit glibc runtime to see if you can reproduce the problem
>>> yourself?
>>
>> Sure, I'll take a look.
>
> So the question I have now is how does this work on other architectures? ;-)
No idea.
> Ruby uses jmpbuf as a context object for doing threading but also at
> gc.c:1845 it seems to be using a jmpbuf to mark the root set for GC
> which if we are encrypting FP (which is usually a general purpose
> register on ARM) then that may fail and the GC could end up collecting
> live data.
Ruby can't look into the jmpbuf, it's opaque.
If it's actually looking into the jmpbuf we can claim undefined
behaviour and shutdown the bug as a ruby issue.
I haven't seen any bespoke per-target code in Ruby that actually
looks into the jmpbuf, have you?
> I haven't managed to run the Ruby testsuite as it just seems to have
> loads of failures with or without the pointer encryption support. I
> guess I am running it wrong somehow.
All I know is that with the frame pointer mangling support the testsuite
went from bad to worse with tests SIGABRT'ing.
> I'll post a patch. If you could test it with Ruby that would be much
> appreciated.
I can forward it on and have it tested with Ruby.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list