Re: Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust

Derek <derek-nospam@shape-of-code.com>
Tue, 13 May 2025 21:30:43 +0100

          From comp.compilers

Related articles
Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust johnl@taugh.com (John R Levine) (2025-05-09)
Re: Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust derek-nospam@shape-of-code.com (Derek) (2025-05-13)
Re: Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust arnold@freefriends.org (2025-05-14)
Re: Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust 643-408-1753@kylheku.com (Kaz Kylheku) (2025-05-14)
Re: Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust anton@mips.complang.tuwien.ac.at (2025-05-15)
Re: Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust gneuner2@comcast.net (George Neuner) (2025-05-15)
Re: Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust christopher.f.clark@compiler-resources.com (Christopher F Clark) (2025-05-16)
Re: Paper: PR2: Peephole Raw Pointer Rewriting with LLMs for Translating C to Safer Rust cross@spitfire.i.gajendra.net (2025-05-16)
[1 later articles]
| List of all articles for this month |
From: Derek <derek-nospam@shape-of-code.com>
Newsgroups: comp.compilers
Date: Tue, 13 May 2025 21:30:43 +0100
Organization: Compilers Central
References: 25-05-004
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="76075"; mail-complaints-to="abuse@iecc.com"
Keywords: C, Rust
Posted-Date: 13 May 2025 21:16:42 EDT
In-Reply-To: 25-05-004

All,


> Automated tools translate C to Rust but produce lousy Rust code because of
> C's loose pointer semantics. They use an LLM to improve it somewhat.


Developers could always stay with C and switch on all the
pointer+array bounds checking that GCC/LLVM have been supporting for
some years (30 in the case of gcc).


I have been trying to find out how many products written in Rust
actually ship with the checking still switched on.


Way back when, most products written in Pascal used to ship with the
checking switched off, so that customers did not see the strange
errors+program termination.


I suspect that the same is happening with Rust. If so, how does using
Rust make the code safer than using C without any checking switched
on?


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.