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 "Henrik Nordberg (JIRA)" <ax...@ws.apache.org> on 2006/01/24 20:41:09 UTC

[jira] Created: (AXISCPP-919) Double delete in generated DestroyInstance()

Double delete in generated DestroyInstance()
--------------------------------------------

         Key: AXISCPP-919
         URL: http://issues.apache.org/jira/browse/AXISCPP-919
     Project: Axis-C++
        Type: Bug
    Versions: current (nightly)    
    Reporter: Henrik Nordberg
    Priority: Critical


The generated code for each web service has this function:

STORAGE_CLASS_INFO 
int DestroyInstance(BasicHandler *inst)
{
	if (inst)
	{
		WrapperClassHandler* pWCH = reinterpret_cast<WrapperClassHandler*>(inst);
		pWCH->fini();
		delete pWCH;		
		delete inst;
		return AXIS_SUCCESS;
	}
	return AXIS_FAIL;
}

The same pointer (inst and pWCH) is deleted twice. If inst is really of type WrapperClassHandler*, as suggested by the reinterpret_cast<>, then the
delete inst;
call should be removed.

-- 
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-919) Double delete in generated DestroyInstance()

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

Adrian Dick reassigned AXISCPP-919:
-----------------------------------

    Assign To: Adrian Dick

> Double delete in generated DestroyInstance()
> --------------------------------------------
>
>          Key: AXISCPP-919
>          URL: http://issues.apache.org/jira/browse/AXISCPP-919
>      Project: Axis-C++
>         Type: Bug
>     Versions: current (nightly)
>     Reporter: Henrik Nordberg
>     Assignee: Adrian Dick
>     Priority: Critical
>  Attachments: diff.txt
>
> The generated code for each web service has this function:
> STORAGE_CLASS_INFO 
> int DestroyInstance(BasicHandler *inst)
> {
> 	if (inst)
> 	{
> 		WrapperClassHandler* pWCH = reinterpret_cast<WrapperClassHandler*>(inst);
> 		pWCH->fini();
> 		delete pWCH;		
> 		delete inst;
> 		return AXIS_SUCCESS;
> 	}
> 	return AXIS_FAIL;
> }
> The same pointer (inst and pWCH) is deleted twice. If inst is really of type WrapperClassHandler*, as suggested by the reinterpret_cast<>, then the
> delete inst;
> call should be removed.

-- 
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-919) Double delete in generated DestroyInstance()

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

nadir amra closed AXISCPP-919.
------------------------------


> Double delete in generated DestroyInstance()
> --------------------------------------------
>
>                 Key: AXISCPP-919
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-919
>             Project: Axis-C++
>          Issue Type: Bug
>    Affects Versions: current (nightly)
>            Reporter: Henrik Nordberg
>         Assigned To: Adrian Dick
>            Priority: Critical
>             Fix For: current (nightly)
>
>         Attachments: diff.txt
>
>
> The generated code for each web service has this function:
> STORAGE_CLASS_INFO 
> int DestroyInstance(BasicHandler *inst)
> {
> 	if (inst)
> 	{
> 		WrapperClassHandler* pWCH = reinterpret_cast<WrapperClassHandler*>(inst);
> 		pWCH->fini();
> 		delete pWCH;		
> 		delete inst;
> 		return AXIS_SUCCESS;
> 	}
> 	return AXIS_FAIL;
> }
> The same pointer (inst and pWCH) is deleted twice. If inst is really of type WrapperClassHandler*, as suggested by the reinterpret_cast<>, then the
> delete inst;
> call should be removed.

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXISCPP-919) Double delete in generated DestroyInstance()

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

Henrik Nordberg updated AXISCPP-919:
------------------------------------

    Attachment: diff.txt

A diff that removes the line

            writer.write("\t\tdelete inst;\n");

from ws-axis\c\src\wsdl\org\apache\axis\wsdl\wsdl2ws\cpp\ClassLoader.java

