PicoC: a very small C interpreter for scripting
code.google.com
PicoC: a very small C interpreter for scripting
1–10 of 47 posts
Re: PicoC: a very small C interpreter for scripting
#2Re: PicoC: a very small C interpreter for scripting
#3Very cool, there is even an interactive prompt. I wonder how hard is to make this interpreter "safe".
Re: PicoC: a very small C interpreter for scripting
#4Re: PicoC: a very small C interpreter for scripting
#5Re: PicoC: a very small C interpreter for scripting
#6Re: PicoC: a very small C interpreter for scripting
#7Earlier quoted context omitted.
Running every kind of script will never corrupt the application memory :)
[deleted]
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.
Re: PicoC: a very small C interpreter for scripting
#8Re: PicoC: a very small C interpreter for scripting
#9Earlier quoted context omitted.
[deleted]
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.
Re: PicoC: a very small C interpreter for scripting
#10Earlier quoted context omitted.
[deleted]
Well, if it's interpreted, the interpreter could sandbox the C code it's running, rather than passing it through directly to its own memory space.
If you take that away, what's left?