This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Ruby testsuite failures because of pointer mangling on 32-bit ARM?
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 10 Dec 2013 13:28:09 -0500
- Subject: Re: Ruby testsuite failures because of pointer mangling on 32-bit ARM?
- Authentication-results: sourceware.org; auth=none
- References: <52A6732E dot 4030905 at redhat dot com> <CANu=DmgWNhyxq9vE37bvvD=PrDrfi0Y+eAMv0i2KZPxaEnEOxw at mail dot gmail dot com> <CANu=Dmi=8JB-=2M_SccqJtAo6Ueny37D-JE0jaG1ErqrNLQ3qQ at mail dot gmail dot com>
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.