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
(11) |
2
(9) |
3
(11) |
4
(12) |
5
(11) |
|
6
(9) |
7
(13) |
8
(6) |
9
(7) |
10
(7) |
11
(11) |
12
(13) |
|
13
(7) |
14
(6) |
15
(7) |
16
(19) |
17
(20) |
18
(9) |
19
(9) |
|
20
(6) |
21
(7) |
22
(11) |
23
(16) |
24
(14) |
25
(24) |
26
(16) |
|
27
(20) |
28
(58) |
29
(7) |
30
(10) |
31
(15) |
|
|
|
From: Nicholas N. <nj...@cs...> - 2006-08-16 23:56:05
|
On Wed, 16 Aug 2006, Karai Csaba wrote: > If you, developers are interested, I would write a new component for > valgrind, a precompiler. > > The precompiler would modify the C/C++ code to detect more memory > errors in the program. > > How it would work? > > - one should compile with valgrind-cc instead of gcc > - valgrind-cc calls the gcc -E for getting a clean code > without macros and includes > - after that it modifies the code for further checks > - compiles the modified code It sounds like this would be a totally different tool -- certainly complementary to Valgrind, but not particularly related. Another random point of note: people really like dynamic instrumentation because it's so easy to use -- you don't have to recompile anything or do any other kind of preparation. People *really* like that. Nick |
|
From: <sv...@va...> - 2006-08-16 17:51:32
|
Author: sewardj
Date: 2006-08-16 18:51:28 +0100 (Wed, 16 Aug 2006)
New Revision: 6006
Log:
A small fix to the "mempool trim" client request; the previous version
didn't cope with zero-sized chunks properly. (from Graydon Hoare).
Modified:
trunk/memcheck/mc_malloc_wrappers.c
Modified: trunk/memcheck/mc_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_malloc_wrappers.c 2006-08-16 15:07:48 UTC (rev 6005=
)
+++ trunk/memcheck/mc_malloc_wrappers.c 2006-08-16 17:51:28 UTC (rev 6006=
)
@@ -492,23 +492,25 @@
=20
tl_assert(chunks !=3D NULL);
for (i =3D 0; i < n_shadows; ++i) {
+
+ Addr lo, hi;
+
mc =3D (MC_Chunk*) chunks[i];
=20
- if (mc->size =3D=3D 0)
- continue;
+ lo =3D mc->data;
+ hi =3D mc->size =3D=3D 0 ? mc->data : mc->data + mc->size - 1;
=20
#define EXTENT_CONTAINS(x) ((addr <=3D (x)) && ((x) < addr + size))
=20
- if (EXTENT_CONTAINS(mc->data) &&
- EXTENT_CONTAINS(mc->data + mc->size - 1)) {
+ if (EXTENT_CONTAINS(lo) && EXTENT_CONTAINS(hi)) {
=20
/* The current chunk is entirely within the trim extent: keep
it. */
=20
continue;
=20
- } else if ( (! EXTENT_CONTAINS(mc->data)) &&
- (! EXTENT_CONTAINS(mc->data + mc->size - 1)) ) {
+ } else if ( (! EXTENT_CONTAINS(lo)) &&
+ (! EXTENT_CONTAINS(hi)) ) {
=20
/* The current chunk is entirely outside the trim extent:
delete it. */
@@ -525,9 +527,8 @@
/* The current chunk intersects the trim extent: remove,
trim, and reinsert it. */
=20
- Addr lo, hi;
- tl_assert(EXTENT_CONTAINS(mc->data) ||
- EXTENT_CONTAINS(mc->data + mc->size - 1));
+ tl_assert(EXTENT_CONTAINS(lo) ||
+ EXTENT_CONTAINS(hi));
if (VG_(HT_remove)(mp->chunks, (UWord)mc->data) =3D=3D NULL) {
MC_(record_free_error)(tid, (Addr)mc->data);
VG_(free)(chunks);
|
|
From: Karai C. <cs...@fr...> - 2006-08-16 16:39:52
|
ext Bart Van Assche =EDrta: > Hello Karai, >=20 > What would such a compiler do more than the -fmudflap feature of gc= c=20 > 4 ? See also=20 > http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Optimize-Options.html#Optim= ize-Options=20 > <http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Optimize-Options.html#Opti= mize-Options> >=20 I didn't know that GCC 4 implemented this feature. In this case writing this component is not necessary. Thank you, Bye, Csaba |
|
From: Bart V. A. <bar...@gm...> - 2006-08-16 15:37:25
|
Hello Karai,
What would such a compiler do more than the -fmudflap feature of gcc 4 ?
See also
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Optimize-Options.html#Optimize-Options
On 8/16/06, Karai Csaba <cs...@fr...> wrote:
>
> Hi!
>
> If you, developers are interested, I would write a new component for
> valgrind, a precompiler.
>
> The precompiler would modify the C/C++ code to detect more memory
> errors in the program.
>
> How it would work?
>
> - one should compile with valgrind-cc instead of gcc
> - valgrind-cc calls the gcc -E for getting a clean code
> without macros and includes
> - after that it modifies the code for further checks
> - compiles the modified code
>
>
> My precompiler could detect array bound errors, such as:
>
>
> static int array [ 5 ];
> void error()
> {
> array[ 10 ] = 10;
> }
>
>
> After the modifications:
>
> static int array [ 5 ];
> void error()
> {
> indexcheck(10,5);array[ 10 ] = 10;
> }
>
> void indexcheck( int i1, int i2 )
> {
> if( i1 < 0 || i1 >= i2 )
> ...
> }
>
>
>
> This could work for primitive types, where no operator[] is defined.
>
> Do you think it worths to write such a component?
>
|
|
From: Karai C. <cs...@fr...> - 2006-08-16 15:20:51
|
Hi!
If you, developers are interested, I would write a new component for
valgrind, a precompiler.
The precompiler would modify the C/C++ code to detect more memory
errors in the program.
How it would work?
- one should compile with valgrind-cc instead of gcc
- valgrind-cc calls the gcc -E for getting a clean code
without macros and includes
- after that it modifies the code for further checks
- compiles the modified code
My precompiler could detect array bound errors, such as:
static int array [ 5 ];
void error()
{
array[ 10 ] = 10;
}
After the modifications:
static int array [ 5 ];
void error()
{
indexcheck(10,5);array[ 10 ] = 10;
}
void indexcheck( int i1, int i2 )
{
if( i1 < 0 || i1 >= i2 )
...
}
This could work for primitive types, where no operator[] is defined.
Do you think it worths to write such a component?
Thanks,
Csaba
|
|
From: <sv...@va...> - 2006-08-16 15:17:05
|
Author: sewardj
Date: 2006-08-16 16:07:48 +0100 (Wed, 16 Aug 2006)
New Revision: 6005
Log:
Regression test for fix for #129866.
Added:
trunk/none/tests/bug129866.c
trunk/none/tests/bug129866.stderr.exp
trunk/none/tests/bug129866.stdout.exp
trunk/none/tests/bug129866.vgtest
Modified:
trunk/none/tests/Makefile.am
Modified: trunk/none/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/Makefile.am 2006-08-16 15:06:53 UTC (rev 6004)
+++ trunk/none/tests/Makefile.am 2006-08-16 15:07:48 UTC (rev 6005)
@@ -28,6 +28,7 @@
async-sigs.stderr.exp async-sigs.stdout.exp async-sigs.vgtest \
bitfield1.stderr.exp bitfield1.vgtest \
blockfault.vgtest blockfault.stderr.exp blockfault.stdout.exp \
+ bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
closeall.stderr.exp closeall.vgtest \
cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \
cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \
@@ -131,7 +132,9 @@
=20
check_PROGRAMS =3D \
ansi args \
- async-sigs bitfield1 blockfault closeall coolo_strlen \
+ async-sigs bitfield1 blockfault \
+ bug129866 \
+ closeall coolo_strlen \
discard exec-sigmask execve faultstatus fcntl_setown \
fdleak_cmsg fdleak_creat fdleak_dup fdleak_dup2 \
fdleak_fcntl fdleak_ipv4 fdleak_open fdleak_pipe \
Added: trunk/none/tests/bug129866.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/bug129866.c (rev 0)
+++ trunk/none/tests/bug129866.c 2006-08-16 15:07:48 UTC (rev 6005)
@@ -0,0 +1,34 @@
+
+#include <stdlib.h>
+char * touch_malloc (int size)=20
+{
+ char * result;
+ int i;
+ result =3D malloc (size);
+ for (i =3D 0; i < size; i++)
+ *(result + i) =3D 'a';
+
+ return result;
+}
+char * touch_realloc (char * ptr, int size)=20
+{
+ char * result;
+ int i;
+ result =3D realloc (ptr, size);
+ for (i =3D 0; i < size; i++)
+ *(result + i) =3D 'a';
+
+ return result;
+}
+
+int main ( void )
+{
+ char *a1, *b1, *a2, *b2;
+ printf("started\n");
+ a1 =3D touch_malloc(1600000) ;
+ b1 =3D touch_malloc(200000) ;
+ a2 =3D touch_realloc(a1, 1601600) ;
+ b2 =3D touch_realloc(b1, 200000) ;
+ printf("success\n");
+ return 0;
+};
Added: trunk/none/tests/bug129866.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/bug129866.stderr.exp (rev 0)
+++ trunk/none/tests/bug129866.stderr.exp 2006-08-16 15:07:48 UTC (rev 60=
05)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/bug129866.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/bug129866.stdout.exp (rev 0)
+++ trunk/none/tests/bug129866.stdout.exp 2006-08-16 15:07:48 UTC (rev 60=
05)
@@ -0,0 +1,2 @@
+started
+success
Added: trunk/none/tests/bug129866.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/bug129866.vgtest (rev 0)
+++ trunk/none/tests/bug129866.vgtest 2006-08-16 15:07:48 UTC (rev 6005)
@@ -0,0 +1 @@
+prog: bug129866
|
|
From: <sv...@va...> - 2006-08-16 15:07:41
|
Author: sewardj
Date: 2006-08-16 16:06:53 +0100 (Wed, 16 Aug 2006)
New Revision: 6004
Log:
Extra paranoia that should really have been committed in r6003.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2006-08-16 14:22:29 UTC (rev =
6003)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2006-08-16 15:06:53 UTC (rev =
6004)
@@ -2992,6 +2992,8 @@
if (sres.isError) {
AM_SANITY_CHECK;
return False;
+ } else {
+ aspacem_assert(sres.val =3D=3D new_addr);
}
=20
*need_discard =3D any_Ts_in_range( old_addr, old_len )
|
|
From: <sv...@va...> - 2006-08-16 14:22:37
|
Author: sewardj
Date: 2006-08-16 15:22:29 +0100 (Wed, 16 Aug 2006)
New Revision: 6003
Log:
When handling mremap, disallow an expanding in-place remap if it would
trash some other segment as a result of the expansion. This fixes
#129866. I don't know if it is a good solution though. Causes
none/tests/mremap{,2} to fail now, although I think it is still OK.
mremap really is a semantic disaster area.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2006-08-16 01:50:55 UTC (rev =
6002)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2006-08-16 14:22:29 UTC (rev =
6003)
@@ -2903,6 +2903,9 @@
NSegment seg_copy =3D *seg;
SizeT seg_old_len =3D seg->end + 1 - seg->start;
=20
+ if (0)
+ VG_(am_show_nsegments)(0, "VG_(am_extend_map_client) BEFORE");
+
if (seg->kind !=3D SkFileC && seg->kind !=3D SkAnonC)
return False;
=20
@@ -2924,6 +2927,9 @@
if (sres.isError) {
AM_SANITY_CHECK;
return False;
+ } else {
+ /* the area must not have moved */
+ aspacem_assert(sres.val =3D=3D seg->start);
}
=20
*need_discard =3D any_Ts_in_range( seg_copy.end+1, delta );
@@ -2931,6 +2937,9 @@
seg_copy.end +=3D delta;
add_segment( &seg_copy );
=20
+ if (0)
+ VG_(am_show_nsegments)(0, "VG_(am_extend_map_client) AFTER");
+
AM_SANITY_CHECK;
return True;
}
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2006-08-16 01:50:55 UTC (=
rev 6002)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2006-08-16 14:22:29 UTC (=
rev 6003)
@@ -187,6 +187,8 @@
old_addr,old_len,new_addr,new_len,=20
flags & VKI_MREMAP_MAYMOVE ? "MAYMOVE" : "",
flags & VKI_MREMAP_FIXED ? "FIXED" : "");
+ if (0)
+ VG_(am_show_nsegments)(0, "do_remap: before");
=20
if (flags & ~(VKI_MREMAP_FIXED | VKI_MREMAP_MAYMOVE))
goto eINVAL;
@@ -327,6 +329,18 @@
/* VG_(am_get_advisory_client_simple) interprets zero to mean
non-fixed, which is not what we want */
advised =3D VG_(am_get_advisory_client_simple)( needA, needL, &ok );
+ if (ok) {
+ /* VG_(am_get_advisory_client_simple) (first arg =3D=3D 0, meaning
+ this-or-nothing) is too lenient, and may allow us to trash
+ the next segment along. So make very sure that the proposed
+ new area really is free. This is perhaps overly
+ conservative, but it fixes #129866. */
+ NSegment* segLo =3D VG_(am_find_nsegment)( needA );
+ NSegment* segHi =3D VG_(am_find_nsegment)( needA + needL - 1 );
+ if (segLo =3D=3D NULL || segHi =3D=3D NULL=20
+ || segLo !=3D segHi || segLo->kind !=3D SkFree)
+ ok =3D False;
+ }
if (ok && advised =3D=3D needA) {
ok =3D VG_(am_extend_map_client)( &d, old_seg, needL );
if (ok) {
@@ -374,6 +388,17 @@
/* VG_(am_get_advisory_client_simple) interprets zero to mean
non-fixed, which is not what we want */
advised =3D VG_(am_get_advisory_client_simple)( needA, needL, &ok );
+ if (ok) {
+ /* VG_(am_get_advisory_client_simple) (first arg =3D=3D 0, meaning
+ this-or-nothing) is too lenient, and may allow us to trash
+ the next segment along. So make very sure that the proposed
+ new area really is free. */
+ NSegment* segLo =3D VG_(am_find_nsegment)( needA );
+ NSegment* segHi =3D VG_(am_find_nsegment)( needA + needL - 1 );
+ if (segLo =3D=3D NULL || segHi =3D=3D NULL=20
+ || segLo !=3D segHi || segLo->kind !=3D SkFree)
+ ok =3D False;
+ }
if (!ok || advised !=3D needA)
goto eNOMEM;
ok =3D VG_(am_extend_map_client)( &d, old_seg, needL );
|
|
From: <js...@ac...> - 2006-08-16 09:51:47
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2006-08-16 09:00:02 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 206 tests, 10 stderr failures, 5 stdout failures, 0 posttest failures == memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: Tom H. <th...@cy...> - 2006-08-16 09:23:04
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2006-08-16 03:00:09 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 264 tests, 5 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/mempool (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/tls (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 262 tests, 5 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/mempool (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/tls (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Aug 16 06:44:26 2006 --- new.short Wed Aug 16 10:23:09 2006 *************** *** 8,10 **** ! == 262 tests, 5 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/mempool (stderr) --- 8,10 ---- ! == 264 tests, 5 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/mempool (stderr) |
|
From: <js...@ac...> - 2006-08-16 03:02:55
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2006-08-16 03:30:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 235 tests, 4 stderr failures, 0 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) |
|
From: Tom H. <to...@co...> - 2006-08-16 02:45:37
|
Nightly build on dunsmere ( athlon, Fedora Core 5 ) started at 2006-08-16 03:30:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 237 tests, 4 stderr failures, 0 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) |
|
From: Tom H. <th...@cy...> - 2006-08-16 02:32:10
|
Nightly build on dellow ( x86_64, Fedora Core 5 ) started at 2006-08-16 03:10:11 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 262 tests, 3 stderr failures, 0 stdout failures, 0 posttest failures == memcheck/tests/mempool (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 260 tests, 3 stderr failures, 0 stdout failures, 0 posttest failures == memcheck/tests/mempool (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Aug 16 03:20:17 2006 --- new.short Wed Aug 16 03:32:10 2006 *************** *** 8,10 **** ! == 260 tests, 3 stderr failures, 0 stdout failures, 0 posttest failures == memcheck/tests/mempool (stderr) --- 8,10 ---- ! == 262 tests, 3 stderr failures, 0 stdout failures, 0 posttest failures == memcheck/tests/mempool (stderr) |
|
From: Tom H. <th...@cy...> - 2006-08-16 02:30:29
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2006-08-16 03:15:03 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo /tmp/cc3OLq22.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc3OLq22.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc3OLq22.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc3OLq22.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc3OLq22.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc3OLq22.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc3OLq22.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc3OLq22.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 rm insn_mmx.c insn_sse2.c insn_fpu.c insn_mmxext.c insn_sse.c insn_sse3.c insn_cmov.c insn_basic.c make[5]: Leaving directory `/tmp/valgrind.6884/valgrind/none/tests/x86' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/valgrind.6884/valgrind/none/tests/x86' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/valgrind.6884/valgrind/none/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/valgrind.6884/valgrind/none' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/valgrind.6884/valgrind' make: *** [check] Error 2 ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo /tmp/cc5b6abb.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc5b6abb.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc5b6abb.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc5b6abb.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc5b6abb.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc5b6abb.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc5b6abb.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cc5b6abb.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 rm insn_mmx.c insn_sse2.c insn_fpu.c insn_mmxext.c insn_sse.c insn_sse3.c insn_cmov.c insn_basic.c make[5]: Leaving directory `/tmp/valgrind.6884/valgrind/none/tests/x86' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/valgrind.6884/valgrind/none/tests/x86' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/valgrind.6884/valgrind/none/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/valgrind.6884/valgrind/none' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/valgrind.6884/valgrind' make: *** [check] Error 2 ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Aug 16 03:21:54 2006 --- new.short Wed Aug 16 03:30:08 2006 *************** *** 7,16 **** Last 20 lines of verbose log follow echo ! /tmp/cc5b6abb.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc5b6abb.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc5b6abb.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc5b6abb.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc5b6abb.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc5b6abb.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc5b6abb.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc5b6abb.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 --- 7,16 ---- Last 20 lines of verbose log follow echo ! /tmp/cc3OLq22.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc3OLq22.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc3OLq22.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc3OLq22.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc3OLq22.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc3OLq22.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc3OLq22.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cc3OLq22.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 |
|
From: <sv...@va...> - 2006-08-16 01:50:58
|
Author: sewardj
Date: 2006-08-16 02:50:55 +0100 (Wed, 16 Aug 2006)
New Revision: 6002
Log:
Regtest for bug fixed by r6001.
Added:
trunk/none/tests/amd64/nibz_bennee_mmap.c
trunk/none/tests/amd64/nibz_bennee_mmap.stderr.exp
trunk/none/tests/amd64/nibz_bennee_mmap.stdout.exp
trunk/none/tests/amd64/nibz_bennee_mmap.vgtest
Modified:
trunk/none/tests/amd64/Makefile.am
Modified: trunk/none/tests/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/Makefile.am 2006-08-16 01:48:19 UTC (rev 6001)
+++ trunk/none/tests/amd64/Makefile.am 2006-08-16 01:50:55 UTC (rev 6002)
@@ -14,13 +14,16 @@
$(addsuffix .vgtest,$(INSN_TESTS)) \
jrcxz.stderr.exp jrcxz.stdout.exp jrcxz.vgtest \
looper.stderr.exp looper.stdout.exp looper.vgtest \
+ nibz_bennee_mmap.stderr.exp nibz_bennee_mmap.stdout.exp=20
+ nibz_bennee_mmap.vgtest \
smc1.stderr.exp smc1.stdout.exp smc1.vgtest \
shrld.stderr.exp shrld.stdout.exp shrld.vgtest
=20
=20
check_PROGRAMS =3D \
clc \
- faultstatus fcmovnu fxtract $(INSN_TESTS) looper jrcxz smc1 shrld
+ faultstatus fcmovnu fxtract $(INSN_TESTS) looper jrcxz smc1 shrld \
+ nibz_bennee_mmap
=20
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude
@FLAG_M64@
Added: trunk/none/tests/amd64/nibz_bennee_mmap.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/nibz_bennee_mmap.c (re=
v 0)
+++ trunk/none/tests/amd64/nibz_bennee_mmap.c 2006-08-16 01:50:55 UTC (re=
v 6002)
@@ -0,0 +1,61 @@
+
+/* Test for aspacem bug reported by Alex Bennee, reported on users
+ list around 9 Aug 06, resulting in
+
+ > > --1515:0:aspacem Valgrind: FATAL: aspacem assertion failed:
+ > > --1515:0:aspacem holeEnd <=3D aspacem_maxAddr
+ > > --1515:0:aspacem at m_aspacemgr/aspacemgr.c:1998
+ > > (vgPlain_am_get_advisory)
+ > > --1515:0:aspacem Exiting now.
+
+ TomH writes:
+
+ > I think the problem here is that you've done an mmap (either fixed =
or
+ > hinted) above aspacem_maxAddr and then munmaped it which leaves you
+ > with a free segment above aspacem_maxAddr.
+
+ The sequence seems to be that you have to allocate memory somewhere
+ above aspacem_maxAddr, then free it, then do another hinted
+ allocation that is above aspacem_maxAddr but which can't be done
+ due to the memory already being in use. This program will reproduce
+ it.
+
+ On investigation: the problem was the munmap returns its space in
+ the form of SkFree even though the space above aspacem_maxAddr is
+ supposed to be SkResvn. This is now fixed.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+
+int main(int argc, char **argv)
+{
+ void *p;
+ if ((p =3D mmap((void*)0x1F7F100000, 4096, PROT_READ|PROT_WRITE,
+ MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)) =3D=3D (vo=
id *)-1)
+ {
+ perror("mmap");
+ exit(1);
+ }
+ if (munmap(p, 4096) < 0)
+ {
+ perror("munmap");
+ exit(1);
+ }
+ if ((p =3D mmap((void*)0x1F7F101000, 4096, PROT_READ,
+ MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)) =3D=3D (void *)-1)
+ {
+ perror("mmap");
+ exit(1);
+ }
+ if ((p =3D mmap((void*)0x1F7F101000, 4096, PROT_READ,
+ MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)) =3D=3D (void *)-1)
+ {
+ perror("mmap");
+ exit(1);
+ }
+
+ printf("made it through alive!\n");
+ exit(0);
+}
Added: trunk/none/tests/amd64/nibz_bennee_mmap.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/nibz_bennee_mmap.stderr.exp =
(rev 0)
+++ trunk/none/tests/amd64/nibz_bennee_mmap.stderr.exp 2006-08-16 01:50:5=
5 UTC (rev 6002)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/amd64/nibz_bennee_mmap.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/nibz_bennee_mmap.stdout.exp =
(rev 0)
+++ trunk/none/tests/amd64/nibz_bennee_mmap.stdout.exp 2006-08-16 01:50:5=
5 UTC (rev 6002)
@@ -0,0 +1 @@
+made it through alive!
Added: trunk/none/tests/amd64/nibz_bennee_mmap.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/nibz_bennee_mmap.vgtest =
(rev 0)
+++ trunk/none/tests/amd64/nibz_bennee_mmap.vgtest 2006-08-16 01:50:55 UT=
C (rev 6002)
@@ -0,0 +1 @@
+prog: nibz_bennee_mmap
|
|
From: <sv...@va...> - 2006-08-16 01:48:24
|
Author: sewardj
Date: 2006-08-16 02:48:19 +0100 (Wed, 16 Aug 2006)
New Revision: 6001
Log:
When a segment becomes free, and it is above aspacem_maxAddr, mark it
as SkResvn rather than SkFree, since doing otherwise causes the area
above aspacem_maxAddr - which starts out as SkResvn - to be polluted
with SkFree bits. Fixes an assertion failure found by Alex Bennee
(users list, 9 Aug 06).
Also allow the preener to merge fixed-sized SkResvns so as to avoid
fragmentation that otherwise results.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2006-08-16 00:28:25 UTC (rev =
6000)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2006-08-16 01:48:19 UTC (rev =
6001)
@@ -994,6 +994,12 @@
case SkShmC:
return False;
=20
+ case SkResvn:
+ if (s1->smode =3D=3D SmFixed && s2->smode =3D=3D SmFixed) {
+ s1->end =3D s2->end;
+ return True;
+ }
+
default:
break;
=20
@@ -2232,9 +2238,22 @@
needDiscard =3D any_Ts_in_range( start, len );
=20
init_nsegment( &seg );
- seg.kind =3D SkFree;
seg.start =3D start;
seg.end =3D start + len - 1;
+
+ /* The segment becomes unused (free). Segments from above
+ aspacem_maxAddr were originally SkResvn and so we make them so
+ again. Note, this isn't really right when the segment straddles
+ the aspacem_maxAddr boundary - then really it should be split in
+ two, the lower part marked as SkFree and the upper part as
+ SkResvn. Ah well. */
+ if (start > aspacem_maxAddr=20
+ && /* check previous comparison is meaningful */
+ aspacem_maxAddr < Addr_MAX)
+ seg.kind =3D SkResvn;
+ else
+ seg.kind =3D SkFree;
+
add_segment( &seg );
=20
/* Unmapping could create two adjacent free segments, so a preen is
@@ -2984,9 +3003,17 @@
=20
/* Create a free hole in the old location. */
init_nsegment( &seg );
- seg.kind =3D SkFree;
seg.start =3D old_addr;
seg.end =3D old_addr + old_len - 1;
+ /* See comments in VG_(am_notify_munmap) about this SkResvn vs
+ SkFree thing. */
+ if (old_addr > aspacem_maxAddr=20
+ && /* check previous comparison is meaningful */
+ aspacem_maxAddr < Addr_MAX)
+ seg.kind =3D SkResvn;
+ else
+ seg.kind =3D SkFree;
+
add_segment( &seg );
=20
AM_SANITY_CHECK;
|
|
From: <sv...@va...> - 2006-08-16 00:28:30
|
Author: sewardj
Date: 2006-08-16 01:28:25 +0100 (Wed, 16 Aug 2006)
New Revision: 6000
Log:
Regression test for #132146.
Added:
trunk/memcheck/tests/amd64/bug132146.c
trunk/memcheck/tests/amd64/bug132146.stderr.exp
trunk/memcheck/tests/amd64/bug132146.stdout.exp
trunk/memcheck/tests/amd64/bug132146.vgtest
Modified:
trunk/memcheck/tests/amd64/Makefile.am
Modified: trunk/memcheck/tests/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/amd64/Makefile.am 2006-08-13 04:48:25 UTC (rev 5=
999)
+++ trunk/memcheck/tests/amd64/Makefile.am 2006-08-16 00:28:25 UTC (rev 6=
000)
@@ -10,10 +10,11 @@
$(addsuffix .vgtest,$(INSN_TESTS)) \
bt_everything.stderr.exp bt_everything.stdout.exp \
bt_everything.vgtest \
+ bug132146.vgtest bug132146.stderr.exp bug132146.stdout.exp \
more_x87_fp.stderr.exp more_x87_fp.stdout.exp more_x87_fp.vgtest \
sse_memory.stderr.exp sse_memory.stdout.exp sse_memory.vgtest
=20
-check_PROGRAMS =3D bt_everything more_x87_fp sse_memory
+check_PROGRAMS =3D bt_everything bug132146 more_x87_fp sse_memory
=20
AM_CPPFLAGS =3D -I$(top_srcdir)/include
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude
Added: trunk/memcheck/tests/amd64/bug132146.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/amd64/bug132146.c (rev 0=
)
+++ trunk/memcheck/tests/amd64/bug132146.c 2006-08-16 00:28:25 UTC (rev 6=
000)
@@ -0,0 +1,106 @@
+
+#include <stdio.h>
+
+typedef unsigned int UInt;
+typedef unsigned long long ULong;
+
+#if defined(__x86_64__)
+
+#define BSWAPQ(_lval) \
+ do { \
+ __asm__ __volatile__("bswapq %0" \
+ : /*out*/ "+r"(_lval) ); \
+ } while (0)
+
+ULong bswapq ( ULong x )
+{
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x); BSWAPQ(x);
+ BSWAPQ(x);
+ return x;
+}
+
+#endif /* defined(__x86_64__) */
+
+#define BSWAPL(_lval) \
+ do { \
+ __asm__ __volatile__("bswapl %0" \
+ : /*out*/ "+r"(_lval) ); \
+ } while (0)
+
+UInt bswapl ( UInt x )
+{
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x); BSWAPL(x);
+ BSWAPL(x);
+ return x;
+}
+
+int main ( void )
+{
+#if defined(__x86_64__)
+ printf("0x%llx\n", bswapq( 0x8877665544332211ULL ));
+#endif
+ printf("0x%x\n", bswapl( 0x44332211ULL ));
+ return 0;
+}
Added: trunk/memcheck/tests/amd64/bug132146.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Added: trunk/memcheck/tests/amd64/bug132146.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/amd64/bug132146.stdout.exp =
(rev 0)
+++ trunk/memcheck/tests/amd64/bug132146.stdout.exp 2006-08-16 00:28:25 U=
TC (rev 6000)
@@ -0,0 +1,2 @@
+0x1122334455667788
+0x11223344
Added: trunk/memcheck/tests/amd64/bug132146.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/amd64/bug132146.vgtest (=
rev 0)
+++ trunk/memcheck/tests/amd64/bug132146.vgtest 2006-08-16 00:28:25 UTC (=
rev 6000)
@@ -0,0 +1,2 @@
+prog: bug132146
+vgopts: -q
|
|
From: <sv...@va...> - 2006-08-16 00:25:31
|
Author: sewardj
Date: 2006-08-16 01:25:28 +0100 (Wed, 16 Aug 2006)
New Revision: 1638
Log:
Generate less verbose IR for amd64 'bswapq'. Fixes #132146.
Modified:
trunk/priv/guest-amd64/toIR.c
trunk/priv/main/vex_util.c
Modified: trunk/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/toIR.c 2006-08-16 00:23:21 UTC (rev 1637)
+++ trunk/priv/guest-amd64/toIR.c 2006-08-16 00:25:28 UTC (rev 1638)
@@ -13631,7 +13631,7 @@
binop(Iop_Or32,
binop(Iop_Shl32, mkexpr(t1), mkU8(24)),
binop(Iop_Or32,
- binop(Iop_And32, binop(Iop_Shl32, mkexpr(t1), mkU8(8))=
,=20
+ binop(Iop_And32, binop(Iop_Shl32, mkexpr(t1), mkU8(8))=
,
mkU32(0x00FF0000)),
binop(Iop_Or32,
binop(Iop_And32, binop(Iop_Shr32, mkexpr(t1), mkU8(8))=
,
@@ -13645,33 +13645,50 @@
break;
}
else if (sz =3D=3D 8) {
+ IRTemp m8 =3D newTemp(Ity_I64);
+ IRTemp s8 =3D newTemp(Ity_I64);
+ IRTemp m16 =3D newTemp(Ity_I64);
+ IRTemp s16 =3D newTemp(Ity_I64);
+ IRTemp m32 =3D newTemp(Ity_I64);
t1 =3D newTemp(Ity_I64);
t2 =3D newTemp(Ity_I64);
assign( t1, getIRegRexB(8, pfx, opc-0xC8) );
=20
-# define LANE(_nn) \
- binop( Iop_Shl64, \
- binop( Iop_And64, \
- binop(Iop_Shr64, mkexpr(t1), \
- mkU8(8 * (7 - (_nn)))), \
- mkU64(0xFF)), \
- mkU8(8 * (_nn)))
+ assign( m8, mkU64(0xFF00FF00FF00FF00ULL) );
+ assign( s8,
+ binop(Iop_Or64,
+ binop(Iop_Shr64,
+ binop(Iop_And64,mkexpr(t1),mkexpr(m8)),
+ mkU8(8)),
+ binop(Iop_And64,
+ binop(Iop_Shl64,mkexpr(t1),mkU8(8)),
+ mkexpr(m8))
+ )=20
+ );
=20
- assign(=20
- t2,
- binop(Iop_Or64,
- binop(Iop_Or64,
- binop(Iop_Or64,LANE(0),LANE(1)),
- binop(Iop_Or64,LANE(2),LANE(3))
- ),
- binop(Iop_Or64,
- binop(Iop_Or64,LANE(4),LANE(5)),
- binop(Iop_Or64,LANE(6),LANE(7))
- )
- )
- );
+ assign( m16, mkU64(0xFFFF0000FFFF0000ULL) );
+ assign( s16,
+ binop(Iop_Or64,
+ binop(Iop_Shr64,
+ binop(Iop_And64,mkexpr(s8),mkexpr(m16)),
+ mkU8(16)),
+ binop(Iop_And64,
+ binop(Iop_Shl64,mkexpr(s8),mkU8(16)),
+ mkexpr(m16))
+ )=20
+ );
=20
-# undef LANE
+ assign( m32, mkU64(0xFFFFFFFF00000000ULL) );
+ assign( t2,
+ binop(Iop_Or64,
+ binop(Iop_Shr64,
+ binop(Iop_And64,mkexpr(s16),mkexpr(m32))=
,
+ mkU8(32)),
+ binop(Iop_And64,
+ binop(Iop_Shl64,mkexpr(s16),mkU8(32)),
+ mkexpr(m32))
+ )=20
+ );
=20
putIRegRexB(8, pfx, opc-0xC8, mkexpr(t2));
DIP("bswapq %s\n", nameIRegRexB(8, pfx, opc-0xC8));
Modified: trunk/priv/main/vex_util.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/main/vex_util.c 2006-08-16 00:23:21 UTC (rev 1637)
+++ trunk/priv/main/vex_util.c 2006-08-16 00:25:28 UTC (rev 1638)
@@ -62,7 +62,7 @@
MByte/sec. Once the size increases enough to fall out of the cache
into memory, the rate falls by about a factor of 3.=20
*/
-#define N_TEMPORARY_BYTES 2400000
+#define N_TEMPORARY_BYTES 4000000
=20
static HChar temporary[N_TEMPORARY_BYTES] __attribute__((aligned(8)));
static HChar* temporary_first =3D &temporary[0];
|
|
From: <sv...@va...> - 2006-08-16 00:23:27
|
Author: sewardj
Date: 2006-08-16 01:23:21 +0100 (Wed, 16 Aug 2006)
New Revision: 1637
Log:
amd64 insn printing fix.
Modified:
trunk/priv/host-amd64/isel.c
Modified: trunk/priv/host-amd64/isel.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/host-amd64/isel.c 2006-08-04 14:51:19 UTC (rev 1636)
+++ trunk/priv/host-amd64/isel.c 2006-08-16 00:23:21 UTC (rev 1637)
@@ -172,7 +172,7 @@
{
addHInstr(env->code, instr);
if (vex_traceflags & VEX_TRACE_VCODE) {
- ppAMD64Instr(instr, False);
+ ppAMD64Instr(instr, True);
vex_printf("\n");
}
}
|