aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/graphKit.cpp
diff options
context:
space:
mode:
authorkvn <none@none>2009-02-05 14:43:58 -0800
committerkvn <none@none>2009-02-05 14:43:58 -0800
commit8de29d3d3828aae9d407dd20b538f23e1afe569d (patch)
tree5d92377e21f55e2ae25f2b54500059e7cff3772c /src/share/vm/opto/graphKit.cpp
parent0a4d82fa03e46e1776efb285fe037599ea93ed5a (diff)
downloadjdk8u_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.cpp28
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