Skip to content

Commit

Permalink
[jit] Emit a null check for stelem instructions. (dotnet#46817)
Browse files Browse the repository at this point in the history
Part of the fix for dotnet#46766.
  • Loading branch information
vargaz committed Jan 20, 2021
1 parent 6fe3b9a commit c4421ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mono/mono/mini/memory-access.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ mini_emit_memory_store (MonoCompile *cfg, MonoType *type, MonoInst *dest, MonoIn
} else if (!mini_debug_options.weak_memory_model && mini_type_is_reference (type) && cfg->method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER)
mini_emit_memory_barrier (cfg, MONO_MEMORY_BARRIER_REL);

MONO_EMIT_NULL_CHECK (cfg, dest->dreg, FALSE);

if ((ins_flag & MONO_INST_UNALIGNED) && !COMPILE_LLVM (cfg)) {
MonoInst *addr, *mov, *tmp_var;

Expand Down

0 comments on commit c4421ac

Please sign in to comment.