Add the initializtion for eof_pos. eof_pos may not be initialized properly when part of gcda ...
13 years, 11 months ago
(2011-05-23 21:06:48 UTC)
#1
Add the initializtion for eof_pos. eof_pos may not be initialized properly
when part of gcda files got merged.
Tested with gcc bootstrap and regression tests.
2011-05-23 Rong Xu <xur@google.com>
* gcc/libgcov.c (gcov_merge_gcda_file): initialize eof_pos for
every invocation.
Index: gcc/libgcov.c
===================================================================
--- gcc/libgcov.c (revision 174088)
+++ gcc/libgcov.c (working copy)
@@ -748,6 +748,8 @@
int error = 0;
gcov_unsigned_t tag, length;
+ eof_pos = 0;
+
tag = gcov_read_unsigned ();
if (tag)
{
--
This patch is available for review at http://codereview.appspot.com/4553059
This patch is for google_main only. The bug was introduced in r173806 (only in google_main). ...
13 years, 11 months ago
(2011-05-23 21:21:15 UTC)
#2
This patch is for google_main only. The bug was introduced in r173806 (only in
google_main).
Thanks,
-Rong
On 2011/05/23 21:06:48, xur wrote:
> Add the initializtion for eof_pos. eof_pos may not be initialized properly
> when part of gcda files got merged.
>
> Tested with gcc bootstrap and regression tests.
>
> 2011-05-23 Rong Xu <mailto:xur@google.com>
>
> * gcc/libgcov.c (gcov_merge_gcda_file): initialize eof_pos for
> every invocation.
>
> Index: gcc/libgcov.c
> ===================================================================
> --- gcc/libgcov.c (revision 174088)
> +++ gcc/libgcov.c (working copy)
> @@ -748,6 +748,8 @@
> int error = 0;
> gcov_unsigned_t tag, length;
>
> + eof_pos = 0;
> +
> tag = gcov_read_unsigned ();
> if (tag)
> {
>
> --
> This patch is available for review at http://codereview.appspot.com/4553059
ok for google/main. David On Mon, May 23, 2011 at 2:06 PM, Rong Xu <xur@google.com> ...
13 years, 11 months ago
(2011-05-23 21:32:04 UTC)
#3
ok for google/main.
David
On Mon, May 23, 2011 at 2:06 PM, Rong Xu <xur@google.com> wrote:
> Add the initializtion for eof_pos. eof_pos may not be initialized properly
> when part of gcda files got merged.
>
> Tested with gcc bootstrap and regression tests.
>
> 2011-05-23 Rong Xu <xur@google.com>
>
> * gcc/libgcov.c (gcov_merge_gcda_file): initialize eof_pos for
> every invocation.
>
> Index: gcc/libgcov.c
> ===================================================================
> --- gcc/libgcov.c (revision 174088)
> +++ gcc/libgcov.c (working copy)
> @@ -748,6 +748,8 @@
> int error = 0;
> gcov_unsigned_t tag, length;
>
> + eof_pos = 0;
> +
> tag = gcov_read_unsigned ();
> if (tag)
> {
>
> --
> This patch is available for review at http://codereview.appspot.com/4553059
>
Issue 4553059: [google] initialize eof_pos
Created 13 years, 11 months ago by xur
Modified 13 years, 11 months ago
Reviewers: davidxl
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/main/
Comments: 0