[jdk21u-dev] RFR: 8333887: ubsan: unsafe.cpp:247:13: runtime error: store to null pointer of type 'volatile int' [v4]

Aleksey Shipilev shade at openjdk.org
Fri Jul 12 10:55:51 UTC 2024


On Fri, 12 Jul 2024 10:50:18 GMT, luwang1103 <duke at openjdk.org> wrote:

>> hi @shipilev ,
>> 
>> This pull request contains a backport of commit [0d3a3771](https://git.openjdk.org/jdk/commit/0d3a3771c3777d3dd1fec8dc8faed5fd02b06830) from the [master](https://github.com/openjdk/jdk) repository.
>> 
>> The commit being backported was authored by Matthias Baesken on 13 Jun 2024.
>> 
>> Thanks!
>
> luwang1103 has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Backport 0d3a3771c3777d3dd1fec8dc8faed5fd02b06830

Spot the difference, this is original change:


  // we use this method at some places for writing to 0 e.g. to cause a crash;
  // ubsan does not know that this is the desired behavior
#if defined(__clang__) || defined(__GNUC__)
__attribute__((no_sanitize("undefined")))
#endif


Current PR misses two spaces before `//` comments:


// we use this method at some places for writing to 0 e.g. to cause a crash;
// ubsan does not know that this is the desired behavior
#if defined(__clang__) || defined(__GNUC__)
__attribute__((no_sanitize("undefined")))
#endif


This might sound like odd thing to get right, but matching the indenting _exactly_ would make your follow-up backport in the same place clean. Make sure you have the new hunks _exactly_ the same.

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

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/837#issuecomment-2225323282


More information about the jdk-updates-dev mailing list