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 some possible out-of-bound accesses in process_preprocesed_{file,line} #1980

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

glandium
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (7cca55a) 30.95% compared to head (c9c6063) 30.62%.

Files Patch % Lines
src/compiler/c.rs 33.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1980      +/-   ##
==========================================
- Coverage   30.95%   30.62%   -0.33%     
==========================================
  Files          51       51              
  Lines       19191    19192       +1     
  Branches     9231     9230       -1     
==========================================
- Hits         5940     5878      -62     
- Misses       7756     7761       +5     
- Partials     5495     5553      +58     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sylvestre sylvestre merged commit 68d0409 into mozilla:main Nov 22, 2023
39 checks passed
glandium added a commit to glandium/sccache that referenced this pull request Nov 22, 2023
Currently, when the server panics, the client never gets a response, and
the compilation gets stuck. The only indication of something going wrong
is in the logs if they are enabled.

With this change, the error is transmitted to the client, which then
fails and prints it. For instance, one of the out-of-bound accesses
fixed in mozilla#1980 now prints this on the client side before returning a
non-zero exit code:

sccache: encountered fatal error
sccache: error: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1
sccache: caused by: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1

Fixes mozilla#756
glandium added a commit to glandium/sccache that referenced this pull request Nov 22, 2023
Currently, when the server panics, the client never gets a response, and
the compilation gets stuck. The only indication of something going wrong
is in the logs if they are enabled.

With this change, the error is transmitted to the client, which then
fails and prints it. For instance, one of the out-of-bound accesses
fixed in mozilla#1980 now prints this on the client side before returning a
non-zero exit code:

sccache: encountered fatal error
sccache: error: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1
sccache: caused by: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1

Fixes mozilla#756
glandium added a commit to glandium/sccache that referenced this pull request Nov 22, 2023
Currently, when the server panics, the client never gets a response, and
the compilation gets stuck. The only indication of something going wrong
is in the logs if they are enabled.

With this change, the error is transmitted to the client, which then
fails and prints it. For instance, one of the out-of-bound accesses
fixed in mozilla#1980 now prints this on the client side before returning a
non-zero exit code:

sccache: encountered fatal error
sccache: error: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1
sccache: caused by: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1

Fixes mozilla#756
glandium added a commit to glandium/sccache that referenced this pull request Nov 22, 2023
Currently, when the server panics, the client never gets a response, and
the compilation gets stuck. The only indication of something going wrong
is in the logs if they are enabled.

With this change, the error is transmitted to the client, which then
fails and prints it. For instance, one of the out-of-bound accesses
fixed in mozilla#1980 now prints this on the client side before returning a
non-zero exit code:

sccache: encountered fatal error
sccache: error: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1
sccache: caused by: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1

Fixes mozilla#756
pull bot pushed a commit to exoosh/sccache that referenced this pull request Nov 23, 2023
Currently, when the server panics, the client never gets a response, and
the compilation gets stuck. The only indication of something going wrong
is in the logs if they are enabled.

With this change, the error is transmitted to the client, which then
fails and prints it. For instance, one of the out-of-bound accesses
fixed in mozilla#1980 now prints this on the client side before returning a
non-zero exit code:

sccache: encountered fatal error
sccache: error: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1
sccache: caused by: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1

Fixes mozilla#756
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants