JDK-8234967 : [test] ShowRegistersOnAssertTest fails on ARM32
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: aarch32
  • Submitted: 2019-11-28
  • Updated: 2019-11-28
  • Resolved: 2019-11-28
Related Reports
Duplicate :  
Description
The test ShowRegistersOnAssertTest fails on ARM32, because on that platform, the BREAKPOINT macro emits a "bkpt" instruction [1]. BREAKPOINT is used at the end of every assert [2] and because the test suppresses errors, the bkpt instruction is executed.
Because of that, the JVM receives SIGTRAP and core dumps:

$ ./jdk-fastdebug-bkpt/bin/java -XX:+UnlockDiagnosticVMOptions -Xmx100M -XX:-CreateCoredumpOnCrash -XX:ErrorHandlerTest=3 -XX:SuppressErrorAt=/vmError.cpp -XX:-ShowRegistersOnAssert -version
Trace/breakpoint trap (core dumped)

As far as I can see, ARM32 is the only platform on which the BREAKPOINT macro has a special definition.

[1] https://hg.openjdk.java.net/jdk/jdk/file/219ec11136d9/src/hotspot/cpu/arm/globalDefinitions_arm.hpp#l61
[2] https://hg.openjdk.java.net/jdk/jdk/file/219ec11136d9/src/hotspot/share/utilities/debug.hpp#l59
Comments
Sorry, didn't see that there is already an open issue about this.
28-11-2019