quest: check-android-static-init refuses four dynamic initializers on main

Open Beginner friendly
#2,664 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, cpp

Research direction

Read the four named source files: src/quest/sentinel/resource_request_hook.cpp and the three guards under src/quest/combat/. Start by locating their namespace-scope objects with dynamic initializers and check how the static initializer checker reports them. Make those objects constant-initialized or function-local statics, then run just test-android; done means it exits 0 without a check_quest_static_init error.

Written by the indexing model from the issue text.

Description

backlog bug

just test-android is red on main: check-android-static-init refuses four dynamic initializers in the sentinel.

Evidence at 48c8eaa67

just test-android (a clean worktree at 48c8eaa6762c8cabaf18ed8f05126e4334a41c7a, ninja with ccache), exit 1:

check_quest_static_init: build/android-arm64/sentinel/libovrplatformloader.so: .init_array entry 0x7f45d8 (_GLOBAL__sub_I_resource_request_hook.cpp) is not an expected initializer; use a function-local static
check_quest_static_init: build/android-arm64/sentinel/libovrplatformloader.so: .init_array entry 0x872f88 (_GLOBAL__sub_I_bullet_velocity_guard.cpp) is not an expected initializer; use a function-local static
check_quest_static_init: build/android-arm64/sentinel/libovrplatformloader.so: .init_array entry 0x8b9b08 (_GLOBAL__sub_I_sound_symbol_guard.cpp) is not an expected initializer; use a function-local static
check_quest_static_init: build/android-arm64/sentinel/libovrplatformloader.so: .init_array entry 0x8bc2d4 (_GLOBAL__sub_I_texel_buffer_guard.cpp) is not an expected initializer; use a function-local static
error: recipe `check-android-static-init` failed with exit code 1

Not shown

  • Which commit brought each initializer in, and whether any runs before the sentinel's constructor on a headset.

Falsifier

just test-android at a later main tip exits 0 with no check_quest_static_init line.

Work

  1. In src/quest/sentinel/resource_request_hook.cpp, src/quest/combat/bullet_velocity_guard.cpp, src/quest/combat/sound_symbol_guard.cpp and src/quest/combat/texel_buffer_guard.cpp, make each namespace-scope object with a dynamic initializer constant-initialised or a function-local static.
  2. just test-android exits 0.
Dominant language
C++
Stars
2
Forks
5
Avg merge
4h 16m
Merged PRs (30d)
791

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 EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.