diff options
author | kvn <none@none> | 2009-02-05 14:43:58 -0800 |
---|---|---|
committer | kvn <none@none> | 2009-02-05 14:43:58 -0800 |
commit | 8de29d3d3828aae9d407dd20b538f23e1afe569d (patch) | |
tree | 5d92377e21f55e2ae25f2b54500059e7cff3772c /src/share/vm/opto/graphKit.cpp | |
parent | 0a4d82fa03e46e1776efb285fe037599ea93ed5a (diff) | |
download | jdk8u_hotspot-8de29d3d3828aae9d407dd20b538f23e1afe569d.tar.gz |
6799693: Server compiler leads to data corruption when expression throws an Exception
Summary: Use merged memory state for an allocation's slow path.
Reviewed-by: never
Diffstat (limited to 'src/share/vm/opto/graphKit.cpp')
-rw-r--r-- | src/share/vm/opto/graphKit.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp index d5d03d68c..0b19ae59c 100644 --- a/src/share/vm/opto/graphKit.cpp +++ b/src/share/vm/opto/graphKit.cpp @@ -2942,16 +2942,10 @@ Node* GraphKit::new_instance(Node* klass_node, // Now generate allocation code - // With escape analysis, the entire memory state is needed to be able to - // eliminate the allocation. If the allocations cannot be eliminated, this - // will be optimized to the raw slice when the allocation is expanded. - Node *mem; - if (C->do_escape_analysis()) { - mem = reset_memory(); - set_all_memory(mem); - } else { - mem = memory(Compile::AliasIdxRaw); - } + // The entire memory state is needed for slow path of the allocation + // since GC and deoptimization can happened. + Node *mem = reset_memory(); + set_all_memory(mem); // Create new memory state AllocateNode* alloc = new (C, AllocateNode::ParmLimit) @@ -3088,16 +3082,10 @@ Node* GraphKit::new_array(Node* klass_node, // array klass (maybe variable) // Now generate allocation code - // With escape analysis, the entire memory state is needed to be able to - // eliminate the allocation. If the allocations cannot be eliminated, this - // will be optimized to the raw slice when the allocation is expanded. - Node *mem; - if (C->do_escape_analysis()) { - mem = reset_memory(); - set_all_memory(mem); - } else { - mem = memory(Compile::AliasIdxRaw); - } + // The entire memory state is needed for slow path of the allocation + // since GC and deoptimization can happened. + Node *mem = reset_memory(); + set_all_memory(mem); // Create new memory state // Create the AllocateArrayNode and its result projections AllocateArrayNode* alloc |