RFR: 8257794: Zero: assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1) failed: wrong on Linux/x86_32 [v2]
Aleksey Shipilev
shade at openjdk.java.net
Tue Dec 8 08:42:12 UTC 2020
On Mon, 7 Dec 2020 07:02:29 GMT, Jie Fu <jiefu at openjdk.org> wrote:
>> Hi all,
>>
>> Zero debug build on Linux/x86_32 is broken due to an incorrect assert [1].
>>
>> 'istate->_stack_limit' is set here [2] as 'stack->sp() - 1'.
>> 'istate->_thread->last_Java_sp()' is set here [3], which is actually 'stack->sp()' according to [4].
>>
>> So the correct assert should be:
>> assert(istate->_stack_limit == istate->_thread->last_Java_sp() - 1)
>>
>> It would be better to fix it.
>>
>> Testing:
>> - Zero fastdebug build passed on Linux/x86_32
>>
>> Thanks.
>> Best regards,
>> Jie
>>
>> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp#L422
>> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp#L819
>> [3] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp#L194
>> [4] https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp#L65
>
> Jie Fu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Make the assert generic
> - Merge branch 'master' into JDK-8257794
> - 8257794: Zero: assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1) failed: wrong on Linux/x86_32
After looking closer, I think this assert is not very useful, it is already disabled on all platforms except x86_32, and it is probably a leftover after many bulk Zero integrations. I think it is fine, safer, faster to remove it for all platforms. Do it, and I'll approve.
-------------
Changes requested by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1637
More information about the hotspot-runtime-dev
mailing list