Re: [LTP] clone tests fails

Jiri Palecek
2010-01-07T01:26:01Z

Mike Frysinger napsal(a):
> On Tuesday 05 January 2010 22:26:44 Serge E. Hallyn wrote:
>> Quoting Jiri Palecek (jpalecek@web.de):
>>> Michal, I suspect the failures you see are somehow related to
>>> alignment (that your architecture doesn't like odd addresses). Is
>>> that right? Under x86, the address gets aligned (so some of the
>>> space is unused).
>>>
>>> Perhaps both of these behaviors should be tested by LTP?
>>
>> Gah, yes, Nathan had mentioned arches where this matters (including
>> some power?). Nathan, did you have a generic fix for this in
>> userspace? Should always be safe to do
>> (stack + stack_size - 1)& ~0xf
>> ?
>
> (sizeof(long double)-1) would probably be better than 0xf

sizeof(long double) is not a power of 2 (at least on 386), so this wouldn't
probably work. glibc hardcodes the alignment (to 16 on most arches).

Jiri Palecek