Dan Horák píše v Ne 18. 01. 2009 v 17:59 +0100:
> Bryan Sutula píše v So 17. 01. 2009 v 00:57 -0700:
> > OpenHPI 2.13.2 has been released
> 
> I am getting a SIGSEGV in the tsensorget013 test of the snmp_bc plugin
> on both Fedora 10 and Rawhide on x86_64. Doing some investigation about
> the cause now ...

Program received signal SIGSEGV, Segmentation fault.
0x0000000000425a54 in saHpiSensorReadingGet (SessionId=<value optimized out>, 
ResourceId=1, 
    SensorNum=1, Reading=0x0, EventState=0x7fffffffdb5c) at safhpi.c:1864
1864            if (rv == SA_OK && Reading->IsSupported == SAHPI_FALSE) {

(gdb) where
#0  0x0000000000425a54 in saHpiSensorReadingGet (SessionId=<value optimized 
out>, ResourceId=1, 
    SensorNum=1, Reading=0x0, EventState=0x7fffffffdb5c) at safhpi.c:1864
#1  0x0000000000404188 in main (argc=1, argv=0x7fffffffe108) at 
tsensorget013.c:92


snippet from tsensorget013.c
87      
88              /************************** 
89               * Test : Read sensor with NULL Reading area. State only 
90               **************************/
91              expected_err = SA_OK;                   
92              err = saHpiSensorReadingGet(sessionid, id, dd_sid, NULL, 
&state);
93              checkstatus(err, expected_err, testfail);
94      
95              /************************** 
96               * Test:Read with NULL State area, Read Value only 


The problem was introduced with revision 6920 (SF.net bug #2392398) that
added the following code into safhpi.c

1864            if (rv == SA_OK && Reading->IsSupported == SAHPI_FALSE) {
1865                    Reading->Type = 0;
1866                    memset(&(Reading->Value), 0, 
sizeof(SaHpiSensorReadingUnionT));
1867            }


and IMHO it should be changed into

1864            if (rv == SA_OK && Reading && Reading->IsSupported == 
SAHPI_FALSE) {

Filled as 
https://sourceforge.net/tracker2/?func=detail&aid=2518985&group_id=71730&atid=532251


                Dan

-- 
Dan Horák, RHCE
Software Engineer, BaseOS

Red Hat Czech s.r.o., Purkyňova 99, 612 45 Brno


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to