Thanks for catching and fixing this. I suppose it's a holdover habit from C/PETSc programming:
PetscNew memzeros the allocated memory, so struct members of pointer type are effectively zero-initialized.
I guess I always assumed that pointers are zero-initialized by default. Looking at the C++11 standard
it appears (Section 8.5 paragraphs 11 and 6) that, absent an explicit initializer, pointers are left with an indeterminate
value. Hence, this bug.
On Sat, Oct 27, 2012 at 12:24 AM, Roy Stogner <email@example.com>
Leaving those pointers uninitialized gave me a segfault; it should be
On Wed, 24 Oct 2012, Dmitry Karpeev wrote:
let me know if this causes any kind of grief
fixed in r6225.