Jump to content

Paul Floyd

Members
  • Content Count

    7
  • Joined

  • Last visited

  • Days Won

    2

Paul Floyd last won the day on January 1

Paul Floyd had the most liked content!

About Paul Floyd

  • Rank
    Member

Profile Information

  • Interests
    C++, Valgrind, SPICE, Verilog-AMS

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Here is a full analysis of the first problem, and a proposed patch. Here's what I saw running the executable under Valgrind via the GDB server (this is required to execute the mo(nitor) command). 257 result_p->digit = (sc_digit*)sc_core::sc_temp_heap.allocate( 258 sizeof(sc_digit)*result_p->ndigits ); 259 #if defined(_MSC_VER) 260 // workaround spurious initialisation issue on MS Visual C++ 261 memset( result_p->digit, 0, sizeof(sc_digit)*result_p->ndigits ); 2
  2. More details on the other two issues systemc/misc/user_guide/chpt4.4 ==165605== Invalid write of size 8 ==165605== at 0x49FACA6: sc_core::sc_object::orphan_child_objects() (sc_object.cpp:336) ==165605== by 0x49F5D46: sc_core::sc_module::~sc_module() (sc_module.cpp:273) ==165605== by 0x406CC3: stage1_2::~stage1_2() (stage1_2.h:43) ==165605== by 0x406B95: pipeline::~pipeline() (pipeline.h:43) ==165605== by 0x406C38: pipeline::~pipeline() (pipeline.h:43) ==165605== by 0x49F5343: sc_core::sc_module_dynalloc_list::~sc_module_dynalloc_list() (sc_module.cpp
  3. So, for the 1st item that I've looked at the most, I reproduced this on Fedora 33 amd64 with the default GCC [gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)]. The SystemC library is the latest from github and regressions systemc-regressions-2.3.3 from Accellera. Valgrind is the latest release, 3.16.1. I also reproduced the same issue on FreeBSD 12.2 with the default clang (10 I believe). That was with my own build of Valgrind, a bit more recent than 3.16.1 but no significant differences on amd64. The 2nd and 3rd items I also saw on FreeBSD and I'm rerunning the full set of tests on F
  4. While I'm wearing my Valgrind hat, memcheck detects a few issues in the regression tests tlm/bus_dmi systemc/misc/user_guide/chpt4.4 systemc/datatypes/misc/concat/test07 I haven't looked at the first two. For the last one, here is a cut down version that reproduces the first error. #include "systemc.h" #include "valgrind/memcheck.h" void checkout( const sc_unsigned* actual_p, const sc_unsigned* expected_p ) { cout << *actual_p <<" " << *expected_p << endl; cout <<"another line" << endl; } int sc_main(int argc, c
  5. I might one day have a go at getting QuickThreads to work with Valgrind, but that is another kettle of fish. In the meantime this testcase has one potential deadlock plus an error when deallocating resources.
  6. I get this problem on Fedora 33. Helgrind detects plenty of errors (see below), and the hang seems to be occurring when a call to pthread_cond_destoy is made whilst the object is still being held. I haven't debugged further. ==87323== Thread #3: lock order "0x5378948 before 0x4ACC978" violated ==87323== ==87323== Observed (incorrect) order is: acquisition of lock at 0x4ACC978 ==87323== at 0x483DB42: mutex_lock_WRK (hg_intercepts.c:907) ==87323== by 0x4841A3A: pthread_mutex_lock (hg_intercepts.c:923) ==87323== by 0x49EFEA4: sc_core::sc_cor_pkg_pthread::yie
  7. sc_assert does the same as the C std lib assert. You probably don't want to paste `expr` in the macro in case it has side effects (not that you should be doing that).
×
×
  • Create New...