Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321786

Summary: [ProbekitAgent] SPARC: SIGBUS on probe insertion
Product: z_Archived Reporter: Mike Reid <mikereid>
Component: TPTPAssignee: Mike Reid <mikereid>
Status: CLOSED FIXED QA Contact: Kathy Chan <kathy>
Severity: normal    
Priority: P3 CC: jgwest
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Solaris   
Whiteboard:
Attachments:
Description Flags
patch none

Description Mike Reid CLA 2010-08-04 15:29:00 EDT
Probe insertion on the SPARC architecture results in SIGBUS.
Comment 1 Mike Reid CLA 2010-08-04 15:59:00 EDT
Created attachment 175883 [details]
patch

When reading input from the agent controller, an int is dereferenced from a byte-buffer, e.g.:

 char* buffer = ...;
 int i = *(int*)buffer;
 
Since this is an abritrary byte stream the address may not be int-aligned. On the SPARC architecture, dereferencing an unaligned int results in SIGBUS. 

The attached patch uses memcpy instead.
Comment 2 Mike Reid CLA 2010-08-04 16:00:57 EDT
Patch checked into HEAD.
Comment 3 Kathy Chan CLA 2011-02-11 13:46:05 EST
This defect had been resolved as FIXED for more than 1 month.  Please verify with the latest TPTP 4.7.2 driver.  If this defect is still left unverified by February 25, we'll close it on the originator's behalf.

TPTP 4.7.2 driver can be downloaded from:

http://www.eclipse.org/tptp/home/downloads/?ver=4.7.2
Comment 4 Mike Reid CLA 2011-04-04 11:03:28 EDT
Closing.