Repository navigation
ci(native): run the tests against a UBSan build of the addon - #33
Conversation
A normal build of the out-of-range casts fixed in #30 passes every test. Add a ci-ubsan mise task that builds only the addon with -fsanitize=undefined,float-cast-overflow and no recovery, then runs the tests and smoke. CI runs it as a linux-x64-ubsan matrix row, and every row now names its mise task. _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `medium`_ Change-Id: Iad93613b401f2b4c82346d12b851dc9dc779dac5 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
If the sanitizer flags stop reaching g++, the ubsan row would build a plain addon and stay green. The new step checks the addon's own object files for undefined UBSan _abort handlers. The final .node cannot show this, because libghostty-vt.a always carries Zig's handlers. _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `low`_ Change-Id: I5e7cd4b708ad8e7f17356cb9e4da8cecf15c75b9 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcb68251f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
mise runs each step with pipefail. grep -q exits on its first match, so nm can die of SIGPIPE and the guard fails a correctly instrumented build with exit 141. grep -c reads to the end and still exits 1 when nothing matches. _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `low`_ Change-Id: I17c4f080629226f6dfb27d9354923d7a31ac382b Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Merge record for this PR.
Generated with |
Why
CI must fail by itself when the native addon hits undefined behavior again. A normal build of the out-of-range casts that #30 fixed passed every test, so only a sanitizer build catches that kind of bug. This PR adds that build to CI.
What changed
mise.tomlgets aci-ubsantask. It builds the addon with-fsanitize=undefined,float-cast-overflow -fno-sanitize-recover=all, then runsnpm testandnpm run smoke..github/workflows/ci.ymlgives every matrix row ataskcolumn and adds alinux-x64-ubsanrow that runsci-ubsan.native/README.mdandREADME.mdname the task in their verification sections.Scope
citask.Tradeoffs
taskcolumn says what each row runs.build:nativestep only, sonpm ciand the Zig build of libghostty-vt never see them.LD_PRELOAD. The UBSan handlers that Zig bundles inlibghostty-vt.atake every report and abort the process. The addon also linkslibubsan.so.1as a fallback..node. The.nodecarries Zig's handlers in every build, so it cannot show whether g++ got the flags.Blast radius
CI gets one more Linux job about as long as the
cirow. The published package changes only by one line in each ofREADME.mdandnative/README.md.Verification
main, the sanitized build passes 40 of 40 tests and smoke. With the pre-fix(native): range-check dimensions before casting them #30native/terminal.cc,npm testexits 1 withpanic: nan is outside the range of representable values of type 'unsigned int'.build/folder.g++ -fsanitize=undefinedalone emits no float-cast check. Addingfloat-cast-overflowemits it, which is why the flag list names it.native/terminal.cc. Thelinux-x64-ubsanrow failed with the samenanpanic, and the plainlinux-x64row passed. The plain arm64 rows also failed, on the fix(native): range-check dimensions before casting them #30 test forscrollbackLimit: 2^64.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh