-
Notifications
You must be signed in to change notification settings - Fork 260
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
[Bug]: paho.mqtt.cpp crashes with SEGV_ACCERR in make_shared when built with optimizations #2094
Comments
@RankoR do you know if this worked with r26? We can check for that as well, but if you happen to already know it'd save us the effort :) |
@DanAlbert I don't know, unfortunately. Checked only with r27.1 and r27.2. |
np, we'll check it |
The readme in the repro case says
Could you elaborate so I don't draw the wrong rest of the owl? :) |
My CMake options in CLion:
Some of them may be redundant, especially related to optimizations. In your options |
Oh, that was in the original post. Sorry, I was looking at the other page :) |
Okay, confirmed that it is a regression from r26 (sort of, anyway, the project doesn't build with r26 because it relies on Minimized instructions that work outside clion: $ cmake \
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" \
-DCMAKE_CXX_FLAGS="-O1" \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-32 \
-S . -B build -G Ninja
$ cmake --build build
$ adb push build/paho_mqtt_crash /data/local/tmp/
$ adb push $ANDROID_NDK/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so /data/local/tmp
$ adb shell "LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/paho_mqtt_crash" It seems to also be broken with the r28 compiler, but I did have to make some modifications to the source to get that to build. The project uses btw, it's not the problem here, but using |
Description
When any level of optimizations different than
0
is enabled, paho.mqtt.cpp crashes inshared_ptr
related code, for example, here, or inmessage
:CMake options:
Here is the minimal project to reproduce: https://github.com/RankoR/paho-mqtt-crash-demo
It happens only on Android, I couldn't reproduce it on Linux even with
-O3
, so I assume this is an NDK-related issue.Upstream bug
No response
Commit to cherry-pick
No response
Affected versions
r27
Canary version
No response
Host OS
Linux
Host OS version
Arch
Affected ABIs
arm64-v8a, x86_64
The text was updated successfully, but these errors were encountered: