New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: an attempt to run the tests under ASan/UBsan #3787
Conversation
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
init.lxc.static is run in arbitrary containers where the libasan library lxc has been built with isn't always installed. To make it work let's override GCC's default and link both libasan and libubsan statically. It should help to fix issues like ``` ++ lxc-execute -n c1 -- sudo -u ubuntu /nnptest lxc-init: error while loading shared libraries: libasan.so.5: cannot open shared object file: No such file or directory ``` Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
and show all the commands it runs to make it easier to debug potential issues. Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
This pull request didn't trigger Jenkins as its author isn't in the whitelist. An organization member must perform one of the following:
Those commands are simple Github comments of the format: "jenkins: COMMAND" |
Now that it's green I think it should be more or less ready for review. @brauner could you take a look? |
jenkins: test this please |
mv /usr/bin/{lxc-test-console-log,test-console-log.orig} | ||
cat <<EOF >/usr/bin/lxc-test-console-log | ||
#!/bin/bash | ||
printf "Memory leaks are ignored due to https://github.com/lxc/lxc/issues/3796.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should hopefully be fixed with:
#3790
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried rebasing this PR on top of the master branch (with those commits included) but the test built with clang somehow triggered the same memory leak again. Weirdly, gcc seems to be fine and I can't seem to reproduce it locally with the same version of clang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like clang
was right after all. I fixed it in #3800.
Looks good to me. I think we want to move all the ASAN options (including compiler dependent ones) into the makefile itself in the future. |
Build finished. |
The idea is to run the tests under ASan/UBsan on GHActions when PRs are opened to prevent memory leaks, heap-buffer-overflows and the like from making it into the lxc repository.