Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> you can code a segfault starting in ocaml5

It shouldn't, the OCaml 5 memory model bounds the reach of data races in both space and time. [1] Thread-unsafe code won't be correct when misused, but it will stay memory safe unless you reach for an additional escape hatch (or you find an implementation bug of course).

[1]: https://ocaml.org/manual/5.4/memorymodel.html

I'm much more concerned about the amount of poorly vetted escape hatches in wide use in OCaml, mainly for bindings.





You are right! As of 5.1.1 at least it catches the cross domain access I was using to smash things. From what I am reading it sounds like it didn't work in 5.1 I could go try it in godbolt to find out when it was fixed, but I kind of don't care. Very exciting, I like ocaml and was lamenting the changes.

That makes a lot more sense: The earliest 5.x releases weren't stable at all despite the non-prerelease version numbers. I waited for longer than I wanted to before upgrading from the LTS to 5, but right now it should be ok to switch as long as the few regressions, like the GC pacing issue, don't affect you workload.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: