diff options
author | Camilo Bernal | 2013-06-06 21:54:24 +0000 |
---|---|---|
committer | Xavier Raynaud | 2013-06-13 10:45:53 +0000 |
commit | c0baa6628beb9e2e0b76ae5fb800540a97c6b286 (patch) | |
tree | e3fe7b3d0e6e91b0056acf65aef22073cecaffb0 | |
parent | 713b79f7738cffda58dd99684231676fccdd9d9f (diff) | |
download | org.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.java | 9 |
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) { |