Rust borrow checker에서 11년 묵은 unsoundness 버그 발견
11 year old unsoundness bugs found in Rust borrow checker
Rust의 borrow checker에서 struct의 lifetime 요구사항을 covariant field assignment로 우회할 수 있는 unsoundness 버그가 발견됐다. 이 버그는 Rust 1.4 버전부터 존재해온 것으로, Drop 구현에서 non-'static 참조를 'static으로 잘못 가정하게 만들어 use-after-free나 segfault를 일으킬 수 있다. Rust 팀은 해당 이슈를 P-high 우선순위로 지정하고 types 팀에서 검토 중이다.
내 버전의 코드는 1.18.0(2017년)부터 계속 컴파일되어 왔다. 도대체 어떻게 이게 지금까지 발견되지 않았던 거지???