4 ms·
Yeah, I suppose for the end user I doesn't matter if program stopped working because of segmentation fault or a panic. Though, if one were to choose on of those
by wuch 9y ago
Yeah, I suppose for the end user I doesn't matter if program stopped working because of segmentation fault or a panic.
Though, if one were to choose on of those issues, then obviously runtime errors are preferable over memory-safety problems that might lead to an arbitrary code execution.
BTW, in Java data races do not cause undefined-behaviour.
In fact there is no undefined behaviour in Java at all (as specified at least, in practice as you and many others have observed things may work quite differently).
- mort96 9y agoWho said anything about UB? You can easily fuck up a parallel program in a nondeterministic may without UB. If two threads are in a deadlock, each waiting for the other thread to release a resource it needs, nobody cares that it wasn't caused by UB.