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
(1) |
2
(4) |
3
(3) |
4
(6) |
5
(14) |
6
(10) |
7
(4) |
|
8
(2) |
9
(4) |
10
(7) |
11
(8) |
12
(5) |
13
(11) |
14
(4) |
|
15
(4) |
16
(9) |
17
(6) |
18
|
19
|
20
|
21
|
|
22
(3) |
23
(1) |
24
(7) |
25
(12) |
26
(8) |
27
(13) |
28
(4) |
|
29
(3) |
30
(4) |
|
|
|
|
|
|
From: <sv...@va...> - 2009-11-26 17:20:33
|
Author: sewardj
Date: 2009-11-26 17:20:21 +0000 (Thu, 26 Nov 2009)
New Revision: 10957
Log:
Track vex r1930 (Change the IR representation of load linked and store
conditional.) Completes the fix of #215771.
Modified:
trunk/cachegrind/cg_main.c
trunk/callgrind/main.c
trunk/drd/drd_load_store.c
trunk/exp-ptrcheck/h_main.c
trunk/helgrind/hg_main.c
trunk/lackey/lk_main.c
trunk/massif/ms_main.c
trunk/memcheck/mc_translate.c
Modified: trunk/cachegrind/cg_main.c
===================================================================
--- trunk/cachegrind/cg_main.c 2009-11-25 13:57:47 UTC (rev 10956)
+++ trunk/cachegrind/cg_main.c 2009-11-26 17:20:21 UTC (rev 10957)
@@ -1053,6 +1053,22 @@
break;
}
+ case Ist_LLSC: {
+ IRType dataTy;
+ if (st->Ist.LLSC.storedata == NULL) {
+ /* LL */
+ dataTy = typeOfIRTemp(tyenv, st->Ist.LLSC.result);
+ addEvent_Dr( &cgs, curr_inode,
+ sizeofIRType(dataTy), st->Ist.LLSC.addr );
+ } else {
+ /* SC */
+ dataTy = typeOfIRExpr(tyenv, st->Ist.LLSC.storedata);
+ addEvent_Dw( &cgs, curr_inode,
+ sizeofIRType(dataTy), st->Ist.LLSC.addr );
+ }
+ break;
+ }
+
case Ist_Exit: {
/* Stuff to widen the guard expression to a host word, so
we can pass it to the branch predictor simulation
Modified: trunk/callgrind/main.c
===================================================================
--- trunk/callgrind/main.c 2009-11-25 13:57:47 UTC (rev 10956)
+++ trunk/callgrind/main.c 2009-11-26 17:20:21 UTC (rev 10957)
@@ -657,14 +657,8 @@
static
void addConstMemStoreStmt( IRSB* bbOut, UWord addr, UInt val, IRType hWordTy)
{
- /* JRS 2009june01: re IRTemp_INVALID, am assuming that this
- function is used only to create instrumentation, and not to
- copy/reconstruct IRStmt_Stores that were in the incoming IR
- superblock. If that is not a correct assumption, then things
- will break badly on PowerPC, esp w/ threaded apps. */
addStmtToIRSB( bbOut,
IRStmt_Store(CLGEndness,
- IRTemp_INVALID,
IRExpr_Const(hWordTy == Ity_I32 ?
IRConst_U32( addr ) :
IRConst_U64( addr )),
@@ -864,8 +858,24 @@
addEvent_Dw( &clgs, curr_inode, dataSize, cas->addr );
break;
}
-
- case Ist_Exit: {
+
+ case Ist_LLSC: {
+ IRType dataTy;
+ if (st->Ist.LLSC.storedata == NULL) {
+ /* LL */
+ dataTy = typeOfIRTemp(sbIn->tyenv, st->Ist.LLSC.result);
+ addEvent_Dr( &clgs, curr_inode,
+ sizeofIRType(dataTy), st->Ist.LLSC.addr );
+ } else {
+ /* SC */
+ dataTy = typeOfIRExpr(sbIn->tyenv, st->Ist.LLSC.storedata);
+ addEvent_Dw( &clgs, curr_inode,
+ sizeofIRType(dataTy), st->Ist.LLSC.addr );
+ }
+ break;
+ }
+
+ case Ist_Exit: {
UInt jmps_passed;
/* We may never reach the next statement, so need to flush
Modified: trunk/drd/drd_load_store.c
===================================================================
--- trunk/drd/drd_load_store.c 2009-11-25 13:57:47 UTC (rev 10956)
+++ trunk/drd/drd_load_store.c 2009-11-26 17:20:21 UTC (rev 10957)
@@ -460,8 +460,7 @@
{
IRStmt* const st = bb_in->stmts[i];
tl_assert(st);
- if (st->tag == Ist_NoOp)
- continue;
+ tl_assert(isFlatIRStmt(st));
switch (st->tag)
{
@@ -489,8 +488,7 @@
break;
case Ist_Store:
- if (instrument && /* ignore stores resulting from st{d,w}cx. */
- st->Ist.Store.resSC == IRTemp_INVALID)
+ if (instrument)
{
instrument_store(bb,
st->Ist.Store.addr,
@@ -576,10 +574,42 @@
addStmtToIRSB(bb, st);
break;
- default:
+ case Ist_LLSC: {
+ /* Ignore store-conditionals, and handle load-linked's
+ exactly like normal loads. */
+ IRType dataTy;
+ if (st->Ist.LLSC.storedata == NULL)
+ {
+ /* LL */
+ dataTy = typeOfIRTemp(bb_in->tyenv, st->Ist.LLSC.result);
+ if (instrument) {
+ instrument_load(bb,
+ st->Ist.LLSC.addr,
+ sizeofIRType(dataTy));
+ }
+ }
+ else
+ {
+ /* SC */
+ /*ignore */
+ }
addStmtToIRSB(bb, st);
break;
}
+
+ case Ist_NoOp:
+ case Ist_AbiHint:
+ case Ist_Put:
+ case Ist_PutI:
+ case Ist_Exit:
+ /* None of these can contain any memory references. */
+ addStmtToIRSB(bb, st);
+ break;
+
+ default:
+ ppIRStmt(st);
+ tl_assert(0);
+ }
}
return bb;
Modified: trunk/exp-ptrcheck/h_main.c
===================================================================
--- trunk/exp-ptrcheck/h_main.c 2009-11-25 13:57:47 UTC (rev 10956)
+++ trunk/exp-ptrcheck/h_main.c 2009-11-26 17:20:21 UTC (rev 10957)
@@ -4332,6 +4332,323 @@
}
}
+
+/* schemeS helper for doing stores, pulled out into a function because
+ it needs to handle both normal stores and store-conditionals.
+ Returns False if we see a case we don't know how to handle.
+*/
+static Bool schemeS_store ( PCEnv* pce,
+ IRExpr* data, IRExpr* addr, IRTemp resSC )
+{
+ /* We have: STle(addr) = data
+ if data is int-word sized, do
+ check_store4(addr, addr#, data, data#)
+ for all other stores
+ check_store{1,2}(addr, addr#, data)
+
+ The helper actually *does* the store, so that it can do the
+ post-hoc ugly hack of inspecting and "improving" the shadow data
+ after the store, in the case where it isn't an aligned word
+ store.
+
+ Only word-sized values are shadowed. If this is a
+ store-conditional, .resSC will denote a non-word-typed temp, and
+ so we don't need to shadow it. Assert about the type, tho.
+ However, since we're not re-emitting the original IRStmt_Store,
+ but rather doing it as part of the helper function, we need to
+ actually do a SC in the helper, and assign the result bit to
+ .resSC. Ugly.
+ */
+ IRType d_ty = typeOfIRExpr(pce->sb->tyenv, data);
+ IRExpr* addrv = schemeEw_Atom( pce, addr );
+ if (resSC != IRTemp_INVALID) {
+ tl_assert(typeOfIRTemp(pce->sb->tyenv, resSC) == Ity_I1);
+ /* viz, not something we want to shadow */
+ /* also, throw out all store-conditional cases that
+ we can't handle */
+ if (pce->gWordTy == Ity_I32 && d_ty != Ity_I32)
+ return False;
+ if (pce->gWordTy == Ity_I64 && d_ty != Ity_I32 && d_ty != Ity_I64)
+ return False;
+ }
+ if (pce->gWordTy == Ity_I32) {
+ /* ------ 32 bit host/guest (cough, cough) ------ */
+ switch (d_ty) {
+ /* Integer word case */
+ case Ity_I32: {
+ IRExpr* datav = schemeEw_Atom( pce, data );
+ if (resSC == IRTemp_INVALID) {
+ /* "normal" store */
+ gen_dirty_v_WWWW( pce,
+ &check_store4_P, "check_store4_P",
+ addr, addrv, data, datav );
+ } else {
+ /* store-conditional; need to snarf the success bit */
+ IRTemp resSC32
+ = gen_dirty_W_WWWW( pce,
+ &check_store4C_P,
+ "check_store4C_P",
+ addr, addrv, data, datav );
+ /* presumably resSC32 will really be Ity_I32. In
+ any case we'll get jumped by the IR sanity
+ checker if it's not, when it sees the
+ following statement. */
+ assign( 'I', pce, resSC, unop(Iop_32to1, mkexpr(resSC32)) );
+ }
+ break;
+ }
+ /* Integer subword cases */
+ case Ity_I16:
+ gen_dirty_v_WWW( pce,
+ &check_store2, "check_store2",
+ addr, addrv,
+ uwiden_to_host_word( pce, data ));
+ break;
+ case Ity_I8:
+ gen_dirty_v_WWW( pce,
+ &check_store1, "check_store1",
+ addr, addrv,
+ uwiden_to_host_word( pce, data ));
+ break;
+ /* 64-bit float. Pass store data in 2 32-bit pieces. */
+ case Ity_F64: {
+ IRAtom* d64 = assignNew( 'I', pce, Ity_I64,
+ unop(Iop_ReinterpF64asI64, data) );
+ IRAtom* dLo32 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_64to32, d64) );
+ IRAtom* dHi32 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_64HIto32, d64) );
+ gen_dirty_v_WWWW( pce,
+ &check_store8_ms4B_ls4B,
+ "check_store8_ms4B_ls4B",
+ addr, addrv, dHi32, dLo32 );
+ break;
+ }
+ /* 32-bit float. We can just use _store4, but need
+ to futz with the argument type. */
+ case Ity_F32: {
+ IRAtom* i32 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_ReinterpF32asI32,
+ data ) );
+ gen_dirty_v_WWW( pce,
+ &check_store4,
+ "check_store4",
+ addr, addrv, i32 );
+ break;
+ }
+ /* 64-bit int. Pass store data in 2 32-bit pieces. */
+ case Ity_I64: {
+ IRAtom* dLo32 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_64to32, data) );
+ IRAtom* dHi32 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_64HIto32, data) );
+ gen_dirty_v_WWWW( pce,
+ &check_store8_ms4B_ls4B,
+ "check_store8_ms4B_ls4B",
+ addr, addrv, dHi32, dLo32 );
+ break;
+ }
+ /* 128-bit vector. Pass store data in 4 32-bit pieces.
+ This is all very ugly and inefficient, but it is
+ hard to better without considerably complicating the
+ store-handling schemes. */
+ case Ity_V128: {
+ IRAtom* dHi64 = assignNew( 'I', pce, Ity_I64,
+ unop(Iop_V128HIto64, data) );
+ IRAtom* dLo64 = assignNew( 'I', pce, Ity_I64,
+ unop(Iop_V128to64, data) );
+ IRAtom* w3 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_64HIto32, dHi64) );
+ IRAtom* w2 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_64to32, dHi64) );
+ IRAtom* w1 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_64HIto32, dLo64) );
+ IRAtom* w0 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_64to32, dLo64) );
+ gen_dirty_v_6W( pce,
+ &check_store16_ms4B_4B_4B_ls4B,
+ "check_store16_ms4B_4B_4B_ls4B",
+ addr, addrv, w3, w2, w1, w0 );
+ break;
+ }
+ default:
+ ppIRType(d_ty); tl_assert(0);
+ }
+ } else {
+ /* ------ 64 bit host/guest (cough, cough) ------ */
+ switch (d_ty) {
+ /* Integer word case */
+ case Ity_I64: {
+ IRExpr* datav = schemeEw_Atom( pce, data );
+ if (resSC == IRTemp_INVALID) {
+ /* "normal" store */
+ gen_dirty_v_WWWW( pce,
+ &check_store8_P, "check_store8_P",
+ addr, addrv, data, datav );
+ } else {
+ IRTemp resSC64
+ = gen_dirty_W_WWWW( pce,
+ &check_store8C_P,
+ "check_store8C_P",
+ addr, addrv, data, datav );
+ assign( 'I', pce, resSC, unop(Iop_64to1, mkexpr(resSC64)) );
+ }
+ break;
+ }
+ /* Integer subword cases */
+ case Ity_I32:
+ if (resSC == IRTemp_INVALID) {
+ /* "normal" store */
+ gen_dirty_v_WWW( pce,
+ &check_store4, "check_store4",
+ addr, addrv,
+ uwiden_to_host_word( pce, data ));
+ } else {
+ /* store-conditional; need to snarf the success bit */
+ IRTemp resSC64
+ = gen_dirty_W_WWW( pce,
+ &check_store4C,
+ "check_store4C",
+ addr, addrv,
+ uwiden_to_host_word( pce, data ));
+ assign( 'I', pce, resSC, unop(Iop_64to1, mkexpr(resSC64)) );
+ }
+ break;
+ case Ity_I16:
+ gen_dirty_v_WWW( pce,
+ &check_store2, "check_store2",
+ addr, addrv,
+ uwiden_to_host_word( pce, data ));
+ break;
+ case Ity_I8:
+ gen_dirty_v_WWW( pce,
+ &check_store1, "check_store1",
+ addr, addrv,
+ uwiden_to_host_word( pce, data ));
+ break;
+ /* 128-bit vector. Pass store data in 2 64-bit pieces. */
+ case Ity_V128: {
+ IRAtom* dHi64 = assignNew( 'I', pce, Ity_I64,
+ unop(Iop_V128HIto64, data) );
+ IRAtom* dLo64 = assignNew( 'I', pce, Ity_I64,
+ unop(Iop_V128to64, data) );
+ gen_dirty_v_WWWW( pce,
+ &check_store16_ms8B_ls8B,
+ "check_store16_ms8B_ls8B",
+ addr, addrv, dHi64, dLo64 );
+ break;
+ }
+ /* 64-bit float. */
+ case Ity_F64: {
+ IRAtom* dI = assignNew( 'I', pce, Ity_I64,
+ unop(Iop_ReinterpF64asI64,
+ data ) );
+ gen_dirty_v_WWW( pce,
+ &check_store8_all8B,
+ "check_store8_all8B",
+ addr, addrv, dI );
+ break;
+ }
+ /* 32-bit float. We can just use _store4, but need
+ to futz with the argument type. */
+ case Ity_F32: {
+ IRAtom* i32 = assignNew( 'I', pce, Ity_I32,
+ unop(Iop_ReinterpF32asI32,
+ data ) );
+ IRAtom* i64 = assignNew( 'I', pce, Ity_I64,
+ unop(Iop_32Uto64,
+ i32 ) );
+ gen_dirty_v_WWW( pce,
+ &check_store4,
+ "check_store4",
+ addr, addrv, i64 );
+ break;
+ }
+ default:
+ ppIRType(d_ty); tl_assert(0);
+ }
+ }
+ /* And don't copy the original, since the helper does the store.
+ Ick. */
+ return True; /* store was successfully instrumented */
+}
+
+
+/* schemeS helper for doing loads, pulled out into a function because
+ it needs to handle both normal loads and load-linked's.
+*/
+static void schemeS_load ( PCEnv* pce, IRExpr* addr, IRType e_ty, IRTemp dstv )
+{
+ HChar* h_nm = NULL;
+ void* h_fn = NULL;
+ IRExpr* addrv = NULL;
+ if (e_ty == pce->gWordTy) {
+ tl_assert(dstv != IRTemp_INVALID);
+ } else {
+ tl_assert(dstv == IRTemp_INVALID);
+ }
+ if (pce->gWordTy == Ity_I32) {
+ /* 32 bit host/guest (cough, cough) */
+ switch (e_ty) {
+ /* Ity_I32: helper returns shadow value. */
+ case Ity_I32: h_fn = &check_load4_P;
+ h_nm = "check_load4_P"; break;
+ /* all others: helper does not return a shadow
+ value. */
+ case Ity_V128: h_fn = &check_load16;
+ h_nm = "check_load16"; break;
+ case Ity_I64:
+ case Ity_F64: h_fn = &check_load8;
+ h_nm = "check_load8"; break;
+ case Ity_F32: h_fn = &check_load4;
+ h_nm = "check_load4"; break;
+ case Ity_I16: h_fn = &check_load2;
+ h_nm = "check_load2"; break;
+ case Ity_I8: h_fn = &check_load1;
+ h_nm = "check_load1"; break;
+ default: ppIRType(e_ty); tl_assert(0);
+ }
+ addrv = schemeEw_Atom( pce, addr );
+ if (e_ty == Ity_I32) {
+ assign( 'I', pce, dstv,
+ mkexpr( gen_dirty_W_WW( pce, h_fn, h_nm,
+ addr, addrv )) );
+ } else {
+ gen_dirty_v_WW( pce, NULL, h_fn, h_nm, addr, addrv );
+ }
+ } else {
+ /* 64 bit host/guest (cough, cough) */
+ switch (e_ty) {
+ /* Ity_I64: helper returns shadow value. */
+ case Ity_I64: h_fn = &check_load8_P;
+ h_nm = "check_load8_P"; break;
+ /* all others: helper does not return a shadow
+ value. */
+ case Ity_V128: h_fn = &check_load16;
+ h_nm = "check_load16"; break;
+ case Ity_F64: h_fn = &check_load8;
+ h_nm = "check_load8"; break;
+ case Ity_F32:
+ case Ity_I32: h_fn = &check_load4;
+ h_nm = "check_load4"; break;
+ case Ity_I16: h_fn = &check_load2;
+ h_nm = "check_load2"; break;
+ case Ity_I8: h_fn = &check_load1;
+ h_nm = "check_load1"; break;
+ default: ppIRType(e_ty); tl_assert(0);
+ }
+ addrv = schemeEw_Atom( pce, addr );
+ if (e_ty == Ity_I64) {
+ assign( 'I', pce, dstv,
+ mkexpr( gen_dirty_W_WW( pce, h_fn, h_nm,
+ addr, addrv )) );
+ } else {
+ gen_dirty_v_WW( pce, NULL, h_fn, h_nm, addr, addrv );
+ }
+ }
+}
+
+
/* Generate into 'pce', instrumentation for 'st'. Also copy 'st'
itself into 'pce' (the caller does not do so). This is somewhat
complex and relies heavily on the assumption that the incoming IR
@@ -4571,6 +4888,29 @@
break;
}
+ case Ist_LLSC: {
+ if (st->Ist.LLSC.storedata == NULL) {
+ /* LL */
+ IRTemp dst = st->Ist.LLSC.result;
+ IRType dataTy = typeOfIRTemp(pce->sb->tyenv, dst);
+ Bool isWord = dataTy == pce->gWordTy;
+ IRTemp dstv = isWord ? newShadowTmp( pce, dst )
+ : IRTemp_INVALID;
+ schemeS_load( pce, st->Ist.LLSC.addr, dataTy, dstv );
+ /* copy the original -- must happen after the helper call */
+ stmt( 'C', pce, st );
+ } else {
+ /* SC */
+ schemeS_store( pce,
+ st->Ist.LLSC.storedata,
+ st->Ist.LLSC.addr,
+ st->Ist.LLSC.result );
+ /* Don't copy the original, since the helper does the
+ store itself. */
+ }
+ break;
+ }
+
case Ist_Dirty: {
Int i;
IRDirty* di;
@@ -4702,244 +5042,15 @@
} /* case Ist_Put */
case Ist_Store: {
- /* We have: STle(addr) = data
- if data is int-word sized, do
- check_store4(addr, addr#, data, data#)
- for all other stores
- check_store{1,2}(addr, addr#, data)
-
- The helper actually *does* the store, so that it can do
- the post-hoc ugly hack of inspecting and "improving" the
- shadow data after the store, in the case where it isn't an
- aligned word store.
-
- Only word-sized values are shadowed. If this is a
- store-conditional, .resSC will denote a non-word-typed
- temp, and so we don't need to shadow it. Assert about the
- type, tho. However, since we're not re-emitting the
- original IRStmt_Store, but rather doing it as part of the
- helper function, we need to actually do a SC in the
- helper, and assign the result bit to .resSC. Ugly.
- */
- IRExpr* data = st->Ist.Store.data;
- IRExpr* addr = st->Ist.Store.addr;
- IRType d_ty = typeOfIRExpr(pce->sb->tyenv, data);
- IRExpr* addrv = schemeEw_Atom( pce, addr );
- IRTemp resSC = st->Ist.Store.resSC;
- if (resSC != IRTemp_INVALID) {
- tl_assert(typeOfIRTemp(pce->sb->tyenv, resSC) == Ity_I1);
- /* viz, not something we want to shadow */
- /* also, throw out all store-conditional cases that
- we can't handle */
- if (pce->gWordTy == Ity_I32 && d_ty != Ity_I32)
- goto unhandled;
- if (pce->gWordTy == Ity_I64 && d_ty != Ity_I32 && d_ty != Ity_I64)
- goto unhandled;
- }
- if (pce->gWordTy == Ity_I32) {
- /* ------ 32 bit host/guest (cough, cough) ------ */
- switch (d_ty) {
- /* Integer word case */
- case Ity_I32: {
- IRExpr* datav = schemeEw_Atom( pce, data );
- if (resSC == IRTemp_INVALID) {
- /* "normal" store */
- gen_dirty_v_WWWW( pce,
- &check_store4_P, "check_store4_P",
- addr, addrv, data, datav );
- } else {
- /* store-conditional; need to snarf the success bit */
- IRTemp resSC32
- = gen_dirty_W_WWWW( pce,
- &check_store4C_P,
- "check_store4C_P",
- addr, addrv, data, datav );
- /* presumably resSC32 will really be Ity_I32. In
- any case we'll get jumped by the IR sanity
- checker if it's not, when it sees the
- following statement. */
- assign( 'I', pce, resSC, unop(Iop_32to1, mkexpr(resSC32)) );
- }
- break;
- }
- /* Integer subword cases */
- case Ity_I16:
- gen_dirty_v_WWW( pce,
- &check_store2, "check_store2",
- addr, addrv,
- uwiden_to_host_word( pce, data ));
- break;
- case Ity_I8:
- gen_dirty_v_WWW( pce,
- &check_store1, "check_store1",
- addr, addrv,
- uwiden_to_host_word( pce, data ));
- break;
- /* 64-bit float. Pass store data in 2 32-bit pieces. */
- case Ity_F64: {
- IRAtom* d64 = assignNew( 'I', pce, Ity_I64,
- unop(Iop_ReinterpF64asI64, data) );
- IRAtom* dLo32 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_64to32, d64) );
- IRAtom* dHi32 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_64HIto32, d64) );
- gen_dirty_v_WWWW( pce,
- &check_store8_ms4B_ls4B,
- "check_store8_ms4B_ls4B",
- addr, addrv, dHi32, dLo32 );
- break;
- }
- /* 32-bit float. We can just use _store4, but need
- to futz with the argument type. */
- case Ity_F32: {
- IRAtom* i32 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_ReinterpF32asI32,
- data ) );
- gen_dirty_v_WWW( pce,
- &check_store4,
- "check_store4",
- addr, addrv, i32 );
- break;
- }
- /* 64-bit int. Pass store data in 2 32-bit pieces. */
- case Ity_I64: {
- IRAtom* dLo32 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_64to32, data) );
- IRAtom* dHi32 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_64HIto32, data) );
- gen_dirty_v_WWWW( pce,
- &check_store8_ms4B_ls4B,
- "check_store8_ms4B_ls4B",
- addr, addrv, dHi32, dLo32 );
- break;
- }
-
- /* 128-bit vector. Pass store data in 4 32-bit pieces.
- This is all very ugly and inefficient, but it is
- hard to better without considerably complicating the
- store-handling schemes. */
- case Ity_V128: {
- IRAtom* dHi64 = assignNew( 'I', pce, Ity_I64,
- unop(Iop_V128HIto64, data) );
- IRAtom* dLo64 = assignNew( 'I', pce, Ity_I64,
- unop(Iop_V128to64, data) );
- IRAtom* w3 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_64HIto32, dHi64) );
- IRAtom* w2 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_64to32, dHi64) );
- IRAtom* w1 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_64HIto32, dLo64) );
- IRAtom* w0 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_64to32, dLo64) );
- gen_dirty_v_6W( pce,
- &check_store16_ms4B_4B_4B_ls4B,
- "check_store16_ms4B_4B_4B_ls4B",
- addr, addrv, w3, w2, w1, w0 );
- break;
- }
-
-
- default:
- ppIRType(d_ty); tl_assert(0);
- }
- } else {
- /* ------ 64 bit host/guest (cough, cough) ------ */
- switch (d_ty) {
- /* Integer word case */
- case Ity_I64: {
- IRExpr* datav = schemeEw_Atom( pce, data );
- if (resSC == IRTemp_INVALID) {
- /* "normal" store */
- gen_dirty_v_WWWW( pce,
- &check_store8_P, "check_store8_P",
- addr, addrv, data, datav );
- } else {
- IRTemp resSC64
- = gen_dirty_W_WWWW( pce,
- &check_store8C_P,
- "check_store8C_P",
- addr, addrv, data, datav );
- assign( 'I', pce, resSC, unop(Iop_64to1, mkexpr(resSC64)) );
- }
- break;
- }
- /* Integer subword cases */
- case Ity_I32:
- if (resSC == IRTemp_INVALID) {
- /* "normal" store */
- gen_dirty_v_WWW( pce,
- &check_store4, "check_store4",
- addr, addrv,
- uwiden_to_host_word( pce, data ));
- } else {
- /* store-conditional; need to snarf the success bit */
- IRTemp resSC64
- = gen_dirty_W_WWW( pce,
- &check_store4C,
- "check_store4C",
- addr, addrv,
- uwiden_to_host_word( pce, data ));
- assign( 'I', pce, resSC, unop(Iop_64to1, mkexpr(resSC64)) );
- }
- break;
- case Ity_I16:
- gen_dirty_v_WWW( pce,
- &check_store2, "check_store2",
- addr, addrv,
- uwiden_to_host_word( pce, data ));
- break;
- case Ity_I8:
- gen_dirty_v_WWW( pce,
- &check_store1, "check_store1",
- addr, addrv,
- uwiden_to_host_word( pce, data ));
- break;
- /* 128-bit vector. Pass store data in 2 64-bit pieces. */
- case Ity_V128: {
- IRAtom* dHi64 = assignNew( 'I', pce, Ity_I64,
- unop(Iop_V128HIto64, data) );
- IRAtom* dLo64 = assignNew( 'I', pce, Ity_I64,
- unop(Iop_V128to64, data) );
- gen_dirty_v_WWWW( pce,
- &check_store16_ms8B_ls8B,
- "check_store16_ms8B_ls8B",
- addr, addrv, dHi64, dLo64 );
- break;
- }
- /* 64-bit float. */
- case Ity_F64: {
- IRAtom* dI = assignNew( 'I', pce, Ity_I64,
- unop(Iop_ReinterpF64asI64,
- data ) );
- gen_dirty_v_WWW( pce,
- &check_store8_all8B,
- "check_store8_all8B",
- addr, addrv, dI );
- break;
- }
- /* 32-bit float. We can just use _store4, but need
- to futz with the argument type. */
- case Ity_F32: {
- IRAtom* i32 = assignNew( 'I', pce, Ity_I32,
- unop(Iop_ReinterpF32asI32,
- data ) );
- IRAtom* i64 = assignNew( 'I', pce, Ity_I64,
- unop(Iop_32Uto64,
- i32 ) );
- gen_dirty_v_WWW( pce,
- &check_store4,
- "check_store4",
- addr, addrv, i64 );
- break;
- }
- default:
- ppIRType(d_ty); tl_assert(0);
- }
- }
- /* And don't copy the original, since the helper does the
- store. Ick. */
+ Bool ok = schemeS_store( pce,
+ st->Ist.Store.data,
+ st->Ist.Store.addr,
+ IRTemp_INVALID/*not a SC*/ );
+ if (!ok) goto unhandled;
+ /* Don't copy the original, since the helper does the store
+ itself. */
break;
- } /* case Ist_Store */
+ }
case Ist_WrTmp: {
/* This is the only place we have to deal with the full
@@ -4992,69 +5103,7 @@
}
case Iex_Load: {
- IRExpr* addr = e->Iex.Load.addr;
- HChar* h_nm = NULL;
- void* h_fn = NULL;
- IRExpr* addrv = NULL;
- if (pce->gWordTy == Ity_I32) {
- /* 32 bit host/guest (cough, cough) */
- switch (e_ty) {
- /* Ity_I32: helper returns shadow value. */
- case Ity_I32: h_fn = &check_load4_P;
- h_nm = "check_load4_P"; break;
- /* all others: helper does not return a shadow
- value. */
- case Ity_V128: h_fn = &check_load16;
- h_nm = "check_load16"; break;
- case Ity_I64:
- case Ity_F64: h_fn = &check_load8;
- h_nm = "check_load8"; break;
- case Ity_F32: h_fn = &check_load4;
- h_nm = "check_load4"; break;
- case Ity_I16: h_fn = &check_load2;
- h_nm = "check_load2"; break;
- case Ity_I8: h_fn = &check_load1;
- h_nm = "check_load1"; break;
- default: ppIRType(e_ty); tl_assert(0);
- }
- addrv = schemeEw_Atom( pce, addr );
- if (e_ty == Ity_I32) {
- assign( 'I', pce, dstv,
- mkexpr( gen_dirty_W_WW( pce, h_fn, h_nm,
- addr, addrv )) );
- } else {
- gen_dirty_v_WW( pce, NULL, h_fn, h_nm, addr, addrv );
- }
- } else {
- /* 64 bit host/guest (cough, cough) */
- switch (e_ty) {
- /* Ity_I64: helper returns shadow value. */
- case Ity_I64: h_fn = &check_load8_P;
- h_nm = "check_load8_P"; break;
- /* all others: helper does not return a shadow
- value. */
- case Ity_V128: h_fn = &check_load16;
- h_nm = "check_load16"; break;
- case Ity_F64: h_fn = &check_load8;
- h_nm = "check_load8"; break;
- case Ity_F32:
- case Ity_I32: h_fn = &check_load4;
- h_nm = "check_load4"; break;
- case Ity_I16: h_fn = &check_load2;
- h_nm = "check_load2"; break;
- case Ity_I8: h_fn = &check_load1;
- h_nm = "check_load1"; break;
- default: ppIRType(e_ty); tl_assert(0);
- }
- addrv = schemeEw_Atom( pce, addr );
- if (e_ty == Ity_I64) {
- assign( 'I', pce, dstv,
- mkexpr( gen_dirty_W_WW( pce, h_fn, h_nm,
- addr, addrv )) );
- } else {
- gen_dirty_v_WW( pce, NULL, h_fn, h_nm, addr, addrv );
- }
- }
+ schemeS_load( pce, e->Iex.Load.addr, e_ty, dstv );
/* copy the original -- must happen after the helper call */
stmt( 'C', pce, st );
break;
Modified: trunk/helgrind/hg_main.c
===================================================================
--- trunk/helgrind/hg_main.c 2009-11-25 13:57:47 UTC (rev 10956)
+++ trunk/helgrind/hg_main.c 2009-11-26 17:20:21 UTC (rev 10957)
@@ -4008,22 +4008,44 @@
break;
}
- case Ist_Store:
- /* It seems we pretend that store-conditionals don't
- exist, viz, just ignore them ... */
- if (st->Ist.Store.resSC == IRTemp_INVALID) {
+ case Ist_LLSC: {
+ /* We pretend store-conditionals don't exist, viz, ignore
+ them. Whereas load-linked's are treated the same as
+ normal loads. */
+ IRType dataTy;
+ if (st->Ist.LLSC.storedata == NULL) {
+ /* LL */
+ dataTy = typeOfIRTemp(bbIn->tyenv, st->Ist.LLSC.result);
if (!inLDSO) {
- instrument_mem_access(
- bbOut,
- st->Ist.Store.addr,
- sizeofIRType(typeOfIRExpr(bbIn->tyenv, st->Ist.Store.data)),
- True/*isStore*/,
+ instrument_mem_access(
+ bbOut,
+ st->Ist.LLSC.addr,
+ sizeofIRType(dataTy),
+ False/*!isStore*/,
sizeofIRType(hWordTy)
);
}
+ } else {
+ /* SC */
+ /*ignore */
}
break;
+ }
+ case Ist_Store:
+ /* It seems we pretend that store-conditionals don't
+ exist, viz, just ignore them ... */
+ if (!inLDSO) {
+ instrument_mem_access(
+ bbOut,
+ st->Ist.Store.addr,
+ sizeofIRType(typeOfIRExpr(bbIn->tyenv, st->Ist.Store.data)),
+ True/*isStore*/,
+ sizeofIRType(hWordTy)
+ );
+ }
+ break;
+
case Ist_WrTmp: {
/* ... whereas here we don't care whether a load is a
vanilla one or a load-linked. */
Modified: trunk/lackey/lk_main.c
===================================================================
--- trunk/lackey/lk_main.c 2009-11-25 13:57:47 UTC (rev 10956)
+++ trunk/lackey/lk_main.c 2009-11-26 17:20:21 UTC (rev 10957)
@@ -790,21 +790,54 @@
was introduced, since prior to that point, the Vex
front ends would translate a lock-prefixed instruction
into a (normal) read followed by a (normal) write. */
+ Int dataSize;
+ IRType dataTy;
+ IRCAS* cas = st->Ist.CAS.details;
+ tl_assert(cas->addr != NULL);
+ tl_assert(cas->dataLo != NULL);
+ dataTy = typeOfIRExpr(tyenv, cas->dataLo);
+ dataSize = sizeofIRType(dataTy);
+ if (cas->dataHi != NULL)
+ dataSize *= 2; /* since it's a doubleword-CAS */
if (clo_trace_mem) {
- Int dataSize;
- IRCAS* cas = st->Ist.CAS.details;
- tl_assert(cas->addr != NULL);
- tl_assert(cas->dataLo != NULL);
- dataSize = sizeofIRType(typeOfIRExpr(tyenv, cas->dataLo));
- if (cas->dataHi != NULL)
- dataSize *= 2; /* since it's a doubleword-CAS */
addEvent_Dr( sbOut, cas->addr, dataSize );
addEvent_Dw( sbOut, cas->addr, dataSize );
}
+ if (clo_detailed_counts) {
+ instrument_detail( sbOut, OpLoad, dataTy );
+ if (cas->dataHi != NULL) /* dcas */
+ instrument_detail( sbOut, OpLoad, dataTy );
+ instrument_detail( sbOut, OpStore, dataTy );
+ if (cas->dataHi != NULL) /* dcas */
+ instrument_detail( sbOut, OpStore, dataTy );
+ }
addStmtToIRSB( sbOut, st );
break;
}
+ case Ist_LLSC: {
+ IRType dataTy;
+ if (st->Ist.LLSC.storedata == NULL) {
+ /* LL */
+ dataTy = typeOfIRTemp(tyenv, st->Ist.LLSC.result);
+ if (clo_trace_mem)
+ addEvent_Dr( sbOut, st->Ist.LLSC.addr,
+ sizeofIRType(dataTy) );
+ if (clo_detailed_counts)
+ instrument_detail( sbOut, OpLoad, dataTy );
+ } else {
+ /* SC */
+ dataTy = typeOfIRExpr(tyenv, st->Ist.LLSC.storedata);
+ if (clo_trace_mem)
+ addEvent_Dw( sbOut, st->Ist.LLSC.addr,
+ sizeofIRType(dataTy) );
+ if (clo_detailed_counts)
+ instrument_detail( sbOut, OpStore, dataTy );
+ }
+ addStmtToIRSB( sbOut, st );
+ break;
+ }
+
case Ist_Exit:
if (clo_basic_counts) {
// The condition of a branch was inverted by VEX if a taken
@@ -821,7 +854,8 @@
mkIRExprVec_0() );
else
di = unsafeIRDirty_0_N( 0, "add_one_inverted_Jcc",
- VG_(fnptr_to_fnentry)( &add_one_inverted_Jcc ),
+ VG_(fnptr_to_fnentry)(
+ &add_one_inverted_Jcc ),
mkIRExprVec_0() );
addStmtToIRSB( sbOut, IRStmt_Dirty(di) );
Modified: trunk/massif/ms_main.c
===================================================================
--- trunk/massif/ms_main.c 2009-11-25 13:57:47 UTC (rev 10956)
+++ trunk/massif/ms_main.c 2009-11-26 17:20:21 UTC (rev 10957)
@@ -1903,14 +1903,12 @@
IRTemp t2 = newIRTemp(sbOut->tyenv, Ity_I64);
IRExpr* counter_addr = mkIRExpr_HWord( (HWord)&guest_instrs_executed );
- IRStmt* st1 = IRStmt_WrTmp(t1, IRExpr_Load(False/*!isLL*/,
- END, Ity_I64, counter_addr));
+ IRStmt* st1 = IRStmt_WrTmp(t1, IRExpr_Load(END, Ity_I64, counter_addr));
IRStmt* st2 =
IRStmt_WrTmp(t2,
IRExpr_Binop(Iop_Add64, IRExpr_RdTmp(t1),
IRExpr_Const(IRConst_U64(n))));
- IRStmt* st3 = IRStmt_Store(END, IRTemp_INVALID/*"not store-conditional"*/,
- counter_addr, IRExpr_RdTmp(t2));
+ IRStmt* st3 = IRStmt_Store(END, counter_addr, IRExpr_RdTmp(t2));
addStmtToIRSB( sbOut, st1 );
addStmtToIRSB( sbOut, st2 );
Modified: trunk/memcheck/mc_translate.c
===================================================================
--- trunk/memcheck/mc_translate.c 2009-11-25 13:57:47 UTC (rev 10956)
+++ trunk/memcheck/mc_translate.c 2009-11-26 17:20:21 UTC (rev 10957)
@@ -3862,6 +3862,68 @@
}
+/* ------ Dealing with LL/SC (not difficult) ------ */
+
+static void do_shadow_LLSC ( MCEnv* mce,
+ IREndness stEnd,
+ IRTemp stResult,
+ IRExpr* stAddr,
+ IRExpr* stStoredata )
+{
+ /* In short: treat a load-linked like a normal load followed by an
+ assignment of the loaded (shadow) data to the result temporary.
+ Treat a store-conditional like a normal store, and mark the
+ result temporary as defined. */
+ IRType resTy = typeOfIRTemp(mce->sb->tyenv, stResult);
+ IRTemp resTmp = findShadowTmpV(mce, stResult);
+
+ tl_assert(isIRAtom(stAddr));
+ if (stStoredata)
+ tl_assert(isIRAtom(stStoredata));
+
+ if (stStoredata == NULL) {
+ /* Load Linked */
+ /* Just treat this as a normal load, followed by an assignment of
+ the value to .result. */
+ /* Stay sane */
+ tl_assert(resTy == Ity_I64 || resTy == Ity_I32
+ || resTy == Ity_I16 || resTy == Ity_I8);
+ assign( 'V', mce, resTmp,
+ expr2vbits_Load(
+ mce, stEnd, resTy, stAddr, 0/*addr bias*/));
+ } else {
+ /* Store Conditional */
+ /* Stay sane */
+ IRType dataTy = typeOfIRExpr(mce->sb->tyenv,
+ stStoredata);
+ tl_assert(dataTy == Ity_I64 || dataTy == Ity_I32
+ || dataTy == Ity_I16 || dataTy == Ity_I8);
+ do_shadow_Store( mce, stEnd,
+ stAddr, 0/* addr bias */,
+ stStoredata,
+ NULL /* shadow data */,
+ NULL/*guard*/ );
+ /* This is a store conditional, so it writes to .result a value
+ indicating whether or not the store succeeded. Just claim
+ this value is always defined. In the PowerPC interpretation
+ of store-conditional, definedness of the success indication
+ depends on whether the address of the store matches the
+ reservation address. But we can't tell that here (and
+ anyway, we're not being PowerPC-specific). At least we are
+ guaranteed that the definedness of the store address, and its
+ addressibility, will be checked as per normal. So it seems
+ pretty safe to just say that the success indication is always
+ defined.
+
+ In schemeS, for origin tracking, we must correspondingly set
+ a no-origin value for the origin shadow of .result.
+ */
+ tl_assert(resTy == Ity_I1);
+ assign( 'V', mce, resTmp, definedOfType(resTy) );
+ }
+}
+
+
/*------------------------------------------------------------*/
/*--- Memcheck main ---*/
/*------------------------------------------------------------*/
@@ -3979,6 +4041,11 @@
|| isBogusAtom(cas->expdLo)
|| (cas->dataHi ? isBogusAtom(cas->dataHi) : False)
|| isBogusAtom(cas->dataLo);
+ case Ist_LLSC:
+ return isBogusAtom(st->Ist.LLSC.addr)
+ || (st->Ist.LLSC.storedata
+ ? isBogusAtom(st->Ist.LLSC.storedata)
+ : False);
default:
unhandled:
ppIRStmt(st);
@@ -4182,32 +4249,6 @@
st->Ist.Store.data,
NULL /* shadow data */,
NULL/*guard*/ );
- /* If this is a store conditional, it writes to .resSC a
- value indicating whether or not the store succeeded.
- Just claim this value is always defined. In the
- PowerPC interpretation of store-conditional,
- definedness of the success indication depends on
- whether the address of the store matches the
- reservation address. But we can't tell that here (and
- anyway, we're not being PowerPC-specific). At least we
- are guarantted that the definedness of the store
- address, and its addressibility, will be checked as per
- normal. So it seems pretty safe to just say that the
- success indication is always defined.
-
- In schemeS, for origin tracking, we must
- correspondingly set a no-origin value for the origin
- shadow of resSC.
- */
- if (st->Ist.Store.resSC != IRTemp_INVALID) {
- assign( 'V', &mce,
- findShadowTmpV(&mce, st->Ist.Store.resSC),
- definedOfType(
- shadowTypeV(
- typeOfIRTemp(mce.sb->tyenv,
- st->Ist.Store.resSC)
- )));
- }
break;
case Ist_Exit:
@@ -4241,6 +4282,14 @@
does it all. */
break;
+ case Ist_LLSC:
+ do_shadow_LLSC( &mce,
+ st->Ist.LLSC.end,
+ st->Ist.LLSC.result,
+ st->Ist.LLSC.addr,
+ st->Ist.LLSC.storedata );
+ break;
+
default:
VG_(printf)("\n");
ppIRStmt(st);
@@ -4597,6 +4646,7 @@
tl_assert(0);
}
+
static IRAtom* schemeE ( MCEnv* mce, IRExpr* e )
{
tl_assert(MC_(clo_mc_level) == 3);
@@ -4732,6 +4782,7 @@
}
}
+
static void do_origins_Dirty ( MCEnv* mce, IRDirty* d )
{
// This is a hacked version of do_shadow_Dirty
@@ -4888,6 +4939,26 @@
}
}
+
+static void do_origins_Store ( MCEnv* mce,
+ IREndness stEnd,
+ IRExpr* stAddr,
+ IRExpr* stData )
+{
+ Int dszB;
+ IRAtom* dataB;
+ /* assert that the B value for the address is already available
+ (somewhere), since the call to schemeE will want to see it.
+ XXXX how does this actually ensure that?? */
+ tl_assert(isIRAtom(stAddr));
+ tl_assert(isIRAtom(stData));
+ dszB = sizeofIRType( typeOfIRExpr(mce->sb->tyenv, stData ) );
+ dataB = schemeE( mce, stData );
+ gen_store_b( mce, dszB, stAddr, 0/*offset*/, dataB,
+ NULL/*guard*/ );
+}
+
+
static void schemeS ( MCEnv* mce, IRStmt* st )
{
tl_assert(MC_(clo_mc_level) == 3);
@@ -4928,30 +4999,47 @@
st->Ist.PutI.bias, t4 ));
break;
}
+
case Ist_Dirty:
do_origins_Dirty( mce, st->Ist.Dirty.details );
break;
- case Ist_Store: {
- Int dszB;
- IRAtom* dataB;
- /* assert that the B value for the address is already
- available (somewhere) */
- tl_assert(isIRAtom(st->Ist.Store.addr));
- dszB = sizeofIRType(
- typeOfIRExpr(mce->sb->tyenv, st->Ist.Store.data ));
- dataB = schemeE( mce, st->Ist.Store.data );
- gen_store_b( mce, dszB, st->Ist.Store.addr, 0/*offset*/, dataB,
- NULL/*guard*/ );
- /* For the rationale behind this, see comments at the place
- where the V-shadow for .resSC is constructed, in the main
- loop in MC_(instrument). In short, wee regard .resSc as
- always-defined. */
- if (st->Ist.Store.resSC != IRTemp_INVALID) {
- assign( 'B', mce, findShadowTmpB(mce, st->Ist.Store.resSC),
- mkU32(0) );
+
+ case Ist_Store:
+ do_origins_Store( mce, st->Ist.Store.end,
+ st->Ist.Store.addr,
+ st->Ist.Store.data );
+ break;
+
+ case Ist_LLSC: {
+ /* In short: treat a load-linked like a normal load followed
+ by an assignment of the loaded (shadow) data the result
+ temporary. Treat a store-conditional like a normal store,
+ and mark the result temporary as defined. */
+ if (st->Ist.LLSC.storedata == NULL) {
+ /* Load Linked */
+ IRType resTy
+ = typeOfIRTemp(mce->sb->tyenv, st->Ist.LLSC.result);
+ IRExpr* vanillaLoad
+ = IRExpr_Load(st->Ist.LLSC.end, resTy, st->Ist.LLSC.addr);
+ tl_assert(resTy == Ity_I64 || resTy == Ity_I32
+ || resTy == Ity_I16 || resTy == Ity_I8);
+ assign( 'B', mce, findShadowTmpB(mce, st->Ist.LLSC.result),
+ schemeE(mce, vanillaLoad));
+ } else {
+ /* Store conditional */
+ do_origins_Store( mce, st->Ist.LLSC.end,
+ st->Ist.LLSC.addr,
+ st->Ist.LLSC.storedata );
+ /* For the rationale behind this, see comments at the
+ place where the V-shadow for .result is constructed, in
+ do_shadow_LLSC. In short, we regard .result as
+ always-defined. */
+ assign( 'B', mce, findShadowTmpB(mce, st->Ist.LLSC.result),
+ mkU32(0) );
}
break;
}
+
case Ist_Put: {
Int b_offset
= MC_(get_otrack_shadow_offset)(
@@ -4965,15 +5053,18 @@
}
break;
}
+
case Ist_WrTmp:
assign( 'B', mce, findShadowTmpB(mce, st->Ist.WrTmp.tmp),
schemeE(mce, st->Ist.WrTmp.data) );
break;
+
case Ist_MBE:
case Ist_NoOp:
case Ist_Exit:
case Ist_IMark:
break;
+
default:
VG_(printf)("mc_translate.c: schemeS: unhandled: ");
ppIRStmt(st);
|
|
From: <sv...@va...> - 2009-11-26 17:17:52
|
Author: sewardj
Date: 2009-11-26 17:17:37 +0000 (Thu, 26 Nov 2009)
New Revision: 1930
Log:
Change the IR representation of load linked and store conditional.
They are now moved out into their own new IRStmt kind (IRStmt_LLSC),
and are not treated merely as variants of standard loads (IRExpr_Load)
or store (IRStmt_Store). This is necessary because load linked is a
load with a side effect (lodging a reservation), hence it cannot be an
IRExpr since IRExprs denote side-effect free value computations.
Fix up all front and back ends accordingly; also iropt.
Fixes #215771.
Modified:
trunk/priv/guest_amd64_toIR.c
trunk/priv/guest_arm_toIR.c
trunk/priv/guest_ppc_toIR.c
trunk/priv/guest_x86_toIR.c
trunk/priv/host_amd64_isel.c
trunk/priv/host_arm_isel.c
trunk/priv/host_ppc_isel.c
trunk/priv/host_x86_isel.c
trunk/priv/ir_defs.c
trunk/priv/ir_match.c
trunk/priv/ir_opt.c
trunk/pub/libvex_ir.h
Modified: trunk/priv/guest_amd64_toIR.c
===================================================================
--- trunk/priv/guest_amd64_toIR.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/guest_amd64_toIR.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -312,12 +312,12 @@
static void storeLE ( IRExpr* addr, IRExpr* data )
{
- stmt( IRStmt_Store(Iend_LE, IRTemp_INVALID, addr, data) );
+ stmt( IRStmt_Store(Iend_LE, addr, data) );
}
-static IRExpr* loadLE ( IRType ty, IRExpr* data )
+static IRExpr* loadLE ( IRType ty, IRExpr* addr )
{
- return IRExpr_Load(False, Iend_LE, ty, data);
+ return IRExpr_Load(Iend_LE, ty, addr);
}
static IROp mkSizedOp ( IRType ty, IROp op8 )
Modified: trunk/priv/guest_arm_toIR.c
===================================================================
--- trunk/priv/guest_arm_toIR.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/guest_arm_toIR.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -495,7 +495,7 @@
static void storeLE ( IRExpr* addr, IRExpr* data )
{
- stmt( IRStmt_Store(Iend_LE, IRTemp_INVALID, addr, data) );
+ stmt( IRStmt_Store(Iend_LE, addr, data) );
}
static IRExpr* unop ( IROp op, IRExpr* a )
@@ -543,9 +543,9 @@
}
#endif
-static IRExpr* loadLE ( IRType ty, IRExpr* data )
+static IRExpr* loadLE ( IRType ty, IRExpr* addr )
{
- return IRExpr_Load(False, Iend_LE, ty, data);
+ return IRExpr_Load(Iend_LE, ty, addr);
}
#if 0
Modified: trunk/priv/guest_ppc_toIR.c
===================================================================
--- trunk/priv/guest_ppc_toIR.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/guest_ppc_toIR.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -467,7 +467,7 @@
{
IRType tyA = typeOfIRExpr(irsb->tyenv, addr);
vassert(tyA == Ity_I32 || tyA == Ity_I64);
- stmt( IRStmt_Store(Iend_BE, IRTemp_INVALID, addr, data) );
+ stmt( IRStmt_Store(Iend_BE, addr, data) );
}
static IRExpr* unop ( IROp op, IRExpr* a )
@@ -517,22 +517,11 @@
}
/* This generates a normal (non load-linked) load. */
-static IRExpr* loadBE ( IRType ty, IRExpr* data )
+static IRExpr* loadBE ( IRType ty, IRExpr* addr )
{
- return IRExpr_Load(False, Iend_BE, ty, data);
+ return IRExpr_Load(Iend_BE, ty, addr);
}
-/* And this, a linked load. */
-static IRExpr* loadlinkedBE ( IRType ty, IRExpr* data )
-{
- if (mode64) {
- vassert(ty == Ity_I32 || ty == Ity_I64);
- } else {
- vassert(ty == Ity_I32);
- }
- return IRExpr_Load(True, Iend_BE, ty, data);
-}
-
static IRExpr* mkOR1 ( IRExpr* arg1, IRExpr* arg2 )
{
vassert(typeOfIRExpr(irsb->tyenv, arg1) == Ity_I1);
@@ -4861,7 +4850,8 @@
stmt( IRStmt_MBE(Imbe_Fence) );
break;
- case 0x014: // lwarx (Load Word and Reserve Indexed, PPC32 p458)
+ case 0x014: { // lwarx (Load Word and Reserve Indexed, PPC32 p458)
+ IRTemp res;
/* According to the PowerPC ISA version 2.05, b0 (called EH
in the documentation) is merely a hint bit to the
hardware, I think as to whether or not contention is
@@ -4872,10 +4862,13 @@
gen_SIGBUS_if_misaligned( EA, 4 );
// and actually do the load
- putIReg( rD_addr, mkWidenFrom32(ty, loadlinkedBE(Ity_I32, mkexpr(EA)),
- False) );
+ res = newTemp(Ity_I32);
+ stmt( IRStmt_LLSC(Iend_BE, res, mkexpr(EA), NULL/*this is a load*/) );
+
+ putIReg( rD_addr, mkWidenFrom32(ty, mkexpr(res), False) );
break;
-
+ }
+
case 0x096: {
// stwcx. (Store Word Conditional Indexed, PPC32 p532)
// Note this has to handle stwcx. in both 32- and 64-bit modes,
@@ -4896,7 +4889,7 @@
// Do the store, and get success/failure bit into resSC
resSC = newTemp(Ity_I1);
- stmt( IRStmt_Store(Iend_BE, resSC, mkexpr(EA), mkexpr(rS)) );
+ stmt( IRStmt_LLSC(Iend_BE, resSC, mkexpr(EA), mkexpr(rS)) );
// Set CR0[LT GT EQ S0] = 0b000 || XER[SO] on failure
// Set CR0[LT GT EQ S0] = 0b001 || XER[SO] on success
@@ -4948,7 +4941,8 @@
break;
/* 64bit Memsync */
- case 0x054: // ldarx (Load DWord and Reserve Indexed, PPC64 p473)
+ case 0x054: { // ldarx (Load DWord and Reserve Indexed, PPC64 p473)
+ IRTemp res;
/* According to the PowerPC ISA version 2.05, b0 (called EH
in the documentation) is merely a hint bit to the
hardware, I think as to whether or not contention is
@@ -4961,9 +4955,13 @@
gen_SIGBUS_if_misaligned( EA, 8 );
// and actually do the load
- putIReg( rD_addr, loadlinkedBE(Ity_I64, mkexpr(EA)) );
+ res = newTemp(Ity_I64);
+ stmt( IRStmt_LLSC(Iend_BE, res, mkexpr(EA), NULL/*this is a load*/) );
+
+ putIReg( rD_addr, mkexpr(res) );
break;
-
+ }
+
case 0x0D6: { // stdcx. (Store DWord Condition Indexd, PPC64 p581)
// A marginally simplified version of the stwcx. case
IRTemp rS = newTemp(Ity_I64);
@@ -4984,7 +4982,7 @@
// Do the store, and get success/failure bit into resSC
resSC = newTemp(Ity_I1);
- stmt( IRStmt_Store(Iend_BE, resSC, mkexpr(EA), mkexpr(rS)) );
+ stmt( IRStmt_LLSC(Iend_BE, resSC, mkexpr(EA), mkexpr(rS)) );
// Set CR0[LT GT EQ S0] = 0b000 || XER[SO] on failure
// Set CR0[LT GT EQ S0] = 0b001 || XER[SO] on success
Modified: trunk/priv/guest_x86_toIR.c
===================================================================
--- trunk/priv/guest_x86_toIR.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/guest_x86_toIR.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -648,7 +648,7 @@
static void storeLE ( IRExpr* addr, IRExpr* data )
{
- stmt( IRStmt_Store(Iend_LE, IRTemp_INVALID, addr, data) );
+ stmt( IRStmt_Store(Iend_LE, addr, data) );
}
static IRExpr* unop ( IROp op, IRExpr* a )
@@ -708,9 +708,9 @@
return IRExpr_Const(IRConst_V128(mask));
}
-static IRExpr* loadLE ( IRType ty, IRExpr* data )
+static IRExpr* loadLE ( IRType ty, IRExpr* addr )
{
- return IRExpr_Load(False, Iend_LE, ty, data);
+ return IRExpr_Load(Iend_LE, ty, addr);
}
static IROp mkSizedOp ( IRType ty, IROp op8 )
Modified: trunk/priv/host_amd64_isel.c
===================================================================
--- trunk/priv/host_amd64_isel.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/host_amd64_isel.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -860,8 +860,6 @@
/* We can't handle big-endian loads, nor load-linked. */
if (e->Iex.Load.end != Iend_LE)
goto irreducible;
- if (e->Iex.Load.isLL)
- goto irreducible;
if (ty == Ity_I64) {
addInstr(env, AMD64Instr_Alu64R(Aalu_MOV,
@@ -1963,7 +1961,7 @@
/* special case: 64-bit load from memory */
if (e->tag == Iex_Load && ty == Ity_I64
- && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ && e->Iex.Load.end == Iend_LE) {
AMD64AMode* am = iselIntExpr_AMode(env, e->Iex.Load.addr);
return AMD64RMI_Mem(am);
}
@@ -2749,7 +2747,7 @@
return lookupIRTemp(env, e->Iex.RdTmp.tmp);
}
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE) {
AMD64AMode* am;
HReg res = newVRegV(env);
vassert(e->Iex.Load.ty == Ity_F32);
@@ -2873,7 +2871,7 @@
return res;
}
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE) {
AMD64AMode* am;
HReg res = newVRegV(env);
vassert(e->Iex.Load.ty == Ity_F64);
@@ -3178,7 +3176,7 @@
return dst;
}
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE) {
HReg dst = newVRegV(env);
AMD64AMode* am = iselIntExpr_AMode(env, e->Iex.Load.addr);
addInstr(env, AMD64Instr_SseLdSt( True/*load*/, 16, dst, am ));
@@ -3603,9 +3601,8 @@
IRType tya = typeOfIRExpr(env->type_env, stmt->Ist.Store.addr);
IRType tyd = typeOfIRExpr(env->type_env, stmt->Ist.Store.data);
IREndness end = stmt->Ist.Store.end;
- IRTemp resSC = stmt->Ist.Store.resSC;
- if (tya != Ity_I64 || end != Iend_LE || resSC != IRTemp_INVALID)
+ if (tya != Ity_I64 || end != Iend_LE)
goto stmt_fail;
if (tyd == Ity_I64) {
Modified: trunk/priv/host_arm_isel.c
===================================================================
--- trunk/priv/host_arm_isel.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/host_arm_isel.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -757,9 +757,8 @@
IRType tya = typeOfIRExpr(env->type_env, stmt->Ist.Store.addr);
IRType tyd = typeOfIRExpr(env->type_env, stmt->Ist.Store.data);
IREndness end = stmt->Ist.Store.end;
- IRTemp resSC = stmt->Ist.Store.resSC;
- if (tya != Ity_I32 || end != Iend_LE || resSC != IRTemp_INVALID)
+ if (tya != Ity_I32 || end != Iend_LE)
goto stmt_fail;
reg = iselIntExpr_R(env, stmt->Ist.Store.data);
Modified: trunk/priv/host_ppc_isel.c
===================================================================
--- trunk/priv/host_ppc_isel.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/host_ppc_isel.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -1169,32 +1169,14 @@
/* --------- LOAD --------- */
case Iex_Load: {
- HReg r_dst;
-
+ HReg r_dst;
+ PPCAMode* am_addr;
if (e->Iex.Load.end != Iend_BE)
goto irreducible;
-
- r_dst = newVRegI(env);
-
- if (e->Iex.Load.isLL) {
- /* lwarx or ldarx. Be simple; force address into a register. */
- HReg r_addr = iselWordExpr_R( env, e->Iex.Load.addr );
- if (ty == Ity_I32) {
- addInstr(env, PPCInstr_LoadL( 4, r_dst, r_addr, mode64 ));
- }
- else if (ty == Ity_I64 && mode64) {
- addInstr(env, PPCInstr_LoadL( 8, r_dst, r_addr, mode64 ));
- }
- else
- goto irreducible;
- } else {
- /* Normal load; use whatever amodes we can. */
- PPCAMode* am_addr
- = iselWordExpr_AMode( env, e->Iex.Load.addr, ty/*of xfer*/ );
- addInstr(env, PPCInstr_Load( toUChar(sizeofIRType(ty)),
- r_dst, am_addr, mode64 ));
- }
-
+ r_dst = newVRegI(env);
+ am_addr = iselWordExpr_AMode( env, e->Iex.Load.addr, ty/*of xfer*/ );
+ addInstr(env, PPCInstr_Load( toUChar(sizeofIRType(ty)),
+ r_dst, am_addr, mode64 ));
return r_dst;
/*NOTREACHED*/
}
@@ -1551,7 +1533,7 @@
DECLARE_PATTERN(p_LDbe16_then_16Uto32);
DEFINE_PATTERN(p_LDbe16_then_16Uto32,
unop(Iop_16Uto32,
- IRExpr_Load(False,Iend_BE,Ity_I16,bind(0))) );
+ IRExpr_Load(Iend_BE,Ity_I16,bind(0))) );
if (matchIRExpr(&mi,p_LDbe16_then_16Uto32,e)) {
HReg r_dst = newVRegI(env);
PPCAMode* amode
@@ -2609,7 +2591,7 @@
vassert(typeOfIRExpr(env->type_env,e) == Ity_I64);
/* 64-bit load */
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_BE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_BE) {
HReg tLo = newVRegI(env);
HReg tHi = newVRegI(env);
HReg r_addr = iselWordExpr_R(env, e->Iex.Load.addr);
@@ -2967,7 +2949,7 @@
return lookupIRTemp(env, e->Iex.RdTmp.tmp);
}
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_BE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_BE) {
PPCAMode* am_addr;
HReg r_dst = newVRegF(env);
vassert(e->Iex.Load.ty == Ity_F32);
@@ -3115,7 +3097,7 @@
}
/* --------- LOAD --------- */
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_BE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_BE) {
HReg r_dst = newVRegF(env);
PPCAMode* am_addr;
vassert(e->Iex.Load.ty == Ity_F64);
@@ -3366,7 +3348,7 @@
return dst;
}
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_BE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_BE) {
PPCAMode* am_addr;
HReg v_dst = newVRegV(env);
vassert(e->Iex.Load.ty == Ity_V128);
@@ -3770,7 +3752,6 @@
IRType tya = typeOfIRExpr(env->type_env, stmt->Ist.Store.addr);
IRType tyd = typeOfIRExpr(env->type_env, stmt->Ist.Store.data);
IREndness end = stmt->Ist.Store.end;
- IRTemp resSC = stmt->Ist.Store.resSC;
if (end != Iend_BE)
goto stmt_fail;
@@ -3779,34 +3760,6 @@
if (mode64 && (tya != Ity_I64))
goto stmt_fail;
- if (resSC != IRTemp_INVALID) {
- /* deal with store-conditional */
- HReg r_res = lookupIRTemp(env, resSC);
- HReg r_a = iselWordExpr_R(env, stmt->Ist.Store.addr);
- HReg r_src = iselWordExpr_R(env, stmt->Ist.Store.data);
- HReg r_tmp = newVRegI(env);
- if (tyd == Ity_I32 || (tyd == Ity_I64 && mode64)) {
- addInstr(env, PPCInstr_StoreC( tyd==Ity_I32 ? 4 : 8,
- r_a, r_src, mode64 ));
- addInstr(env, PPCInstr_MfCR( r_tmp ));
- addInstr(env, PPCInstr_Shft(
- Pshft_SHR,
- env->mode64 ? False : True/*F:64-bit, T:32-bit shift*/,
- r_tmp, r_tmp,
- PPCRH_Imm(False/*unsigned*/, 29)));
- /* Probably unnecessary, since the IR dest type is Ity_I1,
- and so we are entitled to leave whatever junk we like
- drifting round in the upper 31 or 63 bits of r_res.
- However, for the sake of conservativeness .. */
- addInstr(env, PPCInstr_Alu(
- Palu_AND,
- r_res, r_tmp,
- PPCRH_Imm(False/*signed*/, 1)));
- return;
- }
- goto stmt_fail;
- }
-
if (tyd == Ity_I8 || tyd == Ity_I16 || tyd == Ity_I32 ||
(mode64 && (tyd == Ity_I64))) {
PPCAMode* am_addr
@@ -3979,6 +3932,67 @@
break;
}
+ /* --------- Load Linked or Store Conditional --------- */
+ case Ist_LLSC: {
+ IRTemp res = stmt->Ist.LLSC.result;
+ IRType tyRes = typeOfIRTemp(env->type_env, res);
+ IRType tyAddr = typeOfIRExpr(env->type_env, stmt->Ist.LLSC.addr);
+
+ if (stmt->Ist.LLSC.end != Iend_BE)
+ goto stmt_fail;
+ if (!mode64 && (tyAddr != Ity_I32))
+ goto stmt_fail;
+ if (mode64 && (tyAddr != Ity_I64))
+ goto stmt_fail;
+
+ if (stmt->Ist.LLSC.storedata == NULL) {
+ /* LL */
+ HReg r_addr = iselWordExpr_R( env, stmt->Ist.LLSC.addr );
+ HReg r_dst = lookupIRTemp(env, res);
+ if (tyRes == Ity_I32) {
+ addInstr(env, PPCInstr_LoadL( 4, r_dst, r_addr, mode64 ));
+ return;
+ }
+ if (tyRes == Ity_I64 && mode64) {
+ addInstr(env, PPCInstr_LoadL( 8, r_dst, r_addr, mode64 ));
+ return;
+ }
+ /* fallthru */;
+ } else {
+ /* SC */
+ HReg r_res = lookupIRTemp(env, res); /* :: Ity_I1 */
+ HReg r_a = iselWordExpr_R(env, stmt->Ist.LLSC.addr);
+ HReg r_src = iselWordExpr_R(env, stmt->Ist.LLSC.storedata);
+ HReg r_tmp = newVRegI(env);
+ IRType tyData = typeOfIRExpr(env->type_env,
+ stmt->Ist.LLSC.storedata);
+ vassert(tyRes == Ity_I1);
+ if (tyData == Ity_I32 || (tyData == Ity_I64 && mode64)) {
+ addInstr(env, PPCInstr_StoreC( tyData==Ity_I32 ? 4 : 8,
+ r_a, r_src, mode64 ));
+ addInstr(env, PPCInstr_MfCR( r_tmp ));
+ addInstr(env, PPCInstr_Shft(
+ Pshft_SHR,
+ env->mode64 ? False : True
+ /*F:64-bit, T:32-bit shift*/,
+ r_tmp, r_tmp,
+ PPCRH_Imm(False/*unsigned*/, 29)));
+ /* Probably unnecessary, since the IR dest type is Ity_I1,
+ and so we are entitled to leave whatever junk we like
+ drifting round in the upper 31 or 63 bits of r_res.
+ However, for the sake of conservativeness .. */
+ addInstr(env, PPCInstr_Alu(
+ Palu_AND,
+ r_res, r_tmp,
+ PPCRH_Imm(False/*signed*/, 1)));
+ return;
+ }
+ /* fallthru */
+ }
+ goto stmt_fail;
+ /*NOTREACHED*/
+ }
+
/* --------- Call to DIRTY helper --------- */
case Ist_Dirty: {
IRType retty;
Modified: trunk/priv/host_x86_isel.c
===================================================================
--- trunk/priv/host_x86_isel.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/host_x86_isel.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -763,8 +763,6 @@
/* We can't handle big-endian loads, nor load-linked. */
if (e->Iex.Load.end != Iend_LE)
goto irreducible;
- if (e->Iex.Load.isLL)
- goto irreducible;
if (ty == Ity_I32) {
addInstr(env, X86Instr_Alu32R(Xalu_MOV,
@@ -1069,7 +1067,7 @@
DECLARE_PATTERN(p_LDle8_then_8Uto32);
DEFINE_PATTERN(p_LDle8_then_8Uto32,
unop(Iop_8Uto32,
- IRExpr_Load(False,Iend_LE,Ity_I8,bind(0))) );
+ IRExpr_Load(Iend_LE,Ity_I8,bind(0))) );
if (matchIRExpr(&mi,p_LDle8_then_8Uto32,e)) {
HReg dst = newVRegI(env);
X86AMode* amode = iselIntExpr_AMode ( env, mi.bindee[0] );
@@ -1083,7 +1081,7 @@
DECLARE_PATTERN(p_LDle8_then_8Sto32);
DEFINE_PATTERN(p_LDle8_then_8Sto32,
unop(Iop_8Sto32,
- IRExpr_Load(False,Iend_LE,Ity_I8,bind(0))) );
+ IRExpr_Load(Iend_LE,Ity_I8,bind(0))) );
if (matchIRExpr(&mi,p_LDle8_then_8Sto32,e)) {
HReg dst = newVRegI(env);
X86AMode* amode = iselIntExpr_AMode ( env, mi.bindee[0] );
@@ -1097,7 +1095,7 @@
DECLARE_PATTERN(p_LDle16_then_16Uto32);
DEFINE_PATTERN(p_LDle16_then_16Uto32,
unop(Iop_16Uto32,
- IRExpr_Load(False,Iend_LE,Ity_I16,bind(0))) );
+ IRExpr_Load(Iend_LE,Ity_I16,bind(0))) );
if (matchIRExpr(&mi,p_LDle16_then_16Uto32,e)) {
HReg dst = newVRegI(env);
X86AMode* amode = iselIntExpr_AMode ( env, mi.bindee[0] );
@@ -1536,7 +1534,7 @@
/* special case: 32-bit load from memory */
if (e->tag == Iex_Load && ty == Ity_I32
- && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ && e->Iex.Load.end == Iend_LE) {
X86AMode* am = iselIntExpr_AMode(env, e->Iex.Load.addr);
return X86RMI_Mem(am);
}
@@ -1955,7 +1953,7 @@
}
/* 64-bit load */
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE) {
HReg tLo, tHi;
X86AMode *am0, *am4;
vassert(e->Iex.Load.ty == Ity_I64);
@@ -2743,7 +2741,7 @@
return lookupIRTemp(env, e->Iex.RdTmp.tmp);
}
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE) {
X86AMode* am;
HReg res = newVRegF(env);
vassert(e->Iex.Load.ty == Ity_F32);
@@ -2867,7 +2865,7 @@
return freg;
}
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE) {
X86AMode* am;
HReg res = newVRegF(env);
vassert(e->Iex.Load.ty == Ity_F64);
@@ -3119,7 +3117,7 @@
return dst;
}
- if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE && !e->Iex.Load.isLL) {
+ if (e->tag == Iex_Load && e->Iex.Load.end == Iend_LE) {
HReg dst = newVRegV(env);
X86AMode* am = iselIntExpr_AMode(env, e->Iex.Load.addr);
addInstr(env, X86Instr_SseLdSt( True/*load*/, dst, am ));
@@ -3140,7 +3138,7 @@
DECLARE_PATTERN(p_zwiden_load64);
DEFINE_PATTERN(p_zwiden_load64,
unop(Iop_64UtoV128,
- IRExpr_Load(False,Iend_LE,Ity_I64,bind(0))));
+ IRExpr_Load(Iend_LE,Ity_I64,bind(0))));
if (matchIRExpr(&mi, p_zwiden_load64, e)) {
X86AMode* am = iselIntExpr_AMode(env, mi.bindee[0]);
HReg dst = newVRegV(env);
@@ -3608,9 +3606,8 @@
IRType tya = typeOfIRExpr(env->type_env, stmt->Ist.Store.addr);
IRType tyd = typeOfIRExpr(env->type_env, stmt->Ist.Store.data);
IREndness end = stmt->Ist.Store.end;
- IRTemp resSC = stmt->Ist.Store.resSC;
- if (tya != Ity_I32 || end != Iend_LE || resSC != IRTemp_INVALID)
+ if (tya != Ity_I32 || end != Iend_LE)
goto stmt_fail;
if (tyd == Ity_I32) {
Modified: trunk/priv/ir_defs.c
===================================================================
--- trunk/priv/ir_defs.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/ir_defs.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -648,8 +648,7 @@
vex_printf( ")" );
break;
case Iex_Load:
- vex_printf( "LD%s%s:", e->Iex.Load.end==Iend_LE ? "le" : "be",
- e->Iex.Load.isLL ? "-LL" : "" );
+ vex_printf( "LD%s:", e->Iex.Load.end==Iend_LE ? "le" : "be" );
ppIRType(e->Iex.Load.ty);
vex_printf( "(" );
ppIRExpr(e->Iex.Load.addr);
@@ -829,20 +828,31 @@
ppIRExpr(s->Ist.WrTmp.data);
break;
case Ist_Store:
- if (s->Ist.Store.resSC != IRTemp_INVALID) {
- ppIRTemp(s->Ist.Store.resSC);
- vex_printf( " = SC( " );
- }
vex_printf( "ST%s(", s->Ist.Store.end==Iend_LE ? "le" : "be" );
ppIRExpr(s->Ist.Store.addr);
vex_printf( ") = ");
ppIRExpr(s->Ist.Store.data);
- if (s->Ist.Store.resSC != IRTemp_INVALID)
- vex_printf( " )" );
break;
case Ist_CAS:
ppIRCAS(s->Ist.CAS.details);
break;
+ case Ist_LLSC:
+ if (s->Ist.LLSC.storedata == NULL) {
+ ppIRTemp(s->Ist.LLSC.result);
+ vex_printf(" = LD%s-Linked(",
+ s->Ist.LLSC.end==Iend_LE ? "le" : "be");
+ ppIRExpr(s->Ist.LLSC.addr);
+ vex_printf(")");
+ } else {
+ ppIRTemp(s->Ist.LLSC.result);
+ vex_printf(" = ( ST%s-Cond(",
+ s->Ist.LLSC.end==Iend_LE ? "le" : "be");
+ ppIRExpr(s->Ist.LLSC.addr);
+ vex_printf(") = ");
+ ppIRExpr(s->Ist.LLSC.storedata);
+ vex_printf(" )");
+ }
+ break;
case Ist_Dirty:
ppIRDirty(s->Ist.Dirty.details);
break;
@@ -1061,10 +1071,9 @@
e->Iex.Unop.arg = arg;
return e;
}
-IRExpr* IRExpr_Load ( Bool isLL, IREndness end, IRType ty, IRExpr* addr ) {
+IRExpr* IRExpr_Load ( IREndness end, IRType ty, IRExpr* addr ) {
IRExpr* e = LibVEX_Alloc(sizeof(IRExpr));
e->tag = Iex_Load;
- e->Iex.Load.isLL = isLL;
e->Iex.Load.end = end;
e->Iex.Load.ty = ty;
e->Iex.Load.addr = addr;
@@ -1257,14 +1266,12 @@
s->Ist.WrTmp.data = data;
return s;
}
-IRStmt* IRStmt_Store ( IREndness end,
- IRTemp resSC, IRExpr* addr, IRExpr* data ) {
- IRStmt* s = LibVEX_Alloc(sizeof(IRStmt));
- s->tag = Ist_Store;
- s->Ist.Store.end = end;
- s->Ist.Store.resSC = resSC;
- s->Ist.Store.addr = addr;
- s->Ist.Store.data = data;
+IRStmt* IRStmt_Store ( IREndness end, IRExpr* addr, IRExpr* data ) {
+ IRStmt* s = LibVEX_Alloc(sizeof(IRStmt));
+ s->tag = Ist_Store;
+ s->Ist.Store.end = end;
+ s->Ist.Store.addr = addr;
+ s->Ist.Store.data = data;
vassert(end == Iend_LE || end == Iend_BE);
return s;
}
@@ -1274,6 +1281,16 @@
s->Ist.CAS.details = cas;
return s;
}
+IRStmt* IRStmt_LLSC ( IREndness end,
+ IRTemp result, IRExpr* addr, IRExpr* storedata ) {
+ IRStmt* s = LibVEX_Alloc(sizeof(IRStmt));
+ s->tag = Ist_LLSC;
+ s->Ist.LLSC.end = end;
+ s->Ist.LLSC.result = result;
+ s->Ist.LLSC.addr = addr;
+ s->Ist.LLSC.storedata = storedata;
+ return s;
+}
IRStmt* IRStmt_Dirty ( IRDirty* d )
{
IRStmt* s = LibVEX_Alloc(sizeof(IRStmt));
@@ -1418,8 +1435,7 @@
return IRExpr_Unop(e->Iex.Unop.op,
deepCopyIRExpr(e->Iex.Unop.arg));
case Iex_Load:
- return IRExpr_Load(e->Iex.Load.isLL,
- e->Iex.Load.end,
+ return IRExpr_Load(e->Iex.Load.end,
e->Iex.Load.ty,
deepCopyIRExpr(e->Iex.Load.addr));
case Iex_Const:
@@ -1490,11 +1506,17 @@
deepCopyIRExpr(s->Ist.WrTmp.data));
case Ist_Store:
return IRStmt_Store(s->Ist.Store.end,
- s->Ist.Store.resSC,
deepCopyIRExpr(s->Ist.Store.addr),
deepCopyIRExpr(s->Ist.Store.data));
case Ist_CAS:
return IRStmt_CAS(deepCopyIRCAS(s->Ist.CAS.details));
+ case Ist_LLSC:
+ return IRStmt_LLSC(s->Ist.LLSC.end,
+ s->Ist.LLSC.result,
+ deepCopyIRExpr(s->Ist.LLSC.addr),
+ s->Ist.LLSC.storedata
+ ? deepCopyIRExpr(s->Ist.LLSC.storedata)
+ : NULL);
case Ist_Dirty:
return IRStmt_Dirty(deepCopyIRDirty(s->Ist.Dirty.details));
case Ist_MBE:
@@ -2138,6 +2160,10 @@
&& isIRAtom(cas->expdLo)
&& (cas->dataHi ? isIRAtom(cas->dataHi) : True)
&& isIRAtom(cas->dataLo) );
+ case Ist_LLSC:
+ return toBool( isIRAtom(st->Ist.LLSC.addr)
+ && (st->Ist.LLSC.storedata
+ ? isIRAtom(st->Ist.LLSC.storedata) : True) );
case Ist_Dirty:
di = st->Ist.Dirty.details;
if (!isIRAtom(di->guard))
@@ -2329,6 +2355,11 @@
useBeforeDef_Expr(bb,stmt,cas->dataHi,def_counts);
useBeforeDef_Expr(bb,stmt,cas->dataLo,def_counts);
break;
+ case Ist_LLSC:
+ useBeforeDef_Expr(bb,stmt,stmt->Ist.LLSC.addr,def_counts);
+ if (stmt->Ist.LLSC.storedata != NULL)
+ useBeforeDef_Expr(bb,stmt,stmt->Ist.LLSC.storedata,def_counts);
+ break;
case Ist_Dirty:
d = stmt->Ist.Dirty.details;
for (i = 0; d->args[i] != NULL; i++)
@@ -2606,9 +2637,6 @@
sanityCheckFail(bb,stmt,"IRStmt.Store.data: cannot Store :: Ity_I1");
if (stmt->Ist.Store.end != Iend_LE && stmt->Ist.Store.end != Iend_BE)
sanityCheckFail(bb,stmt,"Ist.Store.end: bogus endianness");
- if (stmt->Ist.Store.resSC != IRTemp_INVALID
- && typeOfIRTemp(tyenv, stmt->Ist.Store.resSC) != Ity_I1)
- sanityCheckFail(bb,stmt,"Ist.Store.resSC: not :: Ity_I1");
break;
case Ist_CAS:
cas = stmt->Ist.CAS.details;
@@ -2660,6 +2688,27 @@
bad_cas:
sanityCheckFail(bb,stmt,"IRStmt.CAS: ill-formed");
break;
+ case Ist_LLSC: {
+ IRType tyRes;
+ if (typeOfIRExpr(tyenv, stmt->Ist.LLSC.addr) != gWordTy)
+ sanityCheckFail(bb,stmt,"IRStmt.LLSC.addr: not :: guest word type");
+ if (stmt->Ist.LLSC.end != Iend_LE && stmt->Ist.LLSC.end != Iend_BE)
+ sanityCheckFail(bb,stmt,"Ist.LLSC.end: bogus endianness");
+ tyRes = typeOfIRTemp(tyenv, stmt->Ist.LLSC.result);
+ if (stmt->Ist.LLSC.storedata == NULL) {
+ /* it's a LL */
+ if (tyRes != Ity_I64 && tyRes != Ity_I32)
+ sanityCheckFail(bb,stmt,"Ist.LLSC(LL).result :: bogus");
+ } else {
+ /* it's a SC */
+ if (tyRes != Ity_I1)
+ sanityCheckFail(bb,stmt,"Ist.LLSC(SC).result: not :: Ity_I1");
+ tyData = typeOfIRExpr(tyenv, stmt->Ist.LLSC.storedata);
+ if (tyData != Ity_I64 && tyData != Ity_I32)
+ sanityCheckFail(bb,stmt,"Ist.LLSC(SC).result :: storedata bogus");
+ }
+ break;
+ }
case Ist_Dirty:
/* Mostly check for various kinds of ill-formed dirty calls. */
d = stmt->Ist.Dirty.details;
@@ -2790,17 +2839,6 @@
"IRStmt.Tmp: destination tmp is assigned more than once");
break;
case Ist_Store:
- if (stmt->Ist.Store.resSC != IRTemp_INVALID) {
- IRTemp resSC = stmt->Ist.Store.resSC;
- if (resSC < 0 || resSC >= n_temps)
- sanityCheckFail(bb, stmt,
- "IRStmt.Store.resSC: destination tmp is out of range");
- def_counts[resSC]++;
- if (def_counts[resSC] > 1)
- sanityCheckFail(bb, stmt,
- "IRStmt.Store.resSC: destination tmp "
- "is assigned more than once");
- }
break;
case Ist_Dirty:
if (stmt->Ist.Dirty.details->tmp != IRTemp_INVALID) {
@@ -2816,7 +2854,6 @@
break;
case Ist_CAS:
cas = stmt->Ist.CAS.details;
-
if (cas->oldHi != IRTemp_INVALID) {
if (cas->oldHi < 0 || cas->oldHi >= n_temps)
sanityCheckFail(bb, stmt,
@@ -2827,16 +2864,25 @@
"IRStmt.CAS: destination tmpHi is assigned more than once");
}
if (cas->oldLo < 0 || cas->oldLo >= n_temps)
- sanityCheckFail(bb, stmt,
- "IRStmt.CAS: destination tmpLo is out of range");
- def_counts[cas->oldLo]++;
- if (def_counts[cas->oldLo] > 1)
- sanityCheckFail(bb, stmt,
- "IRStmt.CAS: destination tmpLo is assigned more than once");
- break;
+ sanityCheckFail(bb, stmt,
+ "IRStmt.CAS: destination tmpLo is out of range");
+ def_counts[cas->oldLo]++;
+ if (def_counts[cas->oldLo] > 1)
+ sanityCheckFail(bb, stmt,
+ "IRStmt.CAS: destination tmpLo is assigned more than once");
+ break;
+ case Ist_LLSC:
+ if (stmt->Ist.LLSC.result < 0 || stmt->Ist.LLSC.result >= n_temps)
+ sanityCheckFail(bb, stmt,
+ "IRStmt.LLSC: destination tmp is out of range");
+ def_counts[stmt->Ist.LLSC.result]++;
+ if (def_counts[stmt->Ist.LLSC.result] > 1)
+ sanityCheckFail(bb, stmt,
+ "IRStmt.LLSC: destination tmp is assigned more than once");
+ break;
default:
- /* explicitly handle the rest, so as to keep gcc quiet */
- break;
+ /* explicitly handle the rest, so as to keep gcc quiet */
+ break;
}
}
Modified: trunk/priv/ir_match.c
===================================================================
--- trunk/priv/ir_match.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/ir_match.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -90,7 +90,6 @@
return True;
case Iex_Load:
if (e->tag != Iex_Load) return False;
- if (p->Iex.Load.isLL != e->Iex.Load.isLL) return False;
if (p->Iex.Load.end != e->Iex.Load.end) return False;
if (p->Iex.Load.ty != e->Iex.Load.ty) return False;
if (!matchWrk(mi, p->Iex.Load.addr, e->Iex.Load.addr))
Modified: trunk/priv/ir_opt.c
===================================================================
--- trunk/priv/ir_opt.c 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/priv/ir_opt.c 2009-11-26 17:17:37 UTC (rev 1930)
@@ -334,8 +334,7 @@
case Iex_Load:
t1 = newIRTemp(bb->tyenv, ty);
addStmtToIRSB(bb, IRStmt_WrTmp(t1,
- IRExpr_Load(ex->Iex.Load.isLL,
- ex->Iex.Load.end,
+ IRExpr_Load(ex->Iex.Load.end,
ex->Iex.Load.ty,
flatten_Expr(bb, ex->Iex.Load.addr))));
return IRExpr_RdTmp(t1);
@@ -426,8 +425,7 @@
case Ist_Store:
e1 = flatten_Expr(bb, st->Ist.Store.addr);
e2 = flatten_Expr(bb, st->Ist.Store.data);
- addStmtToIRSB(bb, IRStmt_Store(st->Ist.Store.end,
- st->Ist.Store.resSC, e1,e2));
+ addStmtToIRSB(bb, IRStmt_Store(st->Ist.Store.end, e1,e2));
break;
case Ist_CAS:
cas = st->Ist.CAS.details;
@@ -440,6 +438,14 @@
e1, e2, e3, e4, e5 );
addStmtToIRSB(bb, IRStmt_CAS(cas2));
break;
+ case Ist_LLSC:
+ e1 = flatten_Expr(bb, st->Ist.LLSC.addr);
+ e2 = st->Ist.LLSC.storedata
+ ? flatten_Expr(bb, st->Ist.LLSC.storedata)
+ : NULL;
+ addStmtToIRSB(bb, IRStmt_LLSC(st->Ist.LLSC.end,
+ st->Ist.LLSC.result, e1, e2));
+ break;
case Ist_Dirty:
d = st->Ist.Dirty.details;
d2 = emptyIRDirty();
@@ -724,7 +730,7 @@
enough do a lot better if needed. */
/* Probably also overly-conservative, but also dump everything
if we hit a memory bus event (fence, lock, unlock). Ditto
- AbiHints and CASs. */
+ AbiHints, CASs, LLs and SCs. */
case Ist_AbiHint:
vassert(isIRAtom(st->Ist.AbiHint.base));
vassert(isIRAtom(st->Ist.AbiHint.nia));
@@ -732,6 +738,7 @@
case Ist_MBE:
case Ist_Dirty:
case Ist_CAS:
+ case Ist_LLSC:
for (j = 0; j < env->used; j++)
env->inuse[j] = False;
break;
@@ -1674,7 +1681,6 @@
case Iex_Load:
vassert(isIRAtom(ex->Iex.Load.addr));
return IRExpr_Load(
- ex->Iex.Load.isLL,
ex->Iex.Load.end,
ex->Iex.Load.ty,
subst_Expr(env, ex->Iex.Load.addr)
@@ -1763,7 +1769,6 @@
vassert(isIRAtom(st->Ist.Store.data));
return IRStmt_Store(
st->Ist.Store.end,
- st->Ist.Store.resSC,
fold_Expr(subst_Expr(env, st->Ist.Store.addr)),
fold_Expr(subst_Expr(env, st->Ist.Store.data))
);
@@ -1787,6 +1792,19 @@
return IRStmt_CAS(cas2);
}
+ case Ist_LLSC:
+ vassert(isIRAtom(st->Ist.LLSC.addr));
+ if (st->Ist.LLSC.storedata)
+ vassert(isIRAtom(st->Ist.LLSC.storedata));
+ return IRStmt_LLSC(
+ st->Ist.LLSC.end,
+ st->Ist.LLSC.result,
+ fold_Expr(subst_Expr(env, st->Ist.LLSC.addr)),
+ st->Ist.LLSC.storedata
+ ? fold_Expr(subst_Expr(env, st->Ist.LLSC.storedata))
+ : NULL
+ );
+
case Ist_Dirty: {
Int i;
IRDirty *d, *d2;
@@ -2022,6 +2040,11 @@
addUses_Expr(set, cas->dataHi);
addUses_Expr(set, cas->dataLo);
return;
+ case Ist_LLSC:
+ addUses_Expr(set, st->Ist.LLSC.addr);
+ if (st->Ist.LLSC.storedata)
+ addUses_Expr(set, st->Ist.LLSC.storedata);
+ return;
case Ist_Dirty:
d = st->Ist.Dirty.details;
if (d->mFx != Ifx_None)
@@ -2608,7 +2631,8 @@
to do the no-overlap assessments needed for Put/PutI.
*/
switch (st->tag) {
- case Ist_Dirty: case Ist_Store: case Ist_MBE: case Ist_CAS:
+ case Ist_Dirty: case Ist_Store: case Ist_MBE:
+ case Ist_CAS: case Ist_LLSC:
paranoia = 2; break;
case Ist_Put: case Ist_PutI:
paranoia = 1; break;
@@ -3299,8 +3323,6 @@
deltaIRExpr(st->Ist.Exit.guard, delta);
break;
case Ist_Store:
- if (st->Ist.Store.resSC != IRTemp_INVALID)
- st->Ist.Store.resSC += delta;
deltaIRExpr(st->Ist.Store.addr, delta);
deltaIRExpr(st->Ist.Store.data, delta);
break;
@@ -3316,6 +3338,12 @@
deltaIRExpr(st->Ist.CAS.details->dataHi, delta);
deltaIRExpr(st->Ist.CAS.details->dataLo, delta);
break;
+ case Ist_LLSC:
+ st->Ist.LLSC.result += delta;
+ deltaIRExpr(st->Ist.LLSC.addr, delta);
+ if (st->Ist.LLSC.storedata)
+ deltaIRExpr(st->Ist.LLSC.storedata, delta);
+ break;
case Ist_Dirty:
d = st->Ist.Dirty.details;
deltaIRExpr(d->guard, delta);
@@ -3780,6 +3808,11 @@
aoccCount_Expr(uses, cas->dataHi);
aoccCount_Expr(uses, cas->dataLo);
return;
+ case Ist_LLSC:
+ aoccCount_Expr(uses, st->Ist.LLSC.addr);
+ if (st->Ist.LLSC.storedata)
+ aoccCount_Expr(uses, st->Ist.LLSC.storedata);
+ return;
case Ist_Dirty:
d = st->Ist.Dirty.details;
if (d->mFx != Ifx_None)
@@ -3966,7 +3999,6 @@
);
case Iex_Load:
return IRExpr_Load(
- e->Iex.Load.isLL,
e->Iex.Load.end,
e->Iex.Load.ty,
atbSubst_Expr(env, e->Iex.Load.addr)
@@ -4003,7 +4035,6 @@
case Ist_Store:
return IRStmt_Store(
st->Ist.Store.end,
- st->Ist.Store.resSC,
atbSubst_Expr(env, st->Ist.Store.addr),
atbSubst_Expr(env, st->Ist.Store.data)
);
@@ -4048,6 +4079,14 @@
atbSubst_Expr(env, cas->dataLo)
);
return IRStmt_CAS(cas2);
+ case Ist_LLSC:
+ return IRStmt_LLSC(
+ st->Ist.LLSC.end,
+ st->Ist.LLSC.result,
+ atbSubst_Expr(env, st->Ist.LLSC.addr),
+ st->Ist.LLSC.storedata
+ ? atbSubst_Expr(env, st->Ist.LLSC.storedata) : NULL
+ );
case Ist_Dirty:
d = st->Ist.Dirty.details;
d2 = emptyIRDirty();
@@ -4189,15 +4228,13 @@
/* be True if this stmt writes memory or might do (==> we don't
want to reorder other loads or stores relative to it). Also,
- a load-linked falls under this classification, since we
+ both LL and SC fall under this classification, since we
really ought to be conservative and not reorder any other
- memory transactions relative to it. */
+ memory transactions relative to them. */
stmtStores
= toBool( st->tag == Ist_Store
- || (st->tag == Ist_WrTmp
- && st->Ist.WrTmp.data->tag == Iex_Load
- && st->Ist.WrTmp.data->Iex.Load.isLL)
- || st->tag == Ist_Dirty );
+ || st->tag == Ist_Dirty
+ || st->tag == Ist_LLSC );
for (k = A_NENV-1; k >= 0; k--) {
if (env[k].bindee == NULL)
@@ -4388,6 +4425,11 @@
vassert(cas->dataHi == NULL || isIRAtom(cas->dataHi));
vassert(isIRAtom(cas->dataLo));
break;
+ case Ist_LLSC:
+ vassert(isIRAtom(st->Ist.LLSC.addr));
+ if (st->Ist.LLSC.storedata)
+ vassert(isIRAtom(st->Ist.LLSC.storedata));
+ break;
case Ist_Dirty:
d = st->Ist.Dirty.details;
vassert(isIRAtom(d->guard));
@@ -4406,7 +4448,7 @@
default:
bad:
ppIRStmt(st);
- vpanic("hasGetIorPutI");
+ vpanic("considerExpensives");
}
}
}
Modified: trunk/pub/libvex_ir.h
===================================================================
--- trunk/pub/libvex_ir.h 2009-11-22 23:43:17 UTC (rev 1929)
+++ trunk/pub/libvex_ir.h 2009-11-26 17:17:37 UTC (rev 1930)
@@ -1044,20 +1044,13 @@
IRExpr* arg; /* operand */
} Unop;
- /* A load from memory. If .isLL is True then this load also
- lodges a reservation (ppc-style lwarx/ldarx operation). If
- .isLL is True, then also, the address must be naturally
- aligned - any misaligned addresses should be caught by a
- dominating IR check and side exit. This alignment
- restriction exists because on at least some LL/SC platforms
- (ppc), lwarx etc will trap w/ SIGBUS on misaligned addresses,
- and we have to actually generate lwarx on the host, and we
- don't want it trapping on the host.
-
+ /* A load from memory -- a normal load, not a load-linked.
+ Load-Linkeds (and Store-Conditionals) are instead represented
+ by IRStmt.LLSC since Load-Linkeds have side effects and so
+ are not semantically valid IRExpr's.
ppIRExpr output: LD<end>:<ty>(<addr>), eg. LDle:I32(t1)
*/
struct {
- Bool isLL; /* True iff load makes a reservation */
IREndness end; /* Endian-ness of the load */
IRType ty; /* Type of the loaded value */
IRExpr* addr; /* Address being loaded from */
@@ -1141,8 +1134,7 @@
IRExpr* arg2, IRExpr* arg3 );
extern IRExpr* IRExpr_Binop ( IROp op, IRExpr* arg1, IRExpr* arg2 );
extern IRExpr* IRExpr_Unop ( IROp op, IRExpr* arg );
-extern IRExpr* IRExpr_Load ( Bool isLL, IREndness end,
- IRType ty, IRExpr* addr );
+extern IRExpr* IRExpr_Load ( IREndness end, IRType ty, IRExpr* addr );
extern IRExpr* IRExpr_Const ( IRConst* con );
extern IRExpr* IRExpr_CCall ( IRCallee* cee, IRType retty, IRExpr** args );
extern IRExpr* IRExpr_Mux0X ( IRExpr* cond, IRExpr* expr0, IRExpr* exprX );
@@ -1483,6 +1475,7 @@
Ist_WrTmp,
Ist_Store,
Ist_CAS,
+ Ist_LLSC,
Ist_Dirty,
Ist_MBE, /* META (maybe) */
Ist_Exit
@@ -1578,28 +1571,13 @@
IRExpr* data; /* Expression (RHS of assignment) */
} WrTmp;
- /* Write a value to memory. Normally scRes is
- IRTemp_INVALID, denoting a normal store. If scRes is not
- IRTemp_INVALID, then this is a store-conditional, which
- may fail or succeed depending on the outcome of a
- previously lodged reservation on this address. scRes is
- written 1 if the store succeeds and 0 if it fails, and
- must have type Ity_I1.
-
- If scRes is not IRTemp_INVALID, then also, the address
- must be naturally aligned - any misaligned addresses
- should be caught by a dominating IR check and side exit.
- This alignment restriction exists because on at least some
- LL/SC platforms (ppc), stwcx. etc will trap w/ SIGBUS on
- misaligned addresses, and we have to actually generate
- stwcx. on the host, and we don't want it trapping on the
- host.
-
+ /* Write a value to memory. This is a normal store, not a
+ Store-Conditional. To represent a Store-Conditional,
+ instead use IRStmt.LLSC.
ppIRStmt output: ST<end>(<addr>) = <data>, eg. STle(t1) = t2
*/
struct {
IREndness end; /* Endianness of the store */
- IRTemp resSC; /* result of SC goes here (1 == success) */
IRExpr* addr; /* store address */
IRExpr* data; /* value to write */
} Store;
@@ -1622,6 +1600,57 @@
IRCAS* details;
} CAS;
+ /* Either Load-Linked or Store-Conditional, depending on
+ STOREDATA.
+
+ If STOREDATA is NULL then this is a Load-Linked, meaning
+ that data is loaded from memory as normal, but a
+ 'reservation' for the address is also lodged in the
+ hardware.
+
+ result = Load-Linked(addr, end)
+
+ The data transfer type is the type of RESULT (I32, I64,
+ etc). ppIRStmt output:
+
+ result = LD<end>-Linked(<addr>), eg. LDbe-Linked(t1)
+
+ If STOREDATA is not NULL then this is a Store-Conditional,
+ hence:
+
+ result = Store-Conditional(addr, storedata, end)
+
+ The data transfer type is the type of STOREDATA and RESULT
+ has type Ity_I1. The store may fail or succeed depending
+ on the state of a previously lodged reservation on this
+ address. RESULT is written 1 if the store succeeds and 0
+ if it fails. eg ppIRStmt output:
+
+ result = ( ST<end>-Cond(<addr>) = <storedata> )
+ eg t3 = ( STbe-Cond(t1, t2) )
+
+ In all cases, the address must be naturally aligned for
+ the transfer type -- any misaligned addresses should be
+ caught by a dominating IR check and side exit. This
+ alignment restriction exists because on at least some
+ LL/SC platforms (ppc), stwcx. etc will trap w/ SIGBUS on
+ misaligned addresses, and we have to actually generate
+ stwcx. on the host, and we don't want it trapping on the
+ host.
+
+ Summary of rules for transfer type:
+ STOREDATA == NULL (LL):
+ transfer type = type of RESULT
+ STOREDATA != NULL (SC):
+ transfer type = type of STOREDATA, and RESULT :: Ity_I1
+ */
+ struct {
+ IREndness end;
+ IRTemp result;
+ IRExpr* addr;
+ IRExpr* storedata; /* NULL => LL, non-NULL => SC */
+ } LLSC;
+
/* Call (possibly conditionally) a C function that has side
effects (ie. is "dirty"). See the comments above the
IRDirty type declaration for more information.
@@ -1668,9 +1697,10 @@
extern IRStmt* IRStmt_PutI ( IRRegArray* descr, IRExpr* ix, Int bias,
IRExpr* data );
extern IRStmt* IRStmt_WrTmp ( IRTemp tmp, IRExpr* data );
-extern IRStmt* IRStmt_Store ( IREndness end,
- IRTemp resSC, IRExpr* addr, IRExpr* data );
+extern IRStmt* IRStmt_Store ( IREndness end, IRExpr* addr, IRExpr* data );
extern IRStmt* IRStmt_CAS ( IRCAS* details );
+extern IRStmt* IRStmt_LLSC ( IREndness end, IRTemp result,
+ IRExpr* addr, IRExpr* storedata );
extern IRStmt* IRStmt_Dirty ( IRDirty* details );
extern IRStmt* IRStmt_MBE ( IRMBusEvent event );
extern IRStmt* IRStmt_Exit ( IRExpr* guard, IRJumpKind jk, IRConst* dst );
|
|
From: Nicholas N. <n.n...@gm...> - 2009-11-26 10:25:03
|
Nightly build on ocean ( Ubuntu 9.04, x86_64 )
Started at 2009-11-26 02:00:01 PST
Ended at 2009-11-26 02:24:43 PST
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
== 537 tests, 3 stderr failures, 0 stdout failures, 0 post failures ==
memcheck/tests/x86-linux/scalar (stderr)
helgrind/tests/pth_spinlock (stderr)
helgrind/tests/tc06_two_races_xml (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
== 537 tests, 2 stderr failures, 0 stdout failures, 0 post failures ==
helgrind/tests/pth_spinlock (stderr)
helgrind/tests/tc06_two_races_xml (stderr)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short 2009-11-26 02:12:28.000000000 -0800
--- new.short 2009-11-26 02:24:43.000000000 -0800
***************
*** 8,10 ****
! == 537 tests, 2 stderr failures, 0 stdout failures, 0 post failures ==
helgrind/tests/pth_spinlock (stderr)
--- 8,11 ----
! == 537 tests, 3 stderr failures, 0 stdout failures, 0 post failures ==
! memcheck/tests/x86-linux/scalar (stderr)
helgrind/tests/pth_spinlock (stderr)
=================================================
./valgrind-new/helgrind/tests/pth_spinlock.stderr.diff
=================================================
--- pth_spinlock.stderr.exp 2009-11-26 02:12:42.000000000 -0800
+++ pth_spinlock.stderr.out 2009-11-26 02:22:08.000000000 -0800
@@ -1,2 +1,13 @@
Start of test.
+Thread #x was created
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (pth_spinlock.c:46)
+
+Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion
+ at 0x........: pthread_spin_lock (hg_intercepts.c:...)
+ by 0x........: thread_func (pth_spinlock.c:27)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
Test successful.
=================================================
./valgrind-new/helgrind/tests/tc06_two_races_xml.stderr.diff
=================================================
--- tc06_two_races_xml.stderr.exp 2009-11-26 02:12:42.000000000 -0800
+++ tc06_two_races_xml.stderr.out 2009-11-26 02:22:14.000000000 -0800
@@ -29,12 +29,12 @@
</status>
<announcethread>
- <hthreadid>1</threadid>
+ <hthreadid>1</hthreadid>
<isrootthread></isrootthread>
</announcethread>
<announcethread>
- <hthreadid>2</threadid>
+ <hthreadid>2</hthreadid>
<stack>
<frame>
<ip>0x........</ip>
@@ -44,11 +44,6 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>do_clone</fn>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<fn>pthread_create@@GLIBC_2.2.5</fn>
</frame>
<frame>
@@ -294,6 +289,7 @@
<xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>...</line> </xauxwhat>
</error>
+
<status>
<state>FINISHED</state>
<time>...</time>
=================================================
./valgrind-new/memcheck/tests/x86-linux/scalar.stderr.diff
=================================================
--- scalar.stderr.exp 2009-11-26 02:12:54.000000000 -0800
+++ scalar.stderr.out 2009-11-26 02:20:11.000000000 -0800
@@ -1863,10 +1863,10 @@
Syscall param pread64(count) contains uninitialised byte(s)
...
-Syscall param pread64(offset_low32) contains uninitialised byte(s)
+Syscall param pread64(offset_low) contains uninitialised byte(s)
...
-Syscall param pread64(offset_high32) contains uninitialised byte(s)
+Syscall param pread64(offset_high) contains uninitialised byte(s)
...
Syscall param pread64(buf) points to unaddressable byte(s)
@@ -1885,10 +1885,10 @@
Syscall param pwrite64(count) contains uninitialised byte(s)
...
-Syscall param pwrite64(offset_low32) contains uninitialised byte(s)
+Syscall param pwrite64(offset_low) contains uninitialised byte(s)
...
-Syscall param pwrite64(offset_high32) contains uninitialised byte(s)
+Syscall param pwrite64(offset_high) contains uninitialised byte(s)
...
Syscall param pwrite64(buf) points to unaddressable byte(s)
@@ -2073,10 +2073,10 @@
Syscall param truncate64(path) contains uninitialised byte(s)
...
-Syscall param truncate64(length_low32) contains uninitialised byte(s)
+Syscall param truncate64(length_low) contains uninitialised byte(s)
...
-Syscall param truncate64(length_high32) contains uninitialised byte(s)
+Syscall param truncate64(length_high) contains uninitialised byte(s)
...
Syscall param truncate64(path) points to unaddressable byte(s)
@@ -2089,10 +2089,10 @@
Syscall param ftruncate64(fd) contains uninitialised byte(s)
...
-Syscall param ftruncate64(length_low32) contains uninitialised byte(s)
+Syscall param ftruncate64(length_low) contains uninitialised byte(s)
...
-Syscall param ftruncate64(length_high32) contains uninitialised byte(s)
+Syscall param ftruncate64(length_high) contains uninitialised byte(s)
...
-----------------------------------------------------
@@ -2874,10 +2874,10 @@
-----------------------------------------------------
253: __NR_lookup_dcookie 4s 1m
-----------------------------------------------------
-Syscall param lookup_dcookie(cookie_low32) contains uninitialised byte(s)
+Syscall param lookup_dcookie(cookie_low) contains uninitialised byte(s)
...
-Syscall param lookup_dcookie(cookie_high32) contains uninitialised byte(s)
+Syscall param lookup_dcookie(cookie_high) contains uninitialised byte(s)
...
Syscall param lookup_dcookie(buf) contains uninitialised byte(s)
=================================================
./valgrind-old/helgrind/tests/pth_spinlock.stderr.diff
=================================================
--- pth_spinlock.stderr.exp 2009-11-26 02:00:24.000000000 -0800
+++ pth_spinlock.stderr.out 2009-11-26 02:09:56.000000000 -0800
@@ -1,2 +1,24 @@
Start of test.
+Thread #x was created
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (pth_spinlock.c:46)
+
+Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion
+ at 0x........: pthread_spin_lock (hg_intercepts.c:...)
+ by 0x........: thread_func (pth_spinlock.c:27)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+Thread #x was created
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (pth_spinlock.c:46)
+
+Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion
+ at 0x........: pthread_spin_lock (hg_intercepts.c:...)
+ by 0x........: thread_func (pth_spinlock.c:27)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
Test successful.
=================================================
./valgrind-old/helgrind/tests/tc06_two_races_xml.stderr.diff
=================================================
--- tc06_two_races_xml.stderr.exp 2009-11-26 02:00:24.000000000 -0800
+++ tc06_two_races_xml.stderr.out 2009-11-26 02:10:01.000000000 -0800
@@ -29,12 +29,12 @@
</status>
<announcethread>
- <hthreadid>1</threadid>
+ <hthreadid>1</hthreadid>
<isrootthread></isrootthread>
</announcethread>
<announcethread>
- <hthreadid>2</threadid>
+ <hthreadid>2</hthreadid>
<stack>
<frame>
<ip>0x........</ip>
@@ -44,11 +44,6 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>do_clone</fn>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<fn>pthread_create@@GLIBC_2.2.5</fn>
</frame>
<frame>
@@ -294,6 +289,7 @@
<xauxwhat><text>declared at tc06_two_races.c:9</text> <file>tc06_two_races.c</file> <line>...</line> </xauxwhat>
</error>
+
<status>
<state>FINISHED</state>
<time>...</time>
|
|
From: Alexander P. <gl...@go...> - 2009-11-26 09:39:26
|
Nightly build on mcgrind ( Darwin 9.7.0 i386 ) Started at 2009-11-26 09:06:01 MSK Ended at 2009-11-26 09:24:58 MSK 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 == 433 tests, 22 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/null_socket (stdout) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) none/tests/async-sigs (stderr) none/tests/faultstatus (stderr) none/tests/pth_blockedsig (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/rwlock_race (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc23_bogus_condwait (stderr) -- Alexander Potapenko Software Engineer Google Moscow |
|
From: Bart V. A. <bar...@gm...> - 2009-11-26 08:27:15
|
Nightly build on cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-11-26 02:00:05 EST Ended at 2009-11-26 03:26:55 EST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 449 tests, 45 stderr failures, 10 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/linux-syscalls-2007 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) |
|
From: Tom H. <th...@cy...> - 2009-11-26 03:49:35
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-11-26 03:05:04 GMT Ended at 2009-11-26 03:49:08 GMT 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 == 531 tests, 2 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/x86-linux/scalar (stderr) helgrind/tests/tc06_two_races_xml (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 == 531 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Nov 26 03:27:21 2009 --- new.short Thu Nov 26 03:49:08 2009 *************** *** 8,10 **** ! == 531 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) --- 8,11 ---- ! == 531 tests, 2 stderr failures, 0 stdout failures, 0 post failures == ! memcheck/tests/x86-linux/scalar (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Tom H. <th...@cy...> - 2009-11-26 03:36:06
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-11-26 03:10:03 GMT Ended at 2009-11-26 03:35:47 GMT 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 == 538 tests, 2 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/x86-linux/scalar (stderr) helgrind/tests/tc06_two_races_xml (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 == 538 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Nov 26 03:22:56 2009 --- new.short Thu Nov 26 03:35:47 2009 *************** *** 8,10 **** ! == 538 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) --- 8,11 ---- ! == 538 tests, 2 stderr failures, 0 stdout failures, 0 post failures == ! memcheck/tests/x86-linux/scalar (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Alexander P. <gl...@go...> - 2009-11-25 14:43:50
|
Nightly build on mcgrind ( Darwin 9.7.0 i386 ) Started at 2009-11-25 09:06:02 MSK Ended at 2009-11-25 09:24:48 MSK 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 == 433 tests, 22 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/null_socket (stdout) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) none/tests/async-sigs (stderr) none/tests/faultstatus (stderr) none/tests/pth_blockedsig (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/rwlock_race (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc23_bogus_condwait (stderr) -- Alexander Potapenko Software Engineer Google Moscow |
|
From: Rich C. <Ric...@me...> - 2009-11-25 14:42:07
|
Nightly build on macbook ( Darwin 9.8.0 i386 )
Started at 2009-11-24 23:05:00 CST
Ended at 2009-11-24 23:32:25 CST
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
== 419 tests, 10 stderr failures, 2 stdout failures, 0 post failures ==
memcheck/tests/null_socket (stdout)
memcheck/tests/origin5-bz2 (stderr)
memcheck/tests/varinfo3 (stderr)
memcheck/tests/varinfo5 (stderr)
none/tests/async-sigs (stderr)
none/tests/faultstatus (stderr)
none/tests/pth_blockedsig (stderr)
helgrind/tests/rwlock_race (stderr)
helgrind/tests/tc06_two_races_xml (stderr)
helgrind/tests/tc18_semabuse (stderr)
helgrind/tests/tc23_bogus_condwait (stderr)
drd/tests/pth_detached (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
== 419 tests, 10 stderr failures, 1 stdout failure, 0 post failures ==
memcheck/tests/null_socket (stdout)
memcheck/tests/origin5-bz2 (stderr)
memcheck/tests/varinfo3 (stderr)
memcheck/tests/varinfo5 (stderr)
none/tests/async-sigs (stderr)
none/tests/faultstatus (stderr)
none/tests/pth_blockedsig (stderr)
helgrind/tests/rwlock_race (stderr)
helgrind/tests/tc06_two_races_xml (stderr)
helgrind/tests/tc18_semabuse (stderr)
helgrind/tests/tc23_bogus_condwait (stderr)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Tue Nov 24 23:18:48 2009
--- new.short Tue Nov 24 23:32:25 2009
***************
*** 8,10 ****
! == 419 tests, 10 stderr failures, 1 stdout failure, 0 post failures ==
memcheck/tests/null_socket (stdout)
--- 8,10 ----
! == 419 tests, 10 stderr failures, 2 stdout failures, 0 post failures ==
memcheck/tests/null_socket (stdout)
***************
*** 20,21 ****
--- 20,22 ----
helgrind/tests/tc23_bogus_condwait (stderr)
+ drd/tests/pth_detached (stdout)
=================================================
./valgrind-new/drd/tests/pth_detached.stdout.diff
=================================================
Binary files pth_detached.stdout.exp and pth_detached.stdout.out differ
=================================================
./valgrind-new/helgrind/tests/rwlock_race.stderr.diff
=================================================
--- rwlock_race.stderr.exp 2009-11-24 23:18:54.000000000 -0600
+++ rwlock_race.stderr.out 2009-11-24 23:29:42.000000000 -0600
@@ -1,25 +1,4 @@
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: main (rwlock_race.c:48)
-
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: main (rwlock_race.c:47)
-
-Possible data race during write of size 4 at 0x........ by thread #x
- at 0x........: thread_func (rwlock_race.c:29)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- This conflicts with a previous write of size 4 by thread #x
- at 0x........: thread_func (rwlock_race.c:29)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- Location 0x........ is 0 bytes inside local var "s_racy"
- declared at rwlock_race.c:18, in frame #x of thread x
-
Result: 2
-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc06_two_races_xml.stderr.diff
=================================================
--- tc06_two_races_xml.stderr.exp 2009-11-24 23:18:54.000000000 -0600
+++ tc06_two_races_xml.stderr.out 2009-11-24 23:29:58.000000000 -0600
@@ -29,27 +29,17 @@
</status>
<announcethread>
- <hthreadid>1</threadid>
+ <hthreadid>1</hthreadid>
<isrootthread></isrootthread>
</announcethread>
<announcethread>
- <hthreadid>2</threadid>
+ <hthreadid>2</hthreadid>
<stack>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>do_clone</fn>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>pthread_create@@GLIBC_2.2.5</fn>
+ <fn>__bsdthread_create</fn>
</frame>
<frame>
<ip>0x........</ip>
@@ -62,7 +52,7 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>pthread_create@*</fn>
+ <fn>pthread_create</fn>
<dir>...</dir>
<file>hg_intercepts.c</file>
<line>...</line>
@@ -120,12 +110,12 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>start_thread</fn>
+ <fn>_pthread_start</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
+ <fn>thread_start</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -174,12 +164,12 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>start_thread</fn>
+ <fn>_pthread_start</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
+ <fn>thread_start</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -228,12 +218,12 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>start_thread</fn>
+ <fn>_pthread_start</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
+ <fn>thread_start</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
@@ -282,18 +272,19 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>start_thread</fn>
+ <fn>_pthread_start</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
+ <fn>thread_start</fn>
</frame>
<truncated beyond 100 lines>
=================================================
./valgrind-new/helgrind/tests/tc18_semabuse.stderr.diff-glibc25-amd64
=================================================
--- tc18_semabuse.stderr.exp-glibc25-amd64 2009-11-24 23:18:54.000000000 -0600
+++ tc18_semabuse.stderr.out 2009-11-24 23:30:12.000000000 -0600
@@ -2,14 +2,30 @@
Thread #x is the program's root thread
Thread #x's call to sem_init failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_init@* (hg_intercepts.c:...)
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_init (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:23)
-Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
+Thread #x's call to sem_init failed
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_init (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:26)
+
+Thread #x's call to sem_wait failed
+ with error code 9 (EBADF: Bad file number)
at 0x........: sem_wait_WRK (hg_intercepts.c:...)
- by 0x........: sem_wait (hg_intercepts.c:...)
+ by 0x........: sem_wait$* (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
+Thread #x's call to sem_post failed
+ with error code 9 (EBADF: Bad file number)
+ at 0x........: sem_post (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:37)
+
+Thread #x's call to sem_destroy failed
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_destroy (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:39)
+
-ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc18_semabuse.stderr.diff-glibc28-amd64
=================================================
--- tc18_semabuse.stderr.exp-glibc28-amd64 2009-11-24 23:18:54.000000000 -0600
+++ tc18_semabuse.stderr.out 2009-11-24 23:30:12.000000000 -0600
@@ -2,20 +2,30 @@
Thread #x is the program's root thread
Thread #x's call to sem_init failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_init@* (hg_intercepts.c:...)
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_init (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:23)
-Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
+Thread #x's call to sem_init failed
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_init (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:26)
+
+Thread #x's call to sem_wait failed
+ with error code 9 (EBADF: Bad file number)
at 0x........: sem_wait_WRK (hg_intercepts.c:...)
- by 0x........: sem_wait (hg_intercepts.c:...)
+ by 0x........: sem_wait$* (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
+ with error code 9 (EBADF: Bad file number)
+ at 0x........: sem_post (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:37)
+Thread #x's call to sem_destroy failed
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_destroy (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:39)
+
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc23_bogus_condwait.stderr.diff
=================================================
--- tc23_bogus_condwait.stderr.exp 2009-11-24 23:18:54.000000000 -0600
+++ tc23_bogus_condwait.stderr.out 2009-11-24 23:30:48.000000000 -0600
@@ -2,32 +2,52 @@
Thread #x is the program's root thread
Thread #x: pthread_cond_{timed}wait called with invalid mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:69)
+
+Thread #x's call to pthread_cond_wait failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:69)
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t*
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:75)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:75)
+
+Thread #x's call to pthread_cond_wait failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:75)
Thread #x: pthread_cond_{timed}wait called with mutex held by a different thread
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:78)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:78)
+Thread #x: Bug in libpthread: write lock granted on mutex/rwlock which is currently wr-held by a different thread
+ at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: _pthread_cond_wait (in /...libc...)
+ by 0x........: pthread_cond_wait$UNIX2003 (in /...libc...)
+ by 0x........: pthread_cond_wait* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:78)
+
+Thread #x: Exiting thread still holds 1 lock
+ ...
+
-ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/memcheck/tests/null_socket.stdout.diff
=================================================
--- /dev/null 2009-11-24 23:24:31.000000000 -0600
+++ null_socket.stdout.out 2009-11-24 23:24:48.000000000 -0600
@@ -0,0 +1 @@
+recvfrom succeeded?
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2009-11-24 23:19:01.000000000 -0600
+++ origin5-bz2.stderr.out 2009-11-24 23:25:03.000000000 -0600
@@ -11,7 +11,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -19,7 +19,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -27,7 +27,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -38,7 +38,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -49,8 +49,8 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2854)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2855)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
@@ -60,8 +60,8 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2858)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2859)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
@@ -71,7 +71,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -82,7 +82,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -93,7 +93,18 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 4
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -104,7 +115,7 @@
Uninitialised value was created by a client request
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2009-11-24 23:19:03.000000000 -0600
+++ origin5-bz2.stderr.out 2009-11-24 23:25:03.000000000 -0600
@@ -28,7 +28,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2820)
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -38,7 +39,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2823)
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -48,7 +50,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2855)
+ at 0x........: mainSort (origin5-bz2.c:2855)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -58,7 +61,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2859)
+ at 0x........: mainSort (origin5-bz2.c:2859)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -68,7 +72,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2963)
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -78,7 +83,19 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2964)
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2009-11-24 23:19:01.000000000 -0600
+++ origin5-bz2.stderr.out 2009-11-24 23:25:03.000000000 -0600
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: handle_compress (origin5-bz2.c:4686)
@@ -9,85 +9,102 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2820)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2823)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2854)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2855)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2858)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2859)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2963)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/varinfo3.stderr.diff
=================================================
--- varinfo3.stderr.exp 2009-11-24 23:19:02.000000000 -0600
+++ varinfo3.stderr.out 2009-11-24 23:25:58.000000000 -0600
@@ -31,7 +31,7 @@
by 0x........: bar (varinfo3.c:42)
by 0x........: foo (varinfo3.c:58)
by 0x........: main (varinfo3.c:66)
- Address 0x........ is 5 bytes inside data symbol "static_local_def.XXXX"
+ Address 0x........ is in the Data segment of ./varinfo3
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo3.c:28)
@@ -46,7 +46,7 @@
by 0x........: bar (varinfo3.c:44)
by 0x........: foo (varinfo3.c:58)
by 0x........: main (varinfo3.c:66)
- Address 0x........ is 7 bytes inside data symbol "static_local_undef.XXXX"
+ Address 0x........ is in the Data segment of ./varinfo3
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo3.c:28)
=================================================
./valgrind-new/memcheck/tests/varinfo5.stderr.diff
=================================================
--- varinfo5.stderr.exp 2009-11-24 23:19:02.000000000 -0600
+++ varinfo5.stderr.out 2009-11-24 23:26:00.000000000 -0600
@@ -119,7 +119,7 @@
by 0x........: varinfo3_main (varinfo5so.c:118)
by 0x........: varinfo5_main (varinfo5so.c:156)
by 0x........: main (varinfo5.c:5)
- Address 0x........ is 5 bytes inside data symbol "static_local_def.XXXX"
+ Address 0x........ is in the Data segment of /Users/minime/src/vg/nightly/valgrind-new/memcheck/tests/varinfo5so.so
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo5so.c:29)
@@ -138,7 +138,7 @@
by 0x........: varinfo3_main (varinfo5so.c:118)
by 0x........: varinfo5_main (varinfo5so.c:156)
by 0x........: main (varinfo5.c:5)
- Address 0x........ is 7 bytes inside data symbol "static_local_undef.XXXX"
+ Address 0x........ is in the Data segment of /Users/minime/src/vg/nightly/valgrind-new/memcheck/tests/varinfo5so.so
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo5so.c:29)
=================================================
./valgrind-new/none/tests/async-sigs.stderr.diff
=================================================
--- async-sigs.stderr.exp 2009-11-24 23:19:11.000000000 -0600
+++ async-sigs.stderr.out 2009-11-24 23:27:26.000000000 -0600
@@ -1,8 +1,30 @@
-testing: blocking=0 caught=11 fatal=7... PASSED
+testing: blocking=0 caught=11 fatal=10...
+Process terminating with default action of signal 10 (SIGBUS)
+ Non-existent physical address at address 0x........
+ at 0x........: test (async-sigs.c:94)
+ by 0x........: main (async-sigs.c:129)
+PASSED
testing: blocking=0 caught=11 fatal=1... PASSED
-testing: blocking=0 caught=10 fatal=7... PASSED
-testing: blocking=0 caught=10 fatal=1... PASSED
-testing: blocking=1 caught=11 fatal=7... PASSED
+testing: blocking=0 caught=30 fatal=10...
+Process terminating with default action of signal 10 (SIGBUS)
+ Non-existent physical address at address 0x........
+ at 0x........: test (async-sigs.c:94)
+ by 0x........: main (async-sigs.c:131)
+PASSED
+testing: blocking=0 caught=30 fatal=1... PASSED
+testing: blocking=1 caught=11 fatal=10...
+Process terminating with default action of signal 10 (SIGBUS)
+ Non-existent physical address at address 0x........
+ at 0x........: __sigsuspend (in /...libc...)
+ by 0x........: test (async-sigs.c:95)
+ by 0x........: main (async-sigs.c:133)
+PASSED
testing: blocking=1 caught=11 fatal=1... PASSED
-testing: blocking=1 caught=10 fatal=7... PASSED
-testing: blocking=1 caught=10 fatal=1... PASSED
+testing: blocking=1 caught=30 fatal=10...
+Process terminating with default action of signal 10 (SIGBUS)
+ Non-existent physical address at address 0x........
+ at 0x........: __sigsuspend (in /...libc...)
+ by 0x........: test (async-sigs.c:95)
+ by 0x........: main (async-sigs.c:135)
+PASSED
+testing: blocking=1 caught=30 fatal=1... PASSED
=================================================
./valgrind-new/none/tests/faultstatus.stderr.diff
=================================================
--- faultstatus.stderr.exp 2009-11-24 23:19:12.000000000 -0600
+++ faultstatus.stderr.out 2009-11-24 23:27:31.000000000 -0600
@@ -1,6 +1,6 @@
-Test 1: PASS
-Test 2: PASS
-Test 3: PASS
-Test 4: PASS
+Test 1: FAIL: expected signal 11, not 10
+Test 2: FAIL: expected signal 11, not 10
+Test 3: FAIL: no fault, or handler returned
+Test 4: FAIL: expected si_code==7, not 0
=================================================
./valgrind-new/none/tests/pth_blockedsig.stderr.diff
=================================================
--- pth_blockedsig.stderr.exp 2009-11-24 23:19:11.000000000 -0600
+++ pth_blockedsig.stderr.out 2009-11-24 23:28:33.000000000 -0600
@@ -1,2 +1,4 @@
+UNKNOWN __pthread_sigmask is unsupported. This warning will not be repeated.
+SHOULD NOT BE HERE (SIGUSR1)!!!!
=================================================
./valgrind-old/helgrind/tests/rwlock_race.stderr.diff
=================================================
--- rwlock_race.stderr.exp 2009-11-24 23:05:13.000000000 -0600
+++ rwlock_race.stderr.out 2009-11-24 23:16:06.000000000 -0600
@@ -1,25 +1,4 @@
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: main (rwlock_race.c:48)
-
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: main (rwlock_race.c:47)
-
-Possible data race during write of size 4 at 0x........ by thread #x
- at 0x........: thread_func (rwlock_race.c:29)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- This conflicts with a previous write of size 4 by thread #x
- at 0x........: thread_func (rwlock_race.c:29)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- Location 0x........ is 0 bytes inside local var "s_racy"
- declared at rwlock_race.c:18, in frame #x of thread x
-
Result: 2
-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc06_two_races_xml.stderr.diff
=================================================
--- tc06_two_races_xml.stderr.exp 2009-11-24 23:05:14.000000000 -0600
+++ tc06_two_races_xml.stderr.out 2009-11-24 23:16:22.000000000 -0600
@@ -29,27 +29,17 @@
</status>
<announcethread>
- <hthreadid>1</threadid>
+ <hthreadid>1</hthreadid>
<isrootthread></isrootthread>
</announcethread>
<announcethread>
- <hthreadid>2</threadid>
+ <hthreadid>2</hthreadid>
<stack>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>do_clone</fn>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>pthread_create@@GLIBC_2.2.5</fn>
+ <fn>__bsdthread_create</fn>
</frame>
<frame>
<ip>0x........</ip>
@@ -62,7 +52,7 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>pthread_create@*</fn>
+ <fn>pthread_create</fn>
<dir>...</dir>
<file>hg_intercepts.c</file>
<line>...</line>
@@ -120,12 +110,12 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>start_thread</fn>
+ <fn>_pthread_start</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
+ <fn>thread_start</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -174,12 +164,12 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>start_thread</fn>
+ <fn>_pthread_start</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
+ <fn>thread_start</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -228,12 +218,12 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>start_thread</fn>
+ <fn>_pthread_start</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
+ <fn>thread_start</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
@@ -282,18 +272,19 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>start_thread</fn>
+ <fn>_pthread_start</fn>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>clone</fn>
+ <fn>thread_start</fn>
</frame>
<truncated beyond 100 lines>
=================================================
./valgrind-old/helgrind/tests/tc18_semabuse.stderr.diff-glibc25-amd64
=================================================
--- tc18_semabuse.stderr.exp-glibc25-amd64 2009-11-24 23:05:13.000000000 -0600
+++ tc18_semabuse.stderr.out 2009-11-24 23:16:36.000000000 -0600
@@ -2,14 +2,30 @@
Thread #x is the program's root thread
Thread #x's call to sem_init failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_init@* (hg_intercepts.c:...)
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_init (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:23)
-Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
+Thread #x's call to sem_init failed
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_init (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:26)
+
+Thread #x's call to sem_wait failed
+ with error code 9 (EBADF: Bad file number)
at 0x........: sem_wait_WRK (hg_intercepts.c:...)
- by 0x........: sem_wait (hg_intercepts.c:...)
+ by 0x........: sem_wait$* (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
+Thread #x's call to sem_post failed
+ with error code 9 (EBADF: Bad file number)
+ at 0x........: sem_post (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:37)
+
+Thread #x's call to sem_destroy failed
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_destroy (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:39)
+
-ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc18_semabuse.stderr.diff-glibc28-amd64
=================================================
--- tc18_semabuse.stderr.exp-glibc28-amd64 2009-11-24 23:05:13.000000000 -0600
+++ tc18_semabuse.stderr.out 2009-11-24 23:16:36.000000000 -0600
@@ -2,20 +2,30 @@
Thread #x is the program's root thread
Thread #x's call to sem_init failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_init@* (hg_intercepts.c:...)
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_init (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:23)
-Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
+Thread #x's call to sem_init failed
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_init (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:26)
+
+Thread #x's call to sem_wait failed
+ with error code 9 (EBADF: Bad file number)
at 0x........: sem_wait_WRK (hg_intercepts.c:...)
- by 0x........: sem_wait (hg_intercepts.c:...)
+ by 0x........: sem_wait$* (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
+ with error code 9 (EBADF: Bad file number)
+ at 0x........: sem_post (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:37)
+Thread #x's call to sem_destroy failed
+ with error code 78 (ENOSYS: Function not implemented)
+ at 0x........: sem_destroy (hg_intercepts.c:...)
+ by 0x........: main (tc18_semabuse.c:39)
+
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc23_bogus_condwait.stderr.diff
=================================================
--- tc23_bogus_condwait.stderr.exp 2009-11-24 23:05:13.000000000 -0600
+++ tc23_bogus_condwait.stderr.out 2009-11-24 23:17:12.000000000 -0600
@@ -2,32 +2,52 @@
Thread #x is the program's root thread
Thread #x: pthread_cond_{timed}wait called with invalid mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:69)
+
+Thread #x's call to pthread_cond_wait failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:69)
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t*
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:75)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:75)
+
+Thread #x's call to pthread_cond_wait failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:75)
Thread #x: pthread_cond_{timed}wait called with mutex held by a different thread
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:78)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:78)
+Thread #x: Bug in libpthread: write lock granted on mutex/rwlock which is currently wr-held by a different thread
+ at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: _pthread_cond_wait (in /...libc...)
+ by 0x........: pthread_cond_wait$UNIX2003 (in /...libc...)
+ by 0x........: pthread_cond_wait* (hg_intercepts.c:...)
+ by 0x........: main (tc23_bogus_condwait.c:78)
+
+Thread #x: Exiting thread still holds 1 lock
+ ...
+
-ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/memcheck/tests/null_socket.stdout.diff
=================================================
--- /dev/null 2009-11-24 23:10:55.000000000 -0600
+++ null_socket.stdout.out 2009-11-24 23:11:12.000000000 -0600
@@ -0,0 +1 @@
+recvfrom succeeded?
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2009-11-24 23:05:21.000000000 -0600
+++ origin5-bz2.stderr.out 2009-11-24 23:11:27.000000000 -0600
@@ -11,7 +11,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -19,7 +19,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
@@ -27,7 +27,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -38,7 +38,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -49,8 +49,8 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2854)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2855)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
@@ -60,8 +60,8 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2858)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2859)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
@@ -71,7 +71,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -82,7 +82,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -93,7 +93,18 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 4
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -104,7 +115,7 @@
Uninitialised value was created by a client request
<truncated beyond 100 lines>
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2009-11-24 23:05:22.000000000 -0600
+++ origin5-bz2.stderr.out 2009-11-24 23:11:27.000000000 -0600
@@ -28,7 +28,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2820)
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -38,7 +39,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2823)
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -48,7 +50,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2855)
+ at 0x........: mainSort (origin5-bz2.c:2855)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -58,7 +61,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2859)
+ at 0x........: mainSort (origin5-bz2.c:2859)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -68,7 +72,8 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2963)
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -78,7 +83,19 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 4
- at 0x........: BZ2_blockSort (origin5-bz2.c:2964)
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
+ by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
+ by 0x........: handle_compress (origin5-bz2.c:4753)
+ by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
+ by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
+ by 0x........: main (origin5-bz2.c:6484)
+ Uninitialised value was created by a client request
+ at 0x........: main (origin5-bz2.c:6479)
+
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2964)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2009-11-24 23:05:21.000000000 -0600
+++ origin5-bz2.stderr.out 2009-11-24 23:11:27.000000000 -0600
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: handle_compress (origin5-bz2.c:4686)
@@ -9,85 +9,102 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
+Use of uninitialised value of size 4
at 0x........: handle_compress (origin5-bz2.c:4686)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2820)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2820)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2823)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2823)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2854)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2855)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2858)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2859)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
by 0x........: handle_compress (origin5-bz2.c:4753)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 8
- at 0x........: BZ2_blockSort (origin5-bz2.c:2963)
+Use of uninitialised value of size 4
+ at 0x........: mainSort (origin5-bz2.c:2963)
+ by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
<truncated beyond 100 lines>
=================================================
./valgrind-old/memcheck/tests/varinfo3.stderr.diff
=================================================
--- varinfo3.stderr.exp 2009-11-24 23:05:21.000000000 -0600
+++ varinfo3.stderr.out 2009-11-24 23:12:22.000000000 -0600
@@ -31,7 +31,7 @@
by 0x........: bar (varinfo3.c:42)
by 0x........: foo (varinfo3.c:58)
by 0x........: main (varinfo3.c:66)
- Address 0x........ is 5 bytes inside data symbol "static_local_def.XXXX"
+ Address 0x........ is in the Data segment of ./varinfo3
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo3.c:28)
@@ -46,7 +46,7 @@
by 0x........: bar (varinfo3.c:44)
by 0x........: foo (varinfo3.c:58)
by 0x........: main (varinfo3.c:66)
- Address 0x........ is 7 bytes inside data symbol "static_local_undef.XXXX"
+ Address 0x........ is in the Data segment of ./varinfo3
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo3.c:28)
=================================================
./valgrind-old/memcheck/tests/varinfo5.stderr.diff
=================================================
--- varinfo5.stderr.exp 2009-11-24 23:05:22.000000000 -0600
+++ varinfo5.stderr.out 2009-11-24 23:12:24.000000000 -0600
@@ -119,7 +119,7 @@
by 0x........: varinfo3_main (varinfo5so.c:118)
by 0x........: varinfo5_main (varinfo5so.c:156)
by 0x........: main (varinfo5.c:5)
- Address 0x........ is 5 bytes inside data symbol "static_local_def.XXXX"
+ Address 0x........ is in the Data segment of /Users/minime/src/vg/nightly/valgrind-old/memcheck/tests/varinfo5so.so
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo5so.c:29)
@@ -138,7 +138,7 @@
by 0x........: varinfo3_main (varinfo5so.c:118)
by 0x........: varinfo5_main (varinfo5so.c:156)
by 0x........: main (varinfo5.c:5)
- Address 0x........ is 7 bytes inside data symbol "static_local_undef.XXXX"
+ Address 0x........ is in the Data segment of /Users/minime/src/vg/nightly/valgrind-old/memcheck/tests/varinfo5so.so
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo5so.c:29)
=================================================
./valgrind-old/none/tests/async-sigs.stderr.diff
=================================================
--- async-sigs.stderr.exp 2009-11-24 23:05:31.000000000 -0600
+++ async-sigs.stderr.out 2009-11-24 23:13:50.000000000 -0600
@@ -1,8 +1,30 @@
-testing: blocking=0 caught=11 fatal=7... PASSED
+testing: blocking=0 caught=11 fatal=10...
+Process terminating with default action of signal 10 (SIGBUS)
+ Non-existent physical address at address 0x........
+ at 0x........: test (async-sigs.c:94)
+ by 0x........: main (async-sigs.c:129)
+PASSED
testing: blocking=0 caught=11 fatal=1... PASSED
-testing: blocking=0 caught=10 fatal=7... PASSED
-testing: blocking=0 caught=10 fatal=1... PASSED
-testing: blocking=1 caught=11 fatal=7... PASSED
+testing: blocking=0 caught=30 fatal=10...
+Process terminating with default action of signal 10 (SIGBUS)
+ Non-existent physical address at address 0x........
+ at 0x........: test (async-sigs.c:94)
+ by 0x........: main (async-sigs.c:131)
+PASSED
+testing: blocking=0 caught=30 fatal=1... PASSED
+testing: blocking=1 caught=11 fatal=10...
+Process terminating with default action of signal 10 (SIGBUS)
+ Non-existent physical address at address 0x........
+ at 0x........: __sigsuspend (in /...libc...)
+ by 0x........: test (async-sigs.c:95)
+ by 0x........: main (async-sigs.c:133)
+PASSED
testing: blocking=1 caught=11 fatal=1... PASSED
-testing: blocking=1 caught=10 fatal=7... PASSED
-testing: blocking=1 caught=10 fatal=1... PASSED
+testing: blocking=1 caught=30 fatal=10...
+Process terminating with default action of signal 10 (SIGBUS)
+ Non-existent physical address at address 0x........
+ at 0x........: __sigsuspend (in /...libc...)
+ by 0x........: test (async-sigs.c:95)
+ by 0x........: main (async-sigs.c:135)
+PASSED
+testing: blocking=1 caught=30 fatal=1... PASSED
=================================================
./valgrind-old/none/tests/faultstatus.stderr.diff
=================================================
--- faultstatus.stderr.exp 2009-11-24 23:05:32.000000000 -0600
+++ faultstatus.stderr.out 2009-11-24 23:13:55.000000000 -0600
@@ -1,6 +1,6 @@
-Test 1: PASS
-Test 2: PASS
-Test 3: PASS
-Test 4: PASS
+Test 1: FAIL: expected signal 11, not 10
+Test 2: FAIL: expected signal 11, not 10
+Test 3: FAIL: no fault, or handler returned
+Test 4: FAIL: expected si_code==7, not 0
=================================================
./valgrind-old/none/tests/pth_blockedsig.stderr.diff
=================================================
--- pth_blockedsig.stderr.exp 2009-11-24 23:05:31.000000000 -0600
+++ pth_blockedsig.stderr.out 2009-11-24 23:14:57.000000000 -0600
@@ -1,2 +1,4 @@
+UNKNOWN __pthread_sigmask is unsupported. This warning will not be repeated.
+SHOULD NOT BE HERE (SIGUSR1)!!!!
|
|
From: <sv...@va...> - 2009-11-25 13:58:02
|
Author: sewardj
Date: 2009-11-25 13:57:47 +0000 (Wed, 25 Nov 2009)
New Revision: 10956
Log:
Fix type in r10951. Not sure why this didn't cause a compilation
error, but least on ppc32-linux it didn't.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2009-11-25 12:05:41 UTC (rev 10955)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2009-11-25 13:57:47 UTC (rev 10956)
@@ -2355,7 +2355,7 @@
ARG1, ARG2, (ULong)ARG3, MERGE64(ARG4,ARG5));
PRE_REG_READ5(ssize_t, "pwrite64",
unsigned int, fd, const char *, buf, vki_size_t, count,
- vki_u32, MERG64_FIRST(offset), vki_u32, MERGE64_SECOND(offset));
+ vki_u32, MERGE64_FIRST(offset), vki_u32, MERGE64_SECOND(offset));
#elif VG_WORDSIZE == 8
PRINT("sys_pwrite64 ( %ld, %#lx, %llu, %lld )",
ARG1, ARG2, (ULong)ARG3, (Long)ARG4);
|
|
From: <sv...@va...> - 2009-11-25 12:05:54
|
Author: tom
Date: 2009-11-25 12:05:41 +0000 (Wed, 25 Nov 2009)
New Revision: 10955
Log:
Add support for accept4 system call based on patch
from Dodji Seketeli. Part fix for #215973.
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
trunk/include/vki/vki-linux.h
trunk/include/vki/vki-scnums-amd64-linux.h
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-25 11:54:56 UTC (rev 10954)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-25 12:05:41 UTC (rev 10955)
@@ -349,6 +349,7 @@
DECL_TEMPLATE(amd64_linux, sys_getsockopt);
DECL_TEMPLATE(amd64_linux, sys_connect);
DECL_TEMPLATE(amd64_linux, sys_accept);
+DECL_TEMPLATE(amd64_linux, sys_accept4);
DECL_TEMPLATE(amd64_linux, sys_sendto);
DECL_TEMPLATE(amd64_linux, sys_recvfrom);
DECL_TEMPLATE(amd64_linux, sys_sendmsg);
@@ -684,6 +685,23 @@
SET_STATUS_from_SysRes(r);
}
+PRE(sys_accept4)
+{
+ *flags |= SfMayBlock;
+ PRINT("sys_accept4 ( %ld, %#lx, %ld, %ld )",ARG1,ARG2,ARG3,ARG4);
+ PRE_REG_READ4(long, "accept4",
+ int, s, struct sockaddr *, addr, int, *addrlen, int, flags);
+ ML_(generic_PRE_sys_accept)(tid, ARG1,ARG2,ARG3);
+}
+POST(sys_accept4)
+{
+ SysRes r;
+ vg_assert(SUCCESS);
+ r = ML_(generic_POST_sys_accept)(tid, VG_(mk_SysRes_Success)(RES),
+ ARG1,ARG2,ARG3);
+ SET_STATUS_from_SysRes(r);
+}
+
PRE(sys_sendto)
{
*flags |= SfMayBlock;
@@ -1368,7 +1386,7 @@
LINX_(__NR_fallocate, sys_fallocate), // 285
LINXY(__NR_timerfd_settime, sys_timerfd_settime), // 286
LINXY(__NR_timerfd_gettime, sys_timerfd_gettime), // 287
- // (__NR_paccept, sys_ni_syscall) // 288
+ PLAXY(__NR_accept4, sys_accept4), // 288
LINXY(__NR_signalfd4, sys_signalfd4), // 289
LINX_(__NR_eventfd2, sys_eventfd2), // 290
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-25 11:54:56 UTC (rev 10954)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-25 12:05:41 UTC (rev 10955)
@@ -457,6 +457,13 @@
break;
}
+ case VKI_SYS_ACCEPT4: {
+ /* int accept(int s, struct sockaddr *addr, int *addrlen, int args); */
+ PRE_MEM_READ( "socketcall.accept4(args)", ARG2, 4*sizeof(Addr) );
+ ML_(generic_PRE_sys_accept)( tid, ARG2_0, ARG2_1, ARG2_2 );
+ break;
+ }
+
case VKI_SYS_SENDTO:
/* int sendto(int s, const void *msg, int len,
unsigned int flags,
@@ -602,6 +609,7 @@
break;
case VKI_SYS_ACCEPT:
+ case VKI_SYS_ACCEPT4:
/* int accept(int s, struct sockaddr *addr, int *addrlen); */
r = ML_(generic_POST_sys_accept)( tid, VG_(mk_SysRes_Success)(RES),
ARG2_0, ARG2_1, ARG2_2 );
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-25 11:54:56 UTC (rev 10954)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-25 12:05:41 UTC (rev 10955)
@@ -484,6 +484,13 @@
break;
}
+ case VKI_SYS_ACCEPT4: {
+ /* int accept4(int s, struct sockaddr *addr, int *addrlen, int flags); */
+ PRE_MEM_READ( "socketcall.accept4(args)", ARG2, 4*sizeof(Addr) );
+ ML_(generic_PRE_sys_accept)( tid, ARG2_0, ARG2_1, ARG2_2 );
+ break;
+ }
+
case VKI_SYS_SENDTO:
/* int sendto(int s, const void *msg, int len,
unsigned int flags,
@@ -629,7 +636,9 @@
break;
case VKI_SYS_ACCEPT:
+ case VKI_SYS_ACCEPT4:
/* int accept(int s, struct sockaddr *addr, int *addrlen); */
+ /* int accept4(int s, struct sockaddr *addr, int *addrlen, int flags); */
r = ML_(generic_POST_sys_accept)( tid, VG_(mk_SysRes_Success)(RES),
ARG2_0, ARG2_1, ARG2_2 );
SET_STATUS_from_SysRes(r);
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-25 11:54:56 UTC (rev 10954)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-25 12:05:41 UTC (rev 10955)
@@ -1475,6 +1475,13 @@
break;
}
+ case VKI_SYS_ACCEPT4: {
+ /*int accept(int s, struct sockaddr *add, int *addrlen, int flags)*/
+ PRE_MEM_READ( "socketcall.accept4(args)", ARG2, 4*sizeof(Addr) );
+ ML_(generic_PRE_sys_accept)( tid, ARG2_0, ARG2_1, ARG2_2 );
+ break;
+ }
+
case VKI_SYS_SENDTO:
/* int sendto(int s, const void *msg, int len,
unsigned int flags,
@@ -1620,7 +1627,9 @@
break;
case VKI_SYS_ACCEPT:
+ case VKI_SYS_ACCEPT4:
/* int accept(int s, struct sockaddr *addr, int *addrlen); */
+ /* int accept4(int s, struct sockaddr *addr, int *addrlen, int flags); */
r = ML_(generic_POST_sys_accept)( tid, VG_(mk_SysRes_Success)(RES),
ARG2_0, ARG2_1, ARG2_2 );
SET_STATUS_from_SysRes(r);
Modified: trunk/include/vki/vki-linux.h
===================================================================
--- trunk/include/vki/vki-linux.h 2009-11-25 11:54:56 UTC (rev 10954)
+++ trunk/include/vki/vki-linux.h 2009-11-25 12:05:41 UTC (rev 10955)
@@ -525,6 +525,7 @@
#define VKI_SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */
#define VKI_SYS_SENDMSG 16 /* sys_sendmsg(2) */
#define VKI_SYS_RECVMSG 17 /* sys_recvmsg(2) */
+#define VKI_SYS_ACCEPT4 18 /* sys_accept4(2) */
enum vki_sock_type {
VKI_SOCK_STREAM = 1,
Modified: trunk/include/vki/vki-scnums-amd64-linux.h
===================================================================
--- trunk/include/vki/vki-scnums-amd64-linux.h 2009-11-25 11:54:56 UTC (rev 10954)
+++ trunk/include/vki/vki-scnums-amd64-linux.h 2009-11-25 12:05:41 UTC (rev 10955)
@@ -369,7 +369,7 @@
#define __NR_fallocate 285
#define __NR_timerfd_settime 286
#define __NR_timerfd_gettime 287
-#define __NR_paccept 288
+#define __NR_accept4 288
#define __NR_signalfd4 289
#define __NR_eventfd2 290
#define __NR_epoll_create1 291
|
|
From: <sv...@va...> - 2009-11-25 11:55:14
|
Author: tom
Date: 2009-11-25 11:54:56 +0000 (Wed, 25 Nov 2009)
New Revision: 10954
Log:
Wire up vhangup system call on amd64/ppc32/ppc64 linux platforms.
Patch from Dodji Seketeli. Part fix for #215973.
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-25 11:51:05 UTC (rev 10953)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-25 11:54:56 UTC (rev 10954)
@@ -1206,7 +1206,7 @@
GENX_(__NR_munlock, sys_munlock), // 150
GENX_(__NR_mlockall, sys_mlockall), // 151
LINX_(__NR_munlockall, sys_munlockall), // 152
- // (__NR_vhangup, sys_vhangup), // 153
+ LINX_(__NR_vhangup, sys_vhangup), // 153
// (__NR_modify_ldt, sys_modify_ldt), // 154
// (__NR_pivot_root, sys_pivot_root), // 155
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-25 11:51:05 UTC (rev 10953)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-25 11:54:56 UTC (rev 10954)
@@ -1629,7 +1629,7 @@
//.. // (__NR_olduname, sys_uname), // 109 -- obsolete
//..
//.. GENX_(__NR_iopl, sys_iopl), // 110
-//.. LINX_(__NR_vhangup, sys_vhangup), // 111
+ LINX_(__NR_vhangup, sys_vhangup), // 111
//.. GENX_(__NR_idle, sys_ni_syscall), // 112
//.. // (__NR_vm86old, sys_vm86old), // 113 x86/Linux-only
GENXY(__NR_wait4, sys_wait4), // 114
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-25 11:51:05 UTC (rev 10953)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-25 11:54:56 UTC (rev 10954)
@@ -1276,7 +1276,7 @@
// _____(__NR_olduname, sys_olduname), // 109
// _____(__NR_iopl, sys_iopl), // 110
-// _____(__NR_vhangup, sys_vhangup), // 111
+ LINX_(__NR_vhangup, sys_vhangup), // 111
// _____(__NR_idle, sys_idle), // 112
// _____(__NR_vm86, sys_vm86), // 113
GENXY(__NR_wait4, sys_wait4), // 114
|
|
From: <sv...@va...> - 2009-11-25 11:51:21
|
Author: tom
Date: 2009-11-25 11:51:05 +0000 (Wed, 25 Nov 2009)
New Revision: 10953
Log:
Add support for fallocate system call on 32 bit (x86/ppc32) linux
systems based on patch from Dodji Seketeli. Part fix for #215973.
Modified:
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-25 11:29:14 UTC (rev 10952)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-25 11:51:05 UTC (rev 10953)
@@ -1177,14 +1177,24 @@
}
}
-// 64-bit version.
PRE(sys_fallocate)
{
*flags |= SfMayBlock;
+#if VG_WORDSIZE == 4
PRINT("sys_fallocate ( %ld, %ld, %lld, %lld )",
+ ARG1, ARG2, MERGE64(ARG3,ARG4), MERGE64(ARG5,ARG6));
+ PRE_REG_READ6(long, "fallocate",
+ int, fd, int, mode,
+ unsigned, MERGE64_FIRST(offset), unsigned, MERGE64_SECOND(offset),
+ unsigned, MERGE64_FIRST(len), unsigned, MERGE64_SECOND(len));
+#elif VG_WORDSIZE == 8
+ PRINT("sys_fallocate ( %ld, %ld, %lld, %lld )",
ARG1, ARG2, (Long)ARG3, (Long)ARG4);
PRE_REG_READ4(long, "fallocate",
int, fd, int, mode, vki_loff_t, offset, vki_loff_t, len);
+#else
+# error Unexpected word size
+#endif
if (!ML_(fd_allowed)(ARG1, "fallocate", tid, False))
SET_STATUS_Failure( VKI_EBADF );
}
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-25 11:29:14 UTC (rev 10952)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-25 11:51:05 UTC (rev 10953)
@@ -1858,7 +1858,7 @@
LINXY(__NR_timerfd_create, sys_timerfd_create), // 306
LINX_(__NR_eventfd, sys_eventfd), // 307
LINX_(__NR_sync_file_range2, sys_sync_file_range2), // 308
-// LINX_(__NR_fallocate, sys_fallocate), // 309
+ LINX_(__NR_fallocate, sys_fallocate), // 309
// LINXY(__NR_subpage_prot, sys_ni_syscall), // 310
LINXY(__NR_timerfd_settime, sys_timerfd_settime), // 311
LINXY(__NR_timerfd_gettime, sys_timerfd_gettime), // 312
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-25 11:29:14 UTC (rev 10952)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-25 11:51:05 UTC (rev 10953)
@@ -2244,7 +2244,7 @@
LINXY(__NR_signalfd, sys_signalfd), // 321
LINXY(__NR_timerfd_create, sys_timerfd_create), // 322
LINX_(__NR_eventfd, sys_eventfd), // 323
- //LINX_(__NR_fallocate, sys_fallocate), // 324
+ LINX_(__NR_fallocate, sys_fallocate), // 324
LINXY(__NR_timerfd_settime, sys_timerfd_settime), // 325
LINXY(__NR_timerfd_gettime, sys_timerfd_gettime), // 326
|
|
From: <sv...@va...> - 2009-11-25 11:29:28
|
Author: tom
Date: 2009-11-25 11:29:14 +0000 (Wed, 25 Nov 2009)
New Revision: 10952
Log:
Clean up support for sync_file_range system call and add second version used
by ppc platforms based on patch from Dodji Seketeli. Part fix for #215973.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-linux.h
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-11-25 11:24:00 UTC (rev 10951)
+++ trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-11-25 11:29:14 UTC (rev 10952)
@@ -247,6 +247,7 @@
// Linux-specific?
DECL_TEMPLATE(linux, sys_sync_file_range);
+DECL_TEMPLATE(linux, sys_sync_file_range2);
DECL_TEMPLATE(linux, sys_stime); /* maybe generic? I'm not sure */
// Linux specific (kernel modules)
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-25 11:24:00 UTC (rev 10951)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-25 11:29:14 UTC (rev 10952)
@@ -2481,15 +2481,50 @@
PRE(sys_sync_file_range)
{
*flags |= SfMayBlock;
- PRINT("sys_sync_file_range ( %ld, %ld, %ld, %ld )",
- ARG1,ARG2,ARG3,ARG4);
+#if VG_WORDSIZE == 4
+ PRINT("sys_sync_file_range ( %ld, %lld, %lld, %ld )",
+ ARG1,MERGE64(ARG2,ARG3),MERGE64(ARG4,ARG5),ARG6);
+ PRE_REG_READ6(long, "sync_file_range",
+ int, fd,
+ unsigned, MERGE64_FIRST(offset), unsigned, MERGE64_SECOND(offset),
+ unsigned, MERGE64_FIRST(nbytes), unsigned, MERGE64_SECOND(nbytes),
+ unsigned int, flags);
+#elif VG_WORDSIZE == 8
+ PRINT("sys_sync_file_range ( %ld, %lld, %lld, %ld )",
+ ARG1,(Long)ARG2,(Long)ARG3,ARG4);
PRE_REG_READ4(long, "sync_file_range",
int, fd, vki_loff_t, offset, vki_loff_t, nbytes,
unsigned int, flags);
+#else
+# error Unexpected word size
+#endif
if (!ML_(fd_allowed)(ARG1, "sync_file_range", tid, False))
SET_STATUS_Failure( VKI_EBADF );
}
+PRE(sys_sync_file_range2)
+{
+ *flags |= SfMayBlock;
+#if VG_WORDSIZE == 4
+ PRINT("sys_sync_file_range2 ( %ld, %ld, %lld, %lld )",
+ ARG1,ARG2,MERGE64(ARG3,ARG4),MERGE64(ARG5,ARG6));
+ PRE_REG_READ6(long, "sync_file_range2",
+ int, fd, unsigned int, flags,
+ unsigned, MERGE64_FIRST(offset), unsigned, MERGE64_SECOND(offset),
+ unsigned, MERGE64_FIRST(nbytes), unsigned, MERGE64_SECOND(nbytes));
+#elif VG_WORDSIZE == 8
+ PRINT("sys_sync_file_range2 ( %ld, %ld, %lld, %lld )",
+ ARG1,ARG2,(Long)ARG3,(Long)ARG4);
+ PRE_REG_READ4(long, "sync_file_range2",
+ int, fd, unsigned int, flags,
+ vki_loff_t, offset, vki_loff_t, nbytes);
+#else
+# error Unexpected word size
+#endif
+ if (!ML_(fd_allowed)(ARG1, "sync_file_range2", tid, False))
+ SET_STATUS_Failure( VKI_EBADF );
+}
+
PRE(sys_stime)
{
PRINT("sys_stime ( %#lx )", ARG1);
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-25 11:24:00 UTC (rev 10951)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-25 11:29:14 UTC (rev 10952)
@@ -1857,7 +1857,7 @@
LINXY(__NR_signalfd, sys_signalfd), // 305
LINXY(__NR_timerfd_create, sys_timerfd_create), // 306
LINX_(__NR_eventfd, sys_eventfd), // 307
-// LINX_(__NR_sync_file_range2, sys_ni_syscall), // 308
+ LINX_(__NR_sync_file_range2, sys_sync_file_range2), // 308
// LINX_(__NR_fallocate, sys_fallocate), // 309
// LINXY(__NR_subpage_prot, sys_ni_syscall), // 310
LINXY(__NR_timerfd_settime, sys_timerfd_settime), // 311
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-25 11:24:00 UTC (rev 10951)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-25 11:29:14 UTC (rev 10952)
@@ -1497,7 +1497,7 @@
LINXY(__NR_signalfd, sys_signalfd), // 305
LINXY(__NR_timerfd_create, sys_timerfd_create), // 306
LINX_(__NR_eventfd, sys_eventfd), // 307
-// LINX_(__NR_sync_file_range2, sys_ni_syscall), // 308
+ LINX_(__NR_sync_file_range2, sys_sync_file_range2), // 308
LINX_(__NR_fallocate, sys_fallocate), // 309
// LINXY(__NR_subpage_prot, sys_ni_syscall), // 310
LINXY(__NR_timerfd_settime, sys_timerfd_settime), // 311
|
|
From: <sv...@va...> - 2009-11-25 11:24:14
|
Author: tom
Date: 2009-11-25 11:24:00 +0000 (Wed, 25 Nov 2009)
New Revision: 10951
Log:
Rename LOHI64 to MERGE64 and make it work correctly on big endian
platforms. Also add MERGE64_FIRST and MERGE64_SECOND macros to help
produce the right argument names in error messages on big/little
endian platforms.
Based on patch from Dodji Seketeli. Part fix for #215973.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_syswrap/syswrap-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2009-11-25 07:29:34 UTC (rev 10950)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2009-11-25 11:24:00 UTC (rev 10951)
@@ -2091,11 +2091,17 @@
#define PRE(name) DEFN_PRE_TEMPLATE(generic, name)
#define POST(name) DEFN_POST_TEMPLATE(generic, name)
-#if VG_WORDSIZE == 4
-// Combine two 32-bit values into a 64-bit value
-// Always use with low-numbered arg first (e.g. LOHI64(ARG1,ARG2) )
-// GrP fixme correct for ppc-linux?
-#define LOHI64(lo,hi) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
+// Macros to support 64-bit syscall args split into two 32 bit values
+#if defined(VG_LITTLEENDIAN)
+#define MERGE64(lo,hi) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
+#define MERGE64_FIRST(name) name##_low
+#define MERGE64_SECOND(name) name##_high
+#elif defined(VG_BIGENDIAN)
+#define MERGE64(hi,lo) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
+#define MERGE64_FIRST(name) name##_high
+#define MERGE64_SECOND(name) name##_low
+#else
+#error Unknown endianness
#endif
PRE(sys_exit)
@@ -2346,10 +2352,10 @@
*flags |= SfMayBlock;
#if VG_WORDSIZE == 4
PRINT("sys_pwrite64 ( %ld, %#lx, %llu, %lld )",
- ARG1, ARG2, (ULong)ARG3, LOHI64(ARG4,ARG5));
+ ARG1, ARG2, (ULong)ARG3, MERGE64(ARG4,ARG5));
PRE_REG_READ5(ssize_t, "pwrite64",
unsigned int, fd, const char *, buf, vki_size_t, count,
- vki_u32, offset_low32, vki_u32, offset_high32);
+ vki_u32, MERG64_FIRST(offset), vki_u32, MERGE64_SECOND(offset));
#elif VG_WORDSIZE == 8
PRINT("sys_pwrite64 ( %ld, %#lx, %llu, %lld )",
ARG1, ARG2, (ULong)ARG3, (Long)ARG4);
@@ -2405,10 +2411,10 @@
*flags |= SfMayBlock;
#if VG_WORDSIZE == 4
PRINT("sys_pread64 ( %ld, %#lx, %llu, %lld )",
- ARG1, ARG2, (ULong)ARG3, LOHI64(ARG4,ARG5));
+ ARG1, ARG2, (ULong)ARG3, MERGE64(ARG4,ARG5));
PRE_REG_READ5(ssize_t, "pread64",
unsigned int, fd, char *, buf, vki_size_t, count,
- vki_u32, offset_low32, vki_u32, offset_high32);
+ vki_u32, MERGE64_FIRST(offset), vki_u32, MERGE64_SECOND(offset));
#elif VG_WORDSIZE == 8
PRINT("sys_pread64 ( %ld, %#lx, %llu, %lld )",
ARG1, ARG2, (ULong)ARG3, (Long)ARG4);
@@ -2970,10 +2976,10 @@
{
*flags |= SfMayBlock;
#if VG_WORDSIZE == 4
- PRINT("sys_ftruncate64 ( %ld, %lld )", ARG1, LOHI64(ARG2,ARG3));
+ PRINT("sys_ftruncate64 ( %ld, %lld )", ARG1, MERGE64(ARG2,ARG3));
PRE_REG_READ3(long, "ftruncate64",
unsigned int, fd,
- UWord, length_low32, UWord, length_high32);
+ UWord, MERGE64_FIRST(length), UWord, MERGE64_SECOND(length));
#else
PRINT("sys_ftruncate64 ( %ld, %lld )", ARG1, (Long)ARG2);
PRE_REG_READ2(long, "ftruncate64",
@@ -2985,10 +2991,10 @@
{
*flags |= SfMayBlock;
#if VG_WORDSIZE == 4
- PRINT("sys_truncate64 ( %#lx, %lld )", ARG1, (Long)LOHI64(ARG2, ARG3));
+ PRINT("sys_truncate64 ( %#lx, %lld )", ARG1, (Long)MERGE64(ARG2, ARG3));
PRE_REG_READ3(long, "truncate64",
const char *, path,
- UWord, length_low32, UWord, length_high32);
+ UWord, MERGE64_FIRST(length), UWord, MERGE64_SECOND(length));
#else
PRINT("sys_truncate64 ( %#lx, %lld )", ARG1, (Long)ARG2);
PRE_REG_READ2(long, "truncate64",
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-25 07:29:34 UTC (rev 10950)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-25 11:24:00 UTC (rev 10951)
@@ -378,8 +378,18 @@
#define PRE(name) DEFN_PRE_TEMPLATE(linux, name)
#define POST(name) DEFN_POST_TEMPLATE(linux, name)
-// Combine two 32-bit values into a 64-bit value
-#define LOHI64(lo,hi) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
+// Macros to support 64-bit syscall args split into two 32 bit values
+#if defined(VG_LITTLEENDIAN)
+#define MERGE64(lo,hi) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
+#define MERGE64_FIRST(name) name##_low
+#define MERGE64_SECOND(name) name##_high
+#elif defined(VG_BIGENDIAN)
+#define MERGE64(hi,lo) ( ((ULong)(lo)) | (((ULong)(hi)) << 32) )
+#define MERGE64_FIRST(name) name##_high
+#define MERGE64_SECOND(name) name##_low
+#else
+#error Unknown endianness
+#endif
/* ---------------------------------------------------------------------
*mount wrappers
@@ -1286,19 +1296,19 @@
PRE(sys_fadvise64)
{
PRINT("sys_fadvise64 ( %ld, %lld, %lu, %ld )",
- ARG1, LOHI64(ARG2,ARG3), ARG4, ARG5);
+ ARG1, MERGE64(ARG2,ARG3), ARG4, ARG5);
PRE_REG_READ5(long, "fadvise64",
- int, fd, vki_u32, offset_low, vki_u32, offset_high,
+ int, fd, vki_u32, MERGE64_FIRST(offset), vki_u32, MERGE64_SECOND(offset),
vki_size_t, len, int, advice);
}
PRE(sys_fadvise64_64)
{
PRINT("sys_fadvise64_64 ( %ld, %lld, %lld, %ld )",
- ARG1, LOHI64(ARG2,ARG3), LOHI64(ARG4,ARG5), ARG6);
+ ARG1, MERGE64(ARG2,ARG3), MERGE64(ARG4,ARG5), ARG6);
PRE_REG_READ6(long, "fadvise64_64",
- int, fd, vki_u32, offset_low, vki_u32, offset_high,
- vki_u32, len_low, vki_u32, len_high, int, advice);
+ int, fd, vki_u32, MERGE64_FIRST(offset), vki_u32, MERGE64_SECOND(offset),
+ vki_u32, MERGE64_FIRST(len), vki_u32, MERGE64_SECOND(len), int, advice);
}
/* ---------------------------------------------------------------------
@@ -3106,11 +3116,11 @@
struct vki_iovec * vec;
*flags |= SfMayBlock;
#if VG_WORDSIZE == 4
- PRINT("sys_preadv ( %ld, %#lx, %llu, %lld )",ARG1,ARG2,(ULong)ARG3,LOHI64(ARG4,ARG5));
+ PRINT("sys_preadv ( %ld, %#lx, %llu, %lld )",ARG1,ARG2,(ULong)ARG3,MERGE64(ARG4,ARG5));
PRE_REG_READ5(ssize_t, "preadv",
unsigned long, fd, const struct iovec *, vector,
- unsigned long, count, vki_u32, offset_low32,
- vki_u32, offset_high32);
+ unsigned long, count, vki_u32, MERGE64_FIRST(offset),
+ vki_u32, MERGE64_SECOND(offset));
#elif VG_WORDSIZE == 8
PRINT("sys_preadv ( %ld, %#lx, %llu, %lld )",ARG1,ARG2,(ULong)ARG3,(Long)ARG4);
PRE_REG_READ4(ssize_t, "preadv",
@@ -3159,11 +3169,11 @@
struct vki_iovec * vec;
*flags |= SfMayBlock;
#if VG_WORDSIZE == 4
- PRINT("sys_pwritev ( %ld, %#lx, %llu, %lld )",ARG1,ARG2,(ULong)ARG3,LOHI64(ARG4,ARG5));
+ PRINT("sys_pwritev ( %ld, %#lx, %llu, %lld )",ARG1,ARG2,(ULong)ARG3,MERGE64(ARG4,ARG5));
PRE_REG_READ5(ssize_t, "pwritev",
unsigned long, fd, const struct iovec *, vector,
- unsigned long, count, vki_u32, offset_low32,
- vki_u32, offset_high32);
+ unsigned long, count, vki_u32, MERGE64_FIRST(offset),
+ vki_u32, MERGE64_SECOND(offset));
#elif VG_WORDSIZE == 8
PRINT("sys_pwritev ( %ld, %#lx, %llu, %lld )",ARG1,ARG2,(ULong)ARG3,(Long)ARG4);
PRE_REG_READ4(ssize_t, "pwritev",
@@ -3400,9 +3410,9 @@
PRE(sys_lookup_dcookie)
{
PRINT("sys_lookup_dcookie (0x%llx, %#lx, %ld)",
- LOHI64(ARG1,ARG2), ARG3, ARG4);
+ MERGE64(ARG1,ARG2), ARG3, ARG4);
PRE_REG_READ4(long, "lookup_dcookie",
- vki_u32, cookie_low32, vki_u32, cookie_high32,
+ vki_u32, MERGE64_FIRST(cookie), vki_u32, MERGE64_SECOND(cookie),
char *, buf, vki_size_t, len);
PRE_MEM_WRITE( "lookup_dcookie(buf)", ARG3, ARG4);
}
|
|
From: <sv...@va...> - 2009-11-25 07:29:47
|
Author: bart
Date: 2009-11-25 07:29:34 +0000 (Wed, 25 Nov 2009)
New Revision: 10950
Log:
Split long lines.
Modified:
trunk/drd/Testing.txt
Modified: trunk/drd/Testing.txt
===================================================================
--- trunk/drd/Testing.txt 2009-11-25 07:24:07 UTC (rev 10949)
+++ trunk/drd/Testing.txt 2009-11-25 07:29:34 UTC (rev 10950)
@@ -23,7 +23,10 @@
exist:
(
cd drd/tests;
- for e in $(awk '/\\$/{n=$0; sub("\\\\$", "", n); if (line != "") { line = line " " n } else { line=n }} /[^\\]$/{if (line != ""){print line;line=""};print}' < Makefile.am | sed -n 's/^EXTRA_DIST *=//p' | sed 's/..noinst_SCRIPTS.//')
+ for e in $(awk '/\\$/{n=$0; sub("\\\\$", "", n); if (line != "")\
+ { line = line " " n } else { line=n }} \
+ /[^\\]$/{if (line != ""){print line;line=""};print}' < Makefile.am \
+ | sed -n 's/^EXTRA_DIST *=//p' | sed 's/..noinst_SCRIPTS.//')
do
[ -e "$e" ] || echo "$e"
done
|
|
From: <sv...@va...> - 2009-11-25 07:24:22
|
Author: bart Date: 2009-11-25 07:24:07 +0000 (Wed, 25 Nov 2009) New Revision: 10949 Log: Added to repository. Added: trunk/drd/tests/qt4_atomic.stderr.exp trunk/drd/tests/qt4_atomic.vgtest Added: trunk/drd/tests/qt4_atomic.stderr.exp =================================================================== --- trunk/drd/tests/qt4_atomic.stderr.exp (rev 0) +++ trunk/drd/tests/qt4_atomic.stderr.exp 2009-11-25 07:24:07 UTC (rev 10949) @@ -0,0 +1,5 @@ + +Start of test. +Test successful. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/drd/tests/qt4_atomic.vgtest =================================================================== --- trunk/drd/tests/qt4_atomic.vgtest (rev 0) +++ trunk/drd/tests/qt4_atomic.vgtest 2009-11-25 07:24:07 UTC (rev 10949) @@ -0,0 +1,3 @@ +prereq: test -e qt4_atomic +vgopts: --check-stack-var=yes +prog: qt4_atomic |
|
From: Tom H. <th...@cy...> - 2009-11-25 03:49:40
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-11-25 03:05:06 GMT Ended at 2009-11-25 03:49:18 GMT 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 == 531 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Tom H. <th...@cy...> - 2009-11-25 03:36:26
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-11-25 03:10:05 GMT Ended at 2009-11-25 03:36:04 GMT 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 == 538 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) |
|
From: <sv...@va...> - 2009-11-24 16:38:36
|
Author: tom
Date: 2009-11-24 16:38:21 +0000 (Tue, 24 Nov 2009)
New Revision: 10948
Log:
Re-enable old support for adjtimex system call based on patch
from Dodji Seketeli. Part fix for #215973.
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
trunk/include/vki/vki-linux.h
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-24 16:38:21 UTC (rev 10948)
@@ -1213,7 +1213,7 @@
LINXY(__NR__sysctl, sys_sysctl), // 156
LINXY(__NR_prctl, sys_prctl), // 157
PLAX_(__NR_arch_prctl, sys_arch_prctl), // 158
- // (__NR_adjtimex, sys_adjtimex), // 159
+ LINXY(__NR_adjtimex, sys_adjtimex), // 159
GENX_(__NR_setrlimit, sys_setrlimit), // 160
GENX_(__NR_chroot, sys_chroot), // 161
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-24 16:38:21 UTC (rev 10948)
@@ -605,35 +605,35 @@
POST_MEM_WRITE( ARG4, sizeof(vki_loff_t) );
}
-//zz PRE(sys_adjtimex, 0)
-//zz {
-//zz struct vki_timex *tx = (struct vki_timex *)ARG1;
-//zz PRINT("sys_adjtimex ( %p )", ARG1);
-//zz PRE_REG_READ1(long, "adjtimex", struct timex *, buf);
-//zz PRE_MEM_READ( "adjtimex(timex->modes)", ARG1, sizeof(tx->modes));
-//zz
-#if 0 //zz (avoiding warnings about multi-line comments)
-zz #define ADJX(bit,field) \
-zz if (tx->modes & bit) \
-zz PRE_MEM_READ( "adjtimex(timex->"#field")", \
-zz (Addr)&tx->field, sizeof(tx->field))
-#endif
-//zz ADJX(ADJ_FREQUENCY, freq);
-//zz ADJX(ADJ_MAXERROR, maxerror);
-//zz ADJX(ADJ_ESTERROR, esterror);
-//zz ADJX(ADJ_STATUS, status);
-//zz ADJX(ADJ_TIMECONST, constant);
-//zz ADJX(ADJ_TICK, tick);
-//zz #undef ADJX
-//zz
-//zz PRE_MEM_WRITE( "adjtimex(timex)", ARG1, sizeof(struct vki_timex));
-//zz }
-//zz
-//zz POST(sys_adjtimex)
-//zz {
-//zz POST_MEM_WRITE( ARG1, sizeof(struct vki_timex) );
-//zz }
+PRE(sys_adjtimex)
+{
+ struct vki_timex *tx = (struct vki_timex *)ARG1;
+ PRINT("sys_adjtimex ( %#lx )", ARG1);
+ PRE_REG_READ1(long, "adjtimex", struct timex *, buf);
+ PRE_MEM_READ( "adjtimex(timex->modes)", ARG1, sizeof(tx->modes));
+#define ADJX(bit,field) \
+ if (tx->modes & bit) \
+ PRE_MEM_READ( "adjtimex(timex->"#field")", \
+ (Addr)&tx->field, sizeof(tx->field))
+
+ ADJX(VKI_ADJ_OFFSET, offset);
+ ADJX(VKI_ADJ_FREQUENCY, freq);
+ ADJX(VKI_ADJ_MAXERROR, maxerror);
+ ADJX(VKI_ADJ_ESTERROR, esterror);
+ ADJX(VKI_ADJ_STATUS, status);
+ ADJX(VKI_ADJ_TIMECONST, constant);
+ ADJX(VKI_ADJ_TICK, tick);
+#undef ADJX
+
+ PRE_MEM_WRITE( "adjtimex(timex)", ARG1, sizeof(struct vki_timex));
+}
+
+POST(sys_adjtimex)
+{
+ POST_MEM_WRITE( ARG1, sizeof(struct vki_timex) );
+}
+
PRE(sys_ioperm)
{
PRINT("sys_ioperm ( %ld, %ld, %ld )", ARG1, ARG2, ARG3 );
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-24 16:38:21 UTC (rev 10948)
@@ -1644,8 +1644,8 @@
//.. // (__NR_setdomainname, sys_setdomainname), // 121 */*(?)
GENXY(__NR_uname, sys_newuname), // 122
//.. PLAX_(__NR_modify_ldt, sys_modify_ldt), // 123
-//.. LINXY(__NR_adjtimex, sys_adjtimex), // 124
-//..
+ LINXY(__NR_adjtimex, sys_adjtimex), // 124
+
GENXY(__NR_mprotect, sys_mprotect), // 125
LINXY(__NR_sigprocmask, sys_sigprocmask), // 126
GENX_(__NR_create_module, sys_ni_syscall), // 127
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-24 16:38:21 UTC (rev 10948)
@@ -1291,7 +1291,7 @@
// _____(__NR_setdomainname, sys_setdomainname), // 121
GENXY(__NR_uname, sys_newuname), // 122
// _____(__NR_modify_ldt, sys_modify_ldt), // 123
-// _____(__NR_adjtimex, sys_adjtimex), // 124
+ LINXY(__NR_adjtimex, sys_adjtimex), // 124
GENXY(__NR_mprotect, sys_mprotect), // 125
// _____(__NR_sigprocmask, sys_sigprocmask), // 126
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-24 16:38:21 UTC (rev 10948)
@@ -2001,8 +2001,8 @@
//zz // (__NR_setdomainname, sys_setdomainname), // 121 */*(?)
GENXY(__NR_uname, sys_newuname), // 122
PLAX_(__NR_modify_ldt, sys_modify_ldt), // 123
-//zz LINXY(__NR_adjtimex, sys_adjtimex), // 124
-//zz
+ LINXY(__NR_adjtimex, sys_adjtimex), // 124
+
GENXY(__NR_mprotect, sys_mprotect), // 125
LINXY(__NR_sigprocmask, sys_sigprocmask), // 126
//zz // Nb: create_module() was removed 2.4-->2.6
Modified: trunk/include/vki/vki-linux.h
===================================================================
--- trunk/include/vki/vki-linux.h 2009-11-24 16:08:40 UTC (rev 10947)
+++ trunk/include/vki/vki-linux.h 2009-11-24 16:38:21 UTC (rev 10948)
@@ -277,14 +277,14 @@
int :32; int :32; int :32; int :32;
};
-//#define ADJ_OFFSET 0x0001 /* time offset */
-#define ADJ_FREQUENCY 0x0002 /* frequency offset */
-#define ADJ_MAXERROR 0x0004 /* maximum time error */
-#define ADJ_ESTERROR 0x0008 /* estimated time error */
-#define ADJ_STATUS 0x0010 /* clock status */
-#define ADJ_TIMECONST 0x0020 /* pll time constant */
-#define ADJ_TICK 0x4000 /* tick value */
-//#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
+#define VKI_ADJ_OFFSET 0x0001 /* time offset */
+#define VKI_ADJ_FREQUENCY 0x0002 /* frequency offset */
+#define VKI_ADJ_MAXERROR 0x0004 /* maximum time error */
+#define VKI_ADJ_ESTERROR 0x0008 /* estimated time error */
+#define VKI_ADJ_STATUS 0x0010 /* clock status */
+#define VKI_ADJ_TIMECONST 0x0020 /* pll time constant */
+#define VKI_ADJ_TICK 0x4000 /* tick value */
+//#define VKI_ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/linux/times.h
|
|
From: <sv...@va...> - 2009-11-24 16:08:58
|
Author: tom
Date: 2009-11-24 16:08:40 +0000 (Tue, 24 Nov 2009)
New Revision: 10947
Log:
Add support for rt_tgsigqueueinfo system call based on patch
from Dodji Seketeli. Part fix for #215973.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-linux.h
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-11-24 16:03:19 UTC (rev 10946)
+++ trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-11-24 16:08:40 UTC (rev 10947)
@@ -242,6 +242,7 @@
DECL_TEMPLATE(linux, sys_rt_sigpending);
DECL_TEMPLATE(linux, sys_rt_sigtimedwait);
DECL_TEMPLATE(linux, sys_rt_sigqueueinfo);
+DECL_TEMPLATE(linux, sys_rt_tgsigqueueinfo);
DECL_TEMPLATE(linux, sys_rt_sigsuspend);
// Linux-specific?
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
@@ -1379,7 +1379,7 @@
LINXY(__NR_preadv, sys_preadv), // 295
LINX_(__NR_pwritev, sys_pwritev), // 296
- // (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 297
+ LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 297
LINXY(__NR_perf_counter_open, sys_perf_counter_open) // 298
};
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
@@ -2761,6 +2761,21 @@
SET_STATUS_Failure( VKI_EINVAL );
}
+PRE(sys_rt_tgsigqueueinfo)
+{
+ PRINT("sys_rt_tgsigqueueinfo(%ld, %ld, %ld, %#lx)", ARG1, ARG2, ARG3, ARG4);
+ PRE_REG_READ4(long, "rt_tgsigqueueinfo",
+ int, tgid, int, pid, int, sig, vki_siginfo_t *, uinfo);
+ if (ARG3 != 0)
+ PRE_MEM_READ( "rt_tgsigqueueinfo(uinfo)", ARG4, VKI_SI_MAX_SIZE );
+}
+
+POST(sys_rt_tgsigqueueinfo)
+{
+ if (!ML_(client_signal_OK)(ARG3))
+ SET_STATUS_Failure( VKI_EINVAL );
+}
+
// XXX: x86-specific? The kernel prototypes for the different archs are
// hard to decipher.
PRE(sys_rt_sigsuspend)
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
@@ -1871,7 +1871,7 @@
LINXY(__NR_perf_counter_open, sys_perf_counter_open),// 319
LINXY(__NR_preadv, sys_preadv), // 320
LINX_(__NR_pwritev, sys_pwritev), // 321
- // (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 322
+ LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) // 322
};
const UInt ML_(syscall_table_size) =
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
@@ -1511,7 +1511,7 @@
LINXY(__NR_perf_counter_open, sys_perf_counter_open),// 319
LINXY(__NR_preadv, sys_preadv), // 320
LINX_(__NR_pwritev, sys_pwritev), // 321
- // (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 322
+ LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) // 322
};
const UInt ML_(syscall_table_size) =
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-24 16:08:40 UTC (rev 10947)
@@ -2258,7 +2258,7 @@
LINXY(__NR_preadv, sys_preadv), // 333
LINX_(__NR_pwritev, sys_pwritev), // 334
- // (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 335
+ LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 335
LINXY(__NR_perf_counter_open, sys_perf_counter_open) // 336
};
|
|
From: <sv...@va...> - 2009-11-24 16:03:38
|
Author: tom
Date: 2009-11-24 16:03:19 +0000 (Tue, 24 Nov 2009)
New Revision: 10946
Log:
Add support for sched_rr_get_interval system call based on patch
from Dodji Seketeli. Part fix for #215973.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-linux.h
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-11-23 08:19:20 UTC (rev 10945)
+++ trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-11-24 16:03:19 UTC (rev 10946)
@@ -214,7 +214,7 @@
DECL_TEMPLATE(linux, sys_sched_yield);
DECL_TEMPLATE(linux, sys_sched_get_priority_max);
DECL_TEMPLATE(linux, sys_sched_get_priority_min);
-//DECL_TEMPLATE(linux, sys_sched_rr_get_interval); // not yet encountered
+DECL_TEMPLATE(linux, sys_sched_rr_get_interval);
DECL_TEMPLATE(linux, sys_sched_setaffinity);
DECL_TEMPLATE(linux, sys_sched_getaffinity);
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-23 08:19:20 UTC (rev 10945)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
@@ -1200,7 +1200,7 @@
LINX_(__NR_sched_getscheduler, sys_sched_getscheduler), // 145
LINX_(__NR_sched_get_priority_max, sys_sched_get_priority_max), // 146
LINX_(__NR_sched_get_priority_min, sys_sched_get_priority_min), // 147
- //LINX?(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 148
+ LINXY(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 148
GENX_(__NR_mlock, sys_mlock), // 149
GENX_(__NR_munlock, sys_munlock), // 150
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-23 08:19:20 UTC (rev 10945)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
@@ -2318,6 +2318,21 @@
PRE_REG_READ1(long, "sched_get_priority_min", int, policy);
}
+PRE(sys_sched_rr_get_interval)
+{
+ PRINT("sys_sched_rr_get_interval ( %ld, %#lx )", ARG1, ARG2);
+ PRE_REG_READ2(int, "sched_rr_get_interval",
+ vki_pid_t, pid,
+ struct vki_timespec *, tp);
+ PRE_MEM_WRITE("sched_rr_get_interval(timespec)",
+ ARG2, sizeof(struct vki_timespec));
+}
+
+POST(sys_sched_rr_get_interval)
+{
+ POST_MEM_WRITE(ARG2, sizeof(struct vki_timespec));
+}
+
PRE(sys_sched_setaffinity)
{
PRINT("sched_setaffinity ( %ld, %ld, %#lx )", ARG1, ARG2, ARG3);
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-23 08:19:20 UTC (rev 10945)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
@@ -1690,7 +1690,7 @@
LINX_(__NR_sched_get_priority_max, sys_sched_get_priority_max),// 159
LINX_(__NR_sched_get_priority_min, sys_sched_get_priority_min),// 160
-//.. //LINX?(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161 */*
+ LINXY(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161
GENXY(__NR_nanosleep, sys_nanosleep), // 162
GENX_(__NR_mremap, sys_mremap), // 163
LINX_(__NR_setresuid, sys_setresuid), // 164
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-23 08:19:20 UTC (rev 10945)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
@@ -1336,7 +1336,7 @@
LINX_(__NR_sched_get_priority_max, sys_sched_get_priority_max),// 159
LINX_(__NR_sched_get_priority_min, sys_sched_get_priority_min),// 160
-// _____(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161
+ LINXY(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161
GENXY(__NR_nanosleep, sys_nanosleep), // 162
GENX_(__NR_mremap, sys_mremap), // 163
// _____(__NR_setresuid, sys_setresuid), // 164
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-23 08:19:20 UTC (rev 10945)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-11-24 16:03:19 UTC (rev 10946)
@@ -2048,7 +2048,7 @@
LINX_(__NR_sched_get_priority_max, sys_sched_get_priority_max),// 159
LINX_(__NR_sched_get_priority_min, sys_sched_get_priority_min),// 160
-//zz //LINX?(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161 */*
+ LINXY(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161
GENXY(__NR_nanosleep, sys_nanosleep), // 162
GENX_(__NR_mremap, sys_mremap), // 163
LINX_(__NR_setresuid, sys_setresuid16), // 164
|
|
From: Bart V. A. <bar...@gm...> - 2009-11-24 08:49:47
|
Nightly build on cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-11-24 02:22:55 EST Ended at 2009-11-24 03:49:25 EST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 449 tests, 45 stderr failures, 10 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/linux-syscalls-2007 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) |
|
From: Alexander P. <gl...@go...> - 2009-11-24 07:21:30
|
Nightly build on mcgrind ( Darwin 9.7.0 i386 ) Started at 2009-11-24 09:06:00 MSK Ended at 2009-11-24 09:24:34 MSK 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 == 433 tests, 22 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/null_socket (stdout) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) none/tests/async-sigs (stderr) none/tests/faultstatus (stderr) none/tests/pth_blockedsig (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/rwlock_race (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc23_bogus_condwait (stderr) -- Alexander Potapenko Software Engineer Google Moscow |
|
From: Tom H. <th...@cy...> - 2009-11-24 03:49:42
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-11-24 03:05:05 GMT Ended at 2009-11-24 03:49:17 GMT 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 == 531 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) |