[foreign-jextract] RFR: 8241442: jextract spuriously crashes

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Mar 23 13:10:03 UTC 2020


This patch fixes a spurious crash when running jextract; the problem is, again, related to the signal handlers
installed by libclang. While we disable those by calling clang_toggleCrashRecovery soon after index creation, this
leaves us exposed for the call to clang_createIndex itself, which set up the alternate handlers soon after function
enter. This means that, during that call, a bad interaction between hotspot generated signals and libclang signal
handlers can result in spurious VM crashes. This behavior started to become more apparent after this change:

https://github.com/openjdk/panama-foreign/pull/40

Although there's nothing wrong with these changes (but they probably trigger different optimizations to kick in).

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

Commit messages:
 - JDK-8241442: jextract spuriously crashes

Changes: https://git.openjdk.java.net/panama-foreign/pull/62/files
 Webrev: https://webrevs.openjdk.java.net/panama-foreign/62/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8241442
  Stats: 31 lines in 1 file changed: 30 ins; 1 del; 0 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/62.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/62/head:pull/62

PR: https://git.openjdk.java.net/panama-foreign/pull/62


More information about the panama-dev mailing list