-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SmallCStr conversion from CStr #121125
Conversation
r? @davidtwco rustbot has assigned @davidtwco. Use r? to explicitly pick a reviewer |
@bors r+ p=1 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bd6b336): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 636.575s -> 636.704s (0.02%) |
The conversion from CStr to SmallCStr was not including the null byte. SmallCStr requires a trailing null. This caused
as_c_str
to either panic if std is built with debug assertions, or to have some corrupt memory behavior.