TGViewer
Блог* Блог* @dereference_pointer_there · 1.99K subscribers
Post #9986 1.04K
#prog #article

Fixing the Next 10,000 Aliasing Bugs

Относительно старая (март 2023 года) статья, которую стоило бы опубликовать куда раньше.

Статья, которая сначала демонстрирует, к каким багам может приводить алиасинг, а затем пошагово вводит отслеживание алиасинга в систему типов и в итоге приходит к... Rust.

Главный аргумент статьи — почему отслеживание алиасинга в принципе может быть полезно — говорит о связи между алиасингом и инвариантами:

What do all three of these bugs have in common? In every case, an invariant was violated thanks to multiple aliased references to the same value.

Invariants are essential to large scale programming, because it is impossible to hold the entire state of a system in your head at once. <...>

However, code inevitably needs to temporarily violate an invariant while performing updates. The problem comes when there are multiple references to the relevant data, and another reference observes this temporarily violated invariant.
  • 👍 4
  • 🌚 3
  • 😁 2
  • 🔥 1
More from @dereference_pointer_there
  1. Oct 10, 2026#prog #article HTTP is not simple От Daniel Stenberg, автора curl
  2. Oct 10, 2026#article RISC-V: They Should Have Known Better Несколько эмоциональная статья о недостатка…
  3. Oct 9, 2026#prog #rust #meme Было в r/rustjerk, но сначала выложили в r/ClaudeCode
  4. Oct 9, 2026Welp
  5. Oct 9, 2026#prog #article Оттуда: The case against JPEG XL
  6. Oct 9, 2026#prog #article Shipping JPEG XL in Chrome Но в треде на r/rust пишут, что есть сомнения в…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →