-
Notifications
You must be signed in to change notification settings - Fork 307
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
Hash verifications fails on OSX ventura with M1 #262
Comments
Yeah, everything still works fine on my M1 Mac on MacOS 12.0.1 built with Xcode 13.1. Apple clang 13.0.0. By the way, what does |
|
I have verified using an Old intel MacBook pro 2017. |
The invalid hashes/random crashes are caused by executing stale machine code because the instruction cache flush doesn't work. We tried to fix this in #259 but it didn't help. Seems like a bug on apple's side. |
mm thanks for the replay. |
I tried downgrading my xcode to v14.0 and that seems to build fine and passes all tests How to download older versions of code: https://hacknicity.medium.com/working-with-multiple-versions-of-xcode-e331c01aa6bc |
I can also verify this happening on macOS Ventura 13.1 with the M1 chip. EDIT: The above workaround seems to work. I downgraded to Xcode 14.0 and now everything works fine. |
It's not necessary to use an old XCode version, just setting an old SDK is enough. I use
with 12.3 extracted from an older XCode version. |
Using @selsta helpful info, I ran tests against quite a few different versions of XCode and did think it was worth capturing here and hope that it might help moving this issue forward. Using a tart VM on an Apple M1 device, images was deployed with ghcr.io/cirruslabs/macos-ventura-base@sha256:ac7517660310a8c1c06288fd00095634ac9e531bfb6ac651807643414a28a38d. Installed xcrun --show-sdk-path /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk I see today, that there are a few SDKs, but did not look at these yesterday lrwxr-xr-x 1 root wheel 14 May 10 09:44 MacOSX.sdk -> MacOSX13.3.sdk
drwxr-xr-x 7 root wheel 224 May 10 09:44 MacOSX12.3.sdk
lrwxr-xr-x 1 root wheel 14 May 10 09:43 MacOSX12.sdk -> MacOSX12.3.sdk
drwxr-xr-x 7 root wheel 224 Mar 10 00:58 MacOSX13.3.sdk
lrwxr-xr-x 1 root wheel 14 May 10 09:43 MacOSX13.sdk -> MacOSX13.3.sdk default would be pointing to admin@admins-Virtual-Machine build % ./randomx-tests
[ 1] Cache initialization ... PASSED
[ 2] SuperscalarHash generator ... PASSED
[ 3] randomx_reciprocal ... PASSED
[ 4] randomx_reciprocal_fast ... SKIPPED
[ 5] Dataset initialization (interpreter) ... PASSED
[ 6] Dataset initialization (compiler) ... PASSED
[ 7] AesGenerator1R ... PASSED
[ 8] IADD_RS (decode) ... PASSED
[ 9] IADD_RS (execute) ... PASSED
[10] IADD_RS with immediate (decode) ... PASSED
[11] IADD_RS with immediate (decode) ... PASSED
[12] IADD_M (decode) ... PASSED
[13] ISUB_R (decode) ... PASSED
[14] ISUB_R (execute) ... PASSED
[15] ISUB_R with immediate (decode) ... PASSED
[16] ISUB_R with immediate (decode) ... PASSED
[17] ISUB_M (decode) ... PASSED
[18] IMUL_R (decode) ... PASSED
[19] IMUL_R (execute) ... PASSED
[20] IMUL_R with immediate (decode) ... PASSED
[21] IMUL_R with immediate (execute) ... PASSED
[22] IMUL_M (decode) ... PASSED
[23] IMULH_R (decode) ... PASSED
[24] IMULH_R (execute) ... PASSED
[25] IMULH_R squared (decode) ... PASSED
[26] IMULH_M (decode) ... PASSED
[27] ISMULH_R (decode) ... PASSED
[28] ISMULH_R (execute) ... PASSED
[29] ISMULH_R squared (decode) ... PASSED
[30] ISMULH_M (decode) ... PASSED
[31] IMUL_RCP (decode) ... PASSED
[32] IMUL_RCP zero imm32 (decode) ... PASSED
[33] INEG_R (decode) ... PASSED
[34] INEG_R (execute) ... PASSED
[35] IXOR_R (decode) ... PASSED
[36] IXOR_R (execute) ... PASSED
[37] IXOR_R with immediate (decode) ... PASSED
[38] IXOR_R with immediate (execute) ... PASSED
[39] IXOR_M (decode) ... PASSED
[40] IROR_R (decode) ... PASSED
[41] IROR_R (execute) ... PASSED
[42] IROL_R (decode) ... PASSED
[43] IROL_R (execute) ... PASSED
[44] ISWAP_R (decode) ... PASSED
[45] ISWAP_R (execute) ... PASSED
[46] FSWAP_R (decode) ... PASSED
[47] FSWAP_R (execute) ... PASSED
[48] FADD_R (decode) ... PASSED
[49] FADD_R RoundToNearest (execute) ... PASSED
[50] FADD_R RoundDown (execute) ... PASSED
[51] FADD_R RoundUp (execute) ... PASSED
[52] FADD_R RoundToZero (execute) ... PASSED
[53] FADD_M (decode) ... PASSED
[54] FADD_M (execute) ... PASSED
[55] FSUB_R (decode) ... PASSED
[56] FSUB_M (decode) ... PASSED
[57] FSCAL_R (decode) ... PASSED
[58] FSCAL_R (execute) ... PASSED
[59] FMUL_R (decode) ... PASSED
[60] FMUL_R RoundToNearest (execute) ... PASSED
[61] FMUL_R RoundDown/RoundToZero (execute) ... PASSED
[62] FMUL_R RoundUp (execute) ... PASSED
[63] FDIV_M (decode) ... PASSED
[64] FDIV_M RoundToNearest (execute) ... PASSED
[65] FDIV_M RoundDown/RoundToZero (execute) ... PASSED
[66] FDIV_M RoundUp (execute) ... PASSED
[67] FSQRT_R (decode) ... PASSED
[68] FSQRT_R RoundToNearest (execute) ... PASSED
[69] FSQRT_R RoundDown/RoundToZero (execute) ... PASSED
[70] FSQRT_R RoundUp (execute) ... PASSED
[71] CBRANCH (decode) 100 ... PASSED
[72] CBRANCH (decode) 200 ... PASSED
[73] CBRANCH not taken (execute) ... PASSED
[74] CBRANCH taken (execute) ... PASSED
[75] CFROUND (decode) ... PASSED
[76] ISTORE L1 (decode) ... PASSED
[77] ISTORE L2 (decode) ... PASSED
[78] ISTORE L3 (decode) ... PASSED
[79] Hash test 1a (interpreter) ... PASSED
[80] Hash test 1b (interpreter) ... PASSED
[81] Hash test 1c (interpreter) ... PASSED
[82] Hash test 1d (interpreter) ... PASSED
[83] Hash test 1e (interpreter) ... PASSED
[84] Hash test 2a (compiler) ... PASSED
[85] Hash test 2b (compiler) ... Assertion failed: (equalsHex(hash, "300a0adb47603dedb42228ccb2b211104f4da45af709cd7547cd049e9489c969")), function operator(), file tests.cpp, line 972.
zsh: abort ./randomx-tests Extracting XCode 12.3, which is SDK admin@admins-Virtual-Machine build-12.3 % ./randomx-tests
[ 1] Cache initialization ... PASSED
[ 2] SuperscalarHash generator ... PASSED
[ 3] randomx_reciprocal ... PASSED
[ 4] randomx_reciprocal_fast ... SKIPPED
[ 5] Dataset initialization (interpreter) ... PASSED
[ 6] Dataset initialization (compiler) ... PASSED
[ 7] AesGenerator1R ... PASSED
[ 8] IADD_RS (decode) ... PASSED
[ 9] IADD_RS (execute) ... PASSED
[10] IADD_RS with immediate (decode) ... PASSED
[11] IADD_RS with immediate (decode) ... PASSED
[12] IADD_M (decode) ... PASSED
[13] ISUB_R (decode) ... PASSED
[14] ISUB_R (execute) ... PASSED
[15] ISUB_R with immediate (decode) ... PASSED
[16] ISUB_R with immediate (decode) ... PASSED
[17] ISUB_M (decode) ... PASSED
[18] IMUL_R (decode) ... PASSED
[19] IMUL_R (execute) ... PASSED
[20] IMUL_R with immediate (decode) ... PASSED
[21] IMUL_R with immediate (execute) ... PASSED
[22] IMUL_M (decode) ... PASSED
[23] IMULH_R (decode) ... PASSED
[24] IMULH_R (execute) ... PASSED
[25] IMULH_R squared (decode) ... PASSED
[26] IMULH_M (decode) ... PASSED
[27] ISMULH_R (decode) ... PASSED
[28] ISMULH_R (execute) ... PASSED
[29] ISMULH_R squared (decode) ... PASSED
[30] ISMULH_M (decode) ... PASSED
[31] IMUL_RCP (decode) ... PASSED
[32] IMUL_RCP zero imm32 (decode) ... PASSED
[33] INEG_R (decode) ... PASSED
[34] INEG_R (execute) ... PASSED
[35] IXOR_R (decode) ... PASSED
[36] IXOR_R (execute) ... PASSED
[37] IXOR_R with immediate (decode) ... PASSED
[38] IXOR_R with immediate (execute) ... PASSED
[39] IXOR_M (decode) ... PASSED
[40] IROR_R (decode) ... PASSED
[41] IROR_R (execute) ... PASSED
[42] IROL_R (decode) ... PASSED
[43] IROL_R (execute) ... PASSED
[44] ISWAP_R (decode) ... PASSED
[45] ISWAP_R (execute) ... PASSED
[46] FSWAP_R (decode) ... PASSED
[47] FSWAP_R (execute) ... PASSED
[48] FADD_R (decode) ... PASSED
[49] FADD_R RoundToNearest (execute) ... PASSED
[50] FADD_R RoundDown (execute) ... PASSED
[51] FADD_R RoundUp (execute) ... PASSED
[52] FADD_R RoundToZero (execute) ... PASSED
[53] FADD_M (decode) ... PASSED
[54] FADD_M (execute) ... PASSED
[55] FSUB_R (decode) ... PASSED
[56] FSUB_M (decode) ... PASSED
[57] FSCAL_R (decode) ... PASSED
[58] FSCAL_R (execute) ... PASSED
[59] FMUL_R (decode) ... PASSED
[60] FMUL_R RoundToNearest (execute) ... PASSED
[61] FMUL_R RoundDown/RoundToZero (execute) ... PASSED
[62] FMUL_R RoundUp (execute) ... PASSED
[63] FDIV_M (decode) ... PASSED
[64] FDIV_M RoundToNearest (execute) ... PASSED
[65] FDIV_M RoundDown/RoundToZero (execute) ... PASSED
[66] FDIV_M RoundUp (execute) ... PASSED
[67] FSQRT_R (decode) ... PASSED
[68] FSQRT_R RoundToNearest (execute) ... PASSED
[69] FSQRT_R RoundDown/RoundToZero (execute) ... PASSED
[70] FSQRT_R RoundUp (execute) ... PASSED
[71] CBRANCH (decode) 100 ... PASSED
[72] CBRANCH (decode) 200 ... PASSED
[73] CBRANCH not taken (execute) ... PASSED
[74] CBRANCH taken (execute) ... PASSED
[75] CFROUND (decode) ... PASSED
[76] ISTORE L1 (decode) ... PASSED
[77] ISTORE L2 (decode) ... PASSED
[78] ISTORE L3 (decode) ... PASSED
[79] Hash test 1a (interpreter) ... PASSED
[80] Hash test 1b (interpreter) ... PASSED
[81] Hash test 1c (interpreter) ... PASSED
[82] Hash test 1d (interpreter) ... PASSED
[83] Hash test 1e (interpreter) ... PASSED
[84] Hash test 2a (compiler) ... PASSED
[85] Hash test 2b (compiler) ... PASSED
[86] Hash test 2c (compiler) ... PASSED
[87] Hash test 2d (compiler) ... PASSED
[88] Hash test 2e (compiler) ... PASSED
[89] Cache initialization: SSSE3 ... SKIPPED
[90] Cache initialization: AVX2 ... SKIPPED
[91] Hash batch test ... PASSED
[92] Preserve rounding mode ... PASSED
All tests PASSED
3 tests were SKIPPED due to incompatible configuration (see above) Extracting XCode 13.2.1, which is SDK admin@admins-Virtual-Machine build-13.2.1 % ./randomx-tests
[ 1] Cache initialization ... PASSED
[ 2] SuperscalarHash generator ... PASSED
[ 3] randomx_reciprocal ... PASSED
[ 4] randomx_reciprocal_fast ... SKIPPED
[ 5] Dataset initialization (interpreter) ... PASSED
[ 6] Dataset initialization (compiler) ... PASSED
[ 7] AesGenerator1R ... PASSED
[ 8] IADD_RS (decode) ... PASSED
[ 9] IADD_RS (execute) ... PASSED
[10] IADD_RS with immediate (decode) ... PASSED
[11] IADD_RS with immediate (decode) ... PASSED
[12] IADD_M (decode) ... PASSED
[13] ISUB_R (decode) ... PASSED
[14] ISUB_R (execute) ... PASSED
[15] ISUB_R with immediate (decode) ... PASSED
[16] ISUB_R with immediate (decode) ... PASSED
[17] ISUB_M (decode) ... PASSED
[18] IMUL_R (decode) ... PASSED
[19] IMUL_R (execute) ... PASSED
[20] IMUL_R with immediate (decode) ... PASSED
[21] IMUL_R with immediate (execute) ... PASSED
[22] IMUL_M (decode) ... PASSED
[23] IMULH_R (decode) ... PASSED
[24] IMULH_R (execute) ... PASSED
[25] IMULH_R squared (decode) ... PASSED
[26] IMULH_M (decode) ... PASSED
[27] ISMULH_R (decode) ... PASSED
[28] ISMULH_R (execute) ... PASSED
[29] ISMULH_R squared (decode) ... PASSED
[30] ISMULH_M (decode) ... PASSED
[31] IMUL_RCP (decode) ... PASSED
[32] IMUL_RCP zero imm32 (decode) ... PASSED
[33] INEG_R (decode) ... PASSED
[34] INEG_R (execute) ... PASSED
[35] IXOR_R (decode) ... PASSED
[36] IXOR_R (execute) ... PASSED
[37] IXOR_R with immediate (decode) ... PASSED
[38] IXOR_R with immediate (execute) ... PASSED
[39] IXOR_M (decode) ... PASSED
[40] IROR_R (decode) ... PASSED
[41] IROR_R (execute) ... PASSED
[42] IROL_R (decode) ... PASSED
[43] IROL_R (execute) ... PASSED
[44] ISWAP_R (decode) ... PASSED
[45] ISWAP_R (execute) ... PASSED
[46] FSWAP_R (decode) ... PASSED
[47] FSWAP_R (execute) ... PASSED
[48] FADD_R (decode) ... PASSED
[49] FADD_R RoundToNearest (execute) ... PASSED
[50] FADD_R RoundDown (execute) ... PASSED
[51] FADD_R RoundUp (execute) ... PASSED
[52] FADD_R RoundToZero (execute) ... PASSED
[53] FADD_M (decode) ... PASSED
[54] FADD_M (execute) ... PASSED
[55] FSUB_R (decode) ... PASSED
[56] FSUB_M (decode) ... PASSED
[57] FSCAL_R (decode) ... PASSED
[58] FSCAL_R (execute) ... PASSED
[59] FMUL_R (decode) ... PASSED
[60] FMUL_R RoundToNearest (execute) ... PASSED
[61] FMUL_R RoundDown/RoundToZero (execute) ... PASSED
[62] FMUL_R RoundUp (execute) ... PASSED
[63] FDIV_M (decode) ... PASSED
[64] FDIV_M RoundToNearest (execute) ... PASSED
[65] FDIV_M RoundDown/RoundToZero (execute) ... PASSED
[66] FDIV_M RoundUp (execute) ... PASSED
[67] FSQRT_R (decode) ... PASSED
[68] FSQRT_R RoundToNearest (execute) ... PASSED
[69] FSQRT_R RoundDown/RoundToZero (execute) ... PASSED
[70] FSQRT_R RoundUp (execute) ... PASSED
[71] CBRANCH (decode) 100 ... PASSED
[72] CBRANCH (decode) 200 ... PASSED
[73] CBRANCH not taken (execute) ... PASSED
[74] CBRANCH taken (execute) ... PASSED
[75] CFROUND (decode) ... PASSED
[76] ISTORE L1 (decode) ... PASSED
[77] ISTORE L2 (decode) ... PASSED
[78] ISTORE L3 (decode) ... PASSED
[79] Hash test 1a (interpreter) ... PASSED
[80] Hash test 1b (interpreter) ... PASSED
[81] Hash test 1c (interpreter) ... PASSED
[82] Hash test 1d (interpreter) ... PASSED
[83] Hash test 1e (interpreter) ... PASSED
[84] Hash test 2a (compiler) ... PASSED
[85] Hash test 2b (compiler) ... PASSED
[86] Hash test 2c (compiler) ... PASSED
[87] Hash test 2d (compiler) ... PASSED
[88] Hash test 2e (compiler) ... PASSED
[89] Cache initialization: SSSE3 ... SKIPPED
[90] Cache initialization: AVX2 ... SKIPPED
[91] Hash batch test ... PASSED
[92] Preserve rounding mode ... PASSED
All tests PASSED
3 tests were SKIPPED due to incompatible configuration (see above) Extracting XCode 13.4.1, which is SDK admin@admins-Virtual-Machine build-13.4.1 % ./randomx-tests
[ 1] Cache initialization ... PASSED
[ 2] SuperscalarHash generator ... PASSED
[ 3] randomx_reciprocal ... PASSED
[ 4] randomx_reciprocal_fast ... SKIPPED
[ 5] Dataset initialization (interpreter) ... PASSED
[ 6] Dataset initialization (compiler) ... PASSED
[ 7] AesGenerator1R ... PASSED
[ 8] IADD_RS (decode) ... PASSED
[ 9] IADD_RS (execute) ... PASSED
[10] IADD_RS with immediate (decode) ... PASSED
[11] IADD_RS with immediate (decode) ... PASSED
[12] IADD_M (decode) ... PASSED
[13] ISUB_R (decode) ... PASSED
[14] ISUB_R (execute) ... PASSED
[15] ISUB_R with immediate (decode) ... PASSED
[16] ISUB_R with immediate (decode) ... PASSED
[17] ISUB_M (decode) ... PASSED
[18] IMUL_R (decode) ... PASSED
[19] IMUL_R (execute) ... PASSED
[20] IMUL_R with immediate (decode) ... PASSED
[21] IMUL_R with immediate (execute) ... PASSED
[22] IMUL_M (decode) ... PASSED
[23] IMULH_R (decode) ... PASSED
[24] IMULH_R (execute) ... PASSED
[25] IMULH_R squared (decode) ... PASSED
[26] IMULH_M (decode) ... PASSED
[27] ISMULH_R (decode) ... PASSED
[28] ISMULH_R (execute) ... PASSED
[29] ISMULH_R squared (decode) ... PASSED
[30] ISMULH_M (decode) ... PASSED
[31] IMUL_RCP (decode) ... PASSED
[32] IMUL_RCP zero imm32 (decode) ... PASSED
[33] INEG_R (decode) ... PASSED
[34] INEG_R (execute) ... PASSED
[35] IXOR_R (decode) ... PASSED
[36] IXOR_R (execute) ... PASSED
[37] IXOR_R with immediate (decode) ... PASSED
[38] IXOR_R with immediate (execute) ... PASSED
[39] IXOR_M (decode) ... PASSED
[40] IROR_R (decode) ... PASSED
[41] IROR_R (execute) ... PASSED
[42] IROL_R (decode) ... PASSED
[43] IROL_R (execute) ... PASSED
[44] ISWAP_R (decode) ... PASSED
[45] ISWAP_R (execute) ... PASSED
[46] FSWAP_R (decode) ... PASSED
[47] FSWAP_R (execute) ... PASSED
[48] FADD_R (decode) ... PASSED
[49] FADD_R RoundToNearest (execute) ... PASSED
[50] FADD_R RoundDown (execute) ... PASSED
[51] FADD_R RoundUp (execute) ... PASSED
[52] FADD_R RoundToZero (execute) ... PASSED
[53] FADD_M (decode) ... PASSED
[54] FADD_M (execute) ... PASSED
[55] FSUB_R (decode) ... PASSED
[56] FSUB_M (decode) ... PASSED
[57] FSCAL_R (decode) ... PASSED
[58] FSCAL_R (execute) ... PASSED
[59] FMUL_R (decode) ... PASSED
[60] FMUL_R RoundToNearest (execute) ... PASSED
[61] FMUL_R RoundDown/RoundToZero (execute) ... PASSED
[62] FMUL_R RoundUp (execute) ... PASSED
[63] FDIV_M (decode) ... PASSED
[64] FDIV_M RoundToNearest (execute) ... PASSED
[65] FDIV_M RoundDown/RoundToZero (execute) ... PASSED
[66] FDIV_M RoundUp (execute) ... PASSED
[67] FSQRT_R (decode) ... PASSED
[68] FSQRT_R RoundToNearest (execute) ... PASSED
[69] FSQRT_R RoundDown/RoundToZero (execute) ... PASSED
[70] FSQRT_R RoundUp (execute) ... PASSED
[71] CBRANCH (decode) 100 ... PASSED
[72] CBRANCH (decode) 200 ... PASSED
[73] CBRANCH not taken (execute) ... PASSED
[74] CBRANCH taken (execute) ... PASSED
[75] CFROUND (decode) ... PASSED
[76] ISTORE L1 (decode) ... PASSED
[77] ISTORE L2 (decode) ... PASSED
[78] ISTORE L3 (decode) ... PASSED
[79] Hash test 1a (interpreter) ... PASSED
[80] Hash test 1b (interpreter) ... PASSED
[81] Hash test 1c (interpreter) ... PASSED
[82] Hash test 1d (interpreter) ... PASSED
[83] Hash test 1e (interpreter) ... PASSED
[84] Hash test 2a (compiler) ... PASSED
[85] Hash test 2b (compiler) ... PASSED
[86] Hash test 2c (compiler) ... PASSED
[87] Hash test 2d (compiler) ... PASSED
[88] Hash test 2e (compiler) ... PASSED
[89] Cache initialization: SSSE3 ... SKIPPED
[90] Cache initialization: AVX2 ... SKIPPED
[91] Hash batch test ... PASSED
[92] Preserve rounding mode ... PASSED
All tests PASSED
3 tests were SKIPPED due to incompatible configuration (see above) Extracting XCode 14.0, which is SDK admin@admins-Virtual-Machine build-14.0 % ./randomx-tests
[ 1] Cache initialization ... PASSED
[ 2] SuperscalarHash generator ... PASSED
[ 3] randomx_reciprocal ... PASSED
[ 4] randomx_reciprocal_fast ... SKIPPED
[ 5] Dataset initialization (interpreter) ... PASSED
[ 6] Dataset initialization (compiler) ... PASSED
[ 7] AesGenerator1R ... PASSED
[ 8] IADD_RS (decode) ... PASSED
[ 9] IADD_RS (execute) ... PASSED
[10] IADD_RS with immediate (decode) ... PASSED
[11] IADD_RS with immediate (decode) ... PASSED
[12] IADD_M (decode) ... PASSED
[13] ISUB_R (decode) ... PASSED
[14] ISUB_R (execute) ... PASSED
[15] ISUB_R with immediate (decode) ... PASSED
[16] ISUB_R with immediate (decode) ... PASSED
[17] ISUB_M (decode) ... PASSED
[18] IMUL_R (decode) ... PASSED
[19] IMUL_R (execute) ... PASSED
[20] IMUL_R with immediate (decode) ... PASSED
[21] IMUL_R with immediate (execute) ... PASSED
[22] IMUL_M (decode) ... PASSED
[23] IMULH_R (decode) ... PASSED
[24] IMULH_R (execute) ... PASSED
[25] IMULH_R squared (decode) ... PASSED
[26] IMULH_M (decode) ... PASSED
[27] ISMULH_R (decode) ... PASSED
[28] ISMULH_R (execute) ... PASSED
[29] ISMULH_R squared (decode) ... PASSED
[30] ISMULH_M (decode) ... PASSED
[31] IMUL_RCP (decode) ... PASSED
[32] IMUL_RCP zero imm32 (decode) ... PASSED
[33] INEG_R (decode) ... PASSED
[34] INEG_R (execute) ... PASSED
[35] IXOR_R (decode) ... PASSED
[36] IXOR_R (execute) ... PASSED
[37] IXOR_R with immediate (decode) ... PASSED
[38] IXOR_R with immediate (execute) ... PASSED
[39] IXOR_M (decode) ... PASSED
[40] IROR_R (decode) ... PASSED
[41] IROR_R (execute) ... PASSED
[42] IROL_R (decode) ... PASSED
[43] IROL_R (execute) ... PASSED
[44] ISWAP_R (decode) ... PASSED
[45] ISWAP_R (execute) ... PASSED
[46] FSWAP_R (decode) ... PASSED
[47] FSWAP_R (execute) ... PASSED
[48] FADD_R (decode) ... PASSED
[49] FADD_R RoundToNearest (execute) ... PASSED
[50] FADD_R RoundDown (execute) ... PASSED
[51] FADD_R RoundUp (execute) ... PASSED
[52] FADD_R RoundToZero (execute) ... PASSED
[53] FADD_M (decode) ... PASSED
[54] FADD_M (execute) ... PASSED
[55] FSUB_R (decode) ... PASSED
[56] FSUB_M (decode) ... PASSED
[57] FSCAL_R (decode) ... PASSED
[58] FSCAL_R (execute) ... PASSED
[59] FMUL_R (decode) ... PASSED
[60] FMUL_R RoundToNearest (execute) ... PASSED
[61] FMUL_R RoundDown/RoundToZero (execute) ... PASSED
[62] FMUL_R RoundUp (execute) ... PASSED
[63] FDIV_M (decode) ... PASSED
[64] FDIV_M RoundToNearest (execute) ... PASSED
[65] FDIV_M RoundDown/RoundToZero (execute) ... PASSED
[66] FDIV_M RoundUp (execute) ... PASSED
[67] FSQRT_R (decode) ... PASSED
[68] FSQRT_R RoundToNearest (execute) ... PASSED
[69] FSQRT_R RoundDown/RoundToZero (execute) ... PASSED
[70] FSQRT_R RoundUp (execute) ... PASSED
[71] CBRANCH (decode) 100 ... PASSED
[72] CBRANCH (decode) 200 ... PASSED
[73] CBRANCH not taken (execute) ... PASSED
[74] CBRANCH taken (execute) ... PASSED
[75] CFROUND (decode) ... PASSED
[76] ISTORE L1 (decode) ... PASSED
[77] ISTORE L2 (decode) ... PASSED
[78] ISTORE L3 (decode) ... PASSED
[79] Hash test 1a (interpreter) ... PASSED
[80] Hash test 1b (interpreter) ... PASSED
[81] Hash test 1c (interpreter) ... PASSED
[82] Hash test 1d (interpreter) ... PASSED
[83] Hash test 1e (interpreter) ... PASSED
[84] Hash test 2a (compiler) ... PASSED
[85] Hash test 2b (compiler) ... PASSED
[86] Hash test 2c (compiler) ... PASSED
[87] Hash test 2d (compiler) ... PASSED
[88] Hash test 2e (compiler) ... PASSED
[89] Cache initialization: SSSE3 ... SKIPPED
[90] Cache initialization: AVX2 ... SKIPPED
[91] Hash batch test ... PASSED
[92] Preserve rounding mode ... PASSED
All tests PASSED
3 tests were SKIPPED due to incompatible configuration (see above) Extracting XCode 14.1, which is SDK admin@admins-Virtual-Machine build-14.1 % ./randomx-tests
[ 1] Cache initialization ... PASSED
[ 2] SuperscalarHash generator ... PASSED
[ 3] randomx_reciprocal ... PASSED
[ 4] randomx_reciprocal_fast ... SKIPPED
[ 5] Dataset initialization (interpreter) ... PASSED
[ 6] Dataset initialization (compiler) ... PASSED
[ 7] AesGenerator1R ... PASSED
[ 8] IADD_RS (decode) ... PASSED
[ 9] IADD_RS (execute) ... PASSED
[10] IADD_RS with immediate (decode) ... PASSED
[11] IADD_RS with immediate (decode) ... PASSED
[12] IADD_M (decode) ... PASSED
[13] ISUB_R (decode) ... PASSED
[14] ISUB_R (execute) ... PASSED
[15] ISUB_R with immediate (decode) ... PASSED
[16] ISUB_R with immediate (decode) ... PASSED
[17] ISUB_M (decode) ... PASSED
[18] IMUL_R (decode) ... PASSED
[19] IMUL_R (execute) ... PASSED
[20] IMUL_R with immediate (decode) ... PASSED
[21] IMUL_R with immediate (execute) ... PASSED
[22] IMUL_M (decode) ... PASSED
[23] IMULH_R (decode) ... PASSED
[24] IMULH_R (execute) ... PASSED
[25] IMULH_R squared (decode) ... PASSED
[26] IMULH_M (decode) ... PASSED
[27] ISMULH_R (decode) ... PASSED
[28] ISMULH_R (execute) ... PASSED
[29] ISMULH_R squared (decode) ... PASSED
[30] ISMULH_M (decode) ... PASSED
[31] IMUL_RCP (decode) ... PASSED
[32] IMUL_RCP zero imm32 (decode) ... PASSED
[33] INEG_R (decode) ... PASSED
[34] INEG_R (execute) ... PASSED
[35] IXOR_R (decode) ... PASSED
[36] IXOR_R (execute) ... PASSED
[37] IXOR_R with immediate (decode) ... PASSED
[38] IXOR_R with immediate (execute) ... PASSED
[39] IXOR_M (decode) ... PASSED
[40] IROR_R (decode) ... PASSED
[41] IROR_R (execute) ... PASSED
[42] IROL_R (decode) ... PASSED
[43] IROL_R (execute) ... PASSED
[44] ISWAP_R (decode) ... PASSED
[45] ISWAP_R (execute) ... PASSED
[46] FSWAP_R (decode) ... PASSED
[47] FSWAP_R (execute) ... PASSED
[48] FADD_R (decode) ... PASSED
[49] FADD_R RoundToNearest (execute) ... PASSED
[50] FADD_R RoundDown (execute) ... PASSED
[51] FADD_R RoundUp (execute) ... PASSED
[52] FADD_R RoundToZero (execute) ... PASSED
[53] FADD_M (decode) ... PASSED
[54] FADD_M (execute) ... PASSED
[55] FSUB_R (decode) ... PASSED
[56] FSUB_M (decode) ... PASSED
[57] FSCAL_R (decode) ... PASSED
[58] FSCAL_R (execute) ... PASSED
[59] FMUL_R (decode) ... PASSED
[60] FMUL_R RoundToNearest (execute) ... PASSED
[61] FMUL_R RoundDown/RoundToZero (execute) ... PASSED
[62] FMUL_R RoundUp (execute) ... PASSED
[63] FDIV_M (decode) ... PASSED
[64] FDIV_M RoundToNearest (execute) ... PASSED
[65] FDIV_M RoundDown/RoundToZero (execute) ... PASSED
[66] FDIV_M RoundUp (execute) ... PASSED
[67] FSQRT_R (decode) ... PASSED
[68] FSQRT_R RoundToNearest (execute) ... PASSED
[69] FSQRT_R RoundDown/RoundToZero (execute) ... PASSED
[70] FSQRT_R RoundUp (execute) ... PASSED
[71] CBRANCH (decode) 100 ... PASSED
[72] CBRANCH (decode) 200 ... PASSED
[73] CBRANCH not taken (execute) ... PASSED
[74] CBRANCH taken (execute) ... PASSED
[75] CFROUND (decode) ... PASSED
[76] ISTORE L1 (decode) ... PASSED
[77] ISTORE L2 (decode) ... PASSED
[78] ISTORE L3 (decode) ... PASSED
[79] Hash test 1a (interpreter) ... PASSED
[80] Hash test 1b (interpreter) ... PASSED
[81] Hash test 1c (interpreter) ... PASSED
[82] Hash test 1d (interpreter) ... PASSED
[83] Hash test 1e (interpreter) ... PASSED
[84] Hash test 2a (compiler) ... Assertion failed: (equalsHex(hash, "639183aae1bf4c9a35884cb46b09cad9175f04efd7684e7262a0ac1c2f0b4e3f")), function operator(), file tests.cpp, line 966.
zsh: abort ./randomx-tests Extracting XCode 14.2, which is SDK admin@admins-Virtual-Machine build-14.2 % ./randomx-tests
[ 1] Cache initialization ... PASSED
[ 2] SuperscalarHash generator ... PASSED
[ 3] randomx_reciprocal ... PASSED
[ 4] randomx_reciprocal_fast ... SKIPPED
[ 5] Dataset initialization (interpreter) ... PASSED
[ 6] Dataset initialization (compiler) ... PASSED
[ 7] AesGenerator1R ... PASSED
[ 8] IADD_RS (decode) ... PASSED
[ 9] IADD_RS (execute) ... PASSED
[10] IADD_RS with immediate (decode) ... PASSED
[11] IADD_RS with immediate (decode) ... PASSED
[12] IADD_M (decode) ... PASSED
[13] ISUB_R (decode) ... PASSED
[14] ISUB_R (execute) ... PASSED
[15] ISUB_R with immediate (decode) ... PASSED
[16] ISUB_R with immediate (decode) ... PASSED
[17] ISUB_M (decode) ... PASSED
[18] IMUL_R (decode) ... PASSED
[19] IMUL_R (execute) ... PASSED
[20] IMUL_R with immediate (decode) ... PASSED
[21] IMUL_R with immediate (execute) ... PASSED
[22] IMUL_M (decode) ... PASSED
[23] IMULH_R (decode) ... PASSED
[24] IMULH_R (execute) ... PASSED
[25] IMULH_R squared (decode) ... PASSED
[26] IMULH_M (decode) ... PASSED
[27] ISMULH_R (decode) ... PASSED
[28] ISMULH_R (execute) ... PASSED
[29] ISMULH_R squared (decode) ... PASSED
[30] ISMULH_M (decode) ... PASSED
[31] IMUL_RCP (decode) ... PASSED
[32] IMUL_RCP zero imm32 (decode) ... PASSED
[33] INEG_R (decode) ... PASSED
[34] INEG_R (execute) ... PASSED
[35] IXOR_R (decode) ... PASSED
[36] IXOR_R (execute) ... PASSED
[37] IXOR_R with immediate (decode) ... PASSED
[38] IXOR_R with immediate (execute) ... PASSED
[39] IXOR_M (decode) ... PASSED
[40] IROR_R (decode) ... PASSED
[41] IROR_R (execute) ... PASSED
[42] IROL_R (decode) ... PASSED
[43] IROL_R (execute) ... PASSED
[44] ISWAP_R (decode) ... PASSED
[45] ISWAP_R (execute) ... PASSED
[46] FSWAP_R (decode) ... PASSED
[47] FSWAP_R (execute) ... PASSED
[48] FADD_R (decode) ... PASSED
[49] FADD_R RoundToNearest (execute) ... PASSED
[50] FADD_R RoundDown (execute) ... PASSED
[51] FADD_R RoundUp (execute) ... PASSED
[52] FADD_R RoundToZero (execute) ... PASSED
[53] FADD_M (decode) ... PASSED
[54] FADD_M (execute) ... PASSED
[55] FSUB_R (decode) ... PASSED
[56] FSUB_M (decode) ... PASSED
[57] FSCAL_R (decode) ... PASSED
[58] FSCAL_R (execute) ... PASSED
[59] FMUL_R (decode) ... PASSED
[60] FMUL_R RoundToNearest (execute) ... PASSED
[61] FMUL_R RoundDown/RoundToZero (execute) ... PASSED
[62] FMUL_R RoundUp (execute) ... PASSED
[63] FDIV_M (decode) ... PASSED
[64] FDIV_M RoundToNearest (execute) ... PASSED
[65] FDIV_M RoundDown/RoundToZero (execute) ... PASSED
[66] FDIV_M RoundUp (execute) ... PASSED
[67] FSQRT_R (decode) ... PASSED
[68] FSQRT_R RoundToNearest (execute) ... PASSED
[69] FSQRT_R RoundDown/RoundToZero (execute) ... PASSED
[70] FSQRT_R RoundUp (execute) ... PASSED
[71] CBRANCH (decode) 100 ... PASSED
[72] CBRANCH (decode) 200 ... PASSED
[73] CBRANCH not taken (execute) ... PASSED
[74] CBRANCH taken (execute) ... PASSED
[75] CFROUND (decode) ... PASSED
[76] ISTORE L1 (decode) ... PASSED
[77] ISTORE L2 (decode) ... PASSED
[78] ISTORE L3 (decode) ... PASSED
[79] Hash test 1a (interpreter) ... PASSED
[80] Hash test 1b (interpreter) ... PASSED
[81] Hash test 1c (interpreter) ... PASSED
[82] Hash test 1d (interpreter) ... PASSED
[83] Hash test 1e (interpreter) ... PASSED
[84] Hash test 2a (compiler) ... PASSED
[85] Hash test 2b (compiler) ... PASSED
[86] Hash test 2c (compiler) ... PASSED
[87] Hash test 2d (compiler) ... PASSED
[88] Hash test 2e (compiler) ... PASSED
[89] Cache initialization: SSSE3 ... SKIPPED
[90] Cache initialization: AVX2 ... SKIPPED
[91] Hash batch test ... Assertion failed: (equalsHex(hash3, "c36d4ed4191e617309867ed66a443be4075014e2b061bcdaf9ce7b721d2b77a8")), function operator(), file tests.cpp, line 1074.
zsh: abort ./randomx-tests |
Unfortunately at the moment it's not even clear if this is a macOS bug or RandomX bug. It started happening with macOS 13 so that might hint at a macOS bug but on the other hand lots of other programs use JIT so I can't imagine it being broken for almost a year without anyone noticing. |
Fixed in #281 |
Hi, I am struggling to get all the unit tests to pass on a Mac M1.
The codebase is compiled using cmake, tried without any arguments, with
native
andarm64
.When running
randomx-tests
it passes all unit tests till either 2a or 2b, it varies sometimes 2a passes, and other times it does not. Some times it fails verification, other times it fails with a segmentation fault. But its not constant.Running
randomx-benchmark --verify
it passes everything.Running snippet:
Here is one it failed with segfault:
OS: OSX Ventura 13.2
Xcode: 14
CXX: AppleClang 14.0.0.14000029
Is there anything I am doing wrong here?
This all used to work, but I have not tracked it, but I suspect its the OSX update to Ventura that changed everything.
The text was updated successfully, but these errors were encountered: