kth-competitive-programming / kactl

KTH Algorithm Competition Template Library (... eller KTHs AC-tillverkande lapp)
2.68k stars 711 forks source link

run tests with runtime debug flags #259

Open lrvideckis opened 5 months ago

lrvideckis commented 5 months ago

-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_SANITIZE_VECTOR -D_GLIBCXX_ASSERTIONS -D_FORTIFY_SOURCE=2 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fstack-protector

https://github.com/kth-competitive-programming/kactl/blob/main/doc/scripts/run-all.sh#L16

simonlindholm commented 5 months ago

There's a trade-off here, where debug flags allow you fewer iterations of the stress tests in the same duration of time. I think generally if ASAN finds something it will find it early, not on the millionth iteration. Could be nice to have both options, with some flag passed in to each test that it could use to determine the number of iterations to run.