accellera-official / systemc

SystemC Reference Implementation
https://systemc.org/overview/systemc/
Apache License 2.0
451 stars 145 forks source link

SystemC simulations cause signal 11 when run with addresssanitizer #27

Open tkuyucu-nordicsemi opened 2 years ago

tkuyucu-nordicsemi commented 2 years ago

All simulations end with the tracer catching a signal 11 when built and run with the option -fsanitize=address For example the async_reset test.

        Copyright (c) 1996-2017 by all Contributors,
        ALL RIGHTS RESERVED
SystemC Simulation
==1301179==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff0c98e000; bottom 0x7fa99d1fe000; size: 0x00556f790000 (366942420992)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189

Success
Tracer caught signal 11: addr=0x7fa99d353000 pc=0x7fa9a07b88b0 sp=0x7fa99c3fdca0
==1301179==LeakSanitizer has encountered a fatal error.
==1301179==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==1301179==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
End of SystemC Simulation

I also have -std=c++11 in my ccflags.

maehne commented 2 years ago

@aut0 and @janweinstock: Could you maybe comment on this issue, as you contributed PRs, which were considered by the LWG for inclusion to the next proof-of-concept release?

aut0 commented 2 years ago

I think this is expected, because the version in this github repo does not contain the patches that were merged upstream. You can manually fix this by applying these patches for this version: https://github.com/accellera-official/systemc/pull/19

maehne commented 2 years ago

Thanks for the feedback @aut0!