-
rust1.61에선 해결됨 ❤️I found a very fun Rust bug코딩Coding/★★Rust★★최신동향★및관련글 2022. 6. 29. 22:58728x90
I found a very fun Rust bug
While investigating an ICE, I found this little bug caused by the same issue.
```fn hi() -> impl Sized { std::ptr::null::<u8>() } fn main() { let b: Box<dyn Fn() -> Box<u8>> = Box::new(hi); let boxed = b(); let null = *boxed; // SIGSEGV println!("{null:?}"); }
```
It can come in very handy if you ever need a transmute in forbid(unsafe_code) (do not do this).반응형'코딩Coding > ★★Rust★★최신동향★및관련글' 카테고리의 다른 글
Rust Meetup Amsterdam-Fiberplain's path to full-stack (0) 2022.08.22 Rust Released Cycle Explains | LGR (0) 2022.08.19 웹어셈블리 개발자, 파이썬보다 '러스트' 선호...왜? (0) 2022.07.06 Referencing parent from child (0) 2022.07.06 Obscure Rust: reborrowing is a half-baked feature | Reddit (0) 2022.06.27 Nine Rules for Elegant Rust Library APIs (0) 2022.06.26 Rust : Turtles all the way down (0) 2022.06.19 This Month in Rust OSDev: April 2022 (0) 2022.05.07