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

Bug 328064

Summary: AIF cannot handle array of string properly
Product: [Tools] PTP Reporter: Xuan Chen <xuanchen>
Component: Debug SDMAssignee: Greg Watson <g.watson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
fix for the problem none

Description Xuan Chen CLA 2010-10-18 14:59:49 EDT
I encountered this problem when I was implementing the Array of String support of X10.

In conv.c, AIFAddArrayElement(), it only treat character pointer (not string) as complex array element, i.e., element with different size.  So I ran into segmentation fault when we try to write those result to the buffer.

If I modify both AIFAddArrayElement() and EmptyArrayToAIF() in conv.c for checking of FDS_STRING type in their if statement, it seems fixed the problem.

Please see attached patch for more information.  Thanks.
Comment 1 Xuan Chen CLA 2010-10-18 15:00:36 EDT
Created attachment 181121 [details]
fix for the problem
Comment 2 Greg Watson CLA 2010-10-29 13:06:35 EDT
Committed to 4.0 and HEAD.