[RTEMS Project] #4832: CLANG flagged error

RTEMS trac trac at rtems.org
Fri Jan 27 16:13:18 UTC 2023

#4832: CLANG flagged error
  Reporter:  Daniel Páscoa  |      Owner:  (none)
      Type:  defect         |     Status:  new
  Priority:  normal         |  Milestone:
 Component:  admin          |    Version:
  Severity:  normal         |   Keywords:
Blocked By:                 |   Blocking:
 SPAMR/CLANG point out to a possible deference to a null pointer. However,
 this issue has already been checked by the RTEMS team and flagged as false
 positive (see rtems-6-sparc-gr740-smp-3/doc/paf/spamr/spamr.pdf page 29).

 Yet, the justification sentence ends with "Why CLANG complains about a
 possible null pointer at this place in code and not everywhere or nowhere
 remains a mystery" which sounds awkward and lead us to think that a
 complete analysis as not been done on the error.

 Looking at it now, "_Chain_Initialize_one" is declared as static inline in
 a .h. That makes it public and so not all calls are controlled.
 Within the function, there is already an assert operation for one of the
 inputs. Now, one needs to add it also to the other one. Note that this
 assert is only active when compiler options RTEMS_DEBUG or
 RTEMS_STATIC_ANALYSIS are used which shall remove the CLANG error and not
 influence the flight executable.

 (Missions might do an early compilation with RTEMS_DEGUG to spot any
 problem on this).

 **Additional Notes:**
 This ticket was raised as an outcome of the Independent SW Verification
 and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs
 (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is

 **File list:**
 cpukit\include\rtems\score\chainimpl.h (line 525)

Ticket URL: <http://devel.rtems.org/ticket/4832>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list