From: SourceForge.net <no...@so...> - 2009-01-28 19:45:42
|
Bugs item #2543767, was opened at 2009-01-28 12:44 Message generated for change (Settings changed) made by ricwhite You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=532251&aid=2543767&group_id=71730 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: HP c-Class Plugin Group: 2.13.3 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ric White (ricwhite) >Assigned to: Ric White (ricwhite) Summary: Potential race condition during startup. Initial Comment: There is a potential for a race condition when the event threads are spawned during plug-in startup. This problem was discovered via code inspection, and has not been reported during execution. In oa_soap_discover_resources(). The two local variables oa1_event_handler and oa2_event_handler will be allocated on the stack. Their addresses are then passed to the event threads as parameters. There is no guarantee that the call to oa_soap_discover_resources() will still be in progress when these threads finally run and de-reference their parameters. If oa_soap_discover_resources() has returned before these threads execute, a call to some other function may be using the same locations on the stack, and could corrupt the contents of oa1_event_handler and oa2_event_handler before the threads have read their data. I think the parameters to the threads should be elements in the struct oa_soap_handler, rather than stack variables. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=532251&aid=2543767&group_id=71730 |