[libc-commits] [libc] [libc] Keep the terminator out of the length of a built error or signal description (PR #236516)
Mike Lothian via libc-commits
libc-commits at lists.llvm.org
Wed Oct 28 14:00:26 PDT 2026
FireBurn wrote:
Sorry, yeah that was a total brainfart. The terminator is no longer written through the stream, it goes into the buffer after the text so strerror and strsignal still get a C string but it stays out of the length. I dropped the const_casts and reused max_buff_size on the error side (the signal side has a different base string so it keeps its own check). There is no public API that shows this, as perror only prints to stderr, so the tests are now unit tests for get_error_string and get_signal_string
https://github.com/llvm/llvm-project/pull/236516
More information about the libc-commits
mailing list