commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.6k stars 527 forks source link

ci: Test with ASan and UBSan #534

Closed nwellnhof closed 3 months ago

nwellnhof commented 3 months ago

This adds a CI job that tests with clang, ASan and UBSan. Only the static build is supported for now, meaning that we miss a few tests.

I happened to run into a very recent and probably short-lived issue with Github runners: https://github.com/actions/runner-images/issues/9491. The work-around can probably be removed soon.

We could also consider removing the valgrind test now.

nwellnhof commented 3 months ago

Maybe we should discuss this before merging.

Here's a more invasive change that enables sanitizers on all OSs and compilers: https://github.com/nwellnhof/cmark/blob/asan2/.github/workflows/ci.yml

jgm commented 3 months ago

So, is the question here whether we want the minimal change or the one that tests with sanitizers on all OSs/compilers? What is the drawback to the latter option?

nwellnhof commented 3 months ago

The new proposal now updated with a full os/compiler/build_type/sanitizer matrix: https://github.com/nwellnhof/cmark/blob/asan2/.github/workflows/ci.yml

Test results: https://github.com/nwellnhof/cmark/actions/runs/8321495139

nwellnhof commented 3 months ago

I'll post a new PR.

jgm commented 3 months ago

Are there any drawbacks to using this full matrix? I wasn't sure what you had in mind when you suggested discussion.

nwellnhof commented 3 months ago

Are there any drawbacks to using this full matrix?

Not really. The full matrix runs a few more jobs than before.