CStr::from_bytes_with_nul(b"\0") return value changes when compiling with LTO #40165
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When compiling with LTO enabled, CStr::from_bytes_with_nul(b"\0") returns an error. Without LTO, it returns Ok. The former result seems incorrect. The following terminal session should help illustrate:
The text was updated successfully, but these errors were encountered: