Repository navigation
Conversation
The forced-phone case of t_motion_hid (ceaf6d6) passed (float[]){0} as the rotation, one float, while motion_set reads three (motion_map_apply in motion_fusion.h), so the test read two floats past the array on the stack. It passed by chance; AddressSanitizer reports a stack-buffer-overflow at motion_fusion.h:45 (found by the asan target of seedds#412). The rotation is now (float[]){0, 0, 0}, which is what the case means: no rotation. Checked: make -C dm/host/tests run passes (hid players: 119 checks), and with seedds#412's asan target the report is gone.
This was referenced Oct 27, 2026
seedds
added a commit
that referenced
this pull request
Oct 27, 2026
Integrate the sanitizer targets, HID fixture correction and pinned Xcode 27.1 CI toolchain from #412, #443 and #421. Select the matching runner for the new sanitizer job as well as the four existing jobs. Decode audio command headers without alignment assumptions and validate their extents before consuming them. Finish AudioUnit construction before publishing an output to lifecycle and watchdog readers. Publish pthread handles under the scheduler lock and serialize startup, priority and QoS fields with their readers. Remove all three real-bug suppressions. Add unaligned/truncated header coverage, an output-publication assertion and priority/QoS registration checks, including QoS-enabled TSan CI cases. Document the mechanisms and retain only fixture/framework exceptions. Plain host, ASan/UBSan, TSan, 40 QoS startup stress runs, the complete Metal graphics suite, 525 Python tests (20 skipped), lint, all 178 iOS source compiles and the unsigned synthetic iOS app build passed. Gameplay regression results are reported with the PR follow-up. Fixes #409 Fixes #410 Fixes #411 Co-authored-by: v0lumehi <[email protected]>
Owner
|
Applied directly to I reproduced the original stack-buffer-overflow under ASan: the forced-phone case supplied one rotation float to a three-axis reader. The three-zero rotation fixes the test fixture at its cause; the host motion implementation is unchanged. All 119 HID checks pass, including the full host ASan/UBSan suite. The sanitizer/toolchain integration and root fixes for #409–#411 are documented in the completed validation report. Closing because this fix is now on |
Know-It-All-Brother
pushed a commit
to Know-It-All-Brother/nxnative
that referenced
this pull request
Nov 9, 2026
Integrate the sanitizer targets, HID fixture correction and pinned Xcode 27.1 CI toolchain from seedds#412, seedds#443 and seedds#421. Select the matching runner for the new sanitizer job as well as the four existing jobs. Decode audio command headers without alignment assumptions and validate their extents before consuming them. Finish AudioUnit construction before publishing an output to lifecycle and watchdog readers. Publish pthread handles under the scheduler lock and serialize startup, priority and QoS fields with their readers. Remove all three real-bug suppressions. Add unaligned/truncated header coverage, an output-publication assertion and priority/QoS registration checks, including QoS-enabled TSan CI cases. Document the mechanisms and retain only fixture/framework exceptions. Plain host, ASan/UBSan, TSan, 40 QoS startup stress runs, the complete Metal graphics suite, 525 Python tests (20 skipped), lint, all 178 iOS source compiles and the unsigned synthetic iOS app build passed. Gameplay regression results are reported with the PR follow-up. Fixes seedds#409 Fixes seedds#410 Fixes seedds#411 Co-authored-by: v0lumehi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A one-line test fix, found by the
asantarget of #412.t_motion_hid's forced-phone case (from ceaf6d6, #296) callsdm_motion_set_switch(0, (float[]){0, -1, 0}, (float[]){0}). The rotation is one float, butmotion_setreads three (motion_map_apply,motion_fusion.h:45), so the test reads two floats past the array on the stack. It passes by chance. AddressSanitizer stops on it:The rotation is now
(float[]){0, 0, 0}, which is what the case means: no rotation. The host code is fine; only the test was wrong.Checked:
make -C dm/host/tests runpasses (hid players: 119 checks, 0 failed), and #412'sasantarget no longer reports it. #412 is rebased on top of this.