You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
alloc-variant-zeroed causing issues with LTO #145995
I believe this causing https://crbug.com/441524277. In summary, the rust calloc function _RNvCsfo6nMSlQo1l_7___rustc19___rust_alloc_zeroed definition does not have the alloc-family attribute, but user modules of it have the alloc-family attribute on the calloc declaration. however, if ThinLTO decides to import the function, we lose the alloc-family attribute and the verifier complains 'alloc-variant-zeroed' must name a function belonging to the same 'alloc-family'.
Alternatively we could also drop the verifier checks on the LLVM side -- they are not required for correctness. Though it sounds like this did highlight a legitimate problem in this case.
Activity
aeubanks commentedon Sep 3, 2025
followup to #144086 (comment)
no sign of the
alloc-familyattribute in the.llfile, which does contain definitions for the alloc functionsapiraino commentedon Sep 4, 2025
Assigning priority (discussion on Zulip).
@rustbot label -I-prioritize +P-high
aeubanks commentedon Sep 17, 2025
any update on this? we have #144086 reverted in our ToT rustc build but that's not sustainable
wesleywiser commentedon Sep 18, 2025
Visited during compiler team triage meeting, we recommend considering a revert & re-apply of the injecting PR after this issue has been resolved.
nikic commentedon Sep 18, 2025
Forwarding from Zulip: If no global_allocator is specified the function definitions are generated at:
rust/compiler/rustc_codegen_llvm/src/allocator.rs
Lines 18 to 63 in 32e3d9f
rust/compiler/rustc_builtin_macros/src/global_allocator.rs
Lines 103 to 105 in 32e3d9f
Alternatively we could also drop the verifier checks on the LLVM side -- they are not required for correctness. Though it sounds like this did highlight a legitimate problem in this case.
10 remaining items
Unrolled build for #146766
nikic commentedon Sep 25, 2025
@aeubanks Could you please confirm whether #146766 does indeed fix the original issue you saw?
Rollup merge of #146766 - nikic:global-alloc-attr, r=nnethercote
Auto merge of #147030 - nikic:revert-alloc-zeroed, r=wesleywiser
Auto merge of #147030 - nikic:revert-alloc-zeroed, r=wesleywiser
Rollup merge of rust-lang#147150 - nikic:alloc-shim-attributes, r=bjorn3
Rollup merge of rust-lang#147150 - nikic:alloc-shim-attributes, r=bjorn3
Unrolled build for #147150
wesleywiser commentedon Oct 9, 2025
#147030 was merged to beta to revert the injecting PR and #147150 was merged to master to fix the actual issue thus I believe this can be closed.
@aeubanks if you are still observing this issue on beta or nightly, please let us know so we can reopen. Thanks!
Rollup merge of #146766 - nikic:global-alloc-attr, r=nnethercote
Rollup merge of #146766 - nikic:global-alloc-attr, r=nnethercote