Menu

#1569 There is no response at GetClass after CreateClass

Function
pending-fixed
sfcb (1090)
5
2013-01-29
2009-04-22
No

I issue following iMethodCall, then I get no response at GetClass.
It seems ClString is not build correctory.

(1) I issue CreateClass with new string property value which is null at superclass.
I get no errors. (Need 2778276_SIGSEGV_CreateClass.patch to test.)
(2) I issue GetClass for new class which is made at step 1.
There is no response from sfcb.
There is a segfault in syslog.
Apr 22 13:21:41 ubuntu-vm kernel: [233038.195413] sfcbd[20125]: segfault at 0812ebe0 eip b7f21b94 esp bf7ff790 error 4

CIM-XML;
(1)
<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="4197" PROTOCOLVERSION="1.0">
<SIMPLEREQ>
<IMETHODCALL NAME="CreateClass">
<LOCALNAMESPACEPATH>
<NAMESPACE NAME="root"/>
<NAMESPACE NAME="interop"/>
</LOCALNAMESPACEPATH>
<IPARAMVALUE NAME="NewClass">
<CLASS NAME="CIM_ObjectManager2" SUPERCLASS="CIM_ObjectManager">
<PROPERTY NAME="Caption" TYPE="string">
<VALUE>NewCaptionDefault</VALUE>
</PROPERTY>
</CLASS>
</IPARAMVALUE>
</IMETHODCALL>
</SIMPLEREQ>
</MESSAGE>
</CIM>

result;
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="4197" PROTOCOLVERSION="1.0">
<SIMPLERSP>
<IMETHODRESPONSE NAME="CreateClass">
<IRETURNVALUE>
</IRETURNVALUE>
</IMETHODRESPONSE>
</SIMPLERSP>
</MESSAGE>
</CIM>

(2)
<?xml version="1.0" encoding="utf-8"?>
<CIM CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="4198" PROTOCOLVERSION="1.0">
<SIMPLEREQ>
<IMETHODCALL NAME="GetClass">
<LOCALNAMESPACEPATH>
<NAMESPACE NAME="root"/>
<NAMESPACE NAME="interop"/>
</LOCALNAMESPACEPATH>
<IPARAMVALUE NAME="ClassName">
<CLASSNAME NAME="CIM_ObjectManager2"/>
</IPARAMVALUE>
<IPARAMVALUE NAME="LocalOnly">
<VALUE>true</VALUE>
</IPARAMVALUE>
<IPARAMVALUE NAME="IncludeQualifiers">
<VALUE>true</VALUE>
</IPARAMVALUE>
<IPARAMVALUE NAME="IncludeClassOrigin">
<VALUE>false</VALUE>
</IPARAMVALUE>
</IMETHODCALL>
</SIMPLEREQ>
</MESSAGE>
</CIM>

result;
(none)

In the proposed fix, I cannot clearly understand in the case of the CMPI_string is already exist.
I just set CMPI_RC_ERR_TYPE_MISMATCH in this case, however the return value of addObjectPropertyH() (in objectImpl.c) is not evaluated in cpyClass() (in classProvider.c) function.

Discussion

  • Michael Chase-Salerno

    Moving to RTC product backlog.

     
  • Michael Chase-Salerno

    • status: open --> closed-later
     
  • Chris Buccella

    Chris Buccella - 2013-01-23

    s-hashi: Thank you for your contribution. Sorry the review has taken so long.

    Your patch solves the problem, but the code in your first hunk does not seem to be executed in the code path of the test case for this defect. Is the first hunk of code from your patch necessary?

     
  • Chris Buccella

    Chris Buccella - 2013-01-23
    • status: closed-later --> open-accepted
     
  • Chris Buccella

    Chris Buccella - 2013-01-29
    • status: open-accepted --> pending-fixed
     
  • Chris Buccella

    Chris Buccella - 2013-01-29

    pushed to git master

     

Log in to post a comment.