CF icon indicating copy to clipboard operation
CF copied to clipboard

f-sanitizer report run time error in coverage-cf-cf_cfdp_sbintf-testrunner

Open avan989 opened this issue 1 year ago • 0 comments

Checklist (Please check before submitting)

  • [x] I reviewed the Contributing Guide.
  • [x] I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug Running with f-sanitizer report an run time error:

[BEGIN] 03 CF_CFDP_Send
/home/vboxuser/Desktop/cFS/apps/cf/fsw/src/cf_cfdp_sbintf.c:160:5: runtime error: member access within null pointer of type 'union CFE_SB_Buffer_t'
/home/vboxuser/Desktop/cFS/apps/cf/fsw/src/cf_cfdp_sbintf.c:161:5: runtime error: member access within null pointer of type 'union CFE_SB_Buffer_t'
[ PASS] 03.001 cf_cfdp_sbintf_tests.c:339 - CF_CFDP_Send(UT_CFDP_CHANNEL, ph)
[ PASS] 03.002 cf_cfdp_sbintf_tests.c:340 - CF_AppData.hk.Payload.channel_hk[UT_CFDP_CHANNEL].counters.sent.pdu (1) == 1 (1)
[ PASS] 03.003 cf_cfdp_sbintf_tests.c:341 - CallCount: CFE_MSG_SetSize() (1) == 1 (1)
[ PASS] 03.004 cf_cfdp_sbintf_tests.c:342 - CallCount: CFE_SB_TransmitBuffer() (1) == 1 (1)
[ INFO]                        ABORT::0     WARN::0     FLOW::0     DEBUG::0     N/A::0   
[  END] 03 CF_CFDP_Send         TOTAL::4     PASS::4     FAIL::0     MIR::0     TSF::0     TTF::0   
[ INFO]                        ABORT::0     WARN::0     FLOW::0     DEBUG::0     N/A::0   
[  END] 03 SUMMARY              TOTAL::71    PASS::71    FAIL::0     MIR::0     TSF::0     TTF::0  

To Reproduce Steps to reproduce the behavior: Add the following option: add_compile_options( -fsanitize=address -fsanitize=undefined -fsanitize-recover=all -g ) add_link_options( -fsanitize=address -fsanitize=undefined -fsanitize-recover=all )

Make SIMULATION=native ENABLE_UNIT_TESTS=true prep

make install

Run the test

Expected behavior A clear and concise description of what you expected to happen.

Code snips If applicable, add references to the software.

System observed on:

  • Hardware
  • OS: [e.g. Linux 4.4]
  • Versions [e.g. cFE 6.6, OSAL 4.2, PSP 1.3 for mcp750, any related apps]

Additional context Add any other context about the problem here.

Reporter Info Full name and company/organization if applicable Anh Van, GSFC

avan989 avatar Jun 11 '24 11:06 avan989