Repository navigation
[AUTOMATED] Keep the NULL comparison of a pointer tested inside && / || (truthycond ptrchain) - #1975
Merged
Merged
Conversation
…rison [AUTOMATED] work in progress (temporary KUNA_PTRCMP_GLOBALS toggle for measurement). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] work in progress. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] regenerate docs/options.md and the phase catalog fixture, re-record docs/baseline-stages.json for the new kuna-ptrchain.xml (5464 -> 5474), bump the stage corpus count (926 -> 927). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] boolret_round_trip expects `a0 != NULL` in its chains and still compiles and runs the printed C against the source; the conditional register model defines NULL for the printed `entity == NULL`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
mahaloz
added a commit
to phix33/kuna
that referenced
this pull request
Nov 25, 2026
Resolves the stage-count conflicts with Noelo-Lab#1975: the corpus count is 928 (927 + kuna-elfv1-symbolextent), and docs/baseline-stages.json is re-recorded on the merged tree (5,480 assertions: main's 5,474 plus this stage's 6). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
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 pointer tested inside an
&&/||chain prints bare, while C source usually spells that testp != NULL(andp == NULLfor!p). On the repo'sboolretfixture (decompiler/crates/kuna-analysis/tests/fixtures/boolret.chasreturn path != 0 && path[0] == '/';andreturn p != 0 && *p == a;):With this change:
truthycondgains a value,ptrchain, which becomes the default. It isonexcept that a comparison that is itself an operand of a printed&&/||keeps its!= NULL/== NULLwhen the value it tests prints as a plain pointer parameter or local.onandoffkeep their exact output.if (p)stay truthy, as does a chain that is a loop's condition (while (p && *p)), where the bare form is the common spelling.X != NULL/X == NULLin place ofX/!X.decompile-alltime is unchanged (sshd x0.98, ls x0.94, bash x0.99, min of 7).Tests:
tests/stages/kuna-ptrchain.xmlchecks a pointer between a call and an integer, a negated pointer, a returned chain, a field access, a stand-alone test and a loop condition under the default and underoption truthycond on. Nine stage tests about other features pinoption truthycond on; the vendored datatests do not move. Theboolretround trip, which compiles the printed C and runs it against the source, now expects the comparison.Model:
anthropic/claude-opus-5-5🤖 Generated with Claude Code
https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU