apache / datasketches-cpp

Core C++ Sketch Library
https://datasketches.apache.org
Apache License 2.0
223 stars 71 forks source link

Sanitize #414

Closed jmalkin closed 9 months ago

jmalkin commented 9 months ago

Our cmake config has long supported an option to add a sanitizer but we'd never followed through with doing so. This won't catch quite everything that valgrind or the memory sanitizer will (in particular, read-before-init type errors) but it can check for leaks.

When testing the workflow I created an intentional leak to verify that it did correctly catch the error. See https://github.com/jmalkin/datasketches-cpp/actions/runs/7394385600 to view the output.

The thread sanitizer isn't relevant to us at this point. The memory sanitizer may need to run in docker since it needs a full toolchain compiled with the memory sanitizer enabled. This seems to be all we get for now.

EDIT: A comparison of memory tools can be found here.

coveralls commented 9 months ago

Pull Request Test Coverage Report for Build 7394598638


Totals Coverage Status
Change from base Build 7283675343: 0.0%
Covered Lines: 16036
Relevant Lines: 16208

💛 - Coveralls