This is the mail archive of the
mailing list for the Archer project.
Re: [python] update has_more generation
On 09/07/2009 05:58 PM, Vladimir Prus wrote:
I'm not sure what can be done here, this is something that came up when
I was encoding the length parameter to strings. How does one know when a
string is initialized, or when it is pointing to just an arbitrary point
in memory? Given that an explicit length ignores any embedded nulls?
Volodya> File "/home/ghost/Build/python/libstdcxx/v6/printers.py", line 469, in to_string
Volodya> return self.val['_M_dataplus']['_M_p'].string (encoding, length = len)
Volodya> RuntimeError: Cannot access memory at address 0x1fa
I also get these tracebacks.
We're probably going to need smarter error handling somewhere.
Volodya> Traceback (most recent call last):
Beside, that 'length = len' is also risky -- it means that if the string is not initialized,
we might end up reading a lot of memory.
If it is possible to discern this, could easily code up a method to gate