On Tuesday 29 July 2003 21:10, chromatic wrote:On Tuesday, July 29, 2003, at 02:41 PM, Simon Glover wrote: > Therefore the decision was taken that we should not guarantee that > Parrot > should never segfault when fed bad assembler; the creation of invalid > assembler is a compiler bug, and should be fixed at the compiler > level.
If people write PBC directly, perhaps the assembler could do a few checks. It may not be a good idea. It's just an idea.
Another idea (not mine and I can't recall from whom) is to write a safe interpreter where every single check of those Jos propose is done, may be this could be done by adding #if SAFE_INTERPRETER checks and a configure option, I know this will make the interpreter really slow, but safe.
That's ultimately the plan. There'll be a safe version of all the ops, automatically generated, that perform some basic checks--for example making sure all the pointer-based registers are valid. This'll be the version of the ops that get executed (probably in the slowest form of the interpreter, or if we're lucky in the switch core) when the bytecode is considered untrustable.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk