-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Initialize channel Block
s directly on the heap
#132738
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
r? libs |
This comment has been minimized.
This comment has been minimized.
The channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. Fixes rust-lang#102246
766ae45
to
03383ad
Compare
Can a corresponding PR be opened in the crossbeam-channel repository to avoid things getting out of sync? |
Well, I think crossbeam may not like MSRV 1.82 for edit: I've got something working with manual |
@bors r+ |
The list channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. References from the `std` channel implementation: * rust-lang/rust#102246 * rust-lang/rust#132738
…eemdev Initialize channel `Block`s directly on the heap The channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. Fixes rust-lang#102246
The list channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. References from the `std` channel implementation: * rust-lang/rust#102246 * rust-lang/rust#132738
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132738 (Initialize channel `Block`s directly on the heap) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- failed in #132751 (comment) |
@bors try |
Initialize channel `Block`s directly on the heap The channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. Fixes rust-lang#102246 try-job: test-various
The list channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. References from the `std` channel implementation: * rust-lang/rust#102246 * rust-lang/rust#132738
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
Added @bors r=ibraheemdev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason this can't be a std unit test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't get the old code to fail that way, I think because std
tests are still built with optimization, which may be able avoid the stack slot altogether.
Rollup of 5 pull requests Successful merges: - rust-lang#132161 ([StableMIR] A few fixes to pretty printing) - rust-lang#132389 (coverage: Simplify parts of coverage graph creation) - rust-lang#132452 (coverage: Extract safe FFI wrapper functions to `llvm_cov`) - rust-lang#132590 (Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats`) - rust-lang#132738 (Initialize channel `Block`s directly on the heap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132738 - cuviper:channel-heap-init, r=ibraheemdev Initialize channel `Block`s directly on the heap The channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. Fixes rust-lang#102246 try-job: test-various
…eemdev Initialize channel `Block`s directly on the heap The channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. Fixes rust-lang#102246 try-job: test-various
Rollup of 5 pull requests Successful merges: - rust-lang#132161 ([StableMIR] A few fixes to pretty printing) - rust-lang#132389 (coverage: Simplify parts of coverage graph creation) - rust-lang#132452 (coverage: Extract safe FFI wrapper functions to `llvm_cov`) - rust-lang#132590 (Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats`) - rust-lang#132738 (Initialize channel `Block`s directly on the heap) r? `@ghost` `@rustbot` modify labels: rollup
The channel's
Block::new
was causing a stack overflow because it held32 item slots, instantiated on the stack before moving to
Box::new
.The 32x multiplier made modestly-large item sizes untenable.
That block is now initialized directly on the heap.
Fixes #102246
try-job: test-various