[PATCH] s390: Fix build warning with gcc6 in jmpbuf-unwind.h.
Stefan Liebler
stli@linux.vnet.ibm.com
Fri Jul 24 08:15:00 GMT 2015
On 07/23/2015 08:20 PM, Carlos O'Donell wrote:
> On 07/23/2015 05:11 AM, Andreas Schwab wrote:
>> Stefan Liebler <stli@linux.vnet.ibm.com> writes:
>>
>>> On 07/23/2015 10:30 AM, Andreas Schwab wrote:
>>>> Stefan Liebler <stli@linux.vnet.ibm.com> writes:
>>>>
>>>>> This patch casts _Unwind_GetCFA return to _Unwind_Ptr first
>>>>
>>>> How can a cast fix a truncated pointer value on s390x?
>>>>
>>>> Andreas.
>>>>
>>> Why is the pointer truncated on s390x? All three types
>>> _Unwind_Word, _Unwind_Ptr and void * have a size of 4bytes on
>>> s390 and 8 bytes on s390x.
>>
>> Then why do you get a warning?
>
> Agreed.
>
> Why do you get a warning if the types are, as you claim, the same
> size?
>
> I don't disagree that they are the same size, since the code is
> generic and `typedef unsigned _Unwind_Word
> __attribute__((__mode__(__word__)));` should result in the values you
> quote.
>
> If it's a compiler defect then rather than a cast you need to file a
> bug and disable the warning with the glibc diagnostic macros and
> include rationale for that points at the gcc bug.
>
> Cheers, Carlos.
>
>
The used gcc-head was configured with "--with-mode=zarch". There is
something broken in this mode. After the brasl to _Unwind_GetCFA,
it loads r2 with a value from stack. But r2 is normally used as return
value after a function call. I'll forward this issue.
I've build glibc on s390-32 with gcc-head with esa mode and there is no
warning. And here the value from stack is loaded to r3 and r2 is used as
return value of _Unwind_GetCFA.
Please ignore this patch!
Thanks.
Bye Stefan
More information about the Libc-alpha
mailing list