Skip to content

Android: Disable native heap pointer tagging for core compatibility - #19280

Merged
LibretroAdmin merged 3 commits into
libretro:masterfrom
Starlightbotanist:master
Jul 28, 2026
Merged

Android: Disable native heap pointer tagging for core compatibility#19280
LibretroAdmin merged 3 commits into
libretro:masterfrom
Starlightbotanist:master

Conversation

@Starlightbotanist

Copy link
Copy Markdown
Contributor

Description

Targeting Android API 30 or higher enables native heap pointer tagging for the RetroArch process, causing Flycast's ARM64 native code to crash when launching content. Setting allowNativeHeapPointerTagging to false resolves the crash.

Tested on a pixel 6 with android 17. I was not able to reproduce the issue on any other device.

Related Issues

Should resolve #18026 #19187 There have been a few other strange issues with cores, such as ppsspp, on android recently. It's possible this could resolve those issues, but it's untested.

Related Pull Requests

When bisecting, I wasn't able to reproduce unless I was on 53021d4 or newer.

Reviewers

I looked into this on the recommendation of @i30817

Starlightbotanist and others added 3 commits July 28, 2026 15:55
Targeting Android API 30 or higher enables native heap pointer tagging for the RetroArch process, causing Flycast's ARM64 native code to crash when launching content.

Target SDK 29 works, while targets 30 and 36 crash. Setting allowNativeHeapPointerTagging to false resolves the crash at both targets.

Libretro cores execute inside the RetroArch process, so apply Android's documented compatibility opt-out while affected native core code is updated for tagged-pointer compatibility.
@i30817

i30817 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

As soon as its merged and built I'll test nightly and confirm, thanks for your time doing this.

@LibretroAdmin

Copy link
Copy Markdown
Contributor

Good catch

@LibretroAdmin
LibretroAdmin merged commit 9e7b38a into libretro:master Jul 28, 2026
48 checks passed
@i30817

i30817 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Fixed my issue.

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.

Crash when using Vulkan with Dreamcast Games (Flycast)

3 participants