]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
fix 310424 --read-var-info does not properly describe static variables
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 5 Dec 2012 21:08:24 +0000 (21:08 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 5 Dec 2012 21:08:24 +0000 (21:08 +0000)
This patch changes the way static variables are
recorded by readdwarf3.c (when giving --read-var-info=yes),
improving the way such variables are described.

Currently:
A static variable does not have the DW_AT_external tag.
So, readdwarf3.c does not consider it a global variable.
It is rather considered a "local" variable.
When it is recorded, it is associated to a range of program counters
(the functions in the file where it is visible).
However, even if the static variable is only visible
in the source file where it is declared, it can in reality
be used by any range of program counters, typically
by having the address of the local variable passed
to other functions.

Such local variable can then only be described
when the program counter is in the range of program
counters for which it has been recorded.
However, this (local) description is obtained
by a kludge in debuginfo.c (around line 3285).

This kludge then produces a strange description,
telling that the variable has been declared in
frame 0 of a thread (see second example below).

The kludge is not always able to describe
the address (if the IP of the tid is in another file than
where the variable has been declared).

I suspect the kludge can sometimes describe the var as being
declared in an unrelated thread
(e.g. if an error is triggered by tid 5, but tid1 is by
luck in an IP corresponding to the recorded range).

The patch changes the way a static variable is recorded:
if DW_AT_external tag is found, a variable is marked as global.
If a variable is not external, but is seen when level is 1,
then we record the variable as a global variable (i.e.
with a full IP range).
This improves the way such static variable are described:
* they are described even if being accessed by other files.
* their description is not in an artificial "thread frame".

First example:
**************
a variable cannot be described because it is
accessed by a function in another file:

with the trunk:
==20410== ----------------------------------------------------------------
==20410==
==20410== Possible data race during read of size 4 at 0x600F54 by thread #1
==20410== Locks held: none
==20410==    at 0x4007E4: a (abc.c:42)
==20410==    by 0x4006BC: main (mabc.c:24)
==20410==
==20410== This conflicts with a previous write of size 4 by thread #2
==20410== Locks held: none
==20410==    at 0x4007ED: a (abc.c:42)
==20410==    by 0x400651: brussels_fn (mabc.c:9)
==20410==    by 0x4C2B54E: mythread_wrapper (hg_intercepts.c:219)
==20410==    by 0x4E348C9: start_thread (pthread_create.c:300)
==20410==
==20410== ----------------------------------------------------------------

with the patch:
==4515== ----------------------------------------------------------------
==4515==
==4515== Possible data race during read of size 4 at 0x600F54 by thread #1
==4515== Locks held: none
==4515==    at 0x4007E4: a (abc.c:42)
==4515==    by 0x4006BC: main (mabc.c:24)
==4515==
==4515== This conflicts with a previous write of size 4 by thread #2
==4515== Locks held: none
==4515==    at 0x4007ED: a (abc.c:42)
==4515==    by 0x400651: brussels_fn (mabc.c:9)
==4515==    by 0x4C2B54E: mythread_wrapper (hg_intercepts.c:219)
==4515==    by 0x4E348C9: start_thread (pthread_create.c:300)
==4515==
==4515== Location 0x600f54 is 0 bytes inside global var "static_global"
==4515== declared at mabc.c:4
==4515==
==4515== ----------------------------------------------------------------

Second example:
***************
When the kludge can describe the variable, it is strangely described
as being declared in a frame of a thread, while for sure the declaration
has nothing to do with a thread
With the trunk:
==20410== Location 0x600f68 is 0 bytes inside local var "static_global_a"
==20410== declared at abc.c:3, in frame #0 of thread 1

With the patch:
==4515== Location 0x600f68 is 0 bytes inside global var "static_global_a"
==4515== declared at abc.c:3

#include <stdio.h>

static int static_global_a = 0; //// <<<< this is abc.c:3

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13153

25 files changed:
NEWS
coregrind/m_debuginfo/debuginfo.c
coregrind/m_debuginfo/readdwarf3.c
drd/tests/annotate_ignore_rw.stderr.exp
drd/tests/annotate_ignore_rw2.stderr.exp
drd/tests/annotate_ignore_write.stderr.exp
drd/tests/annotate_ignore_write2.stderr.exp
drd/tests/atomic_var.stderr.exp
drd/tests/fp_race.stderr.exp
drd/tests/fp_race_xml.stderr.exp
drd/tests/hg03_inherit.stderr.exp
drd/tests/hg04_race.stderr.exp
drd/tests/rwlock_race.stderr.exp
drd/tests/sem_as_mutex.stderr.exp
drd/tests/sem_as_mutex3.stderr.exp
drd/tests/sem_open.stderr.exp
drd/tests/sem_open3.stderr.exp
helgrind/tests/hg03_inherit.stderr.exp
helgrind/tests/hg04_race.stderr.exp
helgrind/tests/rwlock_race.stderr.exp
helgrind/tests/tc21_pthonce.stderr.exp
memcheck/tests/varinfo3.stderr.exp
memcheck/tests/varinfo3.stderr.exp-ppc64
memcheck/tests/varinfo5.stderr.exp
memcheck/tests/varinfo5.stderr.exp-ppc64

diff --git a/NEWS b/NEWS
index 1f6dcc4f5028ec7df79a49cf0bdcb3f4326da0e1..f48a5466991ce6e524b5bc304f88d7838e6582da 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,7 @@ m = merged into 3_8_BRANCH
 308644    [390] vgdb command for having the info for the track-fds option
 308711    [390] give more info about aspacemgr and arenas in out_of_memory
 308886    [390] Missing support for PTRACE_SET/GETREGSET 
+310424    [390] --read-var-info does not properly describe static variables 
 310931    [390] s390x: Message-security assist (MSA) instruction extension not implemented
 n-i-bz    [390] report error for vgdb snapshot requested before execution
 n-i-bz    [390] Some wrong command line options could be ignored
index 59f920d37e25d2e8945b2a1c2c6fc1bc41c61231..d3b8ef4aceca76bc4063cee8e7828438c182e510 100644 (file)
@@ -3282,28 +3282,6 @@ Bool VG_(get_data_description)(
       in the stacks of all the threads.  First try to figure out which
       thread's stack data_addr is in. */
 
-   /* --- KLUDGE --- Try examining the top frame of all thread stacks.
-      This finds variables which are not stack allocated but are not
-      globally visible either; specifically it appears to pick up
-      variables which are visible only within a compilation unit.
-      These will have the address range of the compilation unit and
-      tend to live at Scope level 1. */
-   VG_(thread_stack_reset_iter)(&tid);
-   while ( VG_(thread_stack_next)(&tid, &stack_min, &stack_max) ) {
-      if (stack_min >= stack_max)
-         continue; /* ignore obviously stupid cases */
-      if (consider_vars_in_frame( dname1, dname2,
-                                  data_addr,
-                                  VG_(get_IP)(tid),
-                                  VG_(get_SP)(tid), 
-                                  VG_(get_FP)(tid), tid, 0 )) {
-         zterm_XA( dname1 );
-         zterm_XA( dname2 );
-         return True;
-      }
-   }
-   /* --- end KLUDGE --- */
-
    /* Perhaps it's on a thread's stack? */
    found = False;
    VG_(thread_stack_reset_iter)(&tid);
@@ -3328,9 +3306,6 @@ Bool VG_(get_data_description)(
    n_frames = VG_(get_StackTrace)( tid, ips, N_FRAMES,
                                    sps, fps, 0/*first_ip_delta*/ );
 
-   /* As a result of KLUDGE above, starting the loop at j = 0
-      duplicates examination of the top frame and so isn't necessary.
-      Oh well. */
    vg_assert(n_frames >= 0 && n_frames <= N_FRAMES);
    for (j = 0; j < n_frames; j++) {
       if (consider_vars_in_frame( dname1, dname2,
index d058ea9d3130b41d73f3c5dfa8bd34b0f7d7aad8..8dbed5a5cbf95ef65de864fe74eac00bb7fe5ec9 100644 (file)
@@ -1853,7 +1853,7 @@ static void parse_var_DIE (
    if (dtag == DW_TAG_variable || dtag == DW_TAG_formal_parameter) {
       HChar* name        = NULL;
       UWord  typeR       = D3_INVALID_CUOFF;
-      Bool   external    = False;
+      Bool   global      = False;
       GExpr* gexpr       = NULL;
       Int    n_attrs     = 0;
       UWord  abs_ori     = (UWord)D3_INVALID_CUOFF;
@@ -1880,7 +1880,7 @@ static void parse_var_DIE (
             typeR = cook_die_using_form( cc, (UWord)cts, form );
          }
          if (attr == DW_AT_external && ctsSzB > 0 && cts > 0) {
-            external = True;
+            global = True;
          }
          if (attr == DW_AT_abstract_origin && ctsSzB > 0) {
             abs_ori = (UWord)cts;
@@ -1902,6 +1902,14 @@ static void parse_var_DIE (
             if (0) VG_(printf)("XXX filename = %s\n", fileName);
          }
       }
+      if (!global && dtag == DW_TAG_variable && level == 1) {
+         /* Case of a static variable. It is better to declare
+            it global as the variable is not really related to
+            a PC range, as its address can be used by program
+            counters outside of the ranges where it is visible . */
+         global = True;
+      }
+
       /* We'll collect it under if one of the following three
          conditions holds:
          (1) has location and type    -> completed
@@ -1927,7 +1935,7 @@ static void parse_var_DIE (
             this CU. */
          vg_assert(parser->sp >= 0);
 
-         /* If this is a local variable (non-external), try to find
+         /* If this is a local variable (non-global), try to find
             the GExpr for the DW_AT_frame_base of the containing
             function.  It should have been pushed on the stack at the
             time we encountered its DW_TAG_subprogram DIE, so the way
@@ -1939,7 +1947,7 @@ static void parse_var_DIE (
             if the containing DT_TAG_subprogram didn't supply a
             DW_AT_frame_base -- that's OK, but there must actually be
             a containing DW_TAG_subprogram. */
-         if (!external) {
+         if (!global) {
             Bool found = False;
             for (i = parser->sp; i >= 0; i--) {
                if (parser->isFunc[i]) {
@@ -1951,7 +1959,7 @@ static void parse_var_DIE (
             if (!found) {
                if (0 && VG_(clo_verbosity) >= 0) {
                   VG_(message)(Vg_DebugMsg, 
-                     "warning: parse_var_DIE: non-external variable "
+                     "warning: parse_var_DIE: non-global variable "
                      "outside DW_TAG_subprogram\n");
                }
                /* goto bad_DIE; */
@@ -1964,18 +1972,18 @@ static void parse_var_DIE (
             }
          }
 
-         /* re "external ? 0 : parser->sp" (twice), if the var is
-            marked 'external' then we must put it at the global scope,
+         /* re "global ? 0 : parser->sp" (twice), if the var is
+            marked 'global' then we must put it at the global scope,
             as only the global scope (level 0) covers the entire PC
             address space.  It is asserted elsewhere that level 0 
             always covers the entire address space. */
-         xa = parser->ranges[external ? 0 : parser->sp];
+         xa = parser->ranges[global ? 0 : parser->sp];
          nRanges = VG_(sizeXA)(xa);
          vg_assert(nRanges >= 0);
 
          tv = ML_(dinfo_zalloc)( "di.readdwarf3.pvD.1", sizeof(TempVar) );
          tv->name   = name;
-         tv->level  = external ? 0 : parser->sp;
+         tv->level  = global ? 0 : parser->sp;
          tv->typeR  = typeR;
          tv->gexpr  = gexpr;
          tv->fbGX   = fbGX;
index 24684da1399d61db35424a7514a857386d854ff0..416be80ffa2b057f421fa22f214535242ffeffeb 100644 (file)
@@ -1,8 +1,8 @@
 
 Conflicting load by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_rw.c:?)
-Location 0x........ is 0 bytes inside local var "s_c"
-declared at annotate_ignore_rw.c:12, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_c"
+declared at annotate_ignore_rw.c:12
 
 Finished.
 
index ffdb76fc7818dc40336b75a9e37e7f2e0a7ca372..4e96bf31905d1d17c17ab9dcee64dfe94eb5ebde 100644 (file)
@@ -1,18 +1,18 @@
 
 Conflicting load by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_rw.c:?)
-Location 0x........ is 0 bytes inside local var "s_b"
-declared at annotate_ignore_rw.c:11, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_b"
+declared at annotate_ignore_rw.c:11
 
 Conflicting store by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_rw.c:?)
-Location 0x........ is 0 bytes inside local var "s_a"
-declared at annotate_ignore_rw.c:10, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_a"
+declared at annotate_ignore_rw.c:10
 
 Conflicting load by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_rw.c:?)
-Location 0x........ is 0 bytes inside local var "s_c"
-declared at annotate_ignore_rw.c:12, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_c"
+declared at annotate_ignore_rw.c:12
 
 Finished.
 
index f26242e5b9696f6e2322d8dc33aef91ad092bba7..2204d5b523056a9e56c78902c03d85632d80d128 100644 (file)
@@ -1,18 +1,18 @@
 
 Conflicting load by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_write.c:?)
-Location 0x........ is 0 bytes inside local var "s_b"
-declared at annotate_ignore_write.c:11, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_b"
+declared at annotate_ignore_write.c:11
 
 Conflicting load by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_write.c:?)
-Location 0x........ is 0 bytes inside local var "s_c"
-declared at annotate_ignore_write.c:12, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_c"
+declared at annotate_ignore_write.c:12
 
 Conflicting store by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_write.c:?)
-Location 0x........ is 0 bytes inside local var "s_a"
-declared at annotate_ignore_write.c:10, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_a"
+declared at annotate_ignore_write.c:10
 
 Finished.
 
index 03c77661de013a360641b03e46805f0c1d0be869..9b58325a5f21d6854bb5cfa3a6f7db353cf23080 100644 (file)
@@ -1,23 +1,23 @@
 
 Conflicting load by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_write.c:?)
-Location 0x........ is 0 bytes inside local var "s_b"
-declared at annotate_ignore_write.c:11, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_b"
+declared at annotate_ignore_write.c:11
 
 Conflicting store by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_write.c:?)
-Location 0x........ is 0 bytes inside local var "s_a"
-declared at annotate_ignore_write.c:10, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_a"
+declared at annotate_ignore_write.c:10
 
 Conflicting load by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_write.c:?)
-Location 0x........ is 0 bytes inside local var "s_c"
-declared at annotate_ignore_write.c:12, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_c"
+declared at annotate_ignore_write.c:12
 
 Conflicting store by thread 1 at 0x........ size 1
    at 0x........: main (annotate_ignore_write.c:?)
-Location 0x........ is 0 bytes inside local var "s_a"
-declared at annotate_ignore_write.c:10, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_a"
+declared at annotate_ignore_write.c:10
 
 Finished.
 
index 7fa1e0e2be47a220327b9478d3ef35c6c9773107..ad05687d03ce85f0a9b03bc6e1ee3e7b53903bf0 100644 (file)
@@ -3,8 +3,8 @@ Start of test.
 Conflicting load by thread x at 0x........ size 4
    at 0x........: thread_func_2 (atomic_var.c:?)
    by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-Location 0x........ is 0 bytes inside local var "s_y"
-declared at atomic_var.c:35, in frame #? of thread x
+Location 0x........ is 0 bytes inside global var "s_y"
+declared at atomic_var.c:35
 
 y = 1
 Test finished.
index 23873d2eca7b967f386fb2d38c294fd98d87c209..68bd254e149466011e6737c577c79bad07fb4bb4 100644 (file)
@@ -1,8 +1,8 @@
 
 Conflicting load by thread 1 at 0x........ size 8
    at 0x........: main (fp_race.c:?)
-Location 0x........ is 0 bytes inside local var "s_d3"
-declared at fp_race.c:24, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_d3"
+declared at fp_race.c:24
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
@@ -10,8 +10,8 @@ Other segment end (thread 2)
 
 Conflicting store by thread 1 at 0x........ size 8
    at 0x........: main (fp_race.c:?)
-Location 0x........ is 0 bytes inside local var "s_d3"
-declared at fp_race.c:24, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_d3"
+declared at fp_race.c:24
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
index 73a530e4344af5b911c3db452484c9518412f1e6..05ffe71e521d3bf0df9545d9c85a86afe8460cc0 100644 (file)
@@ -48,8 +48,8 @@
       <line>...</line>
     </frame>
   </stack>
-  <auxwhat>Location 0x........ is 0 bytes inside local var "s_d3"</auxwhat>
-  <xauxwhat><text>declared at fp_race.c:24, in frame #? of thread x</text> <file>fp_race.c</file> <line>...</line> </xauxwhat>
+  <auxwhat>Location 0x........ is 0 bytes inside global var "s_d3"</auxwhat>
+  <xauxwhat><text>declared at fp_race.c:24</text> <file>fp_race.c</file> <line>...</line> </xauxwhat>
   <other_segment_start>
   </other_segment_start>
   <other_segment_end>
@@ -71,8 +71,8 @@
       <line>...</line>
     </frame>
   </stack>
-  <auxwhat>Location 0x........ is 0 bytes inside local var "s_d3"</auxwhat>
-  <xauxwhat><text>declared at fp_race.c:24, in frame #? of thread x</text> <file>fp_race.c</file> <line>...</line> </xauxwhat>
+  <auxwhat>Location 0x........ is 0 bytes inside global var "s_d3"</auxwhat>
+  <xauxwhat><text>declared at fp_race.c:24</text> <file>fp_race.c</file> <line>...</line> </xauxwhat>
   <other_segment_start>
   </other_segment_start>
   <other_segment_end>
index 62a8d5de8500c4cf77746683c4a7ffceca88d8b7..72eb236a000619bae2b979642e65414fb26b5b38 100644 (file)
@@ -4,13 +4,13 @@ Conflicting store by thread 3 at 0x........ size 4
    at 0x........: t2 (hg03_inherit.c:28)
    by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
 Location 0x........ is 0 bytes inside shared[1],
-declared at hg03_inherit.c:11, in frame #? of thread 3
+a global variable declared at hg03_inherit.c:11
 
 Conflicting store by thread 3 at 0x........ size 4
    at 0x........: t2 (hg03_inherit.c:29)
    by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
 Location 0x........ is 0 bytes inside shared[1],
-declared at hg03_inherit.c:11, in frame #? of thread 3
+a global variable declared at hg03_inherit.c:11
 
 
 ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
index 9ea3ccdd54afd8fc3a21401a53cce63e91491378..5b5969c995adf6af47855c079c6ec615993c7149 100644 (file)
@@ -3,8 +3,8 @@ Thread 3:
 Conflicting load by thread 3 at 0x........ size 4
    at 0x........: th (hg04_race.c:10)
    by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-Location 0x........ is 0 bytes inside local var "shared"
-declared at hg04_race.c:6, in frame #? of thread 2
+Location 0x........ is 0 bytes inside global var "shared"
+declared at hg04_race.c:6
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
@@ -13,8 +13,8 @@ Other segment end (thread 2)
 Conflicting store by thread 3 at 0x........ size 4
    at 0x........: th (hg04_race.c:10)
    by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-Location 0x........ is 0 bytes inside local var "shared"
-declared at hg04_race.c:6, in frame #? of thread 2
+Location 0x........ is 0 bytes inside global var "shared"
+declared at hg04_race.c:6
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
index 8350b50e764664ac77582d7997a7a67b95b5df7f..d3e0b372adfcaec47d09a34c6a13dfbab13f18c8 100644 (file)
@@ -2,14 +2,14 @@
 Conflicting load by thread x at 0x........ size 4
    at 0x........: thread_func (rwlock_race.c:?)
    by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-Location 0x........ is 0 bytes inside local var "s_racy"
-declared at rwlock_race.c:18, in frame #? of thread x
+Location 0x........ is 0 bytes inside global var "s_racy"
+declared at rwlock_race.c:18
 
 Conflicting store by thread x at 0x........ size 4
    at 0x........: thread_func (rwlock_race.c:?)
    by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-Location 0x........ is 0 bytes inside local var "s_racy"
-declared at rwlock_race.c:18, in frame #? of thread x
+Location 0x........ is 0 bytes inside global var "s_racy"
+declared at rwlock_race.c:18
 
 Result: 2
 
index 1646a6c9bd3df877e0b7dbefc2771badce0b6860..1fbd91ad7658ec3af753073c60e755a99d48ef8c 100644 (file)
@@ -1,8 +1,8 @@
 
 Conflicting load by thread 1 at 0x........ size 8
    at 0x........: main (sem_as_mutex.c:?)
-Location 0x........ is 0 bytes inside local var "s_d3"
-declared at sem_as_mutex.c:25, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_d3"
+declared at sem_as_mutex.c:25
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
@@ -10,8 +10,8 @@ Other segment end (thread 2)
 
 Conflicting store by thread 1 at 0x........ size 8
    at 0x........: main (sem_as_mutex.c:?)
-Location 0x........ is 0 bytes inside local var "s_d3"
-declared at sem_as_mutex.c:25, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_d3"
+declared at sem_as_mutex.c:25
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
index 97b09a12eda895a1a9a3f5a44ae4d8c18c11b2ed..efd47ff1c22a9e22d9dab130d72b86af18050cfb 100644 (file)
@@ -1,8 +1,8 @@
 
 Conflicting load by thread 1 at 0x........ size 8
    at 0x........: main (sem_as_mutex.c:?)
-Location 0x........ is 0 bytes inside local var "s_d3"
-declared at sem_as_mutex.c:25, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_d3"
+declared at sem_as_mutex.c:25
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
index 4e769e5a0d4c85f59f3d3c4d3968f6f6c6a9ad90..e926d059edd6715b417246974559905ddf77d12a 100644 (file)
@@ -1,8 +1,8 @@
 
 Conflicting load by thread 1 at 0x........ size 8
    at 0x........: main (sem_open.c:?)
-Location 0x........ is 0 bytes inside local var "s_d3"
-declared at sem_open.c:25, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_d3"
+declared at sem_open.c:25
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
@@ -10,8 +10,8 @@ Other segment end (thread 2)
 
 Conflicting store by thread 1 at 0x........ size 8
    at 0x........: main (sem_open.c:?)
-Location 0x........ is 0 bytes inside local var "s_d3"
-declared at sem_open.c:25, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_d3"
+declared at sem_open.c:25
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
index 3c2d392b3630d5eb7ccb18ab8b56f5274a7f5619..fb994f50caa7f7658f04be05c0e0d4d9821e3ed0 100644 (file)
@@ -1,8 +1,8 @@
 
 Conflicting load by thread 1 at 0x........ size 8
    at 0x........: main (sem_open.c:?)
-Location 0x........ is 0 bytes inside local var "s_d3"
-declared at sem_open.c:25, in frame #? of thread 1
+Location 0x........ is 0 bytes inside global var "s_d3"
+declared at sem_open.c:25
 Other segment start (thread 2)
    (thread finished, call stack no longer available)
 Other segment end (thread 2)
index 1c4a91e7920a5c9a71f05fbf13726249c79aaffe..ee21cf06de276f7dc252f610ab304024b62d9486 100644 (file)
@@ -24,7 +24,7 @@ Locks held: none
    at 0x........: main (hg03_inherit.c:60)
 
 Location 0x........ is 0 bytes inside shared[1],
-declared at hg03_inherit.c:11, in frame #x of thread x
+a global variable declared at hg03_inherit.c:11
 
 
 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
index 982f940266dea0257ec1a0f6258640328394f56d..bf2a18584a2793c772824cec214b7d1d1ef57dd2 100644 (file)
@@ -29,8 +29,8 @@ Locks held: none
    by 0x........: mythread_wrapper (hg_intercepts.c:...)
    ...
 
-Location 0x........ is 0 bytes inside local var "shared"
-declared at hg04_race.c:6, in frame #x of thread x
+Location 0x........ is 0 bytes inside global var "shared"
+declared at hg04_race.c:6
 
 ----------------------------------------------------------------
 
@@ -46,8 +46,8 @@ Locks held: none
    by 0x........: mythread_wrapper (hg_intercepts.c:...)
    ...
 
-Location 0x........ is 0 bytes inside local var "shared"
-declared at hg04_race.c:6, in frame #x of thread x
+Location 0x........ is 0 bytes inside global var "shared"
+declared at hg04_race.c:6
 
 
 ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
index 4a447135c130b80a9354fabe0878313fb109cc4a..47c3bd5f3410c4d2945b621cc6d644be2201a1f1 100644 (file)
@@ -29,8 +29,8 @@ Locks held: none
    by 0x........: mythread_wrapper (hg_intercepts.c:...)
    ...
 
-Location 0x........ is 0 bytes inside local var "s_racy"
-declared at rwlock_race.c:18, in frame #x of thread x
+Location 0x........ is 0 bytes inside global var "s_racy"
+declared at rwlock_race.c:18
 
 Result: 2
 
index 3e7d2412fd644b57830e7a2266d983e3691e4fef..700b4920712ac8172db2af304efb6ef9f3c4d41f 100644 (file)
@@ -29,8 +29,8 @@ Locks held: none
    by 0x........: mythread_wrapper (hg_intercepts.c:...)
    ...
 
-Location 0x........ is 0 bytes inside local var "unprotected2"
-declared at tc21_pthonce.c:51, in frame #x of thread x
+Location 0x........ is 0 bytes inside global var "unprotected2"
+declared at tc21_pthonce.c:51
 
 ----------------------------------------------------------------
 
@@ -46,8 +46,8 @@ Locks held: none
    by 0x........: mythread_wrapper (hg_intercepts.c:...)
    ...
 
-Location 0x........ is 0 bytes inside local var "unprotected2"
-declared at tc21_pthonce.c:51, in frame #x of thread x
+Location 0x........ is 0 bytes inside global var "unprotected2"
+declared at tc21_pthonce.c:51
 
 
 ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
index d24ddb874f8d2de31d5fa9b9b077a78838810c9e..73130b7fa30b23e73fd561b18438c4e87f1d3c8d 100644 (file)
@@ -3,7 +3,7 @@ Uninitialised byte(s) found during client check request
    by 0x........: foo (varinfo3.c:54)
    by 0x........: main (varinfo3.c:66)
  Location 0x........ is 0 bytes inside static_global_def[1],
- declared at varinfo3.c:35, in frame #0 of thread 1
+ a global variable declared at varinfo3.c:35
 
 Uninitialised byte(s) found during client check request
    at 0x........: croak (varinfo3.c:28)
@@ -17,7 +17,7 @@ Uninitialised byte(s) found during client check request
    by 0x........: foo (varinfo3.c:56)
    by 0x........: main (varinfo3.c:66)
  Location 0x........ is 0 bytes inside static_global_undef[3],
- declared at varinfo3.c:37, in frame #0 of thread 1
+ a global variable declared at varinfo3.c:37
 
 Uninitialised byte(s) found during client check request
    at 0x........: croak (varinfo3.c:28)
index e02a3c803944ff55274d9e3d3d595df7cbb773f9..8dff37097fcab24eabeceee907290ff8b91136f7 100644 (file)
@@ -3,7 +3,7 @@ Uninitialised byte(s) found during client check request
    by 0x........: foo (varinfo3.c:54)
    by 0x........: main (varinfo3.c:66)
  Location 0x........ is 0 bytes inside static_global_def[1],
- declared at varinfo3.c:35, in frame #0 of thread 1
+ a global variable declared at varinfo3.c:35
 
 Uninitialised byte(s) found during client check request
    at 0x........: croak (varinfo3.c:29)
@@ -17,7 +17,7 @@ Uninitialised byte(s) found during client check request
    by 0x........: foo (varinfo3.c:56)
    by 0x........: main (varinfo3.c:66)
  Location 0x........ is 0 bytes inside static_global_undef[3],
- declared at varinfo3.c:37, in frame #0 of thread 1
+ a global variable declared at varinfo3.c:37
 
 Uninitialised byte(s) found during client check request
    at 0x........: croak (varinfo3.c:29)
index 3be0984a2a597ce2fb16c3f962d4a5d2a4e383d4..5fa9d979c72c5555dbbf22b336dad2dfe1be912f 100644 (file)
@@ -83,7 +83,7 @@ Uninitialised byte(s) found during client check request
    by 0x........: varinfo5_main (varinfo5so.c:156)
    by 0x........: main (varinfo5.c:5)
  Location 0x........ is 0 bytes inside static_global_def[1],
- declared at varinfo5so.c:87, in frame #0 of thread 1
+ a global variable declared at varinfo5so.c:87
 
 Uninitialised byte(s) found during client check request
    at 0x........: croak (varinfo5so.c:29)
@@ -101,7 +101,7 @@ Uninitialised byte(s) found during client check request
    by 0x........: varinfo5_main (varinfo5so.c:156)
    by 0x........: main (varinfo5.c:5)
  Location 0x........ is 0 bytes inside static_global_undef[3],
- declared at varinfo5so.c:89, in frame #0 of thread 1
+ a global variable declared at varinfo5so.c:89
 
 Uninitialised byte(s) found during client check request
    at 0x........: croak (varinfo5so.c:29)
index db0c4fd64361d5221b0e8a21f12a299ee8e71570..f5ebf0bd6a103c97a5d46409eb97fbe14211b64c 100644 (file)
@@ -83,7 +83,7 @@ Uninitialised byte(s) found during client check request
    by 0x........: varinfo5_main (varinfo5so.c:156)
    by 0x........: main (varinfo5.c:5)
  Location 0x........ is 0 bytes inside static_global_def[1],
- declared at varinfo5so.c:87, in frame #0 of thread 1
+ a global variable declared at varinfo5so.c:87
 
 Uninitialised byte(s) found during client check request
    at 0x........: croak (varinfo5so.c:30)
@@ -101,7 +101,7 @@ Uninitialised byte(s) found during client check request
    by 0x........: varinfo5_main (varinfo5so.c:156)
    by 0x........: main (varinfo5.c:5)
  Location 0x........ is 0 bytes inside static_global_undef[3],
- declared at varinfo5so.c:89, in frame #0 of thread 1
+ a global variable declared at varinfo5so.c:89
 
 Uninitialised byte(s) found during client check request
    at 0x........: croak (varinfo5so.c:30)