Skip to content

Rust claims article: what the compiler stops, and what it does not - #9

Closed
compilersutra wants to merge 14 commits into
mainfrom
feat/clang-flags-article-ui
Closed

Rust claims article: what the compiler stops, and what it does not#9
compilersutra wants to merge 14 commits into
mainfrom
feat/clang-flags-article-ui

Conversation

@compilersutra

@compilersutra compilersutra commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds an article on what “Rust is memory safe” actually covers, with programs compiled on rustc 1.93.1, gcc/g++ 13.3, and clang/clang++ 18.1.3.
  • Walks through use-after-free, out-of-bounds indexes (constant and from argv), AddressSanitizer/UBSan on the C/C++ side (gcc and clang), and a check-then-open TOCTOU example rustc does not catch.
  • Wires the page into the article index and Compiler Comparisons sidebar, with links from the existing Rust vs C++ and rustc-pipeline pieces.

Test plan

  • Open /docs/articles/rust-claims-a-reality-check locally and skim the three memory examples plus the TOCTOU tabs.
  • Confirm gcc, clang, rustc, ASan, and UBSan output in those sections matches a local rebuild if you have the toolchains.
  • Confirm the ISSTA, Miri, Zellic, and CVE links load.
  • Confirm sidebar and related-article links at the top of the page.

compilersutra and others added 14 commits August 15, 2026 10:41
…ly covers.

Wire it into Compiler Comparisons with hub and sibling-article links so the slogan, the C++ comparison, and the rustc pipeline sit next to each other.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the report cadence (paired tables, wrap-up boxes, extra diagrams) while keeping the compiled demos, uutils notes, and ISSTA / #25860 facts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the same facts and demos; explain jargon on first use so the extra clauses on the slogan are easier to follow.

Co-authored-by: Cursor <cursoragent@cursor.com>
… article.

The piece now walks through rustc vs gcc/g++ on the same bugs, what ASan/UBSan catch by default, and a check-then-open file example rustc does not see.
Clang still ships the UAF and TOCTOU programs; it warns on a constant a[10] and links anyway. ASan/UBSan match gcc when the flags are on.
…-bug trio, and CVE walkthroughs.

Adds the C/C++/Rust scoreboard, what the language does and does not guarantee, safety vs correctness, the rustc pipeline question, cost of the checks, and a decision table.
Adds what rustc actually proves, how that information reaches LLVM, panic vs undefined behavior, a compiled two-thread example, and a sharper closing sentence.
Cut overlapping recap sections, put compile-time vs panic vs unsafe up front, and keep TOCTOU as the boundary example instead of a second CVE essay.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add an unsafe/FFI checklist, note span::at vs operator[] and LLVM-elided bounds checks, and cite references inline.

Co-authored-by: Cursor <cursoragent@cursor.com>
…s of rustc.

Co-authored-by: Cursor <cursoragent@cursor.com>
…nsafe.

Spell out that --release does not drop bounds checks unless LLVM proves the index, and bridge from the pipeline into the rustc soundness example.

Co-authored-by: Cursor <cursoragent@cursor.com>
…notes.

Also bold the results table headers and note that the #25860 debug stop is rustc's internal check, not user code.

Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify that the #25860 debug stop is a compiler-internal assertion, not user code.

Co-authored-by: Cursor <cursoragent@cursor.com>
C++23 checked indexing in the article is vector::at or GSL; the C++23 span[i] experiment is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@compilersutra

Copy link
Copy Markdown
Owner Author

Closing this one. It mixed the clang-flag explorer with the Rust claims article.

The article-only change landed in #10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant