|
From: Julian S. <js...@ac...> - 2006-08-26 08:59:36
|
> The actual text in the output is "Detected data races.", which is short f=
or
> "The drd tool detected some data races". Each time the drd tool detects
> data races, it prints the following chunks of information:
> - call stack of segment begin and end in the first involved thread.
> - call stack of segment begin and end in the second involved thread.
> - 32-bit addresses in the client address space of the data involved in the
> race. Above this last section the text "Actual race" is printed. Maybe I
> should change this in "Addresses of detected data races" ?
Ok, I finally understood this.
=46rom time to time drd wants to report a race. To do so it shows
five pieces of information:
=2D stack snapshot at start of first segment
=2D stack snapshot at end of first segment
=2D stack snapshot at start of second segment
=2D stack snapshot at end of second segment
=2D address(es) of data involved in the race
=46or the data address(es), drd tries to describe the address as well
as possible, eg:
0x06723B10 sz 1 W R (heap, offset 112 in block at 0x6723AA0 of size 124)
Allocation context:
at 0x401B1E8: operator new(unsigned) (vg_replace_malloc.c:163)
by 0x4112B2A: KNNetAccess::KNNetAccess(QObject*, char const*)
(knnetaccess.cpp:60)
by 0x4112BAE: KNGlobals::netAccess() (knglobals.cpp:53)
but sometimes it fails to come up with any description:
0x05B70E59 sz 1 W R (unknown)
I think there are two reasons for my confusion.
(1) In the case where it cannot describe the address, or where is is
just described as BSS, TEXT, etc, there is still
a stack trace printed. This trace is irrelevant (correct?)
(2) The terminology could be improved, and you could make it clearer
where each report starts/ends.
Here's a possible tidy-up:
=2D Remove "Detected data races. Context:" and just print instead a line
of dashes:
----------------------------------------------------------
so as to make it obvious that this is the start of a new error
=2D Change "Actual data races:" to "Data addresses accessed by both segment=
s"
=2D Only print a stack trace if the data address is identified as being
in a heap block. I tried to find where in your code this is done,
but failed.
J
|