Integrated: 8274785: ciReplay: Potential crash due to uninitialized Compile::_ilt variable
Christian Hagedorn
chagedorn at openjdk.java.net
Fri Oct 8 14:54:09 UTC 2021
On Thu, 7 Oct 2021 14:52:57 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> While working on JDK-8272912 and inserting `assert(false)` on various places for testing purposes, I noticed the following segmentation fault in one case:
>
> The inline tree `Compile::_ilt` variable is not initialized directly by the initializer list but only later in `Compile::Compile()` when calling
>
> _ilt = InlineTree::build_inline_tree_root();
>
> Before this assignment, `_ilt` can contain garbage (i.e. `!= NULL`). When hitting an assert or crash before returning from `build_inline_tree_root()`, replay compilation is trying to dump the inline tree and fails to notice that the inline tree is still uninitialized. This can result in a segmentation fault when accessing `_ilt`.
>
> Thanks,
> Christian
This pull request has now been integrated.
Changeset: 36b89a18
Author: Christian Hagedorn <chagedorn at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/36b89a18931d42b8002a843ec8218b5c1ba54374
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
8274785: ciReplay: Potential crash due to uninitialized Compile::_ilt variable
Reviewed-by: neliasso, kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/5852
More information about the hotspot-compiler-dev
mailing list