Repository navigation
AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test - #165203
Conversation
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
loading still works, right? |
There was a problem hiding this comment.
@xingxue-ibm In this test, this array allows controlling whether we test unloading behavior or load-and-unload behavior. Can you replace it with a named constant, and then cfg that so musl and AIX see ["load_only"], instead of ignoring platforms which can still run half the test?
| for command_arg in TEST_MODES { |
There was a problem hiding this comment.
ugh, the comment looks so weird because the suggestion seems to be attaching to the wrong line...
There was a problem hiding this comment.
Changed to use a named constant TEST_MODES as suggested, thanks!
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
d7b932f to
0c5fd2e
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
0c5fd2e to
54a87f5
Compare
The load_only test exposed a problem where |
|
FYI...@Gelbpunkt |
…cdylib test: - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `COMMAND_ARGS` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
54a87f5 to
7eb4e44
Compare
|
@rustbot ready |
|
Beautiful, thank you. I am going to indicate #165125 exists, so please do not be surprised if the destructor behavior somehow becomes different in a future version of Rust, but that would only cover an explicit @bors r+ rollup |
|
Hmm, I'm fairly certain that I tried something akin to this on -musl hosts and it still didn't pass tests, which is why I ended up just skipping the test entirely. I'll give this change a try later today, thanks! |
…ic-loading-cdylib, r=workingjubilee AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test Fix dynamic loading on AIX so it can be properly tested. - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `TEST_MODE` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
…uwer Rollup of 15 pull requests Successful merges: - #165378 (rustfmt subtree update (v1.12.0)) - #149245 (Make inline attributes apply to the generated `poll` in async fn) - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - #165109 (Avoid building a region map when erasing bound regions) - #163393 (std: Use getexecpath() for current_exe() on OpenBSD) - #164896 (offload: pass the linked device image to the host pass) - #165358 (Reenable some cg_gcc tests that were disabled) - #165371 (Don't use `llvm_type` as the type of `static`s.) - #162232 (Replace `builtin #` with `k#`) - #162608 (Avoid oscillating line wrapping due to symbol indices) - #165029 (Use `MalformedLintAttributeInput` in more places) - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - #165230 (Fix rigidity assertion ICE) - #165354 (Remove `AbiAlign`) - #165374 (Refactorings in preparation for the move trait)
…ic-loading-cdylib, r=workingjubilee AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test Fix dynamic loading on AIX so it can be properly tested. - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `TEST_MODE` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
…uwer Rollup of 14 pull requests Successful merges: - #165378 (rustfmt subtree update (v1.12.0)) - #149245 (Make inline attributes apply to the generated `poll` in async fn) - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - #165109 (Avoid building a region map when erasing bound regions) - #163393 (std: Use getexecpath() for current_exe() on OpenBSD) - #164896 (offload: pass the linked device image to the host pass) - #165358 (Reenable some cg_gcc tests that were disabled) - #165371 (Don't use `llvm_type` as the type of `static`s.) - #162232 (Replace `builtin #` with `k#`) - #162608 (Avoid oscillating line wrapping due to symbol indices) - #165029 (Use `MalformedLintAttributeInput` in more places) - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - #165230 (Fix rigidity assertion ICE) - #165374 (Refactorings in preparation for the move trait)
…ic-loading-cdylib, r=workingjubilee AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test Fix dynamic loading on AIX so it can be properly tested. - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `TEST_MODE` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
…uwer Rollup of 14 pull requests Successful merges: - #149245 (Make inline attributes apply to the generated `poll` in async fn) - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - #165109 (Avoid building a region map when erasing bound regions) - #163393 (std: Use getexecpath() for current_exe() on OpenBSD) - #164896 (offload: pass the linked device image to the host pass) - #165358 (Reenable some cg_gcc tests that were disabled) - #165371 (Don't use `llvm_type` as the type of `static`s.) - #162232 (Replace `builtin #` with `k#`) - #162608 (Avoid oscillating line wrapping due to symbol indices) - #164241 (make the safety documentation consistent in Ptr module) - #165029 (Use `MalformedLintAttributeInput` in more places) - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - #165230 (Fix rigidity assertion ICE) - #165374 (Refactorings in preparation for the move trait)
…ic-loading-cdylib, r=workingjubilee AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test Fix dynamic loading on AIX so it can be properly tested. - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `TEST_MODE` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
…uwer Rollup of 13 pull requests Successful merges: - #149245 (Make inline attributes apply to the generated `poll` in async fn) - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - #165109 (Avoid building a region map when erasing bound regions) - #163393 (std: Use getexecpath() for current_exe() on OpenBSD) - #165358 (Reenable some cg_gcc tests that were disabled) - #165371 (Don't use `llvm_type` as the type of `static`s.) - #162232 (Replace `builtin #` with `k#`) - #162608 (Avoid oscillating line wrapping due to symbol indices) - #164241 (make the safety documentation consistent in Ptr module) - #165029 (Use `MalformedLintAttributeInput` in more places) - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - #165230 (Fix rigidity assertion ICE) - #165374 (Refactorings in preparation for the move trait)
…ic-loading-cdylib, r=workingjubilee AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test Fix dynamic loading on AIX so it can be properly tested. - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `TEST_MODE` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
…uwer Rollup of 20 pull requests Successful merges: - #149245 (Make inline attributes apply to the generated `poll` in async fn) - #163495 (Parallelize AST -> HIR lowering) - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - #165109 (Avoid building a region map when erasing bound regions) - #163393 (std: Use getexecpath() for current_exe() on OpenBSD) - #163625 (Add a lint helper attribute namespace ) - #164414 (Add `let_underscore_drop_guard` lint.) - #165342 (Avoid unnecessary MIR traversals in CheckPackedRef lint) - #165351 (delegation: insert probing adjustments before args check adjustments) - #165358 (Reenable some cg_gcc tests that were disabled) - #165377 (Make `no_implicit_prelude` not suppress tool attributes) - #165397 (Add codegen test for unused match arms removed after inlining) - #165398 (Rework parallel reproducibility tests) - #162608 (Avoid oscillating line wrapping due to symbol indices) - #164241 (make the safety documentation consistent in Ptr module) - #165029 (Use `MalformedLintAttributeInput` in more places) - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - #165230 (Fix rigidity assertion ICE) - #165293 (unstable-book: update default-visibility.md to link to tracking issue) - #165374 (Refactorings in preparation for the move trait)
…ic-loading-cdylib, r=workingjubilee AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test Fix dynamic loading on AIX so it can be properly tested. - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `TEST_MODE` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
…uwer Rollup of 21 pull requests Successful merges: - #165416 (fix unsoundness when compiling `[diverging_const; 0]`) - #149245 (Make inline attributes apply to the generated `poll` in async fn) - #163495 (Parallelize AST -> HIR lowering) - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - #165109 (Avoid building a region map when erasing bound regions) - #163393 (std: Use getexecpath() for current_exe() on OpenBSD) - #163625 (Add a lint helper attribute namespace ) - #164414 (Add `let_underscore_drop_guard` lint.) - #165342 (Avoid unnecessary MIR traversals in CheckPackedRef lint) - #165351 (delegation: insert probing adjustments before args check adjustments) - #165358 (Reenable some cg_gcc tests that were disabled) - #165377 (Make `no_implicit_prelude` not suppress tool attributes) - #165397 (Add codegen test for unused match arms removed after inlining) - #165398 (Rework parallel reproducibility tests) - #162608 (Avoid oscillating line wrapping due to symbol indices) - #164241 (make the safety documentation consistent in Ptr module) - #165029 (Use `MalformedLintAttributeInput` in more places) - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - #165230 (Fix rigidity assertion ICE) - #165293 (unstable-book: update default-visibility.md to link to tracking issue) - #165374 (Refactorings in preparation for the move trait)
…ic-loading-cdylib, r=workingjubilee AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test Fix dynamic loading on AIX so it can be properly tested. - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `TEST_MODE` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
…uwer Rollup of 20 pull requests Successful merges: - #149245 (Make inline attributes apply to the generated `poll` in async fn) - #163495 (Parallelize AST -> HIR lowering) - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - #165109 (Avoid building a region map when erasing bound regions) - #163393 (std: Use getexecpath() for current_exe() on OpenBSD) - #163625 (Add a lint helper attribute namespace ) - #164414 (Add `let_underscore_drop_guard` lint.) - #165342 (Avoid unnecessary MIR traversals in CheckPackedRef lint) - #165351 (delegation: insert probing adjustments before args check adjustments) - #165358 (Reenable some cg_gcc tests that were disabled) - #165377 (Make `no_implicit_prelude` not suppress tool attributes) - #165397 (Add codegen test for unused match arms removed after inlining) - #165398 (Rework parallel reproducibility tests) - #162608 (Avoid oscillating line wrapping due to symbol indices) - #164241 (make the safety documentation consistent in Ptr module) - #165029 (Use `MalformedLintAttributeInput` in more places) - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - #165230 (Fix rigidity assertion ICE) - #165293 (unstable-book: update default-visibility.md to link to tracking issue) - #165374 (Refactorings in preparation for the move trait)
|
@Gelbpunkt If the revised version doesn't work on musl (I wouldn't be surprised if it required further refactoring from this version to work), then feel free to ignore it again and be more specific about the comment. I just didn't want to miss the bug that Xing Xue fixed, and I had a feeling in my bones that there was a bug that could be found by fixing the test. And, well, I was right. |
|
Hi @workingjubilee, just a reminder that you haven't approved this PR yet. |
|
Indeed, this does not pass on a musl host: I don't have further time to look into why this is the case today, but if this makes it through in a rollup I can send a PR to ignore it again. |
|
@xingxue-ibm Hi, I didn't send a GH "approved" message but I approved it for the tooling that actually matters here: #165203 (comment) |
…uwer Rollup of 22 pull requests Successful merges: - #149245 (Make inline attributes apply to the generated `poll` in async fn) - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - #165109 (Avoid building a region map when erasing bound regions) - #163393 (std: Use getexecpath() for current_exe() on OpenBSD) - #163625 (Add a lint helper attribute namespace ) - #164414 (Add `let_underscore_drop_guard` lint.) - #165342 (Avoid unnecessary MIR traversals in CheckPackedRef lint) - #165351 (delegation: insert probing adjustments before args check adjustments) - #165358 (Reenable some cg_gcc tests that were disabled) - #165377 (Make `no_implicit_prelude` not suppress tool attributes) - #165397 (Add codegen test for unused match arms removed after inlining) - #165398 (Rework parallel reproducibility tests) - #162232 (Replace `builtin #` with `k#`) - #162608 (Avoid oscillating line wrapping due to symbol indices) - #164241 (make the safety documentation consistent in Ptr module) - #164258 (clarify when `Vec::into_boxed_slice()` is in-place) - #165029 (Use `MalformedLintAttributeInput` in more places) - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - #165230 (Fix rigidity assertion ICE) - #165293 (unstable-book: update default-visibility.md to link to tracking issue) - #165374 (Refactorings in preparation for the move trait) - #165421 (another Enzyme submodule update for nested autodiff)
Rollup merge of #165203 - xingxue-ibm:aix-disable-test-dynamic-loading-cdylib, r=workingjubilee AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test Fix dynamic loading on AIX so it can be properly tested. - Add `sys::thread_local::guard::aix` using `__pt_atexit_np` to run main thread TLS destructors on process exit on AIX. - Update `dynamic-loading-cdylib` to use member archive syntax (`RTLD_MEMBER`) for `dlopen` on AIX. - Replace the mode array in `dynamic-loading-cdylib` with a `TEST_MODE` constant that selects `load_only` for musl and AIX because `dlclose` does not invoke TLS destructors on those platforms.
…uwer Rollup of 22 pull requests Successful merges: - rust-lang/rust#149245 (Make inline attributes apply to the generated `poll` in async fn) - rust-lang/rust#164304 ([perf] Reuse CanonicalVarKinds if no new variables were added) - rust-lang/rust#165109 (Avoid building a region map when erasing bound regions) - rust-lang/rust#163393 (std: Use getexecpath() for current_exe() on OpenBSD) - rust-lang/rust#163625 (Add a lint helper attribute namespace ) - rust-lang/rust#164414 (Add `let_underscore_drop_guard` lint.) - rust-lang/rust#165342 (Avoid unnecessary MIR traversals in CheckPackedRef lint) - rust-lang/rust#165351 (delegation: insert probing adjustments before args check adjustments) - rust-lang/rust#165358 (Reenable some cg_gcc tests that were disabled) - rust-lang/rust#165377 (Make `no_implicit_prelude` not suppress tool attributes) - rust-lang/rust#165397 (Add codegen test for unused match arms removed after inlining) - rust-lang/rust#165398 (Rework parallel reproducibility tests) - rust-lang/rust#162232 (Replace `builtin #` with `k#`) - rust-lang/rust#162608 (Avoid oscillating line wrapping due to symbol indices) - rust-lang/rust#164241 (make the safety documentation consistent in Ptr module) - rust-lang/rust#164258 (clarify when `Vec::into_boxed_slice()` is in-place) - rust-lang/rust#165029 (Use `MalformedLintAttributeInput` in more places) - rust-lang/rust#165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test) - rust-lang/rust#165230 (Fix rigidity assertion ICE) - rust-lang/rust#165293 (unstable-book: update default-visibility.md to link to tracking issue) - rust-lang/rust#165374 (Refactorings in preparation for the move trait) - rust-lang/rust#165421 (another Enzyme submodule update for nested autodiff)
Fix dynamic loading on AIX so it can be properly tested.
sys::thread_local::guard::aixusing__pt_atexit_npto run main thread TLS destructors on process exit on AIX.dynamic-loading-cdylibto use member archive syntax (RTLD_MEMBER) fordlopenon AIX.dynamic-loading-cdylibwith aTEST_MODEconstant that selectsload_onlyfor musl and AIX becausedlclosedoes not invoke TLS destructors on those platforms.