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
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);
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,
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;
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;
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
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
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]) {
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; */
}
}
- /* 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;
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.
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.
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.
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.
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.
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)
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)
<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>
<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>
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)
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)
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)
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
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)
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)
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)
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)
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)
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)
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)
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
----------------------------------------------------------------
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)
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
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
----------------------------------------------------------------
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)
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)
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)
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)
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)
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)
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)
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)
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)