On Fri, 24 Mar 2023 11:36:24 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/JDK-8291555-v2' into JDK-8291555-v2 >> - Set condition flags correctly after fast-lock call on aarch64 > > src/hotspot/share/runtime/lockStack.cpp line 42: > >> 40: >> 41: #ifndef PRODUCT >> 42: void LockStack::validate(const char* msg) const { > > Would you also like to check there are no `nullptr` elements on stack here? Please also verify against over- and underflow, and better than just null checks check that every oop really is an oop. I added this to my code: assert((_offset <= end_offset()), "lockstack overflow: _offset %d end_offset %d", _offset, end_offset()); assert((_offset >= start_offset()), "lockstack underflow: _offset %d end_offset %d", _offset, start_offset()); int end = to_index(_offset); for (int i = 0; i < end; i++) { assert(oopDesc::is_oop(_base[i]), "index %i: not an oop (" PTR_FORMAT ")", i, p2i(_base[i])); ... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1147841666