Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamilo Bernal2013-06-06 21:54:24 +0000
committerXavier Raynaud2013-06-13 10:45:53 +0000
commitc0baa6628beb9e2e0b76ae5fb800540a97c6b286 (patch)
treee3fe7b3d0e6e91b0056acf65aef22073cecaffb0
parent713b79f7738cffda58dd99684231676fccdd9d9f (diff)
downloadorg.eclipse.linuxtools-c0baa6628beb9e2e0b76ae5fb800540a97c6b286.tar.gz
org.eclipse.linuxtools-c0baa6628beb9e2e0b76ae5fb800540a97c6b286.tar.xz
org.eclipse.linuxtools-c0baa6628beb9e2e0b76ae5fb800540a97c6b286.zip
Bug 401638 - Fix missing function tag error on valid gcda file.
Do not attempt to interpret the next four bytes of an unused level (tag labelled as zero) as the corresponding data length. These actually represent a seperate tag. Change-Id: I280e7efba01ff085aa4fc56b37d3959706077c40 Reviewed-on: https://git.eclipse.org/r/13628 Tested-by: Hudson CI Reviewed-by: Xavier Raynaud <xavier.raynaud@kalray.eu> IP-Clean: Xavier Raynaud <xavier.raynaud@kalray.eu>
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcdaRecordsParser.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcdaRecordsParser.java b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcdaRecordsParser.java
index 046cb17d80..aef541f8d5 100644
--- a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcdaRecordsParser.java
+++ b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcdaRecordsParser.java
@@ -83,6 +83,15 @@ public class GcdaRecordsParser {
try {
// parse header
int tag = stream.readInt();
+
+ /*
+ * Move on to the next tag if an unused level (tag == O) is encountered,
+ * these do no have corresponding data lengths.
+ */
+ if(tag == 0){
+ continue;
+ }
+
long length = (stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
// parse gcda data
switch (tag) {

Back to the top