nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
76 stars 45 forks source link

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

Open avan989 opened 1 month ago

avan989 commented 1 month ago

Checklist (Please check before submitting)

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:

Additional context Add any other context about the problem here.

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