Using clang's LeakSanitizer in Docker Runner

I recently installed latest drone CI version (migrating from 1.0.x on an older server).
On the new server tests using clang’s address sanitizer are failing:

==295==LeakSanitizer has encountered a fatal error.
==295==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==295==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)

Supposedly it’s enough to use: --cap-add SYS_PTRACE
I don’t remember configuring this on the older server. Does anyone have any pointers to give?


Possibly related:


You would need to use privileged: true to grant all capabilities to the container:
https://docs.drone.io/pipeline/docker/syntax/steps/#privileged-mode

Great! That did the trick. Thank you.