RFR: 8334239: Introduce macro for ubsan method/function exclusions [v2]
Matthias Baesken
mbaesken at openjdk.org
Mon Jun 17 10:27:23 UTC 2024
On Mon, 17 Jun 2024 06:49:41 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> A number of functions/methods have to be excluded from ubsan detection (e.g. because they do things that ubsan warns about, however it is still valid what is done there).
>> We can simplify this by introducing a macro (similar to asan-related ATTRIBUTE_NO_ASAN, see sanitizers/address.hpp).
>> Currently something like this is used :
>>
>> #if defined(__clang__) || defined(__GNUC__)
>> __attribute__((no_sanitize("undefined")))
>> #endif
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> move ATTRIBUTE_NO_UBSAN to a separate line
Under 'sanitizers' there would be a header for one sanitizer called 'ubsan' - that naming might be a little redundant but would still make sense because that#s the name of the tool ; but I can live with both ub.hpp or ubsan.hpp .
Are there any other opinions ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19722#issuecomment-2172991559
More information about the hotspot-dev
mailing list