RFR: 8302262: Remove -XX:SuppressErrorAt develop option

Thomas Stuefe stuefe at openjdk.org
Sat Feb 11 05:43:26 UTC 2023


On Sat, 11 Feb 2023 03:17:38 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change which removes the -XX:SuppressErrorAt develop option
> and the associated implementation.

While I have used it rarely, I found it useful the few times I did.

Its useful in situations where I analyzed a problem, ran into an assert, but obtaining a new build was difficult or just time-consuming - slow hardware, or a customer's machine. E.g., I used this switch when porting to AIX since rebuilding the VM took about an hour and some asserts could be waived.

Quoting from[ JDK-8302189](https://bugs.openjdk.org/browse/JDK-8302189):
> "This also addresses the problems encountered in [JDK-8294031](https://bugs.openjdk.org/browse/JDK-8294031). Because the failure reporting function used by assert is not "noreturn", the compiler is analyzing the continuation from a failed assert as potentially having the values that would result in an assertion failure (in this case, a variable having a null value). Doing so, it discovers a use of that variable in a context where a null value is UB, and so issues a warning."

I don't understand why this is not a problem for release builds. Relying on assert in this case is not sufficient anyway, you'd need to handle the nullptr in release builds too.

> "This matters even for production, since some of the operations (such as `guarantee` and `ShouldNotReachHere`) are present in product builds, not just debug builds. "

I can see that. But `guarantee` is rare, so maybe a compromise would be to make `guarantee` `noreturn` but leave `assert` as it is?

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

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


More information about the hotspot-dev mailing list