PR3498: more efficient dwfl searching

Josh Stone jistone@redhat.com
Thu Jul 16 18:53:00 GMT 2009


On 07/16/2009 11:01 AM, Frank Ch. Eigler wrote:
> I can't seem to reproduce this problem at all on my machine, but maybe
> this patch would work too.  The gist is to treat kern_dw[module]==0 as
> if kern_dw.find(module)==kern_dw.end().  IOW, if an erlier dwflpp()
> construction attempt failed via an exception, but the stl
> kern_dw[module] initialization already took place, then the resulting
> null pointer will be disregarded later.  Then a new attempt to run the
> dwflpp() ctor will be made (which may itself throw).

Ah yes, the initialization order is probably the culprit.  Another fix
would be to explicitly separate the new and map[] into separate
statements, but either way is fine.

Josh



More information about the Systemtap mailing list