Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addressSanitizer issue with coverage-sample_app-sample_app_cmds-testrunner #232

Open
avan989 opened this issue May 20, 2024 · 0 comments
Open

Comments

@avan989
Copy link
Contributor

avan989 commented May 20, 2024

Describe the bug
Running with addressSanitizer option shows the following error:

=================================================================
==6954==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x55a37767b09d bp 0x7ffd0de98550 sp 0x7ffd0de984a0 T0)
==6954==The signal is caused by a READ memory access.
==6954==Hint: this fault was caused by a dereference of a high value address (see register values below).  Dissassemble the provided pc to learn which register was used.
    #0 0x55a37767b09d in SAMPLE_APP_ProcessCmd /home/vboxuser/Desktop/cFS/apps/sample_app/fsw/src/sample_app_cmds.c:130
    #1 0x55a37767a65d in Test_SAMPLE_APP_ProcessCmd /home/vboxuser/Desktop/cFS/apps/sample_app/unit-test/coveragetest/coveragetest_sample_app_cmds.c:182
    #2 0x55a3776964e3 in UtTest_Run /home/vboxuser/Desktop/cFS/osal/ut_assert/src/uttest.c:172
    #3 0x55a377696f30 in OS_Application_Run /home/vboxuser/Desktop/cFS/osal/ut_assert/src/utbsp.c:230
    #4 0x55a37769879e in main /home/vboxuser/Desktop/cFS/osal/src/bsp/generic-linux/src/bsp_start.c:244
    #5 0x7f0f57ac7082 in __libc_start_main ../csu/libc-start.c:308
    #6 0x55a377679a3d in _start (/home/vboxuser/Desktop/cFS/build/native/default_cpu1/apps/sample_app/unit-test/coverage-sample_app-sample_app_cmds-testrunner+0xba3d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/vboxuser/Desktop/cFS/apps/sample_app/fsw/src/sample_app_cmds.c:130 in SAMPLE_APP_ProcessCmd
==6954==ABORTING

To Reproduce
Steps to reproduce the behavior:

  1. Add the following options:
    a. add_compile_options(-fsanitize=address -g)
    b. add_link_options(-fsanitize=address)

  2. Compile normally and see error.

Expected behavior
No Error

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 avan989 changed the title coveragetest - addressSanitizer issue with coverage-sample_app-sample_app_cmds-testrunner addressSanitizer issue with coverage-sample_app-sample_app_cmds-testrunner May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant