Skip to content

#3127: a function whose every return is a string literal presents as static text - #3254

Merged
ehartford merged 1 commit into
mainfrom
static-text
Nov 11, 2026
Merged

ehartford merged 1 commit into
mainfrom
static-text

Conversation

@ehartford

@ehartford ehartford commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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 *_strerror functions 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 --strict with the display scenarios run).

…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
ehartford added this pull request to stack #3256 November 11, 2026 16:02
@ehartford ehartford changed the title static text #3127: a function whose every return is a string literal presents as static text Nov 11, 2026
@ehartford
ehartford marked this pull request as ready for review November 11, 2026 16:02
@ehartford
ehartford merged commit 6940659 into main Nov 11, 2026
@ehartford
ehartford deleted the static-text branch November 11, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant