You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(7) |
2
(5) |
3
(2) |
4
(8) |
5
(10) |
|
6
(3) |
7
(9) |
8
(7) |
9
(8) |
10
(7) |
11
(4) |
12
(11) |
|
13
(5) |
14
(17) |
15
(6) |
16
(15) |
17
|
18
(3) |
19
(1) |
|
20
(6) |
21
(18) |
22
(5) |
23
(9) |
24
(6) |
25
(3) |
26
(1) |
|
27
(1) |
28
|
29
(8) |
30
(5) |
|
|
|
|
From: <sv...@va...> - 2015-09-07 10:24:05
|
Author: weidendo
Date: Mon Sep 7 11:23:58 2015
New Revision: 15637
Log:
Rephrase Callgrind manual about limiting event aggregation
Modified:
trunk/callgrind/docs/cl-manual.xml
Modified: trunk/callgrind/docs/cl-manual.xml
==============================================================================
--- trunk/callgrind/docs/cl-manual.xml (original)
+++ trunk/callgrind/docs/cl-manual.xml Mon Sep 7 11:23:58 2015
@@ -310,49 +310,78 @@
xreflabel="Limiting range of event collection">
<title>Limiting the range of collected events</title>
- <para>For aggregating events (function enter/leave,
- instruction execution, memory access) into event numbers,
- first, the events must be recognizable by Callgrind, and second,
- the collection state must be enabled.</para>
-
- <para>Event collection is only possible if <emphasis>instrumentation</emphasis>
- for program code is enabled. This is the default, but for faster
- execution (identical to <computeroutput>valgrind --tool=none</computeroutput>),
- it can be disabled until the program reaches a state in which
- you want to start collecting profiling data.
- Callgrind can start without instrumentation
- by specifying option <option><xref linkend="opt.instr-atstart"/>=no</option>.
- Instrumentation can be enabled interactively
- with: <screen>callgrind_control -i on</screen>
- and off by specifying "off" instead of "on".
- Furthermore, instrumentation state can be programatically changed with
- the macros <computeroutput><xref linkend="cr.start-instr"/>;</computeroutput>
- and <computeroutput><xref linkend="cr.stop-instr"/>;</computeroutput>.
+ <para>By default, whenever events are happening (such as an
+ instruction execution or cache hit/miss), Callgrind is aggregating
+ them into event counters. However, you may be interested only in
+ what is happening within a given function or starting from a given
+ program phase. To this end, you can disable event aggregation for
+ uninteresting program parts. While attribution of events to
+ functions as well as producing seperate output per program phase
+ can be done by other means (see previous section), there are two
+ benefits by disabling aggregation. First, this is very
+ fine-granular (e.g. just for a loop within a function). Second,
+ disabling event aggregation for complete program phases allows to
+ switch off time-consuming cache simulation and allows Callgrind to
+ progress at much higher speed with an slowdown of around factor 2
+ (identical to <computeroutput>valgrind
+ --tool=none</computeroutput>).
+ </para>
+
+ <para>There are two aspects which influence whether Callgrind is
+ aggregating events at some point in time of program execution.
+ First, there is the <emphasis>collection state</emphasis>. If this
+ is off, no aggregation will be done. By changing the collection
+ state, you can control event aggregation at a very fine
+ granularity. However, there is not much difference in regard to
+ execution speed of Callgrind. By default, collection is switched
+ on, but can be disabled by different means (see below). Second,
+ there is the <emphasis>instrumentation mode</emphasis> in which
+ Callgrind is running. This mode either can be on or off. If
+ instrumentation is off, no observation of actions in the program
+ will be done and thus, no actions will be forwarded to the
+ simulator which could trigger events. In the end, no events will
+ be aggregated. The huge benefit is the much higher speed with
+ instrumentation switched off. However, this only should be used
+ with care and in a coarse fashion: every mode change resets the
+ simulator state (ie. whether a memory block is cached or not) and
+ flushes Valgrinds internal cache of instrumented code blocks,
+ resulting in latency penalty at switching time. Also, cache
+ simulator results directly after switching on instrumentation will
+ be skewed due to identified cache misses which would not happen in
+ reality (if you care about this warm-up effect, you should make
+ sure to temporarly have collection state switched off directly
+ after turning instrumentation mode on). However, switching
+ instrumentation state is very useful to skip larger program phases
+ such as an initialization phase. By default, instrumentation is
+ switched on, but as with the collection state, can be changed by
+ various means.
+ </para>
+
+ <para>Callgrind can start with instrumentation mode switched off by
+ specifying
+ option <option><xref linkend="opt.instr-atstart"/>=no</option>.
+ Afterwards, instrumentation can be controlled in two ways: first,
+ interactively with: <screen>callgrind_control -i on</screen> (and
+ switching off again by specifying "off" instead of "on"). Second,
+ instrumentation state can be programatically changed with the
+ macros <computeroutput><xref linkend="cr.start-instr"/>;</computeroutput>
+ and <computeroutput><xref linkend="cr.stop-instr"/>;</computeroutput>.
</para>
-
- <para>In addition to enabling instrumentation, you must also enable
- event collection for the parts of your program you are interested in.
- By default, event collection is enabled everywhere.
- You can limit collection to a specific function
- by using
- <option><xref linkend="opt.toggle-collect"/>=function</option>.
- This will toggle the collection state on entering and leaving
- the specified functions.
- When this option is in effect, the default collection state
- at program start is "off". Only events happening while running
- inside of the given function will be collected. Recursive
- calls of the given function do not trigger any action.</para>
-
- <para>It is important to note that with instrumentation disabled, the
- cache simulator cannot see any memory access events, and thus, any
- simulated cache state will be frozen and wrong without instrumentation.
- Therefore, to get useful cache events (hits/misses) after switching on
- instrumentation, the cache first must warm up,
- probably leading to many <emphasis>cold misses</emphasis>
- which would not have happened in reality. If you do not want to see these,
- start event collection a few million instructions after you have enabled
- instrumentation.</para>
+ <para>Similarly, the collection state at program start can be
+ switched off
+ by <option><xref linkend="opt.instr-atstart"/>=no</option>. During
+ execution, it can be controlled programatically with the
+ macro <computeroutput>CALLGRIND_TOGGLE_COLLECT;</computeroutput>.
+ Further, you can limit event collection to a specific function by
+ using <option><xref linkend="opt.toggle-collect"/>=function</option>.
+ This will toggle the collection state on entering and leaving the
+ specified function. When this option is in effect, the default
+ collection state at program start is "off". Only events happening
+ while running inside of the given function will be
+ collected. Recursive calls of the given function do not trigger
+ any action. This option can be given multiple times to specify
+ different functions of interest.</para>
</sect2>
<sect2 id="cl-manual.busevents" xreflabel="Counting global bus events">
|
|
From: <sv...@va...> - 2015-09-07 08:22:10
|
Author: sewardj
Date: Mon Sep 7 09:22:03 2015
New Revision: 3184
Log:
Further kludge stack alignment issues in x86g_dirtyhelper_FXRSTOR.
Fixes (for some definition of "fix") #350359.
Modified:
trunk/priv/guest_x86_helpers.c
Modified: trunk/priv/guest_x86_helpers.c
==============================================================================
--- trunk/priv/guest_x86_helpers.c (original)
+++ trunk/priv/guest_x86_helpers.c Mon Sep 7 09:22:03 2015
@@ -1837,6 +1837,7 @@
/* Code that seems to trigger the problem:
for (i = 0; i < 14; i++) tmp.env[i] = 0; */
for (i = 0; i < 7; i++) tmp.env[i+0] = 0;
+ __asm__ __volatile__("" ::: "memory");
for (i = 0; i < 7; i++) tmp.env[i+7] = 0;
for (i = 0; i < 80; i++) tmp.reg[i] = 0;
|
|
From: <sv...@va...> - 2015-09-07 08:20:53
|
Author: sewardj
Date: Mon Sep 7 09:20:45 2015
New Revision: 15636
Log:
Always use posix_memalign on OS X for consistency. No functional change.
Modified:
trunk/tests/malloc.h
Modified: trunk/tests/malloc.h
==============================================================================
--- trunk/tests/malloc.h (original)
+++ trunk/tests/malloc.h Mon Sep 7 09:20:45 2015
@@ -16,7 +16,7 @@
void* x;
#if defined(VGO_darwin)
// Darwin lacks memalign, but its malloc is always 16-aligned anyway.
- x = malloc(szB);
+ posix_memalign((void **)&x, 16, szB);
#else
x = memalign(16, szB);
#endif
|
|
From: <sv...@va...> - 2015-09-06 20:56:20
|
Author: florian
Date: Sun Sep 6 21:56:13 2015
New Revision: 15635
Log:
Update list of ignored files.
Modified:
trunk/memcheck/tests/ppc32/ (props changed)
trunk/memcheck/tests/ppc64/ (props changed)
|
|
From: <sv...@va...> - 2015-09-06 13:39:20
|
Author: philippe
Date: Sun Sep 6 14:39:13 2015
New Revision: 15634
Log:
Add a basic test for xb memcheck monitor command
Modified:
trunk/gdbserver_tests/mcvabits.stderrB.exp
trunk/gdbserver_tests/mcvabits.stdinB.gdb
Modified: trunk/gdbserver_tests/mcvabits.stderrB.exp
==============================================================================
--- trunk/gdbserver_tests/mcvabits.stderrB.exp (original)
+++ trunk/gdbserver_tests/mcvabits.stderrB.exp Sun Sep 6 14:39:13 2015
@@ -5,6 +5,10 @@
Address 0x........ len 10 defined
Address 0x........ is 0 bytes inside data symbol "undefined"
00000000 00000000 0000
+ 00 00 00 00 00 00 00 00
+0x........: 0x........ 0x........ 0x........ 0x........ 0x........ 0x........ 0x........ 0x........
+ 00 00
+0x........: 0x........ 0x........
Address 0x........ len 10 addressable
Address 0x........ is 0 bytes inside data symbol "undefined"
Address 0x........ len 10 not defined:
Modified: trunk/gdbserver_tests/mcvabits.stdinB.gdb
==============================================================================
--- trunk/gdbserver_tests/mcvabits.stdinB.gdb (original)
+++ trunk/gdbserver_tests/mcvabits.stdinB.gdb Sun Sep 6 14:39:13 2015
@@ -23,6 +23,7 @@
eval "monitor check_memory addressable 0x%lx 10", $0xundefined
eval "monitor check_memory defined 0x%lx 10", $0xundefined
eval "monitor get_vbits 0x%lx 10", $0xundefined
+eval "monitor xb 0x%lx 10", $0xundefined
#
# continue till //2break:
continue
|
|
From: <sv...@va...> - 2015-09-06 13:10:30
|
Author: sewardj
Date: Sun Sep 6 14:10:22 2015
New Revision: 15633
Log:
Bug 342008 - valgrind.h needs type cast for _zzq_default to compile with clang/llvm in 64-bit mode.
(arm64, that is)
Patch from ch...@go....
Modified:
trunk/include/valgrind.h
Modified: trunk/include/valgrind.h
==============================================================================
--- trunk/include/valgrind.h (original)
+++ trunk/include/valgrind.h Sun Sep 6 14:10:22 2015
@@ -794,7 +794,8 @@
"orr x10, x10, x10\n\t" \
"mov %0, x3" /*result*/ \
: "=r" (_zzq_result) \
- : "r" (_zzq_default), "r" (&_zzq_args[0]) \
+ : "r" ((unsigned long int)(_zzq_default)), \
+ "r" (&_zzq_args[0]) \
: "cc","memory", "x3", "x4"); \
_zzq_result; \
})
|
|
From: <sv...@va...> - 2015-09-05 21:28:05
|
Author: florian Date: Sat Sep 5 22:27:58 2015 New Revision: 15632 Log: Strange segments in /proc/self/maps have been observed in the field. Namely those with a file name and an inode number but without major and minor device numbers. See for instance https://bugs.kde.org/124528#c11 This patch also recognises segments with a file name as FileV segments (which is what valgrind used to do prior to r5818). Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c ============================================================================== --- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original) +++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Sat Sep 5 22:27:58 2015 @@ -1519,12 +1519,11 @@ seg.hasX = toBool(prot & VKI_PROT_EXEC); seg.hasT = False; - /* Don't use the presence of a filename to decide if a segment in - the initial /proc/self/maps to decide if the segment is an AnonV - or FileV segment as some systems don't report the filename. Use - the device and inode numbers instead. Fixes bug #124528. */ + /* A segment in the initial /proc/self/maps is considered a FileV + segment if either it has a file name associated with it or both its + device and inode numbers are != 0. See bug #124528. */ seg.kind = SkAnonV; - if (dev != 0 && ino != 0) + if (filename || (dev != 0 && ino != 0)) seg.kind = SkFileV; # if defined(VGO_darwin) |
|
From: Florian K. <fl...@ei...> - 2015-09-05 21:20:51
|
Committed in r15631. Thanks for sending the patch.
Florian
On 05.09.2015 15:28, Matthias Schwarzott wrote:
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/\${ <-- HERE PWD}/ at tests/vg_regtest line 312.
> ---
> tests/vg_regtest.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
> index bfb269f..a441f42 100755
> --- a/tests/vg_regtest.in
> +++ b/tests/vg_regtest.in
> @@ -309,7 +309,7 @@ sub read_vgtest_file($)
> next;
> } elsif ($line =~ /^\s*vgopts:\s*(.*)$/) {
> my $addvgopts = $1;
> - $addvgopts =~ s/\${PWD}/$ENV{PWD}/g;
> + $addvgopts =~ s/\$\{PWD\}/$ENV{PWD}/g;
> $vgopts = $vgopts . " " . $addvgopts; # Nb: Make sure there's a space!
> } elsif ($line =~ /^\s*prog:\s*(.*)$/) {
> $prog = validate_program(".", $1, 0, 0);
>
|
|
From: <sv...@va...> - 2015-09-05 21:19:19
|
Author: florian
Date: Sat Sep 5 22:19:11 2015
New Revision: 15631
Log:
Avoid warnings about deprecated unescaped curly brackets in regular
expressions. Happens with perl 5.22 and newer.
Patch by Matthias Schwarzott <zz...@ge...>
Modified:
trunk/tests/vg_regtest.in
Modified: trunk/tests/vg_regtest.in
==============================================================================
--- trunk/tests/vg_regtest.in (original)
+++ trunk/tests/vg_regtest.in Sat Sep 5 22:19:11 2015
@@ -309,7 +309,7 @@
next;
} elsif ($line =~ /^\s*vgopts:\s*(.*)$/) {
my $addvgopts = $1;
- $addvgopts =~ s/\${PWD}/$ENV{PWD}/g;
+ $addvgopts =~ s/\$\{PWD\}/$ENV{PWD}/g;
$vgopts = $vgopts . " " . $addvgopts; # Nb: Make sure there's a space!
} elsif ($line =~ /^\s*prog:\s*(.*)$/) {
$prog = validate_program(".", $1, 0, 0);
|
|
From: <sv...@va...> - 2015-09-05 20:45:10
|
Author: mjw
Date: Sat Sep 5 21:45:04 2015
New Revision: 15630
Log:
Correct expected output of tc18 and tc20 helgrind tests.
The addition if the safe wrapper in r15620 introduced an extra
output frame in the backtrace of helgrind/tests/tc18_semabuse and
helgrind/tests/tc20_verifywrap.
Modified:
trunk/helgrind/tests/tc18_semabuse.stderr.exp
trunk/helgrind/tests/tc20_verifywrap.stderr.exp
Modified: trunk/helgrind/tests/tc18_semabuse.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc18_semabuse.stderr.exp (original)
+++ trunk/helgrind/tests/tc18_semabuse.stderr.exp Sat Sep 5 21:45:04 2015
@@ -24,6 +24,7 @@
with error code 22 (EINVAL: Invalid argument)
at 0x........: sem_post_WRK (hg_intercepts.c:...)
by 0x........: sem_post (hg_intercepts.c:...)
+ ...
by 0x........: main (tc18_semabuse.c:40)
Modified: trunk/helgrind/tests/tc20_verifywrap.stderr.exp
==============================================================================
--- trunk/helgrind/tests/tc20_verifywrap.stderr.exp (original)
+++ trunk/helgrind/tests/tc20_verifywrap.stderr.exp Sat Sep 5 21:45:04 2015
@@ -238,6 +238,7 @@
with error code 22 (EINVAL: Invalid argument)
at 0x........: sem_post_WRK (hg_intercepts.c:...)
by 0x........: sem_post (hg_intercepts.c:...)
+ ...
by 0x........: main (tc20_verifywrap.c:265)
|
|
From: <sv...@va...> - 2015-09-05 20:39:35
|
Author: florian
Date: Sat Sep 5 21:39:27 2015
New Revision: 15629
Log:
Changes related to new IROp Iop_RoundF128toInt. See VEX r3183.
s390: Add testcase for fixbr.
Patch by Andreas Arnez <ar...@li...>.
Part of fixing BZ #350290.
Added:
trunk/none/tests/s390x/fixbr.c
trunk/none/tests/s390x/fixbr.stderr.exp
trunk/none/tests/s390x/fixbr.stdout.exp
trunk/none/tests/s390x/fixbr.vgtest
Modified:
trunk/NEWS
trunk/docs/internals/3_10_BUGSTATUS.txt
trunk/docs/internals/s390-opcodes.csv
trunk/memcheck/mc_translate.c
trunk/memcheck/tests/vbit-test/irops.c
trunk/memcheck/tests/vbit-test/util.c
trunk/none/tests/s390x/ (props changed)
trunk/none/tests/s390x/Makefile.am
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sat Sep 5 21:39:27 2015
@@ -358,6 +358,7 @@
349941 di_notify_mmap might create wrong start/size DebugInfoMapping
350062 vex x86->IR: 0x66 0xF 0x3A 0xB (ROUNDSD) on OS X
350202 Add limited param to 'monitor block_list'
+350290 s390x: Support instructions fixbr(a)
350809 Fix none/tests/async-sigs for Solaris
350811 Remove reference to --db-attach which has been removed.
350813 Memcheck/x86: enable handwritten assembly helpers for x86/Solaris too
Modified: trunk/docs/internals/3_10_BUGSTATUS.txt
==============================================================================
--- trunk/docs/internals/3_10_BUGSTATUS.txt (original)
+++ trunk/docs/internals/3_10_BUGSTATUS.txt Sat Sep 5 21:39:27 2015
@@ -73,8 +73,6 @@
=== VEX/s390x ==========================================================
-350290 s390x unsupported instruction fixbra
-
=== VEX general ========================================================
=== Syscalls/ioctls ====================================================
Modified: trunk/docs/internals/s390-opcodes.csv
==============================================================================
--- trunk/docs/internals/s390-opcodes.csv (original)
+++ trunk/docs/internals/s390-opcodes.csv Sat Sep 5 21:39:27 2015
@@ -293,9 +293,9 @@
lcxbr,"load complement extended bfp",implemented,
lcdbr,"load complement long bfp",implemented,
lcebr,"load complement short bfp",implemented,
-fixbr,"load fp integer extended bfp","not implemented",
-fidbr,"load fp integer long bfp","implemented",
-fiebr,"load fp integer short bfp","implemented",
+fixbr,"load fp integer extended bfp",implemented,
+fidbr,"load fp integer long bfp",implemented,
+fiebr,"load fp integer short bfp",implemented,
lfpc,"load fpc",implemented,
lxdbr,"load lengthened long to extended bfp",implemented,
lxdb,"load lengthened long to extended bfp",implemented,
Modified: trunk/memcheck/mc_translate.c
==============================================================================
--- trunk/memcheck/mc_translate.c (original)
+++ trunk/memcheck/mc_translate.c Sat Sep 5 21:39:27 2015
@@ -3785,6 +3785,10 @@
/* I32(rm) x D128 -> D128 */
return mkLazy2(mce, Ity_I128, vatom1, vatom2);
+ case Iop_RoundF128toInt:
+ /* I32(rm) x F128 -> F128 */
+ return mkLazy2(mce, Ity_I128, vatom1, vatom2);
+
case Iop_D64toI64S:
case Iop_D64toI64U:
case Iop_I64StoD64:
Modified: trunk/memcheck/tests/vbit-test/irops.c
==============================================================================
--- trunk/memcheck/tests/vbit-test/irops.c (original)
+++ trunk/memcheck/tests/vbit-test/irops.c Sat Sep 5 21:39:27 2015
@@ -241,8 +241,9 @@
{ DEFOP(Iop_CosF64, UNDEF_ALL), .s390x = 0, .amd64 = 1, .x86 = 1, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 0, .mips64 = 0, .tilegx = 0 },
{ DEFOP(Iop_TanF64, UNDEF_ALL), .s390x = 0, .amd64 = 1, .x86 = 1, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 0, .mips64 = 0, .tilegx = 0 },
{ DEFOP(Iop_2xm1F64, UNDEF_ALL), .s390x = 0, .amd64 = 1, .x86 = 1, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 0, .mips64 = 0, .tilegx = 0 },
- { DEFOP(Iop_RoundF64toInt, UNDEF_ALL), .s390x = 0, .amd64 = 1, .x86 = 1, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 0, .mips64 = 1, .tilegx = 0 },
- { DEFOP(Iop_RoundF32toInt, UNDEF_ALL), .s390x = 0, .amd64 = 1, .x86 = 1, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 1, .mips64 = 1, .tilegx = 0 },
+ { DEFOP(Iop_RoundF128toInt, UNDEF_ALL), .s390x = 1, .amd64 = 0, .x86 = 0, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 0, .mips64 = 0, .tilegx = 0 },
+ { DEFOP(Iop_RoundF64toInt, UNDEF_ALL), .s390x = 1, .amd64 = 1, .x86 = 1, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 0, .mips64 = 1, .tilegx = 0 },
+ { DEFOP(Iop_RoundF32toInt, UNDEF_ALL), .s390x = 1, .amd64 = 1, .x86 = 1, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 1, .mips64 = 1, .tilegx = 0 },
{ DEFOP(Iop_MAddF32, UNDEF_ALL), .s390x = 1, .amd64 = 0, .x86 = 0, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 0, .mips64 = 1, .tilegx = 0 },
{ DEFOP(Iop_MSubF32, UNDEF_ALL), .s390x = 1, .amd64 = 0, .x86 = 0, .arm = 0, .ppc64 = 0, .ppc32 = 0, .mips32 = 0, .mips64 = 1, .tilegx = 0 },
{ DEFOP(Iop_MAddF64, UNDEF_ALL), .s390x = 1, .amd64 = 0, .x86 = 0, .arm = 0, .ppc64 = 1, .ppc32 = 1, .mips32 = 0, .mips64 = 1, .tilegx = 0 },
Modified: trunk/memcheck/tests/vbit-test/util.c
==============================================================================
--- trunk/memcheck/tests/vbit-test/util.c (original)
+++ trunk/memcheck/tests/vbit-test/util.c Sat Sep 5 21:39:27 2015
@@ -811,6 +811,7 @@
UNARY(Ity_F128, Ity_F128);
case Iop_SqrtF128:
+ case Iop_RoundF128toInt:
BINARY(ity_RMode,Ity_F128, Ity_F128);
case Iop_I32StoF128: UNARY(Ity_I32, Ity_F128);
Modified: trunk/none/tests/s390x/Makefile.am
==============================================================================
--- trunk/none/tests/s390x/Makefile.am (original)
+++ trunk/none/tests/s390x/Makefile.am Sat Sep 5 21:39:27 2015
@@ -22,7 +22,7 @@
INSN_TESTS += dfp-1 dfp-2 dfp-3 dfp-4 dfptest dfpext dfpconv srnmt pfpo
endif
if HAS_MLONG_DOUBLE_128
- INSN_TESTS += fpext
+ INSN_TESTS += fpext fixbr
endif
check_PROGRAMS = $(INSN_TESTS) \
@@ -36,6 +36,7 @@
ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \
ecag.stdout.exp-z13 \
op00.stderr.exp1 op00.stderr.exp2 op00.vgtest \
+ fixbr.vgtest fixbr.stderr.exp fixbr.stdout.exp \
fpext.vgtest fpext.stderr.exp fpext.stdout.exp \
fpext_fail.vgtest fpext_fail.stderr.exp fpext_fail.stdout.exp \
test.h opcodes.h add.h and.h div.h insert.h dfp_utils.h \
@@ -60,5 +61,6 @@
cu14_1_CFLAGS = $(AM_CFLAGS) -DM3=1
cu21_1_CFLAGS = $(AM_CFLAGS) -DM3=1
cu24_1_CFLAGS = $(AM_CFLAGS) -DM3=1
+fixbr_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
fpext_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
ex_clone_LDFLAGS = -lpthread
Added: trunk/none/tests/s390x/fixbr.c
==============================================================================
--- trunk/none/tests/s390x/fixbr.c (added)
+++ trunk/none/tests/s390x/fixbr.c Sat Sep 5 21:39:27 2015
@@ -0,0 +1,73 @@
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <inttypes.h>
+#include "opcodes.h"
+#include "rounding.h"
+
+/* Test "fixbr" with rounding mode given in insn (m3 field)
+ Covers all generally available rounding modes that can be mapped to
+ IRRoundingMode. As a consequence m3=1 which is "round to nearest with
+ ties away from 0" is not tested here.
+*/
+
+const char *
+rtext(unsigned m3_round)
+{
+ switch (m3_round) {
+ case 0: return "[-> per fpc]";
+ case 1: return "[-> nearest away]";
+ case 3: return "[-> prepare short]"; // floating point extension fac needed
+ case 4: return "[-> nearest even]";
+ case 5: return "[-> 0]";
+ case 6: return "[-> +inf]";
+ case 7: return "[-> -inf]";
+ }
+ assert(0);
+}
+
+#define round_to_int(value,round) \
+do { \
+ long double src = value; \
+ long double dst; \
+ \
+ __asm__ volatile ("fixbr %[dst]," #round ",%[src]\n\t" \
+ : [dst] "=f"(dst) \
+ : [src] "f"(src)); \
+ \
+ printf("fixbr %.5Lf\t-> %Lg %s\n", \
+ src, dst, rtext(round)); \
+} while (0)
+
+#define fixbr(value,round) round_to_int(value,round)
+
+void
+set_rounding_mode(unsigned mode)
+{
+ register unsigned r asm("1") = mode;
+ __asm__ volatile ( SFPC(1) : : "d"(r) );
+}
+
+
+int main(void)
+{
+ int j;
+ static const long double dval[] = {
+ 1.25, 1.5, 2.5, 1.75, -1.25, -1.5, -2.5, -1.75, 0.0,
+ };
+
+ assert(sizeof(long double) == 16);
+
+ /* f128 -> f128, round to int */
+ for (j = 0; j < sizeof dval / sizeof dval[0]; ++j) {
+ set_rounding_mode(FPC_BFP_ROUND_ZERO);
+ fixbr(dval[j], M3_BFP_ROUND_NEAREST_EVEN);
+ set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN);
+ fixbr(dval[j], M3_BFP_ROUND_ZERO);
+ fixbr(dval[j], M3_BFP_ROUND_POSINF);
+ fixbr(dval[j], M3_BFP_ROUND_NEGINF);
+ }
+
+ return 0;
+}
Added: trunk/none/tests/s390x/fixbr.stderr.exp
==============================================================================
--- trunk/none/tests/s390x/fixbr.stderr.exp (added)
+++ trunk/none/tests/s390x/fixbr.stderr.exp Sat Sep 5 21:39:27 2015
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/s390x/fixbr.stdout.exp
==============================================================================
--- trunk/none/tests/s390x/fixbr.stdout.exp (added)
+++ trunk/none/tests/s390x/fixbr.stdout.exp Sat Sep 5 21:39:27 2015
@@ -0,0 +1,36 @@
+fixbr 1.25000 -> 1 [-> nearest even]
+fixbr 1.25000 -> 1 [-> 0]
+fixbr 1.25000 -> 2 [-> +inf]
+fixbr 1.25000 -> 1 [-> -inf]
+fixbr 1.50000 -> 2 [-> nearest even]
+fixbr 1.50000 -> 1 [-> 0]
+fixbr 1.50000 -> 2 [-> +inf]
+fixbr 1.50000 -> 1 [-> -inf]
+fixbr 2.50000 -> 2 [-> nearest even]
+fixbr 2.50000 -> 2 [-> 0]
+fixbr 2.50000 -> 3 [-> +inf]
+fixbr 2.50000 -> 2 [-> -inf]
+fixbr 1.75000 -> 2 [-> nearest even]
+fixbr 1.75000 -> 1 [-> 0]
+fixbr 1.75000 -> 2 [-> +inf]
+fixbr 1.75000 -> 1 [-> -inf]
+fixbr -1.25000 -> -1 [-> nearest even]
+fixbr -1.25000 -> -1 [-> 0]
+fixbr -1.25000 -> -1 [-> +inf]
+fixbr -1.25000 -> -2 [-> -inf]
+fixbr -1.50000 -> -2 [-> nearest even]
+fixbr -1.50000 -> -1 [-> 0]
+fixbr -1.50000 -> -1 [-> +inf]
+fixbr -1.50000 -> -2 [-> -inf]
+fixbr -2.50000 -> -2 [-> nearest even]
+fixbr -2.50000 -> -2 [-> 0]
+fixbr -2.50000 -> -2 [-> +inf]
+fixbr -2.50000 -> -3 [-> -inf]
+fixbr -1.75000 -> -2 [-> nearest even]
+fixbr -1.75000 -> -1 [-> 0]
+fixbr -1.75000 -> -1 [-> +inf]
+fixbr -1.75000 -> -2 [-> -inf]
+fixbr 0.00000 -> 0 [-> nearest even]
+fixbr 0.00000 -> 0 [-> 0]
+fixbr 0.00000 -> 0 [-> +inf]
+fixbr 0.00000 -> 0 [-> -inf]
Added: trunk/none/tests/s390x/fixbr.vgtest
==============================================================================
--- trunk/none/tests/s390x/fixbr.vgtest (added)
+++ trunk/none/tests/s390x/fixbr.vgtest Sat Sep 5 21:39:27 2015
@@ -0,0 +1,2 @@
+prog: fixbr
+prereq: test -e fixbr && ../../../tests/s390x_features s390x-fpext
|
|
From: <sv...@va...> - 2015-09-05 20:36:00
|
Author: florian
Date: Sat Sep 5 21:35:52 2015
New Revision: 3183
Log:
s390: Add support for fixbr(a) instructions.
New IROp Iop_RoundF128toInt.
Patch by Andreas Arnez <ar...@li...>.
Part of fixing BZ #350290.
Modified:
trunk/priv/guest_s390_toIR.c
trunk/priv/host_s390_defs.c
trunk/priv/host_s390_defs.h
trunk/priv/host_s390_isel.c
trunk/priv/ir_defs.c
trunk/pub/libvex_ir.h
Modified: trunk/priv/guest_s390_toIR.c
==============================================================================
--- trunk/priv/guest_s390_toIR.c (original)
+++ trunk/priv/guest_s390_toIR.c Sat Sep 5 21:35:52 2015
@@ -12410,6 +12410,19 @@
}
static const HChar *
+s390_irgen_FIXBRA(UChar m3, UChar m4 __attribute__((unused)),
+ UChar r1, UChar r2)
+{
+ IRTemp result = newTemp(Ity_F128);
+
+ assign(result, binop(Iop_RoundF128toInt, mkexpr(encode_bfp_rounding_mode(m3)),
+ get_fpr_pair(r2)));
+ put_fpr_pair(r1, mkexpr(result));
+
+ return "fixbra";
+}
+
+static const HChar *
s390_irgen_LNEBR(UChar r1, UChar r2)
{
IRTemp result = newTemp(Ity_F32);
@@ -14531,7 +14544,9 @@
case 0xb346: s390_format_RRF_UUFF(s390_irgen_LEXBR, ovl.fmt.RRF2.m3,
ovl.fmt.RRF2.m4, ovl.fmt.RRF2.r1,
ovl.fmt.RRF2.r2); goto ok;
- case 0xb347: /* FIXBR */ goto unimplemented;
+ case 0xb347: s390_format_RRF_UUFF(s390_irgen_FIXBRA, ovl.fmt.RRF2.m3,
+ ovl.fmt.RRF2.m4, ovl.fmt.RRF2.r1,
+ ovl.fmt.RRF2.r2); goto ok;
case 0xb348: /* KXBR */ goto unimplemented;
case 0xb349: s390_format_RRE_FF(s390_irgen_CXBR, ovl.fmt.RRE.r1,
ovl.fmt.RRE.r2); goto ok;
Modified: trunk/priv/host_s390_defs.c
==============================================================================
--- trunk/priv/host_s390_defs.c (original)
+++ trunk/priv/host_s390_defs.c Sat Sep 5 21:35:52 2015
@@ -3973,6 +3973,23 @@
static UChar *
+s390_emit_FIXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
+{
+ vassert(m3 == 0 || s390_host_has_fpext);
+
+ if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) {
+ if (m4 == 0)
+ s390_disasm(ENC4(MNM, FPR, UINT, FPR), "fixbr", r1, m3, r2);
+ else
+ s390_disasm(ENC5(MNM, FPR, UINT, FPR, UINT),
+ "fixbra", r1, m3, r2, m4);
+ }
+
+ return emit_RRF2(p, 0xb3470000, m3, m4, r1, r2);
+}
+
+
+static UChar *
s390_emit_MEEBR(UChar *p, UChar r1, UChar r2)
{
if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
@@ -5748,7 +5765,7 @@
}
-static s390_insn *
+s390_insn *
s390_insn_bfp128_convert(UChar size, s390_bfp_conv_t tag, HReg dst_hi,
HReg dst_lo, HReg op_hi, HReg op_lo,
s390_bfp_round_t rounding_mode)
@@ -5756,9 +5773,10 @@
s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn));
if (size == 16) {
- /* From smaller size to 16 bytes */
+ /* From smaller or equal size to 16 bytes */
vassert(is_valid_fp128_regpair(dst_hi, dst_lo));
- vassert(hregIsInvalid(op_lo));
+ vassert(hregIsInvalid(op_lo)
+ || is_valid_fp128_regpair(op_hi, op_lo));
} else {
/* From 16 bytes to smaller size */
vassert(is_valid_fp128_regpair(op_hi, op_lo));
@@ -6728,7 +6746,8 @@
case S390_BFP_F128_TO_F32:
case S390_BFP_F128_TO_F64: op = "v-f2f"; break;
case S390_BFP_F32_TO_F32I:
- case S390_BFP_F64_TO_F64I: op = "v-f2fi"; break;
+ case S390_BFP_F64_TO_F64I:
+ case S390_BFP_F128_TO_F128I: op = "v-f2fi"; break;
default: goto fail;
}
s390_sprintf(buf, "%M %R,%R", op, insn->variant.bfp_convert.dst_hi,
@@ -9003,6 +9022,7 @@
/* Load FP integer */
case S390_BFP_F32_TO_F32I: return s390_emit_FIEBRA(buf, m3, m4, r1, r2);
case S390_BFP_F64_TO_F64I: return s390_emit_FIDBRA(buf, m3, m4, r1, r2);
+ case S390_BFP_F128_TO_F128I: return s390_emit_FIXBRA(buf, m3, m4, r1, r2);
default: goto fail;
}
Modified: trunk/priv/host_s390_defs.h
==============================================================================
--- trunk/priv/host_s390_defs.h (original)
+++ trunk/priv/host_s390_defs.h Sat Sep 5 21:35:52 2015
@@ -244,7 +244,8 @@
S390_BFP_F128_TO_F32,
S390_BFP_F128_TO_F64,
S390_BFP_F32_TO_F32I,
- S390_BFP_F64_TO_F64I
+ S390_BFP_F64_TO_F64I,
+ S390_BFP_F128_TO_F128I
} s390_bfp_conv_t;
/* Type conversion operations: to and/or from decimal floating point */
@@ -660,6 +661,9 @@
s390_insn *s390_insn_bfp_compare(UChar size, HReg dst, HReg op1, HReg op2);
s390_insn *s390_insn_bfp_convert(UChar size, s390_bfp_conv_t tag, HReg dst,
HReg op, s390_bfp_round_t);
+s390_insn *s390_insn_bfp128_convert(UChar size, s390_bfp_conv_t tag, HReg dst_hi,
+ HReg dst_lo, HReg op_hi, HReg op_lo,
+ s390_bfp_round_t rounding_mode);
s390_insn *s390_insn_bfp128_binop(UChar size, s390_bfp_binop_t, HReg dst_hi,
HReg dst_lo, HReg op2_hi, HReg op2_lo);
s390_insn *s390_insn_bfp128_unop(UChar size, s390_bfp_unop_t, HReg dst_hi,
Modified: trunk/priv/host_s390_isel.c
==============================================================================
--- trunk/priv/host_s390_isel.c (original)
+++ trunk/priv/host_s390_isel.c Sat Sep 5 21:35:52 2015
@@ -2143,6 +2143,42 @@
return;
}
+ case Iop_RoundF128toInt: {
+ IRExpr *irrm;
+ IRExpr *left;
+ s390_bfp_round_t rm;
+ HReg op_hi, op_lo;
+ HReg f0, f2, f4, f6; /* real registers */
+
+ f4 = make_fpr(4); /* source */
+ f6 = make_fpr(6); /* source */
+ f0 = make_fpr(0); /* destination */
+ f2 = make_fpr(2); /* destination */
+
+ irrm = expr->Iex.Binop.arg1;
+ left = expr->Iex.Binop.arg2;
+
+ if (s390_host_has_fpext) {
+ rm = get_bfp_rounding_mode(env, irrm);
+ } else {
+ set_bfp_rounding_mode_in_fpc(env, irrm);
+ rm = S390_BFP_ROUND_PER_FPC;
+ }
+
+ s390_isel_float128_expr(&op_hi, &op_lo, env, left);
+ /* operand --> (f4, f6) */
+ addInstr(env, s390_insn_move(8, f4, op_hi));
+ addInstr(env, s390_insn_move(8, f6, op_lo));
+ addInstr(env, s390_insn_bfp128_convert(16, S390_BFP_F128_TO_F128I,
+ f0, f2, f4, f6, rm));
+ /* (f0, f2) --> destination */
+ *dst_hi = newVRegF(env);
+ *dst_lo = newVRegF(env);
+ addInstr(env, s390_insn_move(8, *dst_hi, f0));
+ addInstr(env, s390_insn_move(8, *dst_lo, f2));
+ return;
+ }
+
default:
goto irreducible;
}
Modified: trunk/priv/ir_defs.c
==============================================================================
--- trunk/priv/ir_defs.c (original)
+++ trunk/priv/ir_defs.c Sat Sep 5 21:35:52 2015
@@ -396,6 +396,7 @@
case Iop_F32toF64: vex_printf("F32toF64"); return;
case Iop_F64toF32: vex_printf("F64toF32"); return;
+ case Iop_RoundF128toInt: vex_printf("RoundF128toInt"); return;
case Iop_RoundF64toInt: vex_printf("RoundF64toInt"); return;
case Iop_RoundF32toInt: vex_printf("RoundF32toInt"); return;
case Iop_RoundF64toF32: vex_printf("RoundF64toF32"); return;
@@ -3161,6 +3162,7 @@
UNARY(Ity_F128, Ity_F128);
case Iop_SqrtF128:
+ case Iop_RoundF128toInt:
BINARY(ity_RMode,Ity_F128, Ity_F128);
case Iop_I32StoF128: UNARY(Ity_I32, Ity_F128);
Modified: trunk/pub/libvex_ir.h
==============================================================================
--- trunk/pub/libvex_ir.h (original)
+++ trunk/pub/libvex_ir.h Sat Sep 5 21:35:52 2015
@@ -713,6 +713,8 @@
Iop_CosF64, /* FCOS */
Iop_TanF64, /* FTAN */
Iop_2xm1F64, /* (2^arg - 1.0) */
+ Iop_RoundF128toInt, /* F128 value to nearest integral value (still
+ as F128) */
Iop_RoundF64toInt, /* F64 value to nearest integral value (still
as F64) */
Iop_RoundF32toInt, /* F32 value to nearest integral value (still
|
|
From: Matthias S. <zz...@ge...> - 2015-09-05 13:29:26
|
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE PWD}/ at tests/vg_regtest line 312.
---
tests/vg_regtest.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
index bfb269f..a441f42 100755
--- a/tests/vg_regtest.in
+++ b/tests/vg_regtest.in
@@ -309,7 +309,7 @@ sub read_vgtest_file($)
next;
} elsif ($line =~ /^\s*vgopts:\s*(.*)$/) {
my $addvgopts = $1;
- $addvgopts =~ s/\${PWD}/$ENV{PWD}/g;
+ $addvgopts =~ s/\$\{PWD\}/$ENV{PWD}/g;
$vgopts = $vgopts . " " . $addvgopts; # Nb: Make sure there's a space!
} elsif ($line =~ /^\s*prog:\s*(.*)$/) {
$prog = validate_program(".", $1, 0, 0);
--
2.5.1
|
|
From: <sv...@va...> - 2015-09-05 08:41:39
|
Author: florian
Date: Sat Sep 5 09:41:32 2015
New Revision: 15628
Log:
Do not compile ansi.c with clang as that compiler does not
recognise the -ansi command line option.
Modified:
trunk/none/tests/Makefile.am
Modified: trunk/none/tests/Makefile.am
==============================================================================
--- trunk/none/tests/Makefile.am (original)
+++ trunk/none/tests/Makefile.am Sat Sep 5 09:41:32 2015
@@ -198,7 +198,7 @@
process_vm_readv_writev.stderr.exp process_vm_readv_writev.vgtest
check_PROGRAMS = \
- ansi args \
+ args \
async-sigs \
bitfield1 \
bug129866 bug234814 \
@@ -250,6 +250,11 @@
check_PROGRAMS += rlimit64_nofile
endif
+# clang does now know -ansi
+if ! COMPILER_IS_CLANG
+ check_PROGRAMS += ansi
+endif
+
if BUILD_IFUNC_TESTS
check_PROGRAMS += ifunc
endif
|
|
From: <sv...@va...> - 2015-09-05 08:40:50
|
Author: florian
Date: Sat Sep 5 09:40:43 2015
New Revision: 15627
Log:
Add callgrind.h
Modified:
trunk/none/tests/ansi.c
Modified: trunk/none/tests/ansi.c
==============================================================================
--- trunk/none/tests/ansi.c (original)
+++ trunk/none/tests/ansi.c Sat Sep 5 09:40:43 2015
@@ -7,6 +7,7 @@
#include "valgrind.h"
#include "../../memcheck/memcheck.h"
#include "../../helgrind/helgrind.h"
+#include "../../callgrind/callgrind.h"
#include "../../drd/drd.h"
int main(void)
|
|
From: <sv...@va...> - 2015-09-05 07:47:57
|
Author: florian
Date: Sat Sep 5 08:47:49 2015
New Revision: 15626
Log:
Update line number as a result of r15624.
Modified:
trunk/none/tests/s390x/fpext_fail.stderr.exp
Modified: trunk/none/tests/s390x/fpext_fail.stderr.exp
==============================================================================
--- trunk/none/tests/s390x/fpext_fail.stderr.exp (original)
+++ trunk/none/tests/s390x/fpext_fail.stderr.exp Sat Sep 5 08:47:49 2015
@@ -2,7 +2,7 @@
Emulation fatal error -- Valgrind cannot continue:
Encountered an instruction that requires the floating point extension facility.
That facility is not available on this host
- at 0x........: main (fpext.c:134)
+ at 0x........: main (fpext.c:136)
Valgrind has to exit now. Sorry.
|
|
From: <sv...@va...> - 2015-09-04 21:53:03
|
Author: mjw
Date: Fri Sep 4 22:52:52 2015
New Revision: 15625
Log:
Fix bug #339636 Use fxsave64 and fxrstor64 mnemonics again.
Just add a configure check to see if the assembler understands
fxsave64/fxrstor64 and fall back to the old-school rex64 prefix
otherwise.
Modified:
trunk/NEWS
trunk/configure.ac
trunk/memcheck/tests/amd64/fxsave-amd64.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Sep 4 22:52:52 2015
@@ -210,11 +210,10 @@
339156 gdbsrv not called for fatal signal
339215 Valgrind 3.10.0 contain 2013 in copyrights notice
339288 support Cavium Octeon MIPS specific BBIT*32 instructions
-339636 Use fxsave64 and fxrstor64 mnemonics instead of rex64 prefix
+339636 Use fxsave64 and fxrstor64 mnemonics instead of old-school rex64 prefix
339442 Fix testsuite build failure on OS X 10.9
339542 Enable compilation with Intel's ICC compiler
339563 The DVB demux DMX_STOP ioctl doesn't have a wrapper
-339636 Use fxsave64 and fxrstor64 mnemonics instead of old-school rex64 prefix
339688 Mac-specific ASM does not support .version directive (cpuid,
tronical and pushfpopf tests)
339745 Valgrind crash when check Marmalade app (partial fix)
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Sep 4 22:52:52 2015
@@ -2231,6 +2231,24 @@
fi
+# does the amd64 assembler understand "fxsave64" and "fxrstor64"?
+AC_MSG_CHECKING([if amd64 assembler supports fxsave64/fxrstor64])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+void* p;
+asm __volatile__("fxsave64 (%0)" : : "r" (p) : "memory" );
+asm __volatile__("fxrstor64 (%0)" : : "r" (p) : "memory" );
+]])], [
+ac_have_as_amd64_fxsave64=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_as_amd64_fxsave64=no
+AC_MSG_RESULT([no])
+])
+if test x$ac_have_as_amd64_fxsave64 = xyes ; then
+ AC_DEFINE(HAVE_AS_AMD64_FXSAVE64, 1, [Define to 1 if as supports fxsave64/fxrstor64.])
+fi
+
# does the x86/amd64 assembler understand SSE3 instructions?
# Note, this doesn't generate a C-level symbol. It generates a
# automake-level symbol (BUILD_SSE3_TESTS), used in test Makefile.am's
Modified: trunk/memcheck/tests/amd64/fxsave-amd64.c
==============================================================================
--- trunk/memcheck/tests/amd64/fxsave-amd64.c (original)
+++ trunk/memcheck/tests/amd64/fxsave-amd64.c Fri Sep 4 22:52:52 2015
@@ -1,4 +1,4 @@
-
+#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include "tests/asm.h"
@@ -17,7 +17,7 @@
__attribute__((noinline))
void do_fxsave ( void* p, int rexw ) {
if (rexw) {
-#if (defined(VGO_linux) || defined(VGO_solaris)) && ! defined(__clang__)
+#ifdef HAVE_AS_AMD64_FXSAVE64
asm __volatile__("fxsave64 (%0)" : : "r" (p) : "memory" );
#else
asm __volatile__("rex64/fxsave (%0)" : : "r" (p) : "memory" );
@@ -30,7 +30,7 @@
__attribute__((noinline))
void do_fxrstor ( void* p, int rexw ) {
if (rexw) {
-#if (defined(VGO_linuxx) || defined(VGO_solaris)) && ! defined(__clang__)
+#ifdef HAVE_AS_AMD64_FXSAVE64
asm __volatile__("fxrstor64 (%0)" : : "r" (p) : "memory" );
#else
asm __volatile__("rex64/fxrstor (%0)" : : "r" (p) : "memory" );
|
|
From: <sv...@va...> - 2015-09-04 20:54:40
|
Author: florian
Date: Fri Sep 4 21:54:34 2015
New Revision: 15624
Log:
Add an assert.
Modified:
trunk/none/tests/s390x/fpext.c
Modified: trunk/none/tests/s390x/fpext.c
==============================================================================
--- trunk/none/tests/s390x/fpext.c (original)
+++ trunk/none/tests/s390x/fpext.c Fri Sep 4 21:54:34 2015
@@ -1,5 +1,6 @@
#include <float.h>
#include <stdio.h>
+#include <assert.h>
#include "opcodes.h"
@@ -131,6 +132,7 @@
int main()
{
+ assert(sizeof(long double) == 16);
DO_L2F(4);
DO_F2L(4);
|
|
From: <sv...@va...> - 2015-09-04 20:52:27
|
Author: florian
Date: Fri Sep 4 21:52:20 2015
New Revision: 15623
Log:
To test extended BFP opcodes we need sizeof(long double) == 16.
Certain old versions of GCC don't have that as default. So we must
give -mlong-double-128 on the command line.
Pertains to BZ #352183.
Modified:
trunk/configure.ac
trunk/none/tests/s390x/Makefile.am
trunk/none/tests/s390x/fpext.vgtest
trunk/none/tests/s390x/fpext_fail.vgtest
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Sep 4 21:52:20 2015
@@ -1847,6 +1847,25 @@
AC_SUBST(PREFERRED_STACK_BOUNDARY_2)
+# does this compiler support -mlong-double-128 ?
+AC_MSG_CHECKING([if gcc accepts -mlong-double-128])
+safe_CFLAGS=$CFLAGS
+CFLAGS="-mlong-double-128 -Werror"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ return 0;
+]])], [
+ac_compiler_supports_mlong_double_128=yes
+AC_MSG_RESULT([yes])
+], [
+ac_compiler_supports_mlong_double_128=no
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+AM_CONDITIONAL(HAS_MLONG_DOUBLE_128, test x$ac_compiler_supports_mlong_double_128 = xyes)
+FLAG_MLONG_DOUBLE_128="-mlong-double-128"
+AC_SUBST(FLAG_MLONG_DOUBLE_128)
+
+
# Convenience function to check whether GCC supports a particular
# warning option. Takes two arguments,
# first the warning flag name to check (without -W), then the
Modified: trunk/none/tests/s390x/Makefile.am
==============================================================================
--- trunk/none/tests/s390x/Makefile.am (original)
+++ trunk/none/tests/s390x/Makefile.am Fri Sep 4 21:52:20 2015
@@ -8,7 +8,7 @@
op_exception fgx stck stckf stcke stfle cksm mvcl clcl troo \
trto trot trtt tr tre cij cgij clij clgij crj cgrj clrj clgrj \
cs csg cds cdsg cu21 cu21_1 cu24 cu24_1 cu42 cu12 cu12_1 \
- ex_sig ex_clone cu14 cu14_1 cu41 fpconv ecag fpext fpext_warn \
+ ex_sig ex_clone cu14 cu14_1 cu41 fpconv ecag fpext_warn \
rounding-1 rounding-2 rounding-3 rounding-4 rounding-5 bfp-1 \
bfp-2 bfp-3 bfp-4 srnm srnmb comp-1 comp-2 exrl tmll tm stmg \
ex clst mvc test_fork test_sig rounding-6 rxsbg\
@@ -21,6 +21,9 @@
if BUILD_DFP_TESTS
INSN_TESTS += dfp-1 dfp-2 dfp-3 dfp-4 dfptest dfpext dfpconv srnmt pfpo
endif
+if HAS_MLONG_DOUBLE_128
+ INSN_TESTS += fpext
+endif
check_PROGRAMS = $(INSN_TESTS) \
allexec \
@@ -33,6 +36,7 @@
ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \
ecag.stdout.exp-z13 \
op00.stderr.exp1 op00.stderr.exp2 op00.vgtest \
+ fpext.vgtest fpext.stderr.exp fpext.stdout.exp \
fpext_fail.vgtest fpext_fail.stderr.exp fpext_fail.stdout.exp \
test.h opcodes.h add.h and.h div.h insert.h dfp_utils.h \
mul.h or.h sub.h xor.h table.h svc.h rounding.h \
@@ -56,5 +60,5 @@
cu14_1_CFLAGS = $(AM_CFLAGS) -DM3=1
cu21_1_CFLAGS = $(AM_CFLAGS) -DM3=1
cu24_1_CFLAGS = $(AM_CFLAGS) -DM3=1
-
+fpext_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
ex_clone_LDFLAGS = -lpthread
Modified: trunk/none/tests/s390x/fpext.vgtest
==============================================================================
--- trunk/none/tests/s390x/fpext.vgtest (original)
+++ trunk/none/tests/s390x/fpext.vgtest Fri Sep 4 21:52:20 2015
@@ -1,2 +1,2 @@
prog: fpext
-prereq: ../../../tests/s390x_features s390x-fpext
+prereq: test -e fpext && ../../../tests/s390x_features s390x-fpext
Modified: trunk/none/tests/s390x/fpext_fail.vgtest
==============================================================================
--- trunk/none/tests/s390x/fpext_fail.vgtest (original)
+++ trunk/none/tests/s390x/fpext_fail.vgtest Fri Sep 4 21:52:20 2015
@@ -1,2 +1,2 @@
prog: fpext
-prereq: ../../../tests/s390x_features '!s390x-fpext'
+prereq: test -e fpext && ../../../tests/s390x_features '!s390x-fpext'
|
|
From: Matthias S. <zz...@ge...> - 2015-09-04 20:52:05
|
Hi! The test helgrind/tests/stackteardown sometimes crashes with a SIGSEGV inside of pthread_create. gentoo, amd64, glibc-2.21-r1, gcc-4.9.3 It seems that this crash happens when the created thread already exited (or at least unmapped the stack). pthread_create.c:711: if (pd->stopped_start) The test app crashes also without valgrind. I wonder if the child thread needs a bit of waiting to make main leave pthread_create? --- stackteardown.stderr.exp 2015-05-17 14:29:09.000000000 +0200 +++ stackteardown.stderr.out 2015-09-04 20:08:03.000000000 +0200 @@ -1,3 +1,14 @@ +Process terminating with default action of signal 11 (SIGSEGV) + Access not within mapped region at address 0x........ + ... + by 0x........: pthread_create@* (hg_intercepts.c:...) + by 0x........: main (stackteardown.c:105) + If you believe this happened as a result of a stack + overflow in your program's main thread (unlikely but + possible), you can try to increase the size of the + main thread stack using the --main-stacksize= flag. + The main thread stack size used in this run was .... + ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) directly executed: ==29782== Process terminating with default action of signal 11 (SIGSEGV) ==29782== Access not within mapped region at address 0x4032D13 ==29782== at 0x4E43ABD: pthread_create@@GLIBC_2.2.5 (pthread_create.c:711) ==29782== by 0x4C3073C: pthread_create_WRK (hg_intercepts.c:427) ==29782== by 0x4C31815: pthread_create@* (hg_intercepts.c:460) ==29782== by 0x40098C: main (stackteardown.c:105) without valgrind: (gdb) bt #0 __pthread_create_2_1 (newthread=0x7fffffffd8e8, attr=<optimized out>, start_routine=0x40086b <child_fn>, arg=0x0) at pthread_create.c:711 #1 0x000000000040098d in main () at stackteardown.c:105 (gdb) info threads Id Target Id Frame * 1 Thread 0x7ffff7fb4700 (LWP 24672) "stackteardown" __pthread_create_2_1 (newthread=0x7fffffffd8e8, attr=<optimized out>, start_routine=0x400 86b <child_fn>, arg=0x0) at pthread_create.c:711 Regards Matthias |
|
From: <sv...@va...> - 2015-09-04 10:52:08
|
Author: mjw
Date: Fri Sep 4 11:52:01 2015
New Revision: 15622
Log:
Bug #352130 helgrind reports false races for printfs using mempcpy
Add a new Race suppression.
Modified:
trunk/NEWS
trunk/glibc-2.34567-NPTL-helgrind.supp
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Sep 4 11:52:01 2015
@@ -371,6 +371,7 @@
351756 Intercept platform_memchr$VARIANT$Haswell on OS X
351858 ldsoexec support on Solaris
351873 Newer gcc doesn't allow __builtin_tabortdc[i] in ppc32 mode
+352130 helgrind reports false races for printfs using mempcpy on FILE* state
n-i-bz Provide implementations of certain compiler builtins to support
compilers that may not provide those
n-i-bz Old STABS code is still being compiled, but never used. Remove it.
Modified: trunk/glibc-2.34567-NPTL-helgrind.supp
==============================================================================
--- trunk/glibc-2.34567-NPTL-helgrind.supp (original)
+++ trunk/glibc-2.34567-NPTL-helgrind.supp Fri Sep 4 11:52:01 2015
@@ -23,6 +23,10 @@
# this, then loads of errors to do with stdio are reported, because
# H fails to see glibc's internal locking/unlocking of FILE*s
# as required by POSIX. A better solution is needed.
+#
+# - some of the stdio functions in newer glibc manipulate stdio
+# FILE*s state through mempcpy, which we intercept, so we also need
+# to suppress such manipulations.
#{
# helgrind-glibc2X-001
@@ -41,6 +45,14 @@
}
{
+ helgrind-glibc-io-xsputn-mempcpy
+ Helgrind:Race
+ fun:__GI_mempcpy
+ fun:_IO_*xsputn*
+ obj:*/lib*/libc-2.*so*
+}
+
+{
helgrind-glibc2X-005
Helgrind:Race
obj:*/lib*/libpthread-2.*so*
|
|
From: <sv...@va...> - 2015-09-04 10:21:46
|
Author: mjw
Date: Fri Sep 4 11:21:38 2015
New Revision: 15621
Log:
Update COPYING and COPYING.DOCS with new FSF address.
Copied latest GPLv2 and GFDLv1.2 files from gnulib.
Modified:
trunk/COPYING
trunk/COPYING.DOCS
Modified: trunk/COPYING
==============================================================================
--- trunk/COPYING (original)
+++ trunk/COPYING Fri Sep 4 11:21:38 2015
@@ -1,12 +1,12 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -56,7 +56,7 @@
The precise terms and conditions for copying, distribution and
modification follow.
- GNU GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -255,7 +255,7 @@
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- How to Apply These Terms to Your New Programs
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -303,17 +303,16 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -336,5 +335,5 @@
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
+library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
Modified: trunk/COPYING.DOCS
==============================================================================
--- trunk/COPYING.DOCS (original)
+++ trunk/COPYING.DOCS Fri Sep 4 11:21:38 2015
@@ -1,9 +1,9 @@
- GNU Free Documentation License
- Version 1.2, November 2002
+ GNU Free Documentation License
+ Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -395,4 +395,3 @@
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
-
|
|
From: Mark W. <mj...@re...> - 2015-09-04 09:43:07
|
On Wed, 2015-09-02 at 00:23 +0200, Mark Wielaard wrote: > On Mon, Aug 24, 2015 at 10:19:01PM +0200, Mark Wielaard wrote: > > I hoped to fix the SIGABRT issue with tc18 and tc20 for sem_post > > in a similar way. See attached. > > > > It does "fix" the tc18 case, but not the tc20 case. > > > > Since hellgrind doesn't actually see the failure now it doesn't report > > anything. Which works for tc18 since there is an alternate exp file with > > that result (silent bad sem_post), but tc20 doesn't have an alternative > > where there is no EINVAL so it still reports an error. But at least not > > an abort, but a missing EINVAL. > > > > I do think glibc not detecting a bad semaphore might be allowed, so > > maybe we could just add an alternative tc20.exp that just doesn't see > > the EINVAL. Or would that be too much "cheating"? > > So if nobody objects I would like to push the attached patch. Since nobody loudly objected I have now pushed this as valgrind svn r15620. Please yell and scream if this breaks things for anybody. Thanks, Mark |
|
From: <sv...@va...> - 2015-09-04 09:41:50
|
Author: mjw
Date: Fri Sep 4 10:41:42 2015
New Revision: 15620
Log:
Add safe sem_post handler and glibc-2.21 expected output for helgrind tests.
This fixes the tc18 and tc20 testcases.
On some bad semaphores glibc now might just abort, we catch the SIGABRT
and turn it into a EINVAL. The program will see this, but the helgrind
wrapper won't. Which works for tc18 since there is an alternate exp file
with that result (silent bad sem_post). We add a similar alternative exp
file for tc21.
Added:
trunk/helgrind/tests/safe-semaphore.h
trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc-2.21
Modified:
trunk/helgrind/tests/Makefile.am
trunk/helgrind/tests/tc18_semabuse.c
trunk/helgrind/tests/tc20_verifywrap.c
Modified: trunk/helgrind/tests/Makefile.am
==============================================================================
--- trunk/helgrind/tests/Makefile.am (original)
+++ trunk/helgrind/tests/Makefile.am Fri Sep 4 10:41:42 2015
@@ -98,6 +98,7 @@
tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \
tc20_verifywrap.stderr.exp \
tc20_verifywrap.stderr.exp-glibc-2.18 \
+ tc20_verifywrap.stderr.exp-glibc-2.21 \
tc20_verifywrap.stderr.exp-mips32 \
tc20_verifywrap.stderr.exp-mips32-b \
tc20_verifywrap.stderr.exp-s390x \
@@ -115,8 +116,8 @@
tls_threads.vgtest tls_threads.stdout.exp \
tls_threads.stderr.exp
-# Wrapper header used by some check programs.
-noinst_HEADERS = safe-pthread.h
+# Wrapper headers used by some check programs.
+noinst_HEADERS = safe-pthread.h safe-semaphore.h
# XXX: tc18_semabuse uses operations that are unsupported on Darwin. It
# should be conditionally compiled like tc20_verifywrap is.
Added: trunk/helgrind/tests/safe-semaphore.h
==============================================================================
--- trunk/helgrind/tests/safe-semaphore.h (added)
+++ trunk/helgrind/tests/safe-semaphore.h Fri Sep 4 10:41:42 2015
@@ -0,0 +1,41 @@
+#include <semaphore.h>
+#include <signal.h>
+#include <setjmp.h>
+#include <errno.h>
+#include <assert.h>
+
+static sigjmp_buf env;
+
+/*
+ * Newer glibc crashes on really bogus semaphors.
+ * Catch a SIGABRT and turn it into a EINVAL.
+ */
+static void abrt_handler( int signum, siginfo_t *siginfo, void *sigcontext ) {
+ siglongjmp( env, EINVAL );
+}
+
+static int safe_sem_post( sem_t *sem ) {
+ struct sigaction sa;
+ struct sigaction oldsa;
+ int r, e;
+
+ sa.sa_handler = NULL;
+ sa.sa_sigaction = abrt_handler;
+ sigemptyset( &sa.sa_mask );
+ sa.sa_flags = SA_SIGINFO;
+
+ sigaction( SIGABRT, &sa, &oldsa );
+
+ if ( ( e = sigsetjmp( env, 1 ) ) == 0 ) {
+ r = sem_post( sem );
+ } else {
+ r = -1;
+ }
+ errno = e;
+
+ sigaction( SIGABRT, &oldsa, NULL );
+
+ return r;
+}
+
+#define sem_post safe_sem_post
Modified: trunk/helgrind/tests/tc18_semabuse.c
==============================================================================
--- trunk/helgrind/tests/tc18_semabuse.c (original)
+++ trunk/helgrind/tests/tc18_semabuse.c Fri Sep 4 10:41:42 2015
@@ -11,7 +11,7 @@
#include <stdlib.h>
#include <assert.h>
#include <pthread.h>
-#include <semaphore.h>
+#include "safe-semaphore.h"
#include <string.h>
void start_watchdog ( void );
int main ( void )
Modified: trunk/helgrind/tests/tc20_verifywrap.c
==============================================================================
--- trunk/helgrind/tests/tc20_verifywrap.c (original)
+++ trunk/helgrind/tests/tc20_verifywrap.c Fri Sep 4 10:41:42 2015
@@ -16,7 +16,7 @@
#include <assert.h>
#include <unistd.h>
#include "safe-pthread.h"
-#include <semaphore.h>
+#include "safe-semaphore.h"
#if !defined(__APPLE__)
Added: trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc-2.21
==============================================================================
--- trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc-2.21 (added)
+++ trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc-2.21 Fri Sep 4 10:41:42 2015
@@ -0,0 +1,247 @@
+
+
+
+------ This is output for >= glibc 2.4 ------
+
+---------------- pthread_create/join ----------------
+
+---Thread-Announcement------------------------------------------
+
+Thread #x is the program's root thread
+
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:81)
+
+----------------------------------------------------------------
+
+Possible data race during write of size 2 at 0x........ by thread #x
+Locks held: none
+ at 0x........: main (tc20_verifywrap.c:83)
+
+This conflicts with a previous write of size 2 by thread #x
+Locks held: none
+ at 0x........: racy_child (tc20_verifywrap.c:39)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+ Location 0x........ is 0 bytes inside global var "unprotected"
+ declared at tc20_verifywrap.c:32
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_join failed
+ with error code 35 (EDEADLK: Resource deadlock would occur)
+ at 0x........: pthread_join_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_join (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:88)
+
+
+---------------- pthread_mutex_lock et al ----------------
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_mutex_init failed
+ with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint)
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:102)
+
+----------------------------------------------------------------
+
+Thread #x: pthread_mutex_destroy of a locked mutex
+ at 0x........: mutex_destroy_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:112)
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_mutex_destroy failed
+ with error code 16 (EBUSY: Device or resource busy)
+ at 0x........: mutex_destroy_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:112)
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_mutex_lock failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: mutex_lock_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:118)
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_mutex_trylock failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: mutex_trylock_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_mutex_trylock (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:126)
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_mutex_timedlock failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: mutex_timedlock_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_mutex_timedlock (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:131)
+
+----------------------------------------------------------------
+
+Thread #x unlocked an invalid lock at 0x........
+ at 0x........: mutex_unlock_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:135)
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_mutex_unlock failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: mutex_unlock_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:135)
+
+
+---------------- pthread_cond_wait et al ----------------
+
+----------------------------------------------------------------
+
+Thread #x: pthread_cond_{timed}wait called with un-held mutex
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:157)
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_cond_wait failed
+ with error code 1 (EPERM: Operation not permitted)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:157)
+
+----------------------------------------------------------------
+
+Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
+ at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:162)
+
+
+FIXME: can't figure out how to verify wrap of pthread_cond_signal
+
+----------------------------------------------------------------
+
+Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
+ at 0x........: pthread_cond_broadcast_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_broadcast@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:168)
+
+
+FIXME: can't figure out how to verify wrap of pthread_broadcast_signal
+
+----------------------------------------------------------------
+
+Thread #x: pthread_cond_{timed}wait called with un-held mutex
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:175)
+
+----------------------------------------------------------------
+
+Thread #x's call to pthread_cond_timedwait failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:175)
+
+
+---------------- pthread_rwlock_* ----------------
+
+----------------------------------------------------------------
+
+Thread #x unlocked a not-locked lock at 0x........
+ at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
+ ...
+ by 0x........: main (tc20_verifywrap.c:189)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_rwlock_init (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:188)
+ Location 0x........ is 0 bytes inside local var "rwl"
+ declared at tc20_verifywrap.c:52, in frame #x of thread x
+
+
+(1) no error on next line
+(2) no error on next line
+(3) ERROR on next line
+----------------------------------------------------------------
+
+Thread #x unlocked a not-locked lock at 0x........
+ at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
+ ...
+ by 0x........: main (tc20_verifywrap.c:206)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_rwlock_init (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:196)
+ Location 0x........ is 0 bytes inside local var "rwl2"
+ declared at tc20_verifywrap.c:53, in frame #x of thread x
+
+
+(4) no error on next line
+(5) no error on next line
+(6) no error on next line
+(7) no error on next line
+(8) ERROR on next line
+----------------------------------------------------------------
+
+Thread #x unlocked a not-locked lock at 0x........
+ at 0x........: pthread_rwlock_unlock_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
+ ...
+ by 0x........: main (tc20_verifywrap.c:227)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_rwlock_init_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_rwlock_init (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:196)
+ Location 0x........ is 0 bytes inside local var "rwl2"
+ declared at tc20_verifywrap.c:53, in frame #x of thread x
+
+
+
+---------------- sem_* ----------------
+
+----------------------------------------------------------------
+
+Thread #x's call to sem_init failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: sem_init_WRK (hg_intercepts.c:...)
+ by 0x........: sem_init@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:248)
+
+
+FIXME: can't figure out how to verify wrap of sem_destroy
+
+----------------------------------------------------------------
+
+Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
+ at 0x........: sem_wait_WRK (hg_intercepts.c:...)
+ by 0x........: sem_wait (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:262)
+
+
+FIXME: can't figure out how to verify wrap of sem_post
+
+
+------------ dealloc of mem holding locks ------------
+
+----------------------------------------------------------------
+
+Thread #x: Exiting thread still holds 1 lock
+ ...
+
+
+ERROR SUMMARY: 22 errors from 22 contexts (suppressed: 0 from 0)
|
|
From: Matthias S. <zz...@ge...> - 2015-09-03 20:04:36
|
Hi Florian! I can confirm that it works now. Thank you Matthias Am 26.08.2015 um 22:27 schrieb Florian Krohm: > I could not reproduce the problem but opted for implementing solution #2 > in r15592. Let me know if this does not work for you. > > Florian > > > On 13.08.2015 23:07, Matthias Schwarzott wrote: >> Hi! >> >> The testcase gdbserver_tests/nlgone_exit fails if the locale is set to a >> non english value. >> >> To reproduce this on any system, run soemthing like this: >> # LANG="de_DE" perl tests/vg_regtest gdbserver_tests/nlgone_exit.vgtest >> >> It then fails with this stdoutB.diff: >> --- nlgone_exit.stderrB.exp 2015-05-17 14:29:09.000000000 +0200 >> +++ nlgone_exit.stderrB.out 2015-08-13 22:56:52.000000000 +0200 >> @@ -1 +1,2 @@ >> relaying data between gdb and process .... >> +32 ../sysdeps/unix/sysv/linux/_exit.c: Datei oder Verzeichnis nicht >> gefunden. >> >> >> Possible Solutions: >> >> 1. Cleanup of environment in vg_regtest: For all tests clear several >> known bad variables like LC_* or define others like LC_ALL=C. Cleanup >> could also include to set core file limit to a known value (if test does >> not decide otherwise). >> >> 2. add envB to vgtest syntax, so the affected testcase can define LC_ALL=C. >> >> Regards >> Matthias >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Valgrind-developers mailing list >> Val...@li... >> https://lists.sourceforge.net/lists/listinfo/valgrind-developers >> > > |