A unit test from Capstone2LlvmIrTranslatorArm64Tests sometimes unexpectedly fails
- Dominant language
- C++
- Stars
- 8.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
The following unit test sometimes unexpectedly fails (see e.g. [this TC build](https://retdec-tc.avast.com/viewLog.html?buildId=2875&tab=buildLog&buildTypeId=Retdec_MacBuild&logTab=tree&filter=all&_focus=6821)):
```
$ ./retdec-tests-runner.py
Running all unit tests in retdec/build/install/bin...
[..]
retdec-tests-capstone2llvmir
retdec/tests/capstone2llvmir/capstone2llvmir_tests.h:609: Failure
Expected equality of these values:
val.ui
Which is: 4294901760
getRegisterValueUnsigned(reg)
Which is: 4290772992
register = x0
function: ""
bb: "bb"
0 : store volatile i64 0, i64* @0
4294967295 : %0 = load i64, i64* @x1
4294967295 : %1 = trunc i64 %0 to i32
65535 : %2 = load i64, i64* @x2
65535 : %3 = trunc i64 %2 to i32
4290772992 : %4 = shl i32 %3, 22
4194303 : %5 = xor i32 %4, -1
4290772992 : %6 = xor i32 %1, %5
4290772992 : %7 = zext i32 %6 to i64
4290772992 : store i64 %7, i64* @x0
unknown : ret void
[ FAILED ] InstantiateArm64WithAllModes/Capstone2LlvmIrTranslatorArm64Tests.ARM64_INS_EON32_r_r_r/CS_MODE_ARM, where GetParam() = 0 (3 ms)
[ PASSED ] 3756 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] InstantiateArm64WithAllModes/Capstone2LlvmIrTranslatorArm64Tests.ARM64_INS_EON32_r_r_r/CS_MODE_ARM, where GetParam() = 0
1 FAILED TEST
```
It seems that these failures are caused by nondeterminism, either in our code, or in Capostone/LLVM.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.