Skip to content

Adopt ASAN / Valgrind in the test suite #288

@fdcastel

Description

@fdcastel

@fdcastel

I think we should run all our tests

  1. with ASAN. That means we must make a special build (Debug, maybe wo extra logging) with -fsanitize-address, probably for both driver so & the test binary.
  2. with Valgrind.

It will help us to maintain the code purity.

I just found a buffer overflow bug in legacy code (maybe it's already fixed in the futher PRs) while running tests with ASAN.


The best way is to add the custom cmake types (like DebugWithAsan & DebugWithValgrind), both with -O0, -g3 and no extra logging. It's ok to use simple Debug type for Valgrind run, if the extra logs aren't annoying. ASAN build is special due to the use of special flags & linkage.
And it's not a good idea to combine ASAN & Valgrind runs. So we should run our test suite twice. ASAN run has almost the same speed as the normal, Valgrind is much slower.

Perhaps it would be more efficient if I modify the CMake files and you handle the Windows installer?.. and of cause all that sanitizer stuff may be merged after this PR, no deps here. Do you expect any merge issues if I make changes to the master branch?


Originally posted by @irodushka in #286 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions