Skip to content

Commit c3fc9c4

Browse files
committed
[GR-68255] [GR-63024] Enable UseConservativeUnsafeAccess by default
PullRequest: graal/21707
2 parents 494fbe7 + d31e141 commit c3fc9c4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/api/PointstoOptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Boolean o
141141
* cannot accurately track which fields can be unsafe accessed.
142142
*/
143143
@Option(help = "Conservative unsafe access injects all unsafe accessed fields with the instantiated subtypes of their declared type and saturates all unsafe loads.")//
144-
public static final OptionKey<Boolean> UseConservativeUnsafeAccess = new OptionKey<>(false);
144+
public static final OptionKey<Boolean> UseConservativeUnsafeAccess = new OptionKey<>(true);
145145

146146
@Option(help = "Deprecated, option no longer has any effect.", deprecated = true)//
147147
static final OptionKey<Boolean> UnresolvedIsError = new OptionKey<>(true);
@@ -197,6 +197,7 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, String ol
197197
MaxHeapContextDepth.update(values, 0);
198198
MinCallingContextDepth.update(values, 0);
199199
MaxCallingContextDepth.update(values, 0);
200+
UseConservativeUnsafeAccess.update(values, false);
200201
break;
201202

202203
case "_1obj":
@@ -205,6 +206,7 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, String ol
205206
MaxHeapContextDepth.update(values, 0);
206207
MinCallingContextDepth.update(values, 1);
207208
MaxCallingContextDepth.update(values, 1);
209+
UseConservativeUnsafeAccess.update(values, false);
208210
break;
209211

210212
case "_2obj1h":
@@ -213,6 +215,7 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, String ol
213215
MaxHeapContextDepth.update(values, 1);
214216
MinCallingContextDepth.update(values, 2);
215217
MaxCallingContextDepth.update(values, 2);
218+
UseConservativeUnsafeAccess.update(values, false);
216219
break;
217220

218221
case "_3obj2h":
@@ -221,6 +224,7 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, String ol
221224
MaxHeapContextDepth.update(values, 2);
222225
MinCallingContextDepth.update(values, 3);
223226
MaxCallingContextDepth.update(values, 3);
227+
UseConservativeUnsafeAccess.update(values, false);
224228
break;
225229

226230
case "_4obj3h":
@@ -229,6 +233,7 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, String ol
229233
MaxHeapContextDepth.update(values, 3);
230234
MinCallingContextDepth.update(values, 4);
231235
MaxCallingContextDepth.update(values, 4);
236+
UseConservativeUnsafeAccess.update(values, false);
232237
break;
233238

234239
default:

0 commit comments

Comments
 (0)