RFR: 8293660: Fix frame::sender_for_compiled_frame frame size assert [v2]
Aleksey Shipilev
shade at openjdk.org
Tue Sep 13 06:08:33 UTC 2022
> The condition and assert messages are contradicting each other here:
>
>
> frame frame::sender_for_compiled_frame(RegisterMap* map) const {
> ...
> assert(_cb->frame_size() >= 0, "must have non-zero frame size");
> intptr_t* sender_sp = unextended_sp() + _cb->frame_size();
>
>
> I found this in x86_32 Loom port, where a entry generator bug caused zero-sized frames. I believe the assert message is correct, and the condition is not: sender SP should be different from (unextended) SP. In fact, if allowed to proceed, the tests can then fail the later assert, assuming `sp() == unextended_sp()`:
>
>
> assert(sender_sp != sp(), "must have changed");
>
>
> This code predates OpenJDK history, and assert was copy-pasted in this form to many arches.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug `tier1`
Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
Also fix SA agent
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/10242/files
- new: https://git.openjdk.org/jdk/pull/10242/files/be483145..b9d0390f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=10242&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=10242&range=00-01
Stats: 4 lines in 4 files changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/10242.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10242/head:pull/10242
PR: https://git.openjdk.org/jdk/pull/10242
More information about the hotspot-dev
mailing list