RFR: 8346881: [ubsan] logSelection.cpp:154:24 / logSelectionList.cpp:72:94 : runtime error: applying non-zero offset 1 to null pointer [v3]

Matthias Baesken mbaesken at openjdk.org
Fri Jan 3 08:55:16 UTC 2025


> When running jtreg tests on macOS aarch64 with ubsanized binaries, the following error is reported :
> 
> 
> jdk/src/hotspot/share/logging/logSelection.cpp:154:24: runtime error: applying non-zero offset 1 to null pointer
> UndefinedBehaviorSanitizer:DEADLYSIGNAL
> UndefinedBehaviorSanitizer: nested bug in the same thread, aborting.
> 
> 
> (XCode 13.1 was used)
> 
> This can be seen e.g. in these jdk jtreg tests :
> jdk/internal/misc/CDS/ArchivedEnumTest.java
> jdk/jfr/event/gc/collection/TestGCGarbageCollectionEvent.java
> jdk/jfr/startupargs/TestDumpOnExit.java
> 
> There is another issue observed here (also when running on macOS aarch64) , seems this happens in the for loop when incrementing comma_pos
> " for (char *comma_pos = copy, *cur = copy; success && comma_pos != nullptr; cur = comma_pos + 1) { ..."
> 
> 
> src/hotspot/share/logging/logSelectionList.cpp:72:94: runtime error: applying non-zero offset 1 to null pointer
> UndefinedBehaviorSanitizer:DEADLYSIGNAL
> UndefinedBehaviorSanitizer: nested bug in the same thread, aborting.

Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:

  address iteration in logDecorators.cpp

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22903/files
  - new: https://git.openjdk.org/jdk/pull/22903/files/9fd0a5a3..e67c271e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22903&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22903&range=01-02

  Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/22903.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22903/head:pull/22903

PR: https://git.openjdk.org/jdk/pull/22903


More information about the hotspot-runtime-dev mailing list