Skip to content

Commit 07d0ef3

Browse files
author
Emmmer
committed
[LLDB][RISCV] Fix UndefinedBehaviorSanitizer in RISCVEmulatorTester
1 parent 70a64fe commit 07d0ef3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ void TestAtomic(RISCVEmulatorTester *tester, uint64_t inst, T rs1_val,
250250

251251
TEST_F(RISCVEmulatorTester, TestAtomicSequence) {
252252
this->WritePC(0x0);
253-
*(uint64_t *)this->memory = 0x100427af; // lr.w a5,(s0)
254-
*(uint64_t *)(this->memory + 4) = 0x00079663; // bnez a5,12
255-
*(uint64_t *)(this->memory + 8) = 0x1ce426af; // sc.w.aq a3,a4,(s0)
256-
*(uint64_t *)(this->memory + 12) = 0xfe069ae3; // bnez a3,-12
253+
*(uint32_t *)this->memory = 0x100427af; // lr.w a5,(s0)
254+
*(uint32_t *)(this->memory + 4) = 0x00079663; // bnez a5,12
255+
*(uint32_t *)(this->memory + 8) = 0x1ce426af; // sc.w.aq a3,a4,(s0)
256+
*(uint32_t *)(this->memory + 12) = 0xfe069ae3; // bnez a3,-12
257257
ASSERT_TRUE(this->DecodeAndExecute(*(uint32_t *)this->memory, false));
258258
ASSERT_EQ(this->gpr.gpr[0], uint64_t(16));
259259
}

0 commit comments

Comments
 (0)