Repository navigation
#3127: a function whose every return is a string literal presents as static text - #3254
Merged
Merged
Conversation
…static text, from the proof The evidence walk records a string literal return as `ret:literal`; a function with a character-pointer return whose every return is a literal, or a call of a package function that returns static text, is drafted `returns static CStr` (§16.2b.8) with its proof, and a value-only call that does gets its own item. It read "raw: returns *const c_char, a pointer to no record". A static buffer the function writes (curl_version) and a parameter handed back stay raw. Evidence: test/internals/conan_facade_static_text_return_test.w; on c.libcurl 8.23.0 the four *_strerror functions go from raw to presented (15 -> 17 safe before the count's other movement), and `curl_easy_strerror(CURLE_OUT_OF_MEMORY)` is callable from safe code.
ehartford
marked this pull request as ready for review
November 11, 2026 16:02
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.
The drafter proves static text from the body: every return is a string literal (through calls to functions with the same proof). On libcurl 8.x the four
*_strerrorfunctions go from raw to callable in safe code.Test: test/internals/conan_facade_static_text_return_test.w.
Battery: GREEN on the stack top 433e59c (seed-driven,
with uat --strictwith the display scenarios run).