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

Regression 1.67.0: Static archives have different unix permissions than before #107495

Closed
alexcrichton opened this issue Jan 31, 2023 · 3 comments · Fixed by #122723
Closed

Regression 1.67.0: Static archives have different unix permissions than before #107495

alexcrichton opened this issue Jan 31, 2023 · 3 comments · Fixed by #122723
Labels
A-linkage Area: linking into static, shared libraries and binaries T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@alexcrichton
Copy link
Member

Given this code:

#[no_mangle]
pub extern "C" fn foo() {}

I get this output from rustc:

$ rustc +1.66.1 foo.rs --crate-type staticlib && ls -alh libfoo.a
-rw-r--r-- 1 acrichto acrichto 22M Jan 30 16:28 libfoo.a
$ rustc +1.67.0 foo.rs --crate-type staticlib && ls -alh libfoo.a
-rw------- 1 acrichto acrichto 22M Jan 30 16:28 libfoo.a

The most recent archive no longer has the "read" permission bit set for group/world owners. This ended up breaking Wasmtime's build because our files are built in a container with a different user and aren't then readable outside of the container. There's no particular reason we do this and we can work around this, but I also suspected that the change in permissions here probably wasn't intentional.

I think this is due to #97485 (cc @bjorn3), specifically this line. I haven't dug too deeply but my guess is that temp files specifically turn off other permission bits

@bjorn3
Copy link
Member

bjorn3 commented Jan 31, 2023

#107360 reverted back to the LLVM archive writer to fix another regression. Still I think this issuw should be kept open as a reminder to fix the new archive writer before it becomes the default again.

@jyn514 jyn514 added A-linkage Area: linking into static, shared libraries and binaries T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 8, 2023
@jyn514
Copy link
Member

jyn514 commented Apr 8, 2023

cc #107407, which also needs to be fixed before relanding the archive writer change. BTW @bjorn3 is there a tracking issue for that somewhere? I see the original PR linked to https://github.com/bjorn3/rustc_codegen_cranelift/issues/1155, but it hasn't been reopened.

@bjorn3
Copy link
Member

bjorn3 commented Apr 8, 2023

I have kept all issues that need to be fixed before it can land again in my github notifications. There is currently no tracking issue, but feel free to open one. It did probably be a good idea to ensure no issue is forgotten about.

bjorn3 added a commit to bjorn3/rust that referenced this issue Mar 19, 2024
bjorn3 added a commit to bjorn3/rust that referenced this issue Mar 19, 2024
static libraries with ar_archive_writer

Fixes rust-lang#107495
bjorn3 added a commit to bjorn3/rust that referenced this issue Mar 19, 2024
static libraries with ar_archive_writer

Fixes rust-lang#107495
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Mar 20, 2024
…thercote

Use same file permissions for ar_archive_writer as the LLVM archive writer

This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (rust-lang#107407) to fix all known regressions.

Fixes rust-lang#107495
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Mar 20, 2024
…thercote

Use same file permissions for ar_archive_writer as the LLVM archive writer

This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (rust-lang#107407) to fix all known regressions.

Fixes rust-lang#107495
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Mar 20, 2024
…thercote

Use same file permissions for ar_archive_writer as the LLVM archive writer

This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (rust-lang#107407) to fix all known regressions.

Fixes rust-lang#107495
bjorn3 added a commit to bjorn3/rust that referenced this issue Mar 22, 2024
static libraries with ar_archive_writer

Fixes rust-lang#107495
bjorn3 added a commit to bjorn3/rust that referenced this issue Apr 16, 2024
bjorn3 added a commit to bjorn3/rust that referenced this issue Apr 16, 2024
static libraries with ar_archive_writer

Fixes rust-lang#107495
bjorn3 added a commit to bjorn3/rust that referenced this issue Apr 17, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 17, 2024
…thercote

Use same file permissions for ar_archive_writer as the LLVM archive writer

This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (rust-lang#107407) to fix all known regressions.

Fixes rust-lang#107495
@bors bors closed this as completed in 297fceb Apr 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 17, 2024
Rollup merge of rust-lang#122723 - bjorn3:archive_writer_fixes, r=nnethercote

Use same file permissions for ar_archive_writer as the LLVM archive writer

This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (rust-lang#107407) to fix all known regressions.

Fixes rust-lang#107495
RalfJung pushed a commit to RalfJung/miri that referenced this issue Apr 17, 2024
Use same file permissions for ar_archive_writer as the LLVM archive writer

This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (rust-lang/rust#107407) to fix all known regressions.

Fixes rust-lang/rust#107495
simlay pushed a commit to simlay/rust that referenced this issue Apr 18, 2024
simlay pushed a commit to simlay/rust that referenced this issue Apr 18, 2024
static libraries with ar_archive_writer

Fixes rust-lang#107495
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 12, 2024
…=jieyouxu

Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes rust-lang#107407
Fixes rust-lang#107162
rust-lang#107495 has been fixed in a previous PR already.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 12, 2024
…=jieyouxu

Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes rust-lang#107407
Fixes rust-lang#107162
rust-lang#107495 has been fixed in a previous PR already.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 12, 2024
…=jieyouxu

Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes rust-lang#107407
Fixes rust-lang#107162
rust-lang#107495 has been fixed in a previous PR already.
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 14, 2024
…try>

Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes rust-lang#107407
Fixes rust-lang#107162
rust-lang#107495 has been fixed in a previous PR already.

try-job: dist-aarch64-msvc
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 15, 2024
…ieyouxu

Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes rust-lang#107407
Fixes rust-lang#107162
rust-lang#107495 has been fixed in a previous PR already.
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 15, 2024
…ieyouxu

Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes rust-lang#107407
Fixes rust-lang#107162
rust-lang#107495 has been fixed in a previous PR already.
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Aug 17, 2024
Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes rust-lang/rust#107407
Fixes rust-lang/rust#107162
rust-lang/rust#107495 has been fixed in a previous PR already.
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Aug 29, 2024
Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes rust-lang/rust#107407
Fixes rust-lang/rust#107162
rust-lang/rust#107495 has been fixed in a previous PR already.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants