Questions about JDK-8275008 fix

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Mon Sep 19 13:07:09 UTC 2022


On 2022-09-18 12:15, Roma Marchenko wrote:

> Hello,
>
> There was P4 JDK-8275008 (https://bugs.openjdk.org/browse/JDK-8275008) 
> about GKC 11 warning 'stringop-overflow' in gtest::Guarded Memory.
>
> It was fixed globally by disabling this warning for all openjdk 
> gtests, although in fact the only test required this fix. Moreover, 
> this wasn't a bug, because the test really does 'buffer overflow' to 
> check memory guards then.
>
> I realize that it's just a test, not a product, but anyway 
> '-Wstringop-overflow' is not '-Wundef', and I don't think that 
> disabling 'stringop-overflow' for all the tests is a good idea. Again, 
> as far as I see, there are no other  tests occurring this warning. Is 
> it better to disable the warning locally in the test on upstream and 
> add a comment describing expected behaviour regarding buffer overflow?
>
Unfortunately, there is currently no really nice way to disable a 
warning for a single test. In that case, you'd have to resort to pragmas.

This is a known limitation in the build system that I hope to be able to 
address in not a too far-off future.

/Magnus

> Thanks,
>
> Roman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20220919/6d36c75b/attachment.htm>


More information about the build-dev mailing list