Re: [patch] fix for crash in python pretty-printer

Tom Tromey
2009-07-07T20:54:48Z

>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> It turns out I didn't follow what happens when value_struct_elt() raises
Paul> error correctly: when it does, res_val will be left as NULL, and that will
Paul> trigger gdb_assert in my previous patch.

I missed that too.

Paul> Here is a fix. Sorry for the noise :-(

No big deal. This is ok if you haven't committed it already.

Paul> if (field)
Paul> xfree (field);

Jim Meyering has been going around removing these redundant 'if's.
This is something I'm *sure* coccinelle can do :-)

BTW, I neglected to mention upthread -- Taras has got dehydra and
treehydra working for C. So, you could probably write a TRY_CATCH
checker in javascript without too much trouble.

Tom