This was discovered on the hybridVPIC branch, but should apply to the main branch as well.
The functions register_object and restore_objects each only allocate one byte for new registry entries. This leads to intermittent crashes of the checkpoint code, and to the error "cannot checkpoint a pointer to an unregistered object".
This can be fixed by changing lines 191 and 304 in src/util/checkpt/checkpt.c from:
MALLOC( node, 1 );
to:
MALLOC( node, sizeof(*node) );
As with many memory related bugs, this one can be a little hard to reproduce. This seems to be triggered in particular with GCC compilers.
This was discovered on the hybridVPIC branch, but should apply to the main branch as well.
The functions
register_objectandrestore_objectseach only allocate one byte for new registry entries. This leads to intermittent crashes of the checkpoint code, and to the error "cannot checkpoint a pointer to an unregistered object".This can be fixed by changing lines 191 and 304 in
src/util/checkpt/checkpt.cfrom:MALLOC( node, 1 );to:
MALLOC( node, sizeof(*node) );As with many memory related bugs, this one can be a little hard to reproduce. This seems to be triggered in particular with GCC compilers.