Fix double va_start undefined behavior in error handling#1086
Open
rgsl888prabhu wants to merge 2 commits intoNVIDIA:mainfrom
Open
Fix double va_start undefined behavior in error handling#1086rgsl888prabhu wants to merge 2 commits intoNVIDIA:mainfrom
rgsl888prabhu wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
Remove duplicate va_start() calls in cuopt_expects(), mps_parser_expects(), and mps_parser_expects_fatal(). Calling va_start() twice on the same va_list without an intervening va_end() is undefined behavior per the C standard and can corrupt the stack or produce garbage error messages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughTwo error handling header files are updated to remove redundant Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Summary
Remove duplicate
va_start()calls incuopt_expects(),mps_parser_expects(), andmps_parser_expects_fatal(). Callingva_start()twice on the sameva_listwithout an interveningva_end()is undefined behavior per the C standard.Testing
No new tests added. Existing unit tests cover these error handling paths.
Documentation
No documentation changes needed.