relinker CI: run TLS coverage tests under ASan so the #6401 overread can't return silently #7062

Closed
opened 2026-10-17 09:39:37 +00:00 by oneandonlydean · 3 comments
oneandonlydean commented 2026-10-17 09:39:37 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T09:39:37Z.


Follow-up to #6401 (merged as 750eb13d8).

#6401 fixed a 1-byte read past the end of the input in WindowsTlsBuilder.cpp and added the segment-prefix-at-eof case to the TLS coverage tests. As @Dextroid17 showed in #6401, that case only catches the bug when the relinker is built with AddressSanitizer:

  • Default build, ctest -R '^tls_function_coverage_': passes 3/3 with the fix and 3/3 with the fix reverted.
  • ASan build (-DANYPS5_ENABLE_ASAN=ON -DANYPS5_RELINKER_ONLY=ON): clean 3/3 with the fix, heap-buffer-overflow 3/3 with it reverted.

So CI as it stands would not notice if the overread came back.

Ask: run the relinker TLS coverage tests (or the whole relinker test set, if it's cheap enough) under ASan in the relinker validation workflow, so a regression of #6401 fails CI.

@MarcZX100 said on #6401 that they'd look at covering this path in the relinker validation workflow; this issue is there to track it.

Done when: a CI job builds the relinker with ASan and runs tls_function_coverage_*, and reverting the #6401 fix makes that job fail.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5897043290 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7062). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T09:39:37Z. --- Follow-up to #6401 (merged as 750eb13d8). #6401 fixed a 1-byte read past the end of the input in `WindowsTlsBuilder.cpp` and added the `segment-prefix-at-eof` case to the TLS coverage tests. As @Dextroid17 showed in #6401, that case only catches the bug when the relinker is built with AddressSanitizer: - Default build, `ctest -R '^tls_function_coverage_'`: passes 3/3 with the fix and 3/3 with the fix reverted. - ASan build (`-DANYPS5_ENABLE_ASAN=ON -DANYPS5_RELINKER_ONLY=ON`): clean 3/3 with the fix, heap-buffer-overflow 3/3 with it reverted. So CI as it stands would not notice if the overread came back. **Ask:** run the relinker TLS coverage tests (or the whole relinker test set, if it's cheap enough) under ASan in the relinker validation workflow, so a regression of #6401 fails CI. @MarcZX100 said on #6401 that they'd look at covering this path in the relinker validation workflow; this issue is there to track it. Done when: a CI job builds the relinker with ASan and runs `tls_function_coverage_*`, and reverting the #6401 fix makes that job fail.
pushkarreddyy commented 2026-10-17 11:17:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T11:17:45Z.


Taking this up. I will configure the relinker test step to run under ASan in the relinker validation CI workflow to ensure regression of #6401 is cleanly caught. Will open a PR shortly.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233260699 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7062#issuecomment-6233260699). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-17T11:17:45Z. --- Taking this up. I will configure the relinker test step to run under ASan in the relinker validation CI workflow to ensure regression of #6401 is cleanly caught. Will open a PR shortly.
pushkarreddyy commented 2026-10-17 11:20:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T11:20:51Z.


PR opened: #7096

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233287378 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7062#issuecomment-6233287378). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-17T11:20:51Z. --- PR opened: #7096
MarcZX10 commented 2026-10-17 12:13:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T12:13:03Z.


The proposed CI change is now in PR #7096. I checked its successful Linux relinker job log: the ASan-labeled TLS coverage run completed 31/31 tests with no failures. The full CI matrix on that PR is green for the non-skipped jobs; Windows and Linux application build jobs are skipped by path filtering, while relinker jobs passed on Linux, macOS, and Windows.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233744472 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7062#issuecomment-6233744472). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T12:13:03Z. --- The proposed CI change is now in PR #7096. I checked its successful Linux relinker job log: the ASan-labeled TLS coverage run completed 31/31 tests with no failures. The full CI matrix on that PR is green for the non-skipped jobs; Windows and Linux application build jobs are skipped by path filtering, while relinker jobs passed on Linux, macOS, and Windows.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#7062
No description provided.