This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python] update has_more generation


On Monday 07 September 2009 Phil Muldoon wrote:

> On 09/07/2009 05:58 PM, Vladimir Prus wrote:
> >> 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.
> >
> >    
> 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?
> 
> If it is possible to discern this, could easily code up a method to gate 
> this behaviour.

I think CLI has some limit on the number of elements printed. Can we reuse that?

This is not good, given that MI does not document that variable has effect,
but probably better than possibly crashing.

- Volodya


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]