> Double delete in generated DestroyInstance()
> --------------------------------------------
>
>          Key: AXISCPP-919
>          URL: http://issues.apache.org/jira/browse/AXISCPP-919
>      Project: Axis-C++
>         Type: Bug
>     Versions: current (nightly)
>     Reporter: Henrik Nordberg
>     Priority: Critical
>  Attachments: diff.txt
>
> The generated code for each web service has this function:
> STORAGE_CLASS_INFO 
> int DestroyInstance(BasicHandler *inst)
> {
> 	if (inst)
> 	{
> 		WrapperClassHandler* pWCH = reinterpret_cast<WrapperClassHandler*>(inst);
> 		pWCH->fini();
> 		delete pWCH;		
> 		delete inst;
> 		return AXIS_SUCCESS;
> 	}
> 	return AXIS_FAIL;
> }
> The same pointer (inst and pWCH) is deleted twice. If inst is really of type WrapperClassHandler*, as suggested by the reinterpret_cast<>, then the
> delete inst;
> call should be removed.

-- 
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-919) Double delete in generated DestroyInstance()

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


Just been doing some digging in this area and discoverd why exactly this double delete exists.

The wrong object is being cast to pWCH.   It should actually be inst->_object.

> Double delete in generated DestroyInstance()
> --------------------------------------------
>
>          Key: AXISCPP-919
>          URL: http://issues.apache.org/jira/browse/AXISCPP-919
>      Project: Axis-C++
>         Type: Bug
>     Versions: current (nightly)
>     Reporter: Henrik Nordberg
>     Assignee: Adrian Dick
>     Priority: Critical
>      Fix For: current (nightly)
>  Attachments: diff.txt
>
> The generated code for each web service has this function:
> STORAGE_CLASS_INFO 
> int DestroyInstance(BasicHandler *inst)
> {
> 	if (inst)
> 	{
> 		WrapperClassHandler* pWCH = reinterpret_cast<WrapperClassHandler*>(inst);
> 		pWCH->fini();
> 		delete pWCH;		
> 		delete inst;
> 		return AXIS_SUCCESS;
> 	}
> 	return AXIS_FAIL;
> }
> The same pointer (inst and pWCH) is deleted twice. If inst is really of type WrapperClassHandler*, as suggested by the reinterpret_cast<>, then the
> delete inst;
> call should be removed.

-- 
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-919) Double delete in generated DestroyInstance()

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

    Resolution: Fixed

I have applied some more fixes to the WSDL2Ws tool, which seem to work nicely on Windows.

> Double delete in generated DestroyInstance()
> --------------------------------------------
>
>          Key: AXISCPP-919
>          URL: http://issues.apache.org/jira/browse/AXISCPP-919
>      Project: Axis-C++
>         Type: Bug
>     Versions: current (nightly)
>     Reporter: Henrik Nordberg
>     Assignee: Adrian Dick
>     Priority: Critical
>      Fix For: current (nightly)
>  Attachments: diff.txt
>
> The generated code for each web service has this function:
> STORAGE_CLASS_INFO 
> int DestroyInstance(BasicHandler *inst)
> {
> 	if (inst)
> 	{
> 		WrapperClassHandler* pWCH = reinterpret_cast<WrapperClassHandler*>(inst);
> 		pWCH->fini();
> 		delete pWCH;		
> 		delete inst;
> 		return AXIS_SUCCESS;
> 	}
> 	return AXIS_FAIL;
> }
> The same pointer (inst and pWCH) is deleted twice. If inst is really of type WrapperClassHandler*, as suggested by the reinterpret_cast<>, then the
> delete inst;
> call should be removed.

-- 
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-919) Double delete in generated DestroyInstance()

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

    Fix Version: current (nightly)
     Resolution: Fixed

I have applied the provided fix.

> Double delete in generated DestroyInstance()
> --------------------------------------------
>
>          Key: AXISCPP-919
>          URL: http://issues.apache.org/jira/browse/AXISCPP-919
>      Project: Axis-C++
>         Type: Bug
>     Versions: current (nightly)
>     Reporter: Henrik Nordberg
>     Assignee: Adrian Dick
>     Priority: Critical
>      Fix For: current (nightly)
>  Attachments: diff.txt
>
> The generated code for each web service has this function:
> STORAGE_CLASS_INFO 
> int DestroyInstance(BasicHandler *inst)
> {
> 	if (inst)
> 	{
> 		WrapperClassHandler* pWCH = reinterpret_cast<WrapperClassHandler*>(inst);
> 		pWCH->fini();
> 		delete pWCH;		
> 		delete inst;
> 		return AXIS_SUCCESS;
> 	}
> 	return AXIS_FAIL;
> }
> The same pointer (inst and pWCH) is deleted twice. If inst is really of type WrapperClassHandler*, as suggested by the reinterpret_cast<>, then the
> delete inst;
> call should be removed.

-- 
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