RFR: 8311301: MethodExitTest may fail with stack buffer overrun [v2]

Daniel Jeliński djelinski at openjdk.org
Wed Jul 5 06:40:11 UTC 2023


> Please review this test-only fix that fixes the size of variables that are used in methods that expect a pointer.
> 
> On Windows, type `long` is 32 bits, pointers are 64 bits large. The method `GetThreadLocalStorage` writes a pointer (64 bits) to the address given by its parameter, which overflows a `long`. The code generated by VS compiler ignores this, but the code generated by clang crashes the test.
> 
> No new tests. MethodExitTest continues to pass on supported platforms, and passes on clang+win with this fix.

Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:

  Use void* instead

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14770/files
  - new: https://git.openjdk.org/jdk/pull/14770/files/0b537cb1..e3a71308

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14770&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14770&range=00-01

  Stats: 19 lines in 1 file changed: 2 ins; 0 del; 17 mod
  Patch: https://git.openjdk.org/jdk/pull/14770.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14770/head:pull/14770

PR: https://git.openjdk.org/jdk/pull/14770


More information about the serviceability-dev mailing list