-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Crash in cn_slow_hash() #4197
Comments
cn_slow_hash() requires a fairly large stack. Make sure your calling thread has at least 5MB stack. |
Thanks for your quick answer. But how do i ensure that? |
For example, to set the GNU linker to setup a large stack: set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,10485760") Otherwise, use your threading library to set stack size, eg pthread_attr_setstacksize. |
I tried to add this line in CMakesList.txt of the monero repo but there's no luck yet. |
I encountered this issue either. The problem is not every If you want to check if your cpu supports $ cat /proc/cpuinfo | grep aes and if you get nothing - probably current cpu has no |
Not a monero bug. +invalid |
@naughtyfox You saved my life! It's now working fine after I removed |
It doesn't. AES instructions are used to speed up slow hash |
It's started crashing in x86 also with the same exception. It's been breaking my heart. |
If you can't set the stack size like suggested by hyc and mooo, you can try |
@MoroccanMalinois Where do I need to put it in? I tried to add it to the end of the monero CMakeLists but there's the same crash. |
OK @Pei116, here goes the full explanation :) Look at https://github.com/monero-project/monero/blob/master/src/crypto/slow-hash.c#L1127 By default, the program use the stack :
So the first natural thing to do is to increase the stack size (like suggested by hyc and mooo). Except sometimes you simply cannot control that parameter, like monero-wallet-gui (It's done in Qt internals and clang does not support So if we can't use the Now to answer your question, you have multiple ways to activate this flag: you can either:
|
Trying to use monero wallet api in Android using JNI after pre-building the libraries.
It's always crashed with following error:
`
`
The text was updated successfully, but these errors were encountered: