RFR: 8258382: Fix optimization-unstable code involving pointer overflow [v2]
Kim Barrett
kbarrett at openjdk.java.net
Fri Jan 1 03:52:03 UTC 2021
On Fri, 25 Dec 2020 10:32:09 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 two sites of
>> potential unstable code involving pointer overflow.
>>
>> 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.
>
> Hao Sun has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix unstable code involving pointer overflow only
>
> Move the patch involving singed integer overflow into another PR.
> In this patch we only fix optimization-unstable code involving pointer
> overflow.
>
> Update the patch based on feedback from upstream.
> 1) Remove unnecessary comment.
> 2) Remove unnecessary check between end() and top()
> 3) Use pointer_delta() to compute the offset between two addresses.
>
> Change-Id: Icade8e1a4b684081036c85fd2a2b65b5c3b27f54
> CustomizedGitHooks: yes
Marked as reviewed by kbarrett (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/1886
More information about the hotspot-gc-dev
mailing list