Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NDK 27 arm64 Maps and bundled libc++ have non-16 KB GNU_RELRO segment ends

Open
#2,737 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
44/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, kotlin

Research direction

The issue identifies the affected arm64 artifacts as libmapbox-maps.so in android-core-ndk27 and libc++_shared.so in common-ndk27. Start by inspecting their GNU_RELRO program headers with the Android NDK llvm-readelf -lW command shown in the issue and compare the segment ends with Android's 16 KB alignment guidance. Done means the affected artifacts have aligned GNU_RELRO ends or the project documents why their layout is safe on native 16 KB devices.

Written by the indexing model from the issue text.

Description

Environment

  • Android OS version: Android 16 / API 36 for the bounded emulator result below; the static artifact check is OS-independent.
  • Devices affected: arm64-v8a artifacts intended for 16 KB page-size devices; no physical-device failure established.
  • Maps SDK Version: 11.33.0, then 11.32.2 (-ndk27; Common 24.33.0, then 24.32.2).

Observed behavior and steps to reproduce

The latest stable Maps 11.33.0 artifacts have nonzero GNU_RELRO end remainders for libmapbox-maps.so and libc++_shared.so, despite every LOAD meeting 16 KB alignment. common-ndk27 ships libc++_shared.so; android-core-ndk27 ships libmapbox-maps.so.

  1. Download each official AAR linked below, for example curl -fLO '<AAR URL>'.
  2. Extract the arm64 libraries: unzip '<artifact>.aar' 'jni/arm64-v8a/*.so' -d extracted (use a separate destination for each AAR).
  3. Run the Android NDK tool llvm-readelf -lW extracted/jni/arm64-v8a/<library>.so for each library.
  4. Check every LOAD: p_align is at least 0x4000, is a power of two, and (VirtAddr - Offset) % p_align == 0; all pass here. For GNU_RELRO, calculate (VirtAddr + MemSiz) % 0x4000; the nonzero values below reproduce the defect against the documented end-alignment check.
Library (arm64-v8a) AAR version Every LOAD p_align GNU_RELRO VirtAddr + MemSiz = end end % 0x4000
libc++_shared.so 24.33.0 0x4000, 0x4000, 0x4000, 0x4000 0x1392f0 + 0x9d10 = 0x143000 0x3000
libmapbox-common.so 24.33.0 0x4000, 0x4000, 0x4000 0x67c720 + 0x1f8e0 = 0x69c000 0x0
libmapbox-maps.so 11.33.0 0x4000, 0x4000, 0x4000 0x11d8f60 + 0x5a0a0 = 0x1233000 0x3000
libc++_shared.so 24.32.2 0x4000, 0x4000, 0x4000, 0x4000 0x1392f0 + 0x9d10 = 0x143000 0x3000
libmapbox-common.so 24.32.2 0x4000, 0x4000, 0x4000 0x67ebe0 + 0x20420 = 0x69f000 0x3000
libmapbox-maps.so 11.32.2 0x4000, 0x4000, 0x4000 0x11d2950 + 0x5a6b0 = 0x122d000 0x1000

Expected behavior

The GNU_RELRO segment end is aligned to 16 KB, so (VirtAddr + MemSiz) % 0x4000 == 0, per Android's RELRO guidance, or Mapbox documents why this layout is safe on native 16 KB devices.

Notes / preliminary analysis

libmapbox-common.so now passes the end-alignment formula in Common 24.33.0 (0x0 remainder); it is included above as a passing comparison, not a current defect. Its older Common 24.32.2 artifact still has a nonzero remainder. No separate Common issue is proposed; upgrading resolves that library's static finding.

In a prior bounded Android 16 / API 36 arm64 emulator run with 16 KB pages and linker/package compatibility mode disabled, Maps 11.32.0 / Common 24.32.0 -ndk27 rendered online and offline fixture maps: no crash observed. That result does not establish safety, physical-device compatibility, or runtime behavior of 11.33.0/11.32.2; those versions were checked statically only.

Additional links and references

Android guide: https://developer.android.com/guide/practices/page-sizes#relro-flag

Dominant language
Kotlin
Stars
579
Forks
164
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-maps-android

All issues in mapbox/mapbox-maps-android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.