[Stackless] how to check for C stack?

Christian Tismer tismer at stackless.com
Mon Feb 23 14:44:59 CET 2004


Giovanni Bajo wrote:
> Christian Tismer wrote:
> 
> 
>>So, testing for "t.nesting_level == 0" gives you a safe criterion
>>whether the unpickle will be runnable.
> 
> 
> Thanks!
> 
> 
>>I agree this should better be available via an extra property.
>>If you can give me a reasonable name for that property, I'm
>>happy to add it.
>>Maybe "clonable"? Bad, since we can clone but not run. Hmm.
>>"runnable"? Bad.
> 
> 
> I think I've already asked, but I still can't get my mind around it: why should
> one want to clone a tasklet which can't be run?

Well, I was thinking of ways to run even those pickles in
some future, given that we invent a tool that does a cstack
analysis and creates the "right code". This might be possible
at least for many of the internal Python calls.
Kind of a backdoor to have many more useful tasklets, maybe
restricted to the machine architecture.

Simple but effective access to the cstack contents is given
by str(tasklet.cstate), which *is* the captured stack piece.

Now, given such a fictive stack analysis, one could take
the unpickle of a tasklet and create a "correct" new cstate
and make that really run.

I thought, by disallowing certain pickles, I would block this
opportunity. People also might just want to take snapshots
for other purposes like tracing, debugging etc.

> It looks like totally useless to me, it creates a "broken" clone.

Well, as said, it could at least be great debugger input,
and this would allow to do remote debugging, for instance.

> Maybe "safe_for_pickling" ?

Reminds me of the "safe_for_unpickling" attribute from Python 2.2
and earlier (that dropped security issue, you know?)

Maybe "clone" is good, since the other clone is more a "zombie".
"revivable"?

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/


_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list