In mutex.cpp, method Monitor::check_block_state() is defined for non products builds (PRODUCT flag not defined), but the bool value _allow_vm_block used inside that method is only properly set if the ASSERT flag is defined.
For optimized builds (both PRODUCT and ASSERT not defined) check_block_state() prints incorrect warnings because _allow_vm_block is wrongly initialized.
For optimized builds (both PRODUCT and ASSERT not defined) check_block_state() prints incorrect warnings because _allow_vm_block is wrongly initialized.