News for hackers. Stuff that matters.
Re:Serious Chrome zero-day by pcwalton on Wednesday March 06, 2019 @09:32PM (#19325115)
> Both of those issues would exist regardless of the language chosen--D, Erlang, Java, Python, Rust, w'ever.

Not necessarily. If the language provides a way to ensure memory management of DOM objects is correct across language boundaries, it would provide an effective defense against these issues.

Safe memory management across a combination of managed and unmanaged code is a tough problem, and Rust (and perhaps Swift?) are the only languages I know of that have any attempts to solve it. It requires both language and library support. There are several competing solutions in the community: luster [1], shifgrethor [2], and josephine [3] come to mind. All of them allow this kind of code to be implemented safely.

[1]: https://github.com/kyren/luster

[2]: https://github.com/withoutboats/shifgrethor

[3]: https://github.com/asajeffrey/josephine

Re:Serious Chrome zero-day by mike_hearn on Thursday March 07, 2019 @05:44AM (#19327045)
GraalVM also has a way to do this - the 'unmanaged' C/C++ is upgraded to be automatically memory managed on the fly by compiling pointers into (gc'd reference, integer field offset) and then redirecting allocations to GCd heaps. There's more to it than that of course, but it means traditional C/C++ using new/delete and GCd languages can interop and coexist in the same process and heaps, and memory management errors in the unmanaged side are caught (cause VM termination).
Re:Serious Chrome zero-day by gpderetta on Friday March 08, 2019 @06:14AM (#19336602)
If you want GC there are available GCs for C++.
Re:Serious Chrome zero-day by pjmlp on Thursday March 07, 2019 @02:41AM (#19326248)
You are forgeting SOM and COM/UWP.

Actually something where Rust still fails short of being an alternative to Delphi/C++ on Windows, regarding tooling and productivity.

Looking forward to the HoloLens collaboration or Microsoft now pushing for Rust on their security guidelines will actually improve that experience.

Re:Serious Chrome zero-day by throwaway12iii on Thursday March 07, 2019 @02:35AM (#19326228)
From the rust Oxidization page (hip name):

- "Crossing the C++/Rust boundary can be difficult."

- "For components that are relatively standalone, with small and simple APIs."

- "This minimizes the C++/Rust boundary layer issues."

Not only does Rust not have a good JavaScript integration story, it doesn't have a good C++ integration story.

Most of Firefox is still (8 years later) not written in Rust.

Chrome with C++ has a waaaaay better safety record than Firefox. Guess what? The C++ in Chrome tries to ensure memory safety for JS.

The C++ Chrome tooling does a better job of memory safety as a whole system than Firefox.

Re:Serious Chrome zero-day by vthriller on Thursday March 07, 2019 @06:36AM (#19327244)
> Most of Firefox is still (8 years later) not written in Rust.

<nit>In part because 1.0 release of Rust popped up in 2015, not 2011.</nit>

Re:Serious Chrome zero-day by pcwalton on Thursday March 07, 2019 @10:37AM (#19328838)
None of this is responsive to my points.
Re:Serious Chrome zero-day by throwaway12iii on Thursday March 07, 2019 @12:05PM (#19329734)
Rust is bad at managing DOM memory in Firefox.
Re:Serious Chrome zero-day by krageon on Thursday March 07, 2019 @09:52AM (#19328446)
You make a lot of points about Rust and mention Firefox in your conclusion, right after saying Firefox is by and large not Rust. I think your logical argument would be better served by using clear language and a single subject. After you have those two things you can think about coming up with examples.