Skip to content

[mono][llvm] disable implicit null checks #105544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ public static void Value_ThrownException_DoesntCreateValue_PublicationOnly()
Assert.False(lazy.IsValueCreated);
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/105251", TestPlatforms.tvOS)]
[Fact]
public static void EnsureInitialized_SimpleRefTypes()
{
Expand Down Expand Up @@ -417,7 +416,6 @@ public static void EnsureInitialized_SimpleRefTypes()
Assert.Equal(strTemplate, d);
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/105251", TestPlatforms.tvOS)]
[Fact]
public static void EnsureInitialized_SimpleRefTypes_Invalid()
{
Expand All @@ -430,7 +428,6 @@ public static void EnsureInitialized_SimpleRefTypes_Invalid()
Assert.Throws<MissingMemberException>(() => LazyInitializer.EnsureInitialized(ref ndc));
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/105251", TestPlatforms.tvOS)]
[Fact]
public static void EnsureInitialized_ComplexRefTypes()
{
Expand Down Expand Up @@ -487,7 +484,6 @@ public static void EnsureInitialized_ComplexRefTypes()
Assert.Null(LazyInitializer.EnsureInitialized(ref e, ref einit, ref elock, () => { initCount++; return null; }));
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/105251", TestPlatforms.tvOS)]
[Fact]
public static void EnsureInitialized_ComplexRefTypes_Invalid()
{
Expand All @@ -498,7 +494,6 @@ public static void EnsureInitialized_ComplexRefTypes_Invalid()
Assert.Throws<MissingMemberException>(() => LazyInitializer.EnsureInitialized(ref ndc, ref ndcInit, ref ndcLock));
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/105251", TestPlatforms.tvOS)]
[Fact]
public static void LazyInitializerComplexValueTypes()
{
Expand Down Expand Up @@ -553,7 +548,6 @@ public static void Ctor_Value_ValueType()
VerifyLazy(lazyObject, 123, hasValue: true, isValueCreated: true);
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/105251", TestPlatforms.tvOS)]
[Fact]
public static void EnsureInitialized_FuncInitializationWithoutTrackingBool_Uninitialized()
{
Expand All @@ -565,7 +559,6 @@ public static void EnsureInitialized_FuncInitializationWithoutTrackingBool_Unini
Assert.NotNull(syncLock);
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/105251", TestPlatforms.tvOS)]
[Fact]
public static void EnsureInitialized_FuncInitializationWithoutTrackingBool_Initialized()
{
Expand All @@ -577,7 +570,6 @@ public static void EnsureInitialized_FuncInitializationWithoutTrackingBool_Initi
Assert.Null(syncLock);
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/105251", TestPlatforms.tvOS)]
[Fact]
public static void EnsureInitializer_FuncInitializationWithoutTrackingBool_Null()
{
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/aot-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ arch_init (MonoAotCompile *acfg)
acfg->flags = (MonoAotFileFlags)(acfg->flags | MONO_AOT_FILE_FLAG_CODE_EXEC_ONLY);
#endif
#endif
g_string_append (acfg->llc_args, " -enable-implicit-null-checks -disable-fault-maps");
g_string_append (acfg->llc_args, " -disable-fault-maps");

if (mono_use_fast_math) {
// same parameters are passed to opt and LLVM JIT
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini.c
Original file line number Diff line number Diff line change
Expand Up @@ -3205,7 +3205,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
/* coop requires loop detection to happen */
if (mini_safepoints_enabled ())
cfg->opt |= MONO_OPT_LOOP;
cfg->disable_llvm_implicit_null_checks = mini_debug_options.llvm_disable_implicit_null_checks;
cfg->disable_llvm_implicit_null_checks = TRUE; // mini_debug_options.llvm_disable_implicit_null_checks;
if (cfg->backend->explicit_null_checks || mini_debug_options.explicit_null_checks) {
/* some platforms have null pages, so we can't SIGSEGV */
cfg->explicit_null_checks = TRUE;
Expand Down
Loading