You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Unai Uribarri (JIRA)" <ax...@ws.apache.org> on 2004/12/30 11:37:10 UTC

[jira] Created: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

SIGSEGV deserializing an array of complex elements
--------------------------------------------------

         Key: AXISCPP-343
         URL: http://nagoya.apache.org/jira/browse/AXISCPP-343
     Project: Axis-C++
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.4 Final    
 Environment: RH9
    Reporter: Unai Uribarri


The function Axis_Create_* (in the following example, the mapItem
object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
when tring to enlarge an array of objects

        mapItem* pNew = new mapItem[nSize];
        memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
        memset(pObj, 0, sizeof(mapItem)*nSize/2);
        --> delete [] pObj; <-- SIGSEGV

memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by Duane Murphy <du...@mac.com>.
I'm quite sure I don't understand the context of this change, but
looking at the code makes me wonder why std::vector isn't being used.
std::vector will handle resizing and copying automatically. 

What am I missing?

 ...Duane

--- At Tue, 18 Oct 2005 07:57:45 +0200, nadir amra (JIRA) wrote:

>    [ http://issues.apache.org/jira/browse/AXISCPP-343?
>page=comments#action_12332324 ] 
>
>nadir amra commented on AXISCPP-343:
>------------------------------------
>
>OK, I am currently testing a fix that seems to be working.  Will put
>into repository tomorrow if further testing does not come up with anything.
>
>My solution was to generate a reset() method that contains the code that
>was originally in the constructor.  The constructor now calls reset().  
>
>So when arrays are made bigger, the generated code now looks like the
>following (taking AxisBench as an example):
>
>			BenchBasicDataType* pNew = new BenchBasicDataType[nSize];
>			size_t i = nSize/2;
>			for (int ii=0; ii<i; ++ii)
>			{
>				pNew[ii] = pObj[ii];
>				pObj[ii].reset();
>			}
>			delete [] pObj;
>			return pNew;
>
>This performs bitwise-copies of data items, then resets the copied
>object so that the fields in the source array are reinitialized in the
>same way as when the object is instantiated.
>
>Let me know if you see any wholes...and I will let you know when I
>commit the code to the repository.
>
>> SIGSEGV deserializing an array of complex elements
>> --------------------------------------------------
>>
>>          Key: AXISCPP-343
>>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>>      Project: Axis-C++
>>         Type: Bug
>>   Components: Serialization
>>     Versions: 1.4 Final
>>  Environment: RH9
>>     Reporter: Unai Uribarri
>>      Fix For: 1.6 Alpha
>>  Attachments: siaam.wsdl
>>
>> The function Axis_Create_* (in the following example, the mapItem
>> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
>> when tring to enlarge an array of objects
>>         mapItem* pNew = new mapItem[nSize];
>>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>>         --> delete [] pObj; <-- SIGSEGV
>> memset clears the virtual table pointer of the mapItem objects and the
>delete operator crash.



Re: [jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by Duane Murphy <du...@mac.com>.
--- At Mon, 17 Oct 2005 20:00:45 +0200, nadir amra (JIRA) wrote:

>    [ http://issues.apache.org/jira/browse/AXISCPP-343?
>page=comments#action_12332263 ] 
>
>nadir amra commented on AXISCPP-343:
>------------------------------------
>
>Not sure if exact problem - but test cases are failing. 
>
>The way arrays are handled in general is problematic and needs to be
>redesigned.  I was never comfortable with memcpy/memset of objects
>because it is not good coding practice, but it did work on OS/400.
>
>But what is currently being done is equally bad.
>
>I am not that familiar with the code to understand what exactly needs to
>change to make this a cleaner implementation.  
>
>Probably the quickest resolution to this would be the use of copy
>constructors  - where one would loop through and assign each object to
>the other object in the array. 
>
>More optimal solution would be to use some sort of AXISCPP-created
>container in the future so we do not have to recreate an array?

Take a look at a typical implementation of std:vector for the correct
way to copy objects. In a word, yes, you should be using copy/
assignment. You can also make optimizations if  you can identify the
array members as a POD type (plain old data).

 ...Duane

[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332330 ] 

John Hawkins commented on AXISCPP-343:
--------------------------------------

This issue is very closely tied to axiscpp-149

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332324 ] 

nadir amra commented on AXISCPP-343:
------------------------------------

OK, I am currently testing a fix that seems to be working.  Will put into repository tomorrow if further testing does not come up with anything.

My solution was to generate a reset() method that contains the code that was originally in the constructor.  The constructor now calls reset().  

So when arrays are made bigger, the generated code now looks like the following (taking AxisBench as an example):

			BenchBasicDataType* pNew = new BenchBasicDataType[nSize];
			size_t i = nSize/2;
			for (int ii=0; ii<i; ++ii)
			{
				pNew[ii] = pObj[ii];
				pObj[ii].reset();
			}
			delete [] pObj;
			return pNew;

This performs bitwise-copies of data items, then resets the copied object so that the fields in the source array are reinitialized in the same way as when the object is instantiated.

Let me know if you see any wholes...and I will let you know when I commit the code to the repository.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332329 ] 

John Hawkins commented on AXISCPP-343:
--------------------------------------

As a point of note - windows seems to be *very*  forgiving when it comes to memory management. For these sorts of problems you are better running on different OS - linux seems to be particularly "honest".

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332061 ] 

Dushshantha Chandradasa commented on AXISCPP-343:
-------------------------------------------------

i have applied what Unai sujjested and it seems to be OK. Tests are passing. 

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12329941 ] 

Dushshantha Chandradasa commented on AXISCPP-343:
-------------------------------------------------

from the Mailing list:

Dushshantha Chandradasa wrote:

>Hi All,
>Could somebody please explain why do we use a virtual destructor in 
>complex type auto generated classes for RPC style?
>  
>
In my understanding, it is not a problem to use the virtual destructors. 
But the problem is that we use both memset, followed by delete[] on the same object.
I think we got to do only one of those and see if there are memory leaks.
using delete[] without memset and checking for leaks would reveal whether delete[] alone would take care of memory cleaning.

Thanks,
Samisa...



> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332260 ] 

Henrik Nordberg commented on AXISCPP-343:
-----------------------------------------

...and the generated code still crashes when deleting item.m_Array.
Are you able to reproduce this problem?

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Unai Uribarri (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXISCPP-343?page=history ]

Unai Uribarri updated AXISCPP-343:
----------------------------------

    Attachment: siaam.wsdl

wsdl used to generate the stubs

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://nagoya.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Unai Uribarri (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12330949 ] 

Unai Uribarri commented on AXISCPP-343:
---------------------------------------

An optimization to do the swapping in 4 byte blocks:

long *p1 = (long*)pObj; 
long *p2 = (long*)pNew; 
size_t i = size * sizeof(mapItem) / sizeof(long) / 2; 
while (i) 
{ 
   long c = *p1; 
   *p1 = *p2; 
   *p2 = c; 
   ++p1; 
   ++p2; 
    --i; 
} 


> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12331991 ] 

Fred Preston commented on AXISCPP-343:
--------------------------------------

Could the fixer of this JIRA either create a new or incorporate into an existing test a test that would create a for this function so that we do not regress?

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332538 ] 

Henrik Nordberg commented on AXISCPP-343:
-----------------------------------------

Well my problem still hasn't gone away.

I regenerated the stubs from the WSDL and it still crashes on that same line.

Also,

void reset();

is missing from the generated .hpp files (it is defined in the .cpp files, but needs to be declared in the .hpp files).

I really would like this to be fixed. The problem may or may not be in the above array resizing code.
I am attaching the WSDL file that has functions that cause this error. Would it be possible for you to use it as a test case? You could try calling the GetDrivers() function, for example. Just create and return a dummy array of a few items. It crashes the second time it is invoked (when the dtor is called).

Thanks
 - Henrik

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Nadir Amra
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]
     
Dushshantha Chandradasa resolved AXISCPP-343:
---------------------------------------------

    Resolution: Fixed

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_59695 ]
     
Mark Whitlock commented on AXISCPP-343:
---------------------------------------

This should be fixed for both rpc-encoded and doc-literal. The wsdl is rpc-encoded and fails for the reasons explained above. If it were doc-literal (like AxisBench which does something similar) the destructor would not be virtual, so it succeeds. The solution is to make both the rpc-encoded and doc-literal cases have virtual destructors and do something more sensible instead of the memset.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Mark Whitlock
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Unai Uribarri (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12330942 ] 

Unai Uribarri commented on AXISCPP-343:
---------------------------------------

When the arrays is full, the size is doubled and and new memory is allocated.

The old array (with is size/2) is copied to the new array and zero-ed to try to prevent calling the destructors of these objects. Unfortunately, this doesn't work with virtual destructors.

Just removing the delete[] call will leak memory. The correct way is to use the same mechanism that the STL uses, or just using a std::vector.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12331310 ] 

Henrik Nordberg commented on AXISCPP-343:
-----------------------------------------

I think this issue was not solved correctly. I now get a crash in the dtor of generated classes of type ArrayOfXXXX. Here is an example:

ArrayOfWsDatabaseColumn::~ArrayOfWsDatabaseColumn()
{
	/*delete any pointer and array members here*/
	if (item.m_Array != NULL)
		delete [] ((WsDatabaseColumn*)item.m_Array);
}

I get a crash on the delete[] line. I suspect it has something to do with this bug (AXISCPP-343).
I hope this can get resolved quickly since this is a big blocker for us, and we want to release soon...
Thanks
 - Henrik

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]
     
John Hawkins reopened AXISCPP-343:
----------------------------------


Apparently this is not completely solved.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332539 ] 

Henrik Nordberg commented on AXISCPP-343:
-----------------------------------------

Hmm, I don't seem to be able to attach files. Can I email it to the person who will look into this?
Thanks

Ps. I have this error under Windows, so in this case Windows in no less forgiving than Linux.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Nadir Amra
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=history ]

John Hawkins updated AXISCPP-343:
---------------------------------

    Comment: was deleted

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Mark Whitlock
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332263 ] 

nadir amra commented on AXISCPP-343:
------------------------------------

Not sure if exact problem - but test cases are failing. 

The way arrays are handled in general is problematic and needs to be redesigned.  I was never comfortable with memcpy/memset of objects because it is not good coding practice, but it did work on OS/400.

But what is currently being done is equally bad.

I am not that familiar with the code to understand what exactly needs to change to make this a cleaner implementation.  

Probably the quickest resolution to this would be the use of copy constructors  - where one would loop through and assign each object to the other object in the array. 

More optimal solution would be to use some sort of AXISCPP-created container in the future so we do not have to recreate an array?

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Loganathan Parthipan (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12330792 ] 

Loganathan Parthipan commented on AXISCPP-343:
----------------------------------------------

Just wondering, 
why is only half the array is memcpy'ed into pNew?
what's the reason for zeroing half the array pObj? Why zeroing at all? 


> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Unai Uribarri (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12330947 ] 

Unai Uribarri commented on AXISCPP-343:
---------------------------------------

To grow an array, this function allocates a new bigger array and copies raw memory from the old array to the new memory. This is incorrect since the new array already contains constructed objects. Overwritting this memory will leak any resource allocated by the constructor of these objects.

I think that swapping the memory can work. Just replace memcpy and memset by this code:

char *p1 = (char *)pObj;
char *p2 = (char *)pNew;
size_t i = sizeof(mapItem) * size / 2;
while (i)
{
   char c = *p1;
   *p1 = *p2;
   *p2 = c;
   ++p1;
   ++p2;
    --i;   
}


> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Loganathan Parthipan (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12331018 ] 

Loganathan Parthipan commented on AXISCPP-343:
----------------------------------------------

Ok, so all this is for resizing an array. IMHO a vector should be used. Is there any reason why we shouldn't use a standard container? Low level code when written wrong is much worse than safely using a well tested STL container. And as seen in this case it's also a maintenence nightmare.



> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332544 ] 

Henrik Nordberg commented on AXISCPP-343:
-----------------------------------------

I just run the code with the problem, on Linux and it works. So the problem shows up only on Windows (with MSVC 2003 and MSVC 2005).

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Nadir Amra
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332255 ] 

nadir amra commented on AXISCPP-343:
------------------------------------

Actually, this does not work on systems where memory is protected, such as OS/400.  

I am going to change the code and just loop through the array assigning the values to the proper fields via assignment statements.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]
     
nadir amra reopened AXISCPP-343:
--------------------------------

     Assign To:     (was: Dushshantha Chandradasa)

Actually needs more thought....

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]
     
nadir amra reopened AXISCPP-343:
--------------------------------


My mistake about reset() not being in header file.  I forgot to commit some other files. That is now done.

I guess I can attempt to see what you problem is so you can send it to me....but I just wanted to correct the copying of objects that was done to help resolve you problem..that broke me.  You can click on assignee to see where to send it to if you cannot attache wsdl file to issue.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Nadir Amra
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]
     
nadir amra closed AXISCPP-343:
------------------------------

    Resolution: Fixed
     Assign To: Nadir Amra

OK, Ran the test bucket and everything works now.  I have committed the changes.

As John has indicated, this is tied to axiscpp-149, which is still opened.  That issue deals with how to better implement array support. 

If anyone has a problem, reopen issue.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Nadir Amra
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]

John Hawkins updated AXISCPP-343:
---------------------------------

    Fix Version: 1.6 Alpha
    Description: 
The function Axis_Create_* (in the following example, the mapItem
object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
when tring to enlarge an array of objects

        mapItem* pNew = new mapItem[nSize];
        memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
        memset(pObj, 0, sizeof(mapItem)*nSize/2);
        --> delete [] pObj; <-- SIGSEGV

memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

  was:
The function Axis_Create_* (in the following example, the mapItem
object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
when tring to enlarge an array of objects

        mapItem* pNew = new mapItem[nSize];
        memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
        memset(pObj, 0, sizeof(mapItem)*nSize/2);
        --> delete [] pObj; <-- SIGSEGV

memset clears the virtual table pointer of the mapItem objects and the delete operator crash.


> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332606 ] 

Henrik Nordberg commented on AXISCPP-343:
-----------------------------------------

Nadir,
You can close this bug. The code works now, and I had a bug in _my_ code. After fixing it, everything works.

Thanks
 - Henrik

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Nadir Amra
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332318 ] 

nadir amra commented on AXISCPP-343:
------------------------------------

Dushshantha, 

I do not blame anyone for the problems I am seeing.  The errors I am seeing is due to the differences between UNIX/Windows and OS/400. I run the unit tests.

In UNIX/windows, programmers assume that pointers and integers are inter-changable. That is not true on OS/400, and I would think that is not true on 64-bit machines (of which OS/400 is).  Although it is common practice to treat them the same in UNIX/windows-land, it is not really, in my opinion, good coding practice.

With the current problems I am seeing, it is assumed that performing the memory copies of the class in chunks is OK.  Obviously, it is not good coding practice to do so (neither was the original implementation with memcpy/memset, although that kind of worked on OS/400).  In this case, due to the protection mechanisms built-into the OS/400, the copying of data in this way invalidates any pointers that may be in the object.  

I think I have come up with an interim solution that I will be testing in the next couple of days that should be acceptable on all platforms.  In the long term, we should think about copy-constructors or better array implementation, possibly using an AXIS container that simulates an array via linked lists.  

But basically, I hope developers realize that when coding, integers are not interchangable with pointers and object copying should be performed in a portable, object-oriented way in order for the code to work on a variety of platforms.  


> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332317 ] 

Dushshantha Chandradasa commented on AXISCPP-343:
-------------------------------------------------

In Windows platform i didnt see any failing test case regarding this change. Normally i didnt commit anything without testing the whole test framework more than once. I cannot reproduce the problem that Henric is talking about. 

Nadir, What are the test cases that you are using to test this?? 

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12329513 ] 

Dushshantha Chandradasa commented on AXISCPP-343:
-------------------------------------------------

Hi Mark,

why do we use a memset here?? And why we use a virtual destructor here in RPC?? 

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=history ]

John Hawkins reassigned AXISCPP-343:
------------------------------------

    Assign To: Mark Whitlock

Mark has been in this area of the code recently.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Mark Whitlock
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12332284 ] 

Henrik Nordberg commented on AXISCPP-343:
-----------------------------------------

Just wanted to add that you must run this kind of test twice, or you will not enter the dtor at all. Axis doesn't free up the return values until it needs to create them again, at which point it checks if there are old values present and delete those if that is the case. Maybe this is why the test cases appear to work?

And this needs to be tested with code that was generated by the latest wsdl2ws java file, so the before the tests run, wsdl2ws needs to be built, then invoked on the test WSDL, then the test needs to be compiled and run using this newly generated code.

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]
     
Dushshantha Chandradasa resolved AXISCPP-343:
---------------------------------------------

    Resolution: Fixed

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12330186 ] 

Dushshantha Chandradasa commented on AXISCPP-343:
-------------------------------------------------

i used memset and removed delete []. And set pObj referance to NULL to avoid garbage referance. It solved the problem. I made the destructer virtual for Doc/lit as well. solution is testing. 

But, I need an explanation here. when i tried to use delete [] instead of memset to 0, the program crashed with a message that some memory location cannot be written. Why is that??? 

 

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]

Dushshantha Chandradasa reassigned AXISCPP-343:
-----------------------------------------------

    Assign To: Dushshantha Chandradasa  (was: Mark Whitlock)

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-343?page=comments#action_12331138 ] 

John Hawkins commented on AXISCPP-343:
--------------------------------------

Using STL that is exposed to the customer is not acceptable. We have seen too many instances of issues with ST on different platformsL. We also have some customers who link with compat=4 on Solaris. This means that they cannot use stl ! However, we can use stl inside the engine - just so long as it doesn't creep into the stubs. We occasionally have to sweeps to ensure that some hasn't crept in .

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Dushshantha Chandradasa
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-343) SIGSEGV deserializing an array of complex elements

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-343?page=all ]
     
nadir amra closed AXISCPP-343:
------------------------------

    Resolution: Fixed

Seems everything is resolved. 

> SIGSEGV deserializing an array of complex elements
> --------------------------------------------------
>
>          Key: AXISCPP-343
>          URL: http://issues.apache.org/jira/browse/AXISCPP-343
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.4 Final
>  Environment: RH9
>     Reporter: Unai Uribarri
>     Assignee: Nadir Amra
>      Fix For: 1.6 Alpha
>  Attachments: siaam.wsdl
>
> The function Axis_Create_* (in the following example, the mapItem
> object) in the stubs generated by wsdl2ws java tool generates a SIGSEGV
> when tring to enlarge an array of objects
>         mapItem* pNew = new mapItem[nSize];
>         memcpy(pNew, pObj, sizeof(mapItem)*nSize/2);
>         memset(pObj, 0, sizeof(mapItem)*nSize/2);
>         --> delete [] pObj; <-- SIGSEGV
> memset clears the virtual table pointer of the mapItem objects and the delete operator crash.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira