News for hackers. Stuff that matters.
Re:WebAssembly doesn’t make unsafe languages safe by pedrocr on Sunday November 25, 2018 @05:12PM (#18529400)
>the behavior of that malloc/free pair would need to be identical (same pointers returned from malloc) in all browsers, for every possible sequence of allocations and deallocations

Why would you ever spec it like that? That doesn't seem needed at all. Plenty of programs run across platforms with wildly different mallocs and everything runs file. Replacing the malloc with LD_PRELOAD tricks is even done sometimes.

Re:WebAssembly doesn’t make unsafe languages safe by azakai on Sunday November 25, 2018 @05:21PM (#18529443)
For almost all platforms that's true, but the culture of standardization on the Web is unique. It comes from wanting a Web page to have the maximal chance of running across all standard-compliant browsers, forever - that's just not the case for practically every other platform.
Re:WebAssembly doesn’t make unsafe languages safe by pedrocr on Sunday November 25, 2018 @05:26PM (#18529468)
If only that was true. Javascript has had all plenty of inconsistent behaviors across browsers and the feature matrix for what is and isn't supported in each browser is hugely complex. And even if that was true standardizing the results of malloc makes no sense, it gives you no extra compatibility guarantees for any sane programs and no one cares about insane ones.
Re:WebAssembly doesn’t make unsafe languages safe by int_19h on Sunday November 25, 2018 @07:45PM (#18530110)
I've yet to see a standard-conforming C app that relied solely on the standard library - which, of course, includes malloc/free - to not run across all platforms (that have a filesystem and a console, or some equivalent input/output facilities, anyway).