Skip to content

Fix crash with HXCPP_CATCH_SEGV on android x86_64 - #1378

Open
tobil4sk wants to merge 4 commits into
HaxeFoundation:masterfrom
tobil4sk:fix/android-x86_64-signal
Open

Fix crash with HXCPP_CATCH_SEGV on android x86_64#1378
tobil4sk wants to merge 4 commits into
HaxeFoundation:masterfrom
tobil4sk:fix/android-x86_64-signal

Conversation

@tobil4sk

Copy link
Copy Markdown
Member

This compat code was added in c91637a to work around an ndk compatibility issue when linking files that target platform 21 with older object files.

64 bit architectures (arm64 and x86_64) have only ever been supported with platform 21 and above, so this fix should be excluded from there. Keeping it enabled results in an error on x86_64 android builds that define HXCPP_CATCH_SEGV, because bsd_signal does not exist, so when hxcpp attempts to call signal there is a crash with the message: "bsd_signal symbol not found!"

Checking HXCPP_M64 instead of just HXCPP_ARM64 ensures that all 64-bit architectures are covered:

<flag value="-DHXCPP_M64" if="HXCPP_M64||HXCPP_ARM64||HXCPP_X86_64"/>

This compat code was added in c91637a
to work around an ndk compatibility issue when linking files that target
platform 21 with older object files.

64 bit architectures (arm64 and x86_64) have only ever been supported
with platform 21 and above, so this fix should be excluded from there.
Keeping it enabled results in an error on x86_64 android builds that
define HXCPP_CATCH_SEGV, because bsd_signal does not exist, so when
hxcpp attempts to call signal there is a crash with the message:
"bsd_signal symbol not found!"

Checking HXCPP_M64 instead of just HXCPP_ARM64 ensures that all 64-bit
architectures are covered:
https://github.com/HaxeFoundation/hxcpp/blob/10f73c52cb4c82e72df20d012216b1592eff8d28/toolchain/common-defines.xml#L8
@tobil4sk
tobil4sk force-pushed the fix/android-x86_64-signal branch from cd55a95 to 72240c5 Compare August 27, 2026 23:54
@tobil4sk
tobil4sk force-pushed the fix/android-x86_64-signal branch from 72240c5 to 4d6603f Compare August 27, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant