Repository navigation
docs(debt): say that snwprintf_s does not invoke the exported constraint handler - #8941
Conversation
…int handler Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed against the implementation: FormattingWide.cpp does not invoke the installed Sony constraint handler in snwprintf_s, so this debt wording is accurate and removes the obsolete claim that set_constraint_handler_s is not exported. The overlap report for #7952 is unrelated to this line; it changes wcscpy_s and the Annex K list nearby. Applicable convention, intake, label, and report checks pass.
harisibrar1
left a comment
There was a problem hiding this comment.
Checked against main:
set_constraint_handler_sis exported (WideConversion.cpp:16-18, forwarding toSonySetConstraintHandlerS), so the old "is not exported" was stale.snwprintf_s(FormattingWide.cpp:246-262) never readsSonyConstraintHandlerSlot(); a violation only yields-1andbuffer[0] = 0, so "the handler installed withset_constraint_handler_sis not invoked" is accurate and matches thesscanf_sentry (libc.md:59).check_conventions.py --base main --head pr-8941passes.
Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
|
Checked the snwprintf_s debt wording against FormattingWide.cpp: the installed constraint handler is never invoked, and set_constraint_handler_s is exported; merged. |
What
The
snwprintf_sentry ofdocs/dev/debt/libc.mdsaid "set_constraint_handler_sis not exported". libc has exported it since 5290f92 (WideConversion.cpp:16), andsnwprintf_s(FormattingWide.cpp:246-262) still never calls the installed handler: a violation only returns a negative value. The entry now says that the handler installed withset_constraint_handler_sis not invoked, which matches thesnprintf_sandsscanf_sentries. No other open pull request changes this line (#7081, #8711 and #7841 touch other lines of the file).Tested
Documentation only. Checked on the sources of current
main:snwprintf_shas no call to the Sony constraint handler (SonyConstraintHandlerSlotis only used inWideConversion.cppandFileAndHeap.cpp). The Markdown link scan reports 0 broken links andtools/check_conventions.py --base upstream/mainpasses. No code or test changed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)AI-assisted (Claude Code).