On Tue, 20 Aug 2024 07:33:06 GMT, Afshin Zafari <azaf...@openjdk.org> wrote:
>> src/hotspot/share/nmt/nmtNativeCallStackStorage.hpp line 94: >> >>> 92: if (si._stack_index < 0 || si._stack_index >= _stacks.length()) { >>> 93: return _fake_stack; >>> 94: } >> >> Is that a leftover from debugging? >> >> Shouldn't this be an `assert` in final code? > > You are right. Since the next lines check the `-1` as special case; this > check should be either an `assert` or logged. I wait for @jdksjolen, as this > is his code. Old code, delete it. No logging for this. You can always add an assert for `si._stack_index >= _stacks.length()`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20425#discussion_r1731029704