News for hackers. Stuff that matters.
Re:Nvidia Security Team: “What if we just stopped using C?” by touisteur on Monday November 07, 2022 @12:46PM (#33509285)
Erm it is perfectly possible to perform dynamic allocation in Ada. You have the 'new' keyword to allocate a new object of a type. You have the 'unchecked deallocation' mechanism. You have controlled types that deallocate when an object is out of scope. You have all sorts of weak references schemes in some libraries. You have storage pools to handle allocation specifics for a type. You have the secondary stack that handles returning objects of unknown-size-at-call-site.

Most of those can be disabled though through the 'restriction' mechanism (look up Pragma Restriction which is very interesting in itself).

SPARK itself can handle and prove some ownership properties but to the best of my knowledge isn't at the level of rust in memory safety on dynamically allocated memory.

Re:Nvidia Security Team: “What if we just stopped using C?” by topdancing on Monday November 07, 2022 @05:07PM (#33513240)
> SPARK itself can handle and prove some ownership properties but to the best of my knowledge isn't at the level of rust in memory safety on dynamically allocated memory.

It actually is: https://www.adacore.com/uploads/techPapers/Safe-Dynamic-Memo...

And using https://www.adacore.com/sparkpro as a reference (ignore the 'Pro' bit as it's also available in the GPL edition) - anything certified to SPARK Silver level is far safer than any Rust code out there.

Re:Nvidia Security Team: “What if we just stopped using C?” by touisteur on Monday November 07, 2022 @08:50PM (#33515049)
Seems I missed some of the progress... Things are moving fast these days.