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_strto either panic if std is built with debug assertions, or to have some corrupt memory behavior.