1
1
openmpi/orte/mca/gpr/base
Ralph Castain 53967bd698 Fix a memory corruption problem deep inside the registry when subscriptions/triggers are processed. The create_value function will malloc space for the pointers to keyval objects, but doesn't actually allocate space for the objects themselves. When constructing the gpr_notify_data object, we forgot to OBJ_NEW the keyval objects. Since the create_value function didn't explicitly NULL those memory locations, it just so happened that there was a non-NULL address in them....which we dutifully dumped a keyval into.
This fix includes two parts: (a) we now initialize the keyval pointer locations to NULL after the malloc, and (b) we now OBJ_NEW the keyvals prior to storing info in them.

BTW, in case anyone reads this and wonders why we don't just OBJ_NEW the keyvals in create_value, the reason is simply that some places in the code use static keyvals and simply assign those addresses into the value object's array. So not everyone wants to OBJ_NEW keyvals - by not forcing it here in create_value, we give the user the flexibility to do whatever they want.

This commit was SVN r13300.
2007-01-25 12:54:02 +00:00
..
data_type_support Make the tree compile in debug mode. 2006-12-01 23:03:09 +00:00
pack_api_cmd Make the tree compile in debug mode. 2006-12-01 23:03:09 +00:00
unpack_api_response Make the tree compile in debug mode. 2006-12-01 23:03:09 +00:00
base.h And ORTE is ready for prime-time. All Windows tricks are in: 2006-08-23 03:32:36 +00:00
gpr_base_close.c Next step in the project split, mainly source code re-arranging 2006-02-12 01:33:29 +00:00
gpr_base_create_value_keyval.c Fix a memory corruption problem deep inside the registry when subscriptions/triggers are processed. The create_value function will malloc space for the pointers to keyval objects, but doesn't actually allocate space for the objects themselves. When constructing the gpr_notify_data object, we forgot to OBJ_NEW the keyval objects. Since the create_value function didn't explicitly NULL those memory locations, it just so happened that there was a non-NULL address in them....which we dutifully dumped a keyval into. 2007-01-25 12:54:02 +00:00
gpr_base_open.c Nothing relevant. Only a set of castings to have a clean compile on 2006-10-20 02:25:50 +00:00
gpr_base_select.c Next step in the project split, mainly source code re-arranging 2006-02-12 01:33:29 +00:00
gpr_base_simplified_put.c This commit looks a lot bigger than it is, so relax :-) 2006-10-17 16:06:17 +00:00
gpr_base_simplified_subscribe.c This commit looks a lot bigger than it is, so relax :-) 2006-10-17 16:06:17 +00:00
Makefile.am Merge in the new data support subsystem for ORTE. MPI folks should not notice a difference. Longer explanation will be sent to developers mailing list. 2006-02-07 03:32:36 +00:00