Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332023 - Segmentation fault in Topology::init
Summary: Segmentation fault in Topology::init
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: SCI (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tu Hong Jun CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 09:17 EST by Greg Watson CLA
Modified: 2011-03-18 10:37 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Watson CLA 2010-12-07 09:17:06 EST
The Topology::init method sets agentPath to the result of SysUtil::get_path_name in certain situations, however get_path_name returns NULL if the argument is not found. Assigning a NULL value to a string is illegal in C++. The code should check the result of get_path_name and report the error condition to the user correctly.
Comment 1 rong li CLA 2011-02-11 01:42:07 EST
It is the same issue as the third issues traced in 'Bug 333492':
  3. Fix an coredump issue when scia is not found.

I have attached the patch in 'Bug 333492'. Pls have a try after the patch is committed.
We have added a check in 'topology.cpp'. If the NULL is returned, it will return with an error code 'SCI_ERR_AGENT_NOTFOUND'. Otherwise, it will assign the value to a string.
Comment 2 rong li CLA 2011-02-11 01:46:05 EST
So this bug should have been resolved.
Comment 3 Greg Watson CLA 2011-03-18 10:37:23 EDT
Closing as fixed.