RFR: 8258382: Fix optimization-unstable code

Kim Barrett kbarrett at openjdk.java.net
Thu Dec 24 17:45:56 UTC 2020


On Thu, 24 Dec 2020 00:24:32 GMT, Hao Sun <github.com+16932759+shqking at openjdk.org> wrote:

> Optimization-unstable code refers to code that is unexpectedly discarded
> by compiler optimizations due to undefined behavior in the program.
> 
> We applied a static checker called STACK (prototype from SOSP'13 paper
> [1]) to OpenJDK source code and found the following eight sites of
> potential unstable code.
> 
> Removing undefined behaviors would make the code stable.
> 
> [1] https://css.csail.mit.edu/stack/
> 
> --------
> Note that we tested locally Jtreg tests ( tier1 and jdk::tier3) were passed on Linux x86/aarch64 machines after apply this patch.

I think there are somewhere between two and four distinct issues here
that should be dealt with in separate bugs and PRs (the number depends
on how the compiler folks might like things done). Their only relation
is that all were detected by the STACK tool. But they are in very
different parts of the code and probably ought to be reviewed by folks
from different teams.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1886


More information about the hotspot-dev mailing list