[lworld] RFR: 8271324: [lworld] java/foreign/* tests fail with "guarantee(sect->end() <= tend) failed: sanity"

Tobias Hartmann thartmann at openjdk.java.net
Wed Jul 28 07:28:54 UTC 2021


We hit an assert because the code generated for "upcall_stub_linkToNative" does not fit into the code buffer. That's because we are currently saving all registers before the slow call in the GC barriers:
https://github.com/openjdk/valhalla/blob/8efeb68ef0594c2c7c20bc2e45c112d6ef623b2b/src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp#L206-L211

https://github.com/openjdk/valhalla/blob/8efeb68ef0594c2c7c20bc2e45c112d6ef623b2b/src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp#L332-L337

I've doubled the buffer size to be on the safe side and filed [JDK-8271370](https://bugs.openjdk.java.net/browse/JDK-8271370) to investigate if we can avoid saving all registers in all cases.

Thanks,
Tobias

-------------

Commit messages:
 - 8271324: [lworld] java/foreign/* tests fail with "guarantee(sect->end() <= tend) failed: sanity"

Changes: https://git.openjdk.java.net/valhalla/pull/503/files
 Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=503&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8271324
  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/503.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/503/head:pull/503

PR: https://git.openjdk.java.net/valhalla/pull/503


More information about the valhalla-dev mailing list