[Bug target/88234] UBsan and runtime error: signed integer overflow using unsigned vector
noloader at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 29 13:12:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88234
--- Comment #8 from Jeffrey Walton <noloader at gmail dot com> ---
(In reply to Segher Boessenkool from comment #4)
> This is documented in the ELFv2 ABI, linked from
> https://gcc.gnu.org/readings.html .
>
> ...
> (The vec_vsx_st doesn't have to do with the problem btw. Not that it is
> good or anything ;-) )
Yeah, I tried to convert to the C/C++ pointer dereference pattern several times
as shown in the literature. I.e., this:
byte x[16];
uint8x16_p cc = (uint8x16_p)c;
*(uint8x16_p*) &x[0] = cc;
Instead of this:
byte x[16];
vec_vsx_st((uint8x16_p)c, 0, x);
It breaks a lot of our self tests for certain versions of a particular
compiler. I narrowed it down to the loads but I could not take it further and
develop a reduced case. I don't have the skill to untangle what is happening in
ppc asm at -O3.
If you want to see something really obscene, then take a look at
https://github.com/weidai11/cryptopp/blob/master/ppc_simd.h#L251 .
(If you are talking about something else that is wrong or bad, then please
point it out.)
More information about the Gcc-bugs
mailing list