Undefined behaviour in hotspot
Omair Majid
omajid at redhat.com
Mon Apr 21 18:30:56 UTC 2014
* David Chase <david.r.chase at oracle.com> [2014-04-21 13:53]:
>
> On 2014-04-21, at 12:17 PM, Omair Majid <omajid at redhat.com> wrote:
> > I can ping them, but honestly, I wouldn't be surprised at all if the
> > only response I get is "no". I don't have any official communication
> > channels with them, so my input is not any different from anyone else's.
> >
> > Can you elaborate on what flag/pragma you have in mind? Just something
> > to play nice with NULL pointers?
>
> Not just null pointers. Also optimizations that pretend that integer overflow
> doesn't happen (i.e., optimizations that change program behavior when it
> does) also need to be disabled.
My knowledge of C/C++ is fairly limited, so please bear with me. There
are a few relevant options already listed in 'man gcc':
-Wstrict-overflow=n
This option is only active when -fstrict-overflow is active.
It warns about cases where the compiler optimizes based on
the assumption that signed overflow does not occur
-fwrapv
This option instructs the compiler to assume that signed
arithmetic overflow of addition, subtraction and
multiplication wraps around using twos-complement
representation.
Do you mean others?
Thanks,
Omair
--
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681
More information about the hotspot-dev
mailing list