Skip to content

Commit

Permalink
[RISC-V] UMEntryThunkCode::Poison() (#91221)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-mustafin authored Aug 30, 2023
1 parent 533a461 commit 526e6d3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/coreclr/vm/riscv64/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,15 @@ void UMEntryThunkCode::Encode(UMEntryThunkCode *pEntryThunkCodeRX, BYTE* pTarget

void UMEntryThunkCode::Poison()
{
_ASSERTE(!"RISCV64: not implementation on riscv64!!!");
ExecutableWriterHolder<UMEntryThunkCode> thunkWriterHolder(this, sizeof(UMEntryThunkCode));
UMEntryThunkCode *pThisRW = thunkWriterHolder.GetRW();

pThisRW->m_pTargetCode = (TADDR)UMEntryThunk::ReportViolation;

// ld a0, 24(t6)
pThisRW->m_code[1] = 0x018fb503;

ClrFlushInstructionCache(&m_code,sizeof(m_code));
}

#endif // DACCESS_COMPILE
Expand Down

0 comments on commit 526e6d3

Please sign in to comment.