Achievement unlocked: created a segfault using only safe @rustlang code!
miniblog.
Related Posts
@skybert@emacs.ch Difftastic has very little unsafe, just the FFI to tree-sitter libraries.
That said, I've actually seen safe Rust segfault in the past!
Difftastic is written in Rust, so I was surprised to get a user report of a segfault.
After some investigation, it turns out that it's a segfault in git itself, which has existed since 2014! https://lore.kernel.org/git/CAFXAjY7XcL1APhLRXU8TO96z=f7957f2ieK56dHVsXUay55vpg@mail.gmail.com/T/#u
(Upstream has already kindly written a patch.)
It's possible to reliably segfault Emacs when using undercover, at least on Travis: https://github.com/Wilfred/elisp-def/commit/57523ad268e0f4d2550386d45d55d7a6ed5fe50c
Not sure why at this point.