[HN Gopher] Making unsafe Rust a little safer
       ___________________________________________________________________
        
       Making unsafe Rust a little safer
        
       Author : avinassh
       Score  : 9 points
       Date   : 2024-12-16 11:28 UTC (1 days ago)
        
 (HTM) web link (blog.colinbreck.com)
 (TXT) w3m dump (blog.colinbreck.com)
        
       | no_time wrote:
       | >The program terminates, which may be highly undesirable, or even
       | unacceptable, creating other safety issues if the software is
       | vital for operating critical infrastructure
       | 
       | I'm no rust evangelist but I don't understand this point. In what
       | scenario would you rather have an out of bounds read go through
       | and let Jesus take the wheel rather than print a stacktrace and
       | have a clean-ish exit?
        
         | lilyball wrote:
         | You wouldn't. You cut off the rest of that sentence in your
         | quote, the full sentence is
         | 
         | > _The program terminates, which may be highly undesirable, or
         | even unacceptable, creating other safety issues if the software
         | is vital for operating critical infrastructure, but the run-
         | time checks ensure the program will never execute unsafe code
         | that would result in undefined behaviour._
         | 
         | That said, this whole sentence here just feels kind of out of
         | place, like it was written just for the sake of having
         | something to say about a panic.
        
         | aw1621107 wrote:
         | In those kinds of scenarios I think you'd typically want to go
         | for formal verification or similar methods because you want
         | liveness guarantees in addition to memory safety guarantees.
        
       ___________________________________________________________________
       (page generated 2024-12-17 23:01 UTC)