GAT's + associated type defaults may cause UB #74824
Labels
A-GATs
Area: Generic associated types (GATs)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-associated_type_defaults
`#![feature(associated_type_defaults)]`
F-generic_associated_types
`#![feature(generic_associated_types)]` a.k.a. GATs
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
requires-nightly
This issue requires a nightly compiler in some way.
I tried this code:
I expected to see this happen: Getting some errors that
Box<usize>
does not satisfy theCopy
bound.Instead, this happened: The program compiled and resulted in a double free,
b
andcopy
both are of typeBox<usize>
and point to the same memory...Meta
rustc --version --verbose
:Backtrace
This seems like some variation of #62211 and #68641
The text was updated successfully, but these errors were encountered: