Undefined behaviour in hotspot
david.r.chase at oracle.com
Mon Apr 21 17:53:13 UTC 2014
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.
>> So, step one is to locate all the places where undefined behavior
>> occurs, and then we have to figure out what to do next, but we can't
>> do anything without knowing the full scope of the problem.
> Static analysis tools would come in handy here:
> - gcc's -fsanitize=address|thread|undefined
> - clang static analyzer
> - cppcheck
> - coverity
> Should I start running whatever tools I can get my hands on and
> gathering results?
It would be interesting and probably useful. I don't recommend going
after printf formats quite yet, since I'm trying to clean those up right now
(and you would be horrified).
More information about the hotspot-dev