ucontext: annotate coroutine stack for ASAN
PATCH v4 1/1 ucontext: annotate coroutine stack for ASAN
It helps ASAN to detect more leaks on coroutine stacks, as found in the following patch.
A similar work would need to be done for sigaltstack & windows fibers to have similar coverage. Since ucontext is preferred, I didn't bother checking the other coroutine implementations for now.
Signed-off-by Marc-André Lureau <[email protected]>
--- include/qemu/compiler.h | 4 ++++ util/coroutine-ucontext.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 3 ++- configure | 41 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 93 insertions(+), 3 deletions(-)
include/qemu/compiler.h +4 -0
@@ -111,4 +111,8 @@#define GCC_FMT_ATTR (n, m)#endif +#ifndef __has_feature +#define __has_feature (x) 0/* compatibility with non-clang compilers */ +#endif +#endif /* COMPILER_H */
util/coroutine-ucontext.c +48 -0
101 lines not on this page · raw message
.travis.yml +2 -1
@@ -13,12 +13,13 @@ addons: - libattr1-dev - libbrlapi-dev - libcap-ng-dev + - libgcc-6-dev - libgnutls-dev - libgtk-3-dev - libiscsi-dev - liblttng-ust-dev - - libnfs-dev - libncurses5-dev + - libnfs-dev - libnss3-dev - libpixman-1-dev - libpng12-dev
configure +39 -2
64 lines not on this page · raw message
Signature · 1 line
2.16.0.rc1.1.gef27df75a1
Quoted 7 lines · Marc-André Lureau
It helps ASAN to detect more leaks on coroutine stacks, as found in the following patch.
A similar work would need to be done for sigaltstack & windows fibers to have similar coverage. Since ucontext is preferred, I didn't bother checking the other coroutine implementations for now.
Quoted 7 lines
Signed-off-by Marc-André Lureau <[email protected]>--- include/qemu/compiler.h | 4 ++++ util/coroutine-ucontext.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 3 ++- configure | 41 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 93 insertions(+), 3 deletions(-)
Reviewed-by Stefan Hajnoczi <[email protected]>