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
|
2
|
3
(6) |
4
(1) |
5
(1) |
6
(2) |
|
7
(4) |
8
(7) |
9
(1) |
10
(2) |
11
(1) |
12
(4) |
13
|
|
14
(3) |
15
(2) |
16
(6) |
17
(10) |
18
(8) |
19
|
20
|
|
21
|
22
(5) |
23
(12) |
24
(5) |
25
|
26
(5) |
27
(1) |
|
28
(1) |
29
(2) |
|
|
|
|
|
|
From: <sv...@va...> - 2016-02-17 22:41:26
|
Author: philippe
Date: Wed Feb 17 22:41:14 2016
New Revision: 15794
Log:
Fix incorrect (or infinite loop) unwind on RHEL7 amd64 64 bits.
Same kind of problems as explained and fixed in revision 15720:
In some cases, unwinding always retrieves the same pc/sp/bp.
Fix for 64 bits is similar: stop unwinding if the previous sp is >= new sp
Modified:
trunk/NEWS
trunk/coregrind/m_stacktrace.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Feb 17 22:41:14 2016
@@ -70,11 +70,11 @@
357871 pthread_spin_destroy not properly wrapped
357887 Fix a file handle leak. VG_(fclose) did not close the file
358030 support direct socket calls on x86 32bit (new in linux 4.3)
-359201 futex syscall "skips" argument 5 if op is FUTEX_WAIT_BITSET
359133 Assertion 'eltSzB <= ddpa->poolSzB' failed
+359201 futex syscall "skips" argument 5 if op is FUTEX_WAIT_BITSET
359289 s390x: popcnt (B9E1) not implemented
-n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 32 bits
+n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 and amd64
n-i-bz massif --pages-as-heap=yes does not report peak caused by mmap+munmap
n-i-bz false positive leaks due to aspacemgr merging non heap segments with heap segments.
Modified: trunk/coregrind/m_stacktrace.c
==============================================================================
--- trunk/coregrind/m_stacktrace.c (original)
+++ trunk/coregrind/m_stacktrace.c Wed Feb 17 22:41:14 2016
@@ -607,16 +607,25 @@
* next function which is completely wrong.
*/
while (True) {
+ Addr old_xsp;
if (i >= max_n_ips)
break;
+ old_xsp = uregs.xsp;
+
/* Try to derive a new (ip,sp,fp) triple from the current set. */
/* First off, see if there is any CFI info to hand which can
be used. */
if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) {
if (0 == uregs.xip || 1 == uregs.xip) break;
+ if (old_xsp >= uregs.xsp) {
+ if (debug)
+ VG_(printf) (" CF end of stack old_xsp %p >= xsp %p\n",
+ (void*)old_xsp, (void*)uregs.xsp);
+ break;
+ }
if (sps) sps[i] = uregs.xsp;
if (fps) fps[i] = uregs.xbp;
ips[i++] = uregs.xip - 1; /* -1: refer to calling insn, not the RA */
@@ -646,6 +655,12 @@
if (0 == uregs.xip || 1 == uregs.xip) break;
uregs.xsp = uregs.xbp + sizeof(Addr) /*saved %rbp*/
+ sizeof(Addr) /*ra*/;
+ if (old_xsp >= uregs.xsp) {
+ if (debug)
+ VG_(printf) (" FF end of stack old_xsp %p >= xsp %p\n",
+ (void*)old_xsp, (void*)uregs.xsp);
+ break;
+ }
uregs.xbp = (((UWord*)uregs.xbp)[0]);
if (sps) sps[i] = uregs.xsp;
if (fps) fps[i] = uregs.xbp;
|
|
From: Philippe W. <phi...@sk...> - 2016-02-17 21:53:57
|
On Tue, 2016-02-16 at 14:57 +0530, Anuta Mukherjee wrote:
> Hi,
> I am very new to Valgrind and am trying to write a tool where I need
> to track:
> - Variable declarations (global and local variables)
> - Reads/writes to these variables
> - Locks and unlocks of mutexes
> How do I track reads/writes to variables declared by my test program?
> How do I track pthread_mutex_{lock,unlock}?
>
It would be good to indicate what documentation and/or code
you have already read and explain more in details what you have
tried/not understood/...
But ok, let's assume you have not read much :).
If you want to write a tool, you must have a good idea of
how valgrind works.
So, read the 'introduction' papers/doc such as:
http://www.valgrind.org/docs/valgrind2007.pdf
and
http://www.valgrind.org/docs/manual/tech-docs.html
Look at the code of an easy tool (typically, lackey).
Maybe others valgrind developers might give additional relevant pointers
if I missed some interesting introductory documentation ?
After that, the best is to read the source.
E.g. scan the interfaces that valgrind provides to tools
(these are include/pub_tool_*.h).
Read the implementation of a tool that does somewhat
similar things to what you want to do.
For your objective above, helgrind is a good example:
* it intercepts (a.o.) lock/unlocks
* and it tracks read/write to the memory.
That being said, valgrind tools are working on binary code : tools do
not track variable declarations and/or read/write to variables.
They (can) track read/write to memory, or stack pointer modifications
(e.g. the sp changes that are done at entry of a function).
There is no 'high level interface' to track variables declaration or rw.
valgrind provides some support to translate an address
into e.g. global and/or stack variables.
See e.g. pub_tool_addrinfo.h
It would be interesting also to describe the kind of tool you
want to write.
After that, once you have read doc and code, if you have more
specific questions, do not hesitate to ask, but you must first
read and understand the bulk by yourself, otherwise you will
have to send hundreds of mails with questions :).
Hoping this helps ...
Philippe
|
|
From: Mark W. <mj...@re...> - 2016-02-17 20:54:22
|
On Wed, 2016-02-17 at 14:59 +0100, Petar Jovanovic wrote: > On Mon, Feb 15, 2016 at 4:57 PM, Mark Wielaard <mj...@re...> wrote: > > Sorry I missed this (old) thread when writing the patch for: > > https://bugs.kde.org/show_bug.cgi?id=359201 > > I think it improves on the orginal fix by explicitly skipping argument5 > > (uaddr2 aka dummy) for FUTEX_WAIT_BITSET. > > > > Does that patch look reasonable? > > Looks good to me. Thanks. Pushed as valgrind svn r15793. |
|
From: <sv...@va...> - 2016-02-17 20:53:42
|
Author: mjw
Date: Wed Feb 17 20:53:34 2016
New Revision: 15793
Log:
Bug 359201 futex syscall skips argument 5 if op is FUTEX_WAIT_BITSET
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/syswrap-linux.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Feb 17 20:53:34 2016
@@ -70,6 +70,7 @@
357871 pthread_spin_destroy not properly wrapped
357887 Fix a file handle leak. VG_(fclose) did not close the file
358030 support direct socket calls on x86 32bit (new in linux 4.3)
+359201 futex syscall "skips" argument 5 if op is FUTEX_WAIT_BITSET
359133 Assertion 'eltSzB <= ddpa->poolSzB' failed
359289 s390x: popcnt (B9E1) not implemented
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c Wed Feb 17 20:53:34 2016
@@ -1154,13 +1154,16 @@
return;
}
if (*(vki_u32 *)ARG1 != ARG3) {
- PRE_REG_READ5(long, "futex",
+ PRE_REG_READ4(long, "futex",
vki_u32 *, futex, int, op, int, val,
- struct timespec *, utime, int, dummy);
+ struct timespec *, utime);
} else {
- PRE_REG_READ6(long, "futex",
+ /* Note argument 5 is unused, but argument 6 is used.
+ So we cannot just PRE_REG_READ6. Read argument 6 separately. */
+ PRE_REG_READ4(long, "futex",
vki_u32 *, futex, int, op, int, val,
- struct timespec *, utime, int, dummy, int, val3);
+ struct timespec *, utime);
+ PRA6("futex",int,val3);
}
break;
case VKI_FUTEX_WAKE_BITSET:
|
|
From: <sv...@va...> - 2016-02-17 20:01:06
|
Author: florian
Date: Wed Feb 17 20:00:59 2016
New Revision: 15792
Log:
s390: Fix BZ #359289, adding support for popcnt insn.
Companion patch is VEX r3210.
Patch by Andreas Arnez (ar...@li...).
Added:
trunk/none/tests/s390x/popcnt.c
trunk/none/tests/s390x/popcnt.stderr.exp
trunk/none/tests/s390x/popcnt.stdout.exp
trunk/none/tests/s390x/popcnt.vgtest
Modified:
trunk/NEWS
trunk/docs/internals/s390-opcodes.csv
trunk/none/tests/s390x/ (props changed)
trunk/none/tests/s390x/Makefile.am
trunk/none/tests/s390x/opcodes.h
trunk/tests/s390x_features.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Feb 17 20:00:59 2016
@@ -71,6 +71,7 @@
357887 Fix a file handle leak. VG_(fclose) did not close the file
358030 support direct socket calls on x86 32bit (new in linux 4.3)
359133 Assertion 'eltSzB <= ddpa->poolSzB' failed
+359289 s390x: popcnt (B9E1) not implemented
n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 32 bits
n-i-bz massif --pages-as-heap=yes does not report peak caused by mmap+munmap
Modified: trunk/docs/internals/s390-opcodes.csv
==============================================================================
--- trunk/docs/internals/s390-opcodes.csv (original)
+++ trunk/docs/internals/s390-opcodes.csv Wed Feb 17 20:00:59 2016
@@ -903,7 +903,7 @@
sgrk,"subtract 3 operands 64 bit",implemented,
slrk,"subtract logical 3 operands 32 bit",implemented,
slgrk,"subtract logical 3 operands 64 bit",implemented,
-popcnt,"population count","not implemented",
+popcnt,"population count","implemented",
rrbm,"reset reference bits multiple",N/A,"privileged instruction"
cefbra,"convert from 32 bit fixed to short bfp with rounding mode",implemented,
cdfbra,"convert from 32 bit fixed to long bfp with rounding mode",implemented,
Modified: trunk/none/tests/s390x/Makefile.am
==============================================================================
--- trunk/none/tests/s390x/Makefile.am (original)
+++ trunk/none/tests/s390x/Makefile.am Wed Feb 17 20:00:59 2016
@@ -11,7 +11,7 @@
ex_sig ex_clone cu14 cu14_1 cu41 fpconv ecag fpext_warn \
rounding-1 rounding-2 rounding-3 rounding-4 rounding-5 bfp-1 \
bfp-2 bfp-3 bfp-4 srnm srnmb comp-1 comp-2 exrl tmll tm stmg \
- ex clst mvc test_fork test_sig rounding-6 rxsbg\
+ ex clst mvc test_fork test_sig rounding-6 rxsbg popcnt \
spechelper-alr spechelper-algr \
spechelper-slr spechelper-slgr \
spechelper-cr spechelper-clr \
Modified: trunk/none/tests/s390x/opcodes.h
==============================================================================
--- trunk/none/tests/s390x/opcodes.h (original)
+++ trunk/none/tests/s390x/opcodes.h Wed Feb 17 20:00:59 2016
@@ -324,6 +324,7 @@
#define OY(r1,x2,b2,dl2,dh2) RXY_RRRD(e3,r1,x2,b2,dl2,dh2,56)
#define PFD(r1,x2,b2,dl2,dh2) RXY_URRD(e3,r1,x2,b2,dl2,dh2,36)
#define PFDRL(r1,i2) RIL_UP(c6,r1,2,i2)
+#define POPCNT(r1,r2) RRE_RR(b9e1,00,r1,r2)
#define RISBG(r1,r2,i3,i4,i5) RIE_RRUUU(ec,r1,r2,i3,i4,i5,55)
#define RNSBG(r1,r2,i3,i4,i5) RIE_RRUUU(ec,r1,r2,i3,i4,i5,54)
#define ROSBG(r1,r2,i3,i4,i5) RIE_RRUUU(ec,r1,r2,i3,i4,i5,56)
Added: trunk/none/tests/s390x/popcnt.c
==============================================================================
--- trunk/none/tests/s390x/popcnt.c (added)
+++ trunk/none/tests/s390x/popcnt.c Wed Feb 17 20:00:59 2016
@@ -0,0 +1,30 @@
+#include <stdio.h>
+#include <stdint.h>
+
+
+static void check_popcnt(uint64_t in, uint64_t expected_result,
+ int expected_cc)
+{
+ uint64_t out = ~expected_result;
+ int cc = ~expected_cc;
+
+ asm volatile(".insn rre, 0xb9e10000, %[out], %[in]\n\t"
+ "ipm %[cc]\n\t"
+ "srl %[cc],28\n\t"
+ : [cc]"=d" (cc), [out]"=d" (out)
+ : [in]"d" (in)
+ : "cc");
+ printf("popcnt %16lx -> %16lx %s cc=%d %s\n",
+ in, out, (out == expected_result ? " " : "ERR"),
+ cc, (cc == expected_cc ? " " : "ERR"));
+}
+
+int main()
+{
+ check_popcnt(0, 0, 0);
+ check_popcnt(1, 1, 1);
+ check_popcnt(0x8000000000000000ULL, 0x0100000000000000ULL, 1);
+ check_popcnt(0xffffffffffffffffULL, 0x0808080808080808ULL, 1);
+ check_popcnt(0xff427e3800556bcdULL, 0x0802060300040505ULL, 1);
+ return 0;
+}
Added: trunk/none/tests/s390x/popcnt.stderr.exp
==============================================================================
--- trunk/none/tests/s390x/popcnt.stderr.exp (added)
+++ trunk/none/tests/s390x/popcnt.stderr.exp Wed Feb 17 20:00:59 2016
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/s390x/popcnt.stdout.exp
==============================================================================
--- trunk/none/tests/s390x/popcnt.stdout.exp (added)
+++ trunk/none/tests/s390x/popcnt.stdout.exp Wed Feb 17 20:00:59 2016
@@ -0,0 +1,5 @@
+popcnt 0 -> 0 cc=0
+popcnt 1 -> 1 cc=1
+popcnt 8000000000000000 -> 100000000000000 cc=1
+popcnt ffffffffffffffff -> 808080808080808 cc=1
+popcnt ff427e3800556bcd -> 802060300040505 cc=1
Added: trunk/none/tests/s390x/popcnt.vgtest
==============================================================================
--- trunk/none/tests/s390x/popcnt.vgtest (added)
+++ trunk/none/tests/s390x/popcnt.vgtest Wed Feb 17 20:00:59 2016
@@ -0,0 +1 @@
+prog: popcnt
Modified: trunk/tests/s390x_features.c
==============================================================================
--- trunk/tests/s390x_features.c (original)
+++ trunk/tests/s390x_features.c Wed Feb 17 20:00:59 2016
@@ -232,6 +232,8 @@
match = facilities & FAC_BIT(42);
} else if (strcmp(feature, "s390x-pfpo") == 0 ) {
match = facilities & FAC_BIT(44);
+ } else if (strcmp(feature, "s390x-highw") == 0 ) {
+ match = facilities & FAC_BIT(45);
} else {
return 2; // Unrecognised feature.
}
|
|
From: <sv...@va...> - 2016-02-17 19:57:09
|
Author: florian
Date: Wed Feb 17 19:57:01 2016
New Revision: 3210
Log:
s390: Implement popcnt insn. Part of fixing BZ #359289.
Patch by Andreas Arnez (ar...@li...)
Modified:
trunk/priv/guest_s390_toIR.c
Modified: trunk/priv/guest_s390_toIR.c
==============================================================================
--- trunk/priv/guest_s390_toIR.c (original)
+++ trunk/priv/guest_s390_toIR.c Wed Feb 17 19:57:01 2016
@@ -8,7 +8,7 @@
This file is part of Valgrind, a dynamic binary instrumentation
framework.
- Copyright IBM Corp. 2010-2015
+ Copyright IBM Corp. 2010-2016
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -12938,6 +12938,38 @@
}
static const HChar *
+s390_irgen_POPCNT(UChar r1, UChar r2)
+{
+ Int i;
+ IRTemp val = newTemp(Ity_I64);
+ IRTemp mask[3];
+
+ assign(val, get_gpr_dw0(r2));
+ for (i = 0; i < 3; i++) {
+ mask[i] = newTemp(Ity_I64);
+ }
+ assign(mask[0], mkU64(0x5555555555555555ULL));
+ assign(mask[1], mkU64(0x3333333333333333ULL));
+ assign(mask[2], mkU64(0x0F0F0F0F0F0F0F0FULL));
+ for (i = 0; i < 3; i++) {
+ IRTemp tmp = newTemp(Ity_I64);
+
+ assign(tmp,
+ binop(Iop_Add64,
+ binop(Iop_And64,
+ mkexpr(val),
+ mkexpr(mask[i])),
+ binop(Iop_And64,
+ binop(Iop_Shr64, mkexpr(val), mkU8(1 << i)),
+ mkexpr(mask[i]))));
+ val = tmp;
+ }
+ s390_cc_thunk_putZ(S390_CC_OP_BITWISE, val);
+ put_gpr_dw0(r1, mkexpr(val));
+ return "popcnt";
+}
+
+static const HChar *
s390_irgen_STCK(IRTemp op2addr)
{
IRDirty *d;
@@ -14999,7 +15031,8 @@
ovl.fmt.RRE.r2); goto ok;
case 0xb9df: s390_format_RRE_RR(s390_irgen_CLHLR, ovl.fmt.RRE.r1,
ovl.fmt.RRE.r2); goto ok;
- case 0xb9e1: /* POPCNT */ goto unimplemented;
+ case 0xb9e1: s390_format_RRE_RR(s390_irgen_POPCNT, ovl.fmt.RRE.r1,
+ ovl.fmt.RRE.r2); goto ok;
case 0xb9e2: s390_format_RRF_U0RR(s390_irgen_LOCGR, ovl.fmt.RRF3.r3,
ovl.fmt.RRF3.r1, ovl.fmt.RRF3.r2,
S390_XMNM_LOCGR); goto ok;
|
|
From: <sv...@va...> - 2016-02-17 18:11:41
|
Author: iraisr
Date: Wed Feb 17 18:11:32 2016
New Revision: 15791
Log:
Solaris syscall: commands A_GETSTAT and A_SETSTAT
for auditon(2) subcode of the auditsys() syscall
were removed in Solaris 12.
However they stay for Solaris 11 and illumos.
n-i-bz
Added:
trunk/memcheck/tests/solaris/scalar_auditon_stat.c
trunk/memcheck/tests/solaris/scalar_auditon_stat.stderr.exp
trunk/memcheck/tests/solaris/scalar_auditon_stat.stdout.exp
trunk/memcheck/tests/solaris/scalar_auditon_stat.vgtest
Modified:
trunk/configure.ac
trunk/coregrind/m_syswrap/syswrap-solaris.c
trunk/include/vki/vki-solaris.h
trunk/memcheck/tests/solaris/ (props changed)
trunk/memcheck/tests/solaris/Makefile.am
trunk/memcheck/tests/solaris/scalar.c
trunk/memcheck/tests/solaris/scalar.stderr.exp
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Feb 17 18:11:32 2016
@@ -3039,6 +3039,31 @@
AM_CONDITIONAL(SOLARIS_ZONE_DEFUNCT, test x$solaris_zone_defunct = xyes)
+# Solaris-specific check determining if commands A_GETSTAT and A_SETSTAT
+# for auditon(2) subcode of the auditsys() syscall are available.
+# These commands are available in Solaris 11 and illumos but were removed
+# in Solaris 12.
+#
+# C-level symbol: SOLARIS_AUDITON_STAT
+# Automake-level symbol: SOLARIS_AUDITON_STAT
+#
+AC_MSG_CHECKING([for A_GETSTAT and A_SETSTAT auditon(2) commands (Solaris-specific)])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <bsm/audit.h>
+]], [[
+ return !(A_GETSTAT && A_SETSTAT);
+]])], [
+solaris_auditon_stat=yes
+AC_MSG_RESULT([yes])
+AC_DEFINE([SOLARIS_AUDITON_STAT], 1,
+ [Define to 1 if you have the `A_GETSTAT' and `A_SETSTAT' constants.])
+], [
+solaris_auditon_stat=no
+AC_MSG_RESULT([no])
+])
+AM_CONDITIONAL(SOLARIS_AUDITON_STAT, test x$solaris_auditon_stat = xyes)
+
+
# Solaris-specific check determining if the new shmsys() syscall subcodes
# IPC_XSTAT64, SHMADV, SHM_ADV_GET, SHM_ADV_SET and SHMGET_OSM are available.
# These subcodes were added in Solaris 11 but are missing on illumos.
@@ -3515,6 +3540,7 @@
AM_CONDITIONAL(SOLARIS_LWP_NAME_SYSCALL, false)
AM_CONDITIONAL(SOLARIS_GETRANDOM_SYSCALL, false)
AM_CONDITIONAL(SOLARIS_ZONE_DEFUNCT, false)
+AM_CONDITIONAL(SOLARIS_AUDITON_STAT, false)
AM_CONDITIONAL(SOLARIS_SHM_NEW, false)
AM_CONDITIONAL(SOLARIS_PRXREGSET_T, false)
AM_CONDITIONAL(SOLARIS_FREALPATHAT_SYSCALL, false)
Modified: trunk/coregrind/m_syswrap/syswrap-solaris.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-solaris.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-solaris.c Wed Feb 17 18:11:32 2016
@@ -7663,6 +7663,7 @@
long, code, int, cmd, char *, data, int, length);
PRE_MEM_WRITE("auditsys(data)", ARG3, ARG4);
break;
+#if defined(SOLARIS_AUDITON_STAT)
case VKI_A_GETSTAT:
PRE_REG_READ3(long, SC3("auditsys", "auditctl", "getstat"),
long, code, int, cmd, vki_au_stat_t *, stats);
@@ -7673,6 +7674,7 @@
long, code, int, cmd, vki_au_stat_t *, stats);
PRE_MEM_READ("auditsys(stats)", ARG3, sizeof(vki_au_stat_t));
break;
+#endif /* SOLARIS_AUDITON_STAT */
case VKI_A_SETUMASK:
PRE_REG_READ3(long, SC3("auditsys", "auditctl", "setumask"),
long, code, int, cmd, vki_auditinfo_t *, umask);
@@ -7853,10 +7855,12 @@
case VKI_A_GETCAR:
POST_MEM_WRITE(ARG3, VG_(strlen)((HChar *) ARG3) + 1);
break;
+#if defined(SOLARIS_AUDITON_STAT)
case VKI_A_GETSTAT:
POST_MEM_WRITE(ARG3, sizeof(vki_au_stat_t));
break;
case VKI_A_SETSTAT:
+#endif /* SOLARIS_AUDITON_STAT */
case VKI_A_SETUMASK:
case VKI_A_SETSMASK:
break;
Modified: trunk/include/vki/vki-solaris.h
==============================================================================
--- trunk/include/vki/vki-solaris.h (original)
+++ trunk/include/vki/vki-solaris.h Wed Feb 17 18:11:32 2016
@@ -28,7 +28,7 @@
The GNU General Public License is contained in the file COPYING.
*/
-/* Copyright 2013-2015, Ivo Raisr <iv...@iv...> */
+/* Copyright 2013-2016, Ivo Raisr <iv...@iv...> */
/* Copyright 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
@@ -133,7 +133,10 @@
#define VKI_A_GETPINFO_ADDR A_GETPINFO_ADDR
#define VKI_A_GETPOLICY A_GETPOLICY
#define VKI_A_GETQCTRL A_GETQCTRL
+#if defined(SOLARIS_AUDITON_STAT)
#define VKI_A_GETSTAT A_GETSTAT
+#define VKI_A_SETSTAT A_SETSTAT
+#endif /* SOLARIS_AUDITON_STAT */
#define VKI_A_SETAMASK A_SETAMASK
#define VKI_A_SETCLASS A_SETCLASS
#define VKI_A_SETCOND A_SETCOND
@@ -143,7 +146,6 @@
#define VKI_A_SETPOLICY A_SETPOLICY
#define VKI_A_SETQCTRL A_SETQCTRL
#define VKI_A_SETSMASK A_SETSMASK
-#define VKI_A_SETSTAT A_SETSTAT
#define VKI_A_SETUMASK A_SETUMASK
#define VKI_BSM_AUDIT BSM_AUDIT
#define VKI_BSM_AUDITCTL BSM_AUDITCTL
@@ -158,11 +160,13 @@
#define vki_au_id_t au_id_t
#define vki_au_mask_t au_mask_t
#define vki_au_qctrl au_qctrl
-#define vki_au_stat_t au_stat_t
#define vki_auditinfo_t auditinfo_t
#define vki_auditinfo_addr_t auditinfo_addr_t
#define vki_auditpinfo auditpinfo
#define vki_auditpinfo_addr auditpinfo_addr
+#if defined(SOLARIS_AUDITON_STAT)
+#define vki_au_stat_t au_stat_t
+#endif /* SOLARIS_AUDITON_STAT */
#include <sys/psw.h>
Modified: trunk/memcheck/tests/solaris/Makefile.am
==============================================================================
--- trunk/memcheck/tests/solaris/Makefile.am (original)
+++ trunk/memcheck/tests/solaris/Makefile.am Wed Feb 17 18:11:32 2016
@@ -29,6 +29,7 @@
name_service_door.stdout.exp name_service_door.vgtest \
pkcs11.stderr.exp-illumos pkcs11.stderr.exp-solaris pkcs11.stdout.exp pkcs11.vgtest \
scalar.stderr.exp scalar.stdout.exp scalar.vgtest \
+ scalar_auditon_stat.stderr.exp scalar_auditon_stat.stdout.exp scalar_auditon_stat.vgtest \
scalar_frealpathat.stderr.exp scalar_frealpathat.stdout.exp scalar_frealpathat.vgtest \
scalar_getrandom.stderr.exp scalar_getrandom.stdout.exp scalar_getrandom.vgtest \
scalar_ioctl.stderr.exp scalar_ioctl.stdout.exp scalar_ioctl.vgtest \
@@ -95,6 +96,10 @@
check_PROGRAMS += scalar_obsolete
endif
+if SOLARIS_AUDITON_STAT
+check_PROGRAMS += scalar_auditon_stat
+endif
+
if SOLARIS_FREALPATHAT_SYSCALL
check_PROGRAMS += scalar_frealpathat
endif
@@ -146,7 +151,7 @@
check_PROGRAMS += scalar_uuidsys
endif
-if SOLARIS_ZONE_DEFUNCT
+if SOLARIS_ZONE_DEFUNCT
check_PROGRAMS += scalar_zone_defunct
endif
Modified: trunk/memcheck/tests/solaris/scalar.c
==============================================================================
--- trunk/memcheck/tests/solaris/scalar.c (original)
+++ trunk/memcheck/tests/solaris/scalar.c Wed Feb 17 18:11:32 2016
@@ -950,61 +950,47 @@
__attribute__((noinline))
static void sys_auditsys14(void)
{
- GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETSTAT) 3s 1m");
- SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETSTAT, x0); FAIL;
-}
-
-__attribute__((noinline))
-static void sys_auditsys15(void)
-{
- GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETSTAT) 3s 1m");
- SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETSTAT, x0); FAIL;
-}
-
-__attribute__((noinline))
-static void sys_auditsys16(void)
-{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETUMASK) 3s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETUMASK, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys17(void)
+static void sys_auditsys15(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETSMASK) 3s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETSMASK, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys18(void)
+static void sys_auditsys16(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETCOND) 3s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETCOND, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys19(void)
+static void sys_auditsys17(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETCOND) 3s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETCOND, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys20(void)
+static void sys_auditsys18(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETCLASS) 3s 0m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETCLASS, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys21(void)
+static void sys_auditsys19(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETCLASS) 3s 0m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETCLASS, x0 + 1); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys22(void)
+static void sys_auditsys20(void)
{
au_evclass_map_t classmap;
classmap.ec_number = x0;
@@ -1015,21 +1001,21 @@
}
__attribute__((noinline))
-static void sys_auditsys23(void)
+static void sys_auditsys21(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETPINFO) 3s 0m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETPINFO, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys24(void)
+static void sys_auditsys22(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETPMASK) 3s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETPMASK, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys25(void)
+static void sys_auditsys23(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETPINFO_ADDR) 4s 0m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETPINFO_ADDR, x0,
@@ -1037,49 +1023,49 @@
}
__attribute__((noinline))
-static void sys_auditsys26(void)
+static void sys_auditsys24(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETKAUDIT) 4s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETKAUDIT, x0, x0 + 1); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys27(void)
+static void sys_auditsys25(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETKAUDIT) 4s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETKAUDIT, x0, x0 + 1); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys28(void)
+static void sys_auditsys26(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETAMASK) 3s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETAMASK, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys29(void)
+static void sys_auditsys27(void)
{
GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETAMASK) 3s 1m");
SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETAMASK, x0); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys30(void)
+static void sys_auditsys28(void)
{
GO(SYS_auditsys, "(BSM_GETAUDIT_ADDR) 3s 1m");
SY(SYS_auditsys, x0 + BSM_GETAUDIT_ADDR, x0 + 1, x0 + 1); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys31(void)
+static void sys_auditsys29(void)
{
GO(SYS_auditsys, "(BSM_SETAUDIT_ADDR) 3s 1m");
SY(SYS_auditsys, x0 + BSM_SETAUDIT_ADDR, x0, x0 + 1); FAIL;
}
__attribute__((noinline))
-static void sys_auditsys32(void)
+static void sys_auditsys30(void)
{
GO(SYS_auditsys, "(BSM_AUDITDOOR) 2s 0m");
SY(SYS_auditsys, x0 + BSM_AUDITDOOR, x0); FAIL;
@@ -2215,8 +2201,6 @@
sys_auditsys28();
sys_auditsys29();
sys_auditsys30();
- sys_auditsys31();
- sys_auditsys32();
/* SYS_processor_bind 187 */
/* XXX Missing wrapper. */
Modified: trunk/memcheck/tests/solaris/scalar.stderr.exp
==============================================================================
--- trunk/memcheck/tests/solaris/scalar.stderr.exp (original)
+++ trunk/memcheck/tests/solaris/scalar.stderr.exp Wed Feb 17 18:11:32 2016
@@ -3467,38 +3467,6 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
---------------------------------------------------------
-186: SYS_auditsys (BSM_AUDITCTL,A_GETSTAT) 3s 1m
----------------------------------------------------------
-Syscall param auditsys_auditctl_getstat(code) contains uninitialised byte(s)
- ...
-
-Syscall param auditsys_auditctl_getstat(cmd) contains uninitialised byte(s)
- ...
-
-Syscall param auditsys_auditctl_getstat(stats) contains uninitialised byte(s)
- ...
-
-Syscall param auditsys(stats) points to unaddressable byte(s)
- ...
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-
----------------------------------------------------------
-186: SYS_auditsys (BSM_AUDITCTL,A_SETSTAT) 3s 1m
----------------------------------------------------------
-Syscall param auditsys_auditctl_setstat(code) contains uninitialised byte(s)
- ...
-
-Syscall param auditsys_auditctl_setstat(cmd) contains uninitialised byte(s)
- ...
-
-Syscall param auditsys_auditctl_setstat(stats) contains uninitialised byte(s)
- ...
-
-Syscall param auditsys(stats) points to unaddressable byte(s)
- ...
- Address 0x........ is not stack'd, malloc'd or (recently) free'd
-
----------------------------------------------------------
186: SYS_auditsys (BSM_AUDITCTL,A_SETUMASK) 3s 1m
---------------------------------------------------------
Syscall param auditsys_auditctl_setumask(code) contains uninitialised byte(s)
Added: trunk/memcheck/tests/solaris/scalar_auditon_stat.c
==============================================================================
--- trunk/memcheck/tests/solaris/scalar_auditon_stat.c (added)
+++ trunk/memcheck/tests/solaris/scalar_auditon_stat.c Wed Feb 17 18:11:32 2016
@@ -0,0 +1,35 @@
+/* Scalar test for commands A_GETSTAT and A_SETSTAT for auditon(2) subcode
+ of the auditsys() syscall. Available on Solaris 11 and illumos,
+ removed in Solaris 12. */
+
+#include "scalar.h"
+
+#include <bsm/audit.h>
+
+__attribute__((noinline))
+static void sys_auditsys(void)
+{
+ GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETSTAT) 3s 1m");
+ SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETSTAT, x0); FAIL;
+}
+
+__attribute__((noinline))
+static void sys_auditsys2(void)
+{
+ GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETSTAT) 3s 1m");
+ SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETSTAT, x0); FAIL;
+}
+
+int main(void)
+{
+ /* Uninitialised, but we know px[0] is 0x0. */
+ long *px = malloc(sizeof(long));
+ x0 = px[0];
+
+ /* SYS_auditsys 186 */
+ sys_auditsys();
+ sys_auditsys2();
+
+ return 0;
+}
+
Added: trunk/memcheck/tests/solaris/scalar_auditon_stat.stderr.exp
==============================================================================
--- trunk/memcheck/tests/solaris/scalar_auditon_stat.stderr.exp (added)
+++ trunk/memcheck/tests/solaris/scalar_auditon_stat.stderr.exp Wed Feb 17 18:11:32 2016
@@ -0,0 +1,32 @@
+---------------------------------------------------------
+186: SYS_auditsys (BSM_AUDITCTL,A_GETSTAT) 3s 1m
+---------------------------------------------------------
+Syscall param auditsys_auditctl_getstat(code) contains uninitialised byte(s)
+ ...
+
+Syscall param auditsys_auditctl_getstat(cmd) contains uninitialised byte(s)
+ ...
+
+Syscall param auditsys_auditctl_getstat(stats) contains uninitialised byte(s)
+ ...
+
+Syscall param auditsys(stats) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
+---------------------------------------------------------
+186: SYS_auditsys (BSM_AUDITCTL,A_SETSTAT) 3s 1m
+---------------------------------------------------------
+Syscall param auditsys_auditctl_setstat(code) contains uninitialised byte(s)
+ ...
+
+Syscall param auditsys_auditctl_setstat(cmd) contains uninitialised byte(s)
+ ...
+
+Syscall param auditsys_auditctl_setstat(stats) contains uninitialised byte(s)
+ ...
+
+Syscall param auditsys(stats) points to unaddressable byte(s)
+ ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+
Added: trunk/memcheck/tests/solaris/scalar_auditon_stat.stdout.exp
==============================================================================
(empty)
Added: trunk/memcheck/tests/solaris/scalar_auditon_stat.vgtest
==============================================================================
--- trunk/memcheck/tests/solaris/scalar_auditon_stat.vgtest (added)
+++ trunk/memcheck/tests/solaris/scalar_auditon_stat.vgtest Wed Feb 17 18:11:32 2016
@@ -0,0 +1,4 @@
+prereq: test -e scalar_auditon_stat
+prog: scalar_auditon_stat
+vgopts: -q
+stderr_filter_args:
|
|
From: Bob L. <lam...@ya...> - 2016-02-17 17:48:13
|
Thanks Mark for your response. Although i'm far away from being an adept in Elf/Dwarf format, i've start trying to find in valgrind code where to put the "is z-compressed debug section" ... and failed. So, i give up the task to a more competent lad than me. Anyway, i've successfully aplyied your - elfutils 0.165+ - eu-elfcompress -t none method. So, i'm back on the road with my personal bugs ! Thank's again ! -------------------------------------------- On Wed, 2016-02-10 at 14:49 +0000, Bob LaMain wrote: > > But, recently, when using valgrind on my Debian machines, it constantly report warnings like: > > WARNING: Serious error when reading debug info > When reading debug info from /lib/i386-linux-gnu/ld-2.21.so > Ignoring non-Dwarf2/3/4 block in .debug_info > ... > > It seems related to the reported bug: > https://bugs.kde.org/show_bug.cgi?id=303877 > > So, > Did the bug has been properly reported to valgrind developers ? > And if so, did somebody already working on it ? > How can i help resolving this issue ? Best would be to make sure Debian doesn't use ELF section compression (and especially not different variants). There are better and more supported ways to compress debuginfo [*]. If you are stuck with such a debuginfo file and you have elfutils 0.165+ installed then you can fix them by decompressing using eu-elfcompress -t none. That said, the issue is known, and there have been some suggestions how a fix might possible be done, but nobody is working on it. See the bug report for more info if you want to help out with that. Cheers, Mark [*] https://gnu.wildebeest.org/blog/mjw/2016/02/02/where-are-your-symbols-debuginfo-and-sources/#Compressing |
|
From: Petar J. <mip...@gm...> - 2016-02-17 13:59:09
|
On Mon, Feb 15, 2016 at 4:57 PM, Mark Wielaard <mj...@re...> wrote: > Sorry I missed this (old) thread when writing the patch for: > https://bugs.kde.org/show_bug.cgi?id=359201 > I think it improves on the orginal fix by explicitly skipping argument5 > (uaddr2 aka dummy) for FUTEX_WAIT_BITSET. > > Does that patch look reasonable? > Looks good to me. |
|
From: Marcin S. <mar...@in...> - 2016-02-17 13:03:16
|
Detect pthread_mutex_init on initialized pthread_rwlock_t and
pthread_rwlock_init on initialized pthread_mutex_t as soon as possible.
Currently they are detected in _destroy and _lock, but it's a bit too
late - the problem is on initialization side.
I had hit this case in the below scenario:
struct A { pthread_mutex_t mutex; ... };
struct B { pthread_rwlock_t rwlock; ... };
struct A *a = allocA();
pthread_mutex_init(a->mutex);
// forgot pthread_mutex_destroy(&a->mutex);
freeA(a);
struct B *b = allocB(); // got exactly the same address as "a" (from non-standard allocator)
pthread_rwlock_init(&b->rwlock);
---
helgrind/hg_main.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git helgrind/hg_main.c helgrind/hg_main.c
index 3c1f12c..1b65db6 100644
--- helgrind/hg_main.c
+++ helgrind/hg_main.c
@@ -2006,8 +2006,14 @@ void evh__HG_PTHREAD_MUTEX_INIT_POST( ThreadId tid,
VG_(printf)("evh__hg_PTHREAD_MUTEX_INIT_POST(ctid=%d, mbRec=%ld, %p)\n",
(Int)tid, mbRec, (void*)mutex );
tl_assert(mbRec == 0 || mbRec == 1);
- map_locks_lookup_or_create( mbRec ? LK_mbRec : LK_nonRec,
+ Lock *lk = map_locks_lookup_or_create( mbRec ? LK_mbRec : LK_nonRec,
(Addr)mutex, tid );
+ if (lk && lk->kind == LK_rdwr) {
+ Thread* thr = map_threads_maybe_lookup( tid );
+ HG_(record_error_Misc)(thr, "pthread_mutex_init on alive rwlock "
+ "(missing pthread_rwlock_destroy before free?)");
+ }
+
if (HG_(clo_sanity_flags) & SCE_LOCKS)
all__sanity_check("evh__hg_PTHREAD_MUTEX_INIT_POST");
}
@@ -2577,7 +2583,13 @@ void evh__HG_PTHREAD_RWLOCK_INIT_POST( ThreadId tid, void* rwl )
if (SHOW_EVENTS >= 1)
VG_(printf)("evh__hg_PTHREAD_RWLOCK_INIT_POST(ctid=%d, %p)\n",
(Int)tid, (void*)rwl );
- map_locks_lookup_or_create( LK_rdwr, (Addr)rwl, tid );
+ Lock* lk = map_locks_lookup_or_create( LK_rdwr, (Addr)rwl, tid );
+ if (lk && lk->kind != LK_rdwr) {
+ Thread* thr = map_threads_maybe_lookup( tid );
+ HG_(record_error_Misc)(thr, "pthread_rwlock_init on alive mutex "
+ "(missing pthread_mutex_destroy before free?)" );
+ }
+
if (HG_(clo_sanity_flags) & SCE_LOCKS)
all__sanity_check("evh__hg_PTHREAD_RWLOCK_INIT_POST");
}
--
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
|