4 ms·
Java has a very good sand-boxing mechanism (AcessController), which helps limit the effect of bugs in libraries. Firstly, the memory model is highly abstract;
by hrjet 12y ago
Java has a very good sand-boxing mechanism (AcessController), which helps limit the effect of bugs in libraries. Firstly, the memory model is highly abstract; no pointer arithmetic and type-less references. To mess with the memory, the thread needs to drop down to native code, and this where sandboxing can trap this behavior.
The same mechanism can also help increase trust in a third-party library from a security point of view. Every access to a file or network resource, for example, is checked before being granted.
- protonfish 12y agoCompare this with the worst library include language: JavaScript. There is no sand-boxing at all - code is simply inlined. (PHP's require does this too.) But for some reason web developers pile on the shady libraries when they should be extremely discerning.
- wldcordeiro 12y agoHow many wheels have been rediscovered in the Javascript ecosystem? It seems to be a symptom of the ecosystem as a whole.