RFR: 8360791: [ubsan] Adjust signal handling when using clang [v2]
Matthias Baesken
mbaesken at openjdk.org
Mon Jun 30 07:06:38 UTC 2025
On Mon, 30 Jun 2025 07:02:31 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> A couple of tests e.g. VendorInfoPluginsTest but also some Hotspot like runtime/ErrorHandling/CreateCoredumpOnCrash.java put (write) to special addresses like 0 to provoke crashs.
>> However this does not work well with ubsan-enabled binaries on the clang based platforms (macOS, AIX).
>> The mentioned tests generate a SIGSEGV.
>>
>> Some other tests generate a SIGBUS, e.g.
>>
>> runtime/memory/ReserveMemory.java
>> runtime/memory/ReadFromNoaccessArea.java
>>
>> and this leads to similar issues with ubsan-enabled binaries.
>>
>> We should adjust the signal handling with the sanitizer options, how to do this is documented here :
>> https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove the clang check
> > I wonder if this should be unconditional, rather than conditional on **clang**.
>
> At least it did not do harm on Linux x86_64/gcc when making it unconditional.
I removed the clang check and made the addition unconditional.
Regarding other signals than SIGBUS and SIGSEGV I did not see issues with those in the jtreg tests.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26015#issuecomment-3018033591
More information about the build-dev
mailing list