Closed derchr closed 6 months ago
Hello @derchr , I just tested your example against the new 3.0.0 and could not reproduce the behaviour. I used gcc 13.2 on a debian 12.2 machine, and tested QuickThreads and Pthreads for Systemc. Pthreads are more easy when testing with santize options.
This was my compile command for your example:
g++ -std=c++17 -fsanitize=address,undefined -I${SYSTEMC_HOME}/include -L${SYSTEMC_HOME}/lib-linux64 -lsystemc test.cpp -o test_program
And my output without error:
root@0731fe770d83:/testdir# ./test_program
SystemC 3.0.0_pub_rev_20231124-Accellera --- Dec 13 2023 12:32:10
Copyright (c) 1996-2023 by all Contributors,
ALL RIGHTS RESERVED
Could you re-check with the new SYSTEMC 3.0.0?
I just reproduced your errors with 2.3.4 with Quick and Pthreads on the same system. So I'm certain it will work for you with the new SystemC 3.0.0. Please re-open if you have further issues.
This Issue can be closed.
The use of 0xdb as an end of list indicator in next pointer fields was removed in 3.0.0 so this issue can definitely be closed.
I can confirm that the issue has been fixed with 3.0.0. Thanks all!
Hello, when compiling with
-fsanitize=address,undefined
, even in empty SystemC projects misaligned memory accesses are detected by the undefined behavior sanitizer. Can be observed with both GCC and Clang.This issue is not related to https://github.com/accellera-official/systemc/pull/19 as this can also be observed in the new 2.3.4 version.
GCC output:
Clang output:
For completeness, the program: