quest: two sentinel comments name PollTracking as the only caller of the VrApi input wrapper

Open Beginner friendly
#2,897 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
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
documentation

Research direction

Compare the pinned libr15 listing around ELF 0x1a71800 with the comments in src/quest/sentinel/pinned_targets.h and src/quest/sentinel/hand_pose_log_hook.h. Correct the function name and caller list in both comments based on the listing, then run just test-quest-hooks and the doc-paths check; done means both checks pass and the comments match the evidence.

Written by the indexing model from the issue text.

Description

backlog

Evidence at 27a498bad

Two comments in the Quest sentinel name the wrong function for the code that calls the VrApi input functions:

  • src/quest/sentinel/pinned_targets.h:946: "The game calls both only from CVR::PollTracking's loop (FUN 0x1a71808)".
  • src/quest/sentinel/hand_pose_log_hook.h:4-5: "CVR::PollTracking (FUN 0x1a71808) enumerates the input devices".

The address report for libr15 (sha256 8dd9a961b9dca8566069a4f65b3ddee9c65682c4e9c91a6d41e3c5727b1d8b20; revault VA = ELF vaddr + 0x100000) reads from the listing: the function at ELF 0x1a71808 is its own function (a ret at 0x1a71804, sub sp,sp,#0x180 at 0x1a71808, size 0x230), a wrapper around vrapi_EnumerateInputDevices, vrapi_GetInputTrackingState (calls at 0x1a718c4 and 0x1a718dc) and vrapi_GetCurrentInputState (call at 0x1a71928). CVR::PollTracking is at ELF 0x1a7142c (988 bytes) and calls the wrapper at 0x1a714a0; CVR::UpdateTracking (ELF 0x1a71b60, 4412 bytes) calls it at 0x1a71fd4 and is the per-frame caller that fills the global pose arrays. So "only from PollTracking" is wrong in two places: the wrapper has a second caller, and 0x1a71808 is the wrapper, not PollTracking (the disassembler labelled it PollTracking+0x3dc, an annotation of the nearest symbol).

The observe sampler (#2875, seam B1) reads the globals that the UpdateTracking call fills, so a reader who trusts these comments looks for the data in PollTracking's frame.

Not shown

  • That the comments' other claims (the stub addresses, the JUMP_SLOT values) are right: not rechecked.
  • That PollTracking's own call of the wrapper writes the same globals: it uses its own frame struct (the report says it does not write them).

Falsifier

llvm-objdump -d of the pinned libr15 around ELF 0x1a71800 showing that 0x1a71808 lies inside PollTracking (0x1a7142c to 0x1a71808), or that no call to 0x1a71808 exists at ELF 0x1a71fd4.

Work

  1. Re-read the two comments against the listing; correct the function name and the caller list in both files (the change is comments only).
  2. Run the Quest sentinel host tests that include these headers (just test-quest-hooks) and the doc-paths check; both unaffected expected.
Dominant language
C++
Stars
3
Forks
5
Avg merge
4h 37m
Merged PRs (30d)
524

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.