On Mon, Jul 14, 2008 at 10:42 AM, Daniel Jacobowitz wrote: > There's nothing special about zero. It's just an unreadable memory > address; the same problem will reappear with any other invalid > pointer. There is something special about zero -- it very frequently occurs in correct C++ programs :) > So if we use TRY_CATCH and RETURN_MASK_ERROR around the call to > current_cp_abi.rtti_type, we can return NULL in the error case. Done. I've also added a "non-zero but invalid" pointer test at ~0UL. Is there a "canonical" invalid address I should be testing instead? Thanks, -- Paul Pluzhnikov ChangeLog 2008-07-14 Paul Pluzhnikov PR gdb/2477 * cp-abi.c (value_virtual_fn_field): Handle invalid pointers. testsuite/ChangeLog 2008-07-14 Paul Pluzhnikov * gdb.cp/class2.exp, gdb.cp/class2.cc: Test for PR2477.