|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] coverage: filter out libfdt.o and libelf.o
commit 6ac66c9cbb58abf34fc67e8e4ebb9d17bb207964
Author: Viktor Mitin <viktor.mitin.19@xxxxxxxxx>
AuthorDate: Thu May 16 16:20:16 2019 +0300
Commit: Julien Grall <julien.grall@xxxxxxx>
CommitDate: Mon May 20 13:29:58 2019 +0100
coverage: filter out libfdt.o and libelf.o
While the build system explicitly compiles any .init object without gcov
option, this does not cover the libraries libfdt and libelf. This is
because the two
libraries are built normally and then some sections will have .init
append.
As coverage will be enabled for libfdt, some of the GCOV counters may be
stored in a section that will be stripped after init. On Arm64, this
will reliably result to a crash when 'xencov' will ask to reset the
counters.
Interestingly, on x86, all the counters for libelf seems to be in
sections that will not be renamed so far. Hence, why this was not
discovered before. But this is a latent bug.
As the two libraries can only be used at boot, it is fine to disable
coverage for the entire library.
Reported-by: Viktor Mitin <viktor.mitin.19@xxxxxxxxx>
Suggested-by: Julien Grall <julien.grall@xxxxxxx>
Signed-off-by: Viktor Mitin <viktor.mitin.19@xxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Reviewed-by: Julien Grall <julien.grall@xxxxxxx>
[julien: Reword commit message]
Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
---
xen/common/libelf/Makefile | 1 +
xen/common/libfdt/Makefile | 1 +
2 files changed, 2 insertions(+)
diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile
index 5bf8f764f1..3d9e38f27e 100644
--- a/xen/common/libelf/Makefile
+++ b/xen/common/libelf/Makefile
@@ -1,4 +1,5 @@
obj-bin-y := libelf.o
+nocov-y += libelf.o
SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile
index d81f54b6b8..c075bbf546 100644
--- a/xen/common/libfdt/Makefile
+++ b/xen/common/libfdt/Makefile
@@ -3,6 +3,7 @@ include Makefile.libfdt
SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
obj-y += libfdt.o
+nocov-y += libfdt.o
CFLAGS += -I$(BASEDIR)/include/xen/libfdt/
--
generated by git-patchbot for /home/xen/git/xen.git#staging
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |