Ticket #87 (new defect) — at Initial Version
Segmentation fault in updateStatus method
Reported by: | Knut Landmark | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | zoo-kernel | Version: | |
Keywords: | Cc: |
Description
The Zoo kernel provides the option to store a status message in shared memory along with the status value (i.e. the progress in percent), see this ticket: http://zoo-project.org/trac/ticket/81. However, the current implementation of updateStatus (service_internal.c, revision # 452) does not check if getMapFromMaps(conf,"lenv","message") returns NULL. A segmentation fault occurs (line 115) if a message value has not been set in the service code before a call to updateStatus:
OK: setMapInMaps( conf, "lenv", "status", "99" ); setMapInMaps( conf, "lenv", "message", "Progress: 99%" ); updateStatus( conf );
Segmentation fault: setMapInMaps( conf, "lenv", "status", "99" ); updateStatus( conf );
(Tested on a Window 7 system.)