cFE icon indicating copy to clipboard operation
cFE copied to clipboard

f sanitizer detect runtime error in cfe_msg_sechdr_time.c

Open avan989 opened this issue 1 year ago • 1 comments

Describe the bug Running with f-sanitizer shows the following error:

/home/vboxuser/Desktop/cFS/cfe/modules/msg/fsw/src/cfe_msg_sechdr_time.c:95:42: runtime error: left shift of 144 by 24 places cannot be represented in type 'int'

To Reproduce Add the following options: add_compile_options( -fsanitize=address -fsanitize=undefined -fsanitize-recover=all -g ) add_link_options( -fsanitize=address -fsanitize=undefined -fsanitize-recover=all )

  1. make SIMULATION=native
  2. make install
  3. Run

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 Jul 15 '24 18:07 avan989

@dmknutsen @dzbaker Can you add this to the discussion to see if this is something you want to fix?

avan989 avatar Jul 15 '24 18:07 avan989

fixed with https://github.com/nasa/cFE/pull/2585. No long see.

avan989 avatar Mar 04 '25 19:03 avan989