sumit_tuwien Posted October 16, 2013 Report Share Posted October 16, 2013 Hi All, We have observed Dereference of null pointer in following files : sysc/datatypes/int/sc_uint_base.cpp: line 515 sysc/datatypes/int/sc_unsigned.cpp: line 463 sysc/datatypes/int/sc_signed.cpp: line 479 sysc/datatypes/int/sc_int_base.cpp: line 544 sysc/datatypes/bit/sc_bv_base.cpp: line 315 Everywhere the problem is with: if( *a == 0 ) { Regards, Sumit Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted October 16, 2013 Report Share Posted October 16, 2013 If you look at these parts of the code, you'll see that the pointer is checked for NULL right before. The static analysis tool just doesn't know that SC_REPORT_ERROR does not return (instead, it throws an exception by default). Therefore, all of these can be seen as false positives. /Philipp Quote Link to comment Share on other sites More sharing options...
sumit_tuwien Posted October 16, 2013 Author Report Share Posted October 16, 2013 Thanks Philipp, This is a false positive. But, you just helped me to find a bug which I introduced. I deleted SC_REPORT_ERROR and forgot to add something !!! Sorry for creating confusion which arose out of two different libraries. Many thanks for that. Regards, Sumit Quote Link to comment Share on other sites More sharing options...
sumit_tuwien Posted October 16, 2013 Author Report Share Posted October 16, 2013 I would also like to thank tkdiff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.