RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

Justin King jcking at openjdk.org
Wed Jan 4 13:57:50 UTC 2023


On Wed, 4 Jan 2023 06:21:26 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Justin King has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Exclude more zapping when ASan is in use
>>   
>>   Signed-off-by: Justin King <jcking at google.com>
>
> src/hotspot/share/sanitizers/address.h line 56:
> 
>> 54: #else
>> 55: // NOOP implementation which preserves the arguments, ensuring they still compile, but ensures they
>> 56: // are stripped due to being unreachable.
> 
> Why is this necessary?

This helps with maintenance. All builds will still compile the `addr` and `size` statements, ensuring they are valid, but will strip them when ASan is not enabled. In the event that refactoring occurs and one of the statements becomes invalid due to a method renaming for example, but the refactorer misses it, the build will still fail.

Mostly to help avoid requiring people to build with ASan to ensure it still works.

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

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



More information about the build-dev mailing list