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

Yeah, browsers are essentially interpreters (and nowadays compilers) for a variety of crazy languages (html, css, javascript; probably a few more?).

You don't want to be writing your interpreters in C.



> You don't want to be writing your interpreters in C.

Well, technically, I think most browsers these days are written in C++, but your point remains valid.

OTOH, the "default" Python interpreter is written in C, and so is Perl (Ruby MRI, too, I think, but I am not 100% certain). I cannot recall any major security problem with those languages that originated inside the interpreter (which, of course, does not mean those did not/do not exist). Then again, a web browser is probably far messier in terms of what input is has to deal with.


> Then again, a web browser is probably far messier in terms of what input is has to deal with.

That's the ticket, the browser does have a large attack surface but more importantly it's supposed to safely execute completely arbitrary and untrusted payloads. In the same category are pretty much all of the usual suspect of security issues: flash, java (applets), …

Most interpreters are only fed trusted payloads, lest the developer starts eval'ing stuff they got from god knows where, and in that case the fault is usually laid to the developer's feet rather than the interpreter's.


Yeah. The browser is more like a hypervizor that Amazon might be running to run arbitrary people's VMs. But it has an unimaginably larger surface area than Xen.




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

Search: