home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.misc      Linux-specific topics not covered by oth      135,536 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 135,209 of 135,536   
   Richard Kettlewell to c186282@nnada.net   
   Re: Python: A Little Trick For Every Nee   
   04 Feb 26 08:24:12   
   
   From: invalid@invalid.invalid   
      
   c186282  writes:   
   > On 2/4/26 00:14, Robert Riches wrote:   
   >> Did a bit of web searching to refresh memory.  The term is   
   >> "ownership":   
   >> https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html   
   >> https://luk6xff.github.io/other/safe_secure_rust_book/memory_   
   afety/pointers.html   
   >> I didn't find exactly the wording I was looking for, but IIRC one   
   >> of the key issues is you cannot have a function that allocates   
   >> memory and returns a pointer to said allocated memory, because   
   >> that violates the rule from the first link that, "When the owner   
   >> goes out of scope, the value will be dropped."  Largely, it's   
   >> that restriction that causes difficulty when some code is ported   
   >> from C to Rust.  Workarounds to that restriction are required in   
   >> Rust that are not required in C.   
   >   
   >   Being able to pass pointers back and forth is a strong point with   
   >   'C'. In theory this COULD be exploited by evil actors, but I can't   
   >   find any clear doc on whether it's been done to any relevant degree.   
      
   Yes, constantly and for many decades now. Have a look through CVE   
   databases or follow a list like oss-security and you’ll see a steady   
   stream of vulnerabilities arising from C’s lack of memory safety.   
      
   --   
   https://www.greenend.org.uk/rjk/   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca