Skip to content

Enable testing using Clang's sanitizers. #3294

Open

Activity

  1. AtnNn commented on Nov 6, 2014

    @AtnNn
    Member

    I got it working on newton:

    PATH=/opt/clang-3.5.0/bin:$PATH
    ./configure CXX=clang++ CXXFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address --without-tcmalloc
    make DEBUG=1 ALLOW_WARNINGS=1
    

    It complains about swapcontext being unsupported: http://code.google.com/p/address-sanitizer/issues/detail?id=189

    It also segfaults in a few places when running the unit tests.

    Using -fsanitize=address,undefined also dumps thousands of complaints about unaligned reads and writes.

  2. AtnNn commented on Nov 6, 2014

    @AtnNn
    Member

    @VeXocide: Before using this by default when running tests we would have to get rid of false positives and fix the crashes.

    This feature seems to sometimes cause warnings to be output at runtime without changing the return value of the process. To take full advantage of these warnings, the testsuite would have to be instrumented to notice these warnings in the output logs and report them.

  3. added this to the milestone on Nov 6, 2014
  4. danielmewes commented on Nov 6, 2014

    @danielmewes
    Member

    We could compile the test binary with THREADED_COROUTINES=1 to avoid swapcontext. It might hide some subtle concurrency bugs, but overall would probably still be useful.

  5. AtnNn commented on Nov 15, 2014

    @AtnNn
    Member

    I have opened a few issues for the warnings and errors generated by the sanitizer when running the unit tests. Some of these may be false positives, but most look like a possible source of bugs: #3326 #3328 #3329 #3330 #3337 #3338

  6. modified the milestones: , subsequent on Jan 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions