From d31e14114dcd965bc8d4183caab6343277866d2a Mon Sep 17 00:00:00 2001 From: David Kozak Date: Wed, 30 Jul 2025 21:36:06 +0200 Subject: [PATCH] enable UseConservativeUnsafeAccess by default in all optimization levels --- .../src/com/oracle/graal/pointsto/api/PointstoOptions.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/api/PointstoOptions.java b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/api/PointstoOptions.java index df02569d0e7d..3da19607709c 100644 --- a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/api/PointstoOptions.java +++ b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/api/PointstoOptions.java @@ -141,7 +141,7 @@ protected void onValueUpdate(EconomicMap, Object> values, Boolean o * cannot accurately track which fields can be unsafe accessed. */ @Option(help = "Conservative unsafe access injects all unsafe accessed fields with the instantiated subtypes of their declared type and saturates all unsafe loads.")// - public static final OptionKey UseConservativeUnsafeAccess = new OptionKey<>(false); + public static final OptionKey UseConservativeUnsafeAccess = new OptionKey<>(true); @Option(help = "Deprecated, option no longer has any effect.", deprecated = true)// static final OptionKey UnresolvedIsError = new OptionKey<>(true); @@ -197,6 +197,7 @@ protected void onValueUpdate(EconomicMap, Object> values, String ol MaxHeapContextDepth.update(values, 0); MinCallingContextDepth.update(values, 0); MaxCallingContextDepth.update(values, 0); + UseConservativeUnsafeAccess.update(values, false); break; case "_1obj": @@ -205,6 +206,7 @@ protected void onValueUpdate(EconomicMap, Object> values, String ol MaxHeapContextDepth.update(values, 0); MinCallingContextDepth.update(values, 1); MaxCallingContextDepth.update(values, 1); + UseConservativeUnsafeAccess.update(values, false); break; case "_2obj1h": @@ -213,6 +215,7 @@ protected void onValueUpdate(EconomicMap, Object> values, String ol MaxHeapContextDepth.update(values, 1); MinCallingContextDepth.update(values, 2); MaxCallingContextDepth.update(values, 2); + UseConservativeUnsafeAccess.update(values, false); break; case "_3obj2h": @@ -221,6 +224,7 @@ protected void onValueUpdate(EconomicMap, Object> values, String ol MaxHeapContextDepth.update(values, 2); MinCallingContextDepth.update(values, 3); MaxCallingContextDepth.update(values, 3); + UseConservativeUnsafeAccess.update(values, false); break; case "_4obj3h": @@ -229,6 +233,7 @@ protected void onValueUpdate(EconomicMap, Object> values, String ol MaxHeapContextDepth.update(values, 3); MinCallingContextDepth.update(values, 4); MaxCallingContextDepth.update(values, 4); + UseConservativeUnsafeAccess.update(values, false); break; default: