openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

Allow SVM assertions to be ignored

Open cjjdespres opened this issue 1 year ago • 1 comments
trafficstars

If the option TR_IgnoreAssert is enabled for a particular compilation and the environment variable TR_svmAssertionsAreFatal is not set, SVM assertions will now be non-fatal even in DEBUG or PROD_WITH_ASSUMES builds. This matches the behaviour of normal TR_ASSERT assertions, aside from the possibility of overriding TR_IgnoreAssert with that environment variable.

cjjdespres avatar Aug 28 '24 17:08 cjjdespres

Attn @mpirvu. Since SVM assertions are non-fatal by default, I think it makes sense to allow them to be ignored with TR_IgnoreAssert like other non-fatal assertions - the definition of TR::assertion is here. Maybe @dsouzai could also comment.

cjjdespres avatar Aug 28 '24 17:08 cjjdespres

Looks reasonable to me.

dsouzai avatar Sep 03 '24 17:09 dsouzai

jenkins test sanity zlinux jdk17

mpirvu avatar Sep 04 '24 12:09 mpirvu

jenkins test sanity zlinux jdk17

mpirvu avatar Sep 04 '24 13:09 mpirvu

I don't understand why the zlinux build failed.

mpirvu avatar Sep 05 '24 13:09 mpirvu

jenkins test sanity zlinux jdk17

mpirvu avatar Sep 05 '24 13:09 mpirvu

12:12:18  /home/jenkins/workspace/Build_JDK17_s390x_linux_Personal/openj9/runtime/compiler/runtime/SymbolValidationManager.cpp: In static member function 'static bool TR::SymbolValidationManager::assertionsAreFatal()':
12:12:18  /home/jenkins/workspace/Build_JDK17_s390x_linux_Personal/openj9/runtime/compiler/runtime/SymbolValidationManager.cpp:1607:4: error: control reaches end of non-void function [-Werror=return-type]

pshipton avatar Sep 05 '24 14:09 pshipton

The build failed because in a non-debug configuration there would be no return at the end of the function if fatal were false. I've force-pushed to supply the missing return. (I tested this with a debug build, so didn't catch that).

cjjdespres avatar Sep 05 '24 14:09 cjjdespres

jenkins test sanity zlinux jdk17

mpirvu avatar Sep 05 '24 14:09 mpirvu