Sjmarf@sh.itjust.works to Programmer Humor@programming.dev · 2 years agoIs this a Nut?sh.itjust.worksimagemessage-square17fedilinkarrow-up110arrow-down10
arrow-up110arrow-down1imageIs this a Nut?sh.itjust.worksSjmarf@sh.itjust.works to Programmer Humor@programming.dev · 2 years agomessage-square17fedilink
minus-squaremuzzle@lemm.eelinkfedilinkarrow-up2·edit-22 years agoRust is more like: unless you can mathematically prove to me that this is equivalent to a nut there is no ducking way I’ll ever let you compiled this.
minus-squareCanadaPlus@lemmy.sdf.orglinkfedilinkarrow-up2·2 years agoAnd hot take, but that’s good. I’m absolutely stupid enough for idiot gloves like that.
minus-squareryannathans@aussie.zonelinkfedilinkarrow-up0arrow-down1·edit-22 years agoAnd then still segfault https://github.com/Speykious/cve-rs/blob/main/src/segfault.rs
minus-squareEinfachUnersetzlich@lemm.eelinkfedilinkarrow-up1·2 years agoIf you can make safe Rust segfault you’re doing something wrong.
minus-squarexlash123@sh.itjust.workslinkfedilinkarrow-up1·2 years agoIt actually is possible to segfault in safe Rust, although it is considered a bug. Proofs of concept are shown in this cve-rs crate. If you want an explanation of why this happens, I recommend this video: https://youtu.be/vfMpIsJwpjU
minus-square𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.sociallinkfedilinkarrow-up0arrow-down1·2 years agoIME Rust programs crash at about the same rate as other languages. “Rewrite everything in Rust” hasn’t made much of a difference for me, so far.
minus-squarenick@campfyre.nickwebster.devlinkfedilinkarrow-up1·2 years agoA crash is different to a SEGFAULT. I’d be very surprised to see a safe rust program segfault unless it was actively exploiting a compiler bug.
Rust is more like: unless you can mathematically prove to me that this is equivalent to a nut there is no ducking way I’ll ever let you compiled this.
And hot take, but that’s good. I’m absolutely stupid enough for idiot gloves like that.
And then still segfault
https://github.com/Speykious/cve-rs/blob/main/src/segfault.rs
If you can make safe Rust segfault you’re doing something wrong.
It actually is possible to segfault in safe Rust, although it is considered a bug. Proofs of concept are shown in this cve-rs crate.
If you want an explanation of why this happens, I recommend this video: https://youtu.be/vfMpIsJwpjU
IME Rust programs crash at about the same rate as other languages. “Rewrite everything in Rust” hasn’t made much of a difference for me, so far.
A crash is different to a SEGFAULT. I’d be very surprised to see a safe rust program segfault unless it was actively exploiting a compiler bug.