Skip to content

Comment on PicoC: a very small C interpreter for scriptingparent

Comments

Of course it is possible in an interpreter.

You simply need to verify each access before allowing it, much like Valgrind does.

Of course it's quite costly do to so, and since C gives the programmer a lot of freedom I guess it's hard to optimize the tests, i.e. to know which accesses are safe without explicitly keeping track.

rw-OP

Are you sure? Even Valgrind does not detect everything. E.g. when you mess up variables within your stack.

That's quite different. Sandboxing in an interpreter is actually fairly easy.

rw-OP

Ok, you are right.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.