Skip to content
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

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Feb 15, 2024

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.

@rustbot
Copy link
Collaborator

rustbot commented Feb 15, 2024

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 15, 2024
@Mark-Simulacrum
Copy link
Member

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Feb 15, 2024

📌 Commit 217e5e4 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 15, 2024
@bors
Copy link
Contributor

bors commented Feb 15, 2024

⌛ Testing commit 217e5e4 with merge bd6b336...

@bors
Copy link
Contributor

bors commented Feb 15, 2024

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing bd6b336 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 15, 2024
@bors bors merged commit bd6b336 into rust-lang:master Feb 15, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 15, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bd6b336): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.4% [1.4%, 1.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 636.575s -> 636.704s (0.02%)
Artifact size: 306.16 MiB -> 306.15 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants