Mercurial > hg > truffle
diff src/share/vm/opto/graphKit.cpp @ 565:7fe62bb75bf4
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
author | kvn |
---|---|
date | Thu, 05 Feb 2009 14:43:58 -0800 |
parents | 1b9fc6e3171b |
children | dca06e7f503d |
line wrap: on
line diff
--- a/src/share/vm/opto/graphKit.cpp Thu Feb 05 13:38:52 2009 -0800 +++ b/src/share/vm/opto/graphKit.cpp Thu Feb 05 14:43:58 2009 -0800 @@ -2942,16 +2942,10 @@ // 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 @@ // 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