RFR: 8310275: Bug in assignment operator of ReservedMemoryRegion

Johan Sjölen jsjolen at openjdk.org
Wed Jul 19 09:20:46 UTC 2023


On Tue, 13 Jun 2023 07:33:12 GMT, Ralf Schmelter <rschmelter at openjdk.org> wrote:

> 8310275: Bug in assignment operator of ReservedMemoryRegion

Hi,

Instead of having this be `TEST_VM`, why not simply have it be a regular `TEST`? Then you avoid interference from the VM. You'd only have to ensure that `VirtualMemoryTracker::initailize` is called first. 

Edit:

Or perhaps even simpler: Run the test while holding `ThreadCritical`.

test/hotspot/gtest/nmt/test_virtualMemoryTracker.cpp line 38:

> 36: }
> 37: 
> 38: TEST_VM(VirtualMemoryTracker, missing_remove_released_region) {

Hi, I know that this isn't commonly done in OpenJDK but please type test case names in PascalCase. See: https://github.com/google/googletest/blob/main/docs/faq.md

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

PR Review: https://git.openjdk.org/jdk/pull/14440#pullrequestreview-1514432333
PR Review Comment: https://git.openjdk.org/jdk/pull/14440#discussion_r1253055359


More information about the hotspot-runtime-dev mailing list