Skip to content

Invalid memory write in new Coyote thread constructor #139

@sven-weber

Description

@sven-weber

Description
After switching to the new Coyote release (v.0.2.1), our software experienced a segfault at the end of the program runtime. After some investigation, we found that this segfault only happens when the Coyote cThread is initialized. Therefore, we ran our program with Valgrind and found that there are out of bounds writes and reads that happen in the new cThread constructor. Those writes overwrite other memory of our software, which causes the segfaults at program exit. When going back to a previous Coyote version, this issue does not happen.

Attached is the corresponding valgrind run, which can be imported, for example in CLion. The issue seems to stem from cTread line 108:

Image

Expected behavior
Do not perform out of bounds writes and reads.

Screenshots & Logs

valgrind.xml

Environment:

  • OS (Ubuntu & Linux version): Ubuntu 22.04.5 LTS - Kernel 6.8.0-65-generic (HACC machine 09)
  • CMake version: 3.31.0-rc3
  • gcc version: 11.4.0
  • Vivado / Vitis version: 2024.2
  • Tested on hardware? No - pure software-side issue
  • If tested on hardware, what FPGA (e.g. Alveo U55C, Alveo U200 etc.):

Additional information

As the software is not publicly accessible, I am happy to share steps on how to re-produce this issue privately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions