Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(0.25.0) Change TR_ASSERT_FATAL into failCompilation call
`findOrCreateShadowSymbol()` tries to reuse symrefs produced by `findOrFabricateShadowSymbol()` when the shadow corresponds to the same field. Detecting that the fields are in fact the same requires checking that the defining class is the same. Normally, the expectation is that if a cp field ref is resolved, then the cp ref pointing to the defining class must also be resolved. However, in eclipse-openj9#9416, it appears as though this may not always be the case, which triggers an assert. As a temporary work around, the assert is changed to an abort compilation to avoid taking the JVM. Because the assert is useful for detecting such cases, this patch is only submitted for the release branch so that further investigation can continue on the main development branch. The mainline code uses a different assert when compiling relocatable code to add extra debug information to the assert message in those cases. Since this commit effectively hides any occurrences of the issue reported in eclipse-openj9#9416, I don't believe there is any value in keeping the extra debug information. So, I've simplified the two asserts back into a single check that throws an exception of failure. Signed-off-by: Leonardo Banderali <leonardo2718@protonmail.com>
- Loading branch information