quest: check-android-static-init refuses __init_cpu_features in the sentinel shim on NDK r30
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- android, cmake, cpp
- Domain
- build-system, tooling
Research direction
Read tools/check_quest_static_init.sh and use tools/quest_link_objects.py with llvm-nm to identify which link input defines __init_cpu_features in the shim. Confirm it is the NDK CPU feature constructor, then update the shim allow list and add a case that fails when the name is missing. Run just check-android-static-init and just build-android-observe with the pinned NDK r30; done when both exit 0.
Written by the indexing model from the issue text.
Description
just build-android-observe (added by #2875) and the plain shim's static-init check both exit 1 on the NDK r30 toolchain. The shim's .init_array holds an initializer named __init_cpu_features, and tools/check_quest_static_init.sh accepts that name only in its plugin branch.
Evidence at fe99a482a
Built in the #2875 worktree at fe99a482a, plus the android-arm64-observe preset, with ANDROID_NDK_HOME set to the NDK r30 that tools/ndk.pin names:
just build-android-observecompiles and links, then exits 1 in its shim check:
check_quest_static_init: build/android-observe/sentinel/libovrplatformloader.so: .init_array entry 0x5b9220 (__init_cpu_features) is not an expected initializer; use a function-local staticllvm-nm --defined-only build/android-observe/sentinel/libovrplatformloader.sodefines__init_cpu_featuresas a local function at00000000005b9220, the address of that entry.- The same check on the plain shim,
build/android-arm64/sentinel/libovrplatformloader.so(its CMake cache points at the same NDK r30 toolchain), exits 1 with the same symbol at0x5b9210. tools/check_quest_static_init.sh:41accepts__init_cpu_featuresonly in the plugin branch, which checks the runtime library. Line:43, the shim's list, namesinit_have_lse_atomics,init_cpu_featuresand the sentinel constructor only.- The runtime library passes on the same toolchain:
check_quest_static_init: OK (2 .init_array entries in build/android-observe/sentinel/libnevr-runtime.so, 286 object files).
Each shim log holds exactly one failing entry. The four _GLOBAL__sub_I_* initializers of #2664 are not in either shim at this tip, so #2664 is a different failure.
Not shown
- Whether every NDK r30 arm64 shim carries
__init_cpu_features. Only the two trees above were checked. - Whether this check ever passed on an earlier NDK. No run in the tree records one.
- Whether the manual Android workflow fails the same way in CI. Not measured.
Falsifier
An NDK r30 build of the shim whose .init_array holds __init_cpu_features and on which just check-android-static-init exits 0.
Work
- Find the link input that defines
__init_cpu_featuresin the shim, withtools/quest_link_objects.pyandllvm-nm. If it is the NDK's CPU-feature constructor, the shim's allow list attools/check_quest_static_init.sh:43is stale for r30. - If it is the NDK's constructor, add that name to the shim's allow list with the comment the plugin branch carries, and add a case that fails when the name is missing.
- If it is not, remove that input from the shim's link.
just check-android-static-initandjust build-android-observeexit 0 on NDK r30.
Found while building the observe preset (#2875). Related: #2664 (four user-code initializers, a different failure).
- Dominant language
- C++
- Stars
- 3
- Forks
- 5
- Avg merge
- 4h 37m
- Merged PRs (30d)
- 524
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EchoTools/nevr-runtime
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
EchoTools/nevr-runtime#2910 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
EchoTools/nevr-runtime#2909 ·
Maintainers usually reply within 1 day
-
build: the generated defaults header is written 0600, so a seat outside nevr-build cannot read itOpenbacklog
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
EchoTools/nevr-runtime#2901 · 1 comment ·
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EchoTools/nevr-runtime#2897 ·
Maintainers usually reply within 1 day
All issues in EchoTools/nevr-runtime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
libc++
Difficulty 1/5 Under an hour Newbie friendliness 88/100
llvm/llvm-project#246508 ·
Maintainers usually reply within 1 day
-
good first issue help wanted phase:0 priority:P3 type:task
Difficulty 2/5 1-3 hours Newbie friendliness 67/100