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
(13) |
2
(15) |
|
3
(16) |
4
(42) |
5
(9) |
6
(20) |
7
(22) |
8
(24) |
9
(12) |
|
10
(24) |
11
(11) |
12
(2) |
13
(13) |
14
(8) |
15
|
16
(16) |
|
17
(24) |
18
(36) |
19
(100) |
20
(94) |
21
(50) |
22
(39) |
23
(10) |
|
24
(14) |
25
(19) |
26
(2) |
27
(6) |
28
(17) |
29
(9) |
30
(8) |
|
31
(21) |
|
|
|
|
|
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-20 22:23:43
|
On Wed, May 20, 2009 at 9:58 PM, Konstantin Serebryany <kon...@gm...> wrote: > > Can valgrind driver issue a warning and exit if requested to run on a > static binary (only for those tools that use LD_PRELOAD)? > This will at least avoid confusion... > ? That's a good idea. Not sure how to do it, though... N |
|
From: Vince W. <vi...@cs...> - 2009-05-20 20:01:47
|
On Wed, 20 May 2009, Nicholas Nethercote wrote: > > Patches 5, 6 and 7 seem to be garbled. Since you have to resend them, > can I ask that you bundle all the changes into a single patch? I'd > find that easier to read. sure, I can do that. I wasn't sure what the best way to submit the changeset was, it seems each project I follow does things differently. I would have needed to resend anyway, I found a potential false positive in one of my cases, and also the SysRes changes made in the past few days required a few fixes. > I think it's good you've submitted this, I'll take a look at it, > hopefully soon, but I'm right in the middle of working on merging the > Darwin branch to the trunk and that will take precedence for the > moment. I understand. There's no real rush in getting my stuff reviewed, I just wanted to get the code out there before I get sidetracked on other work. Thanks, Vince |
|
From: Bart V. A. <bar...@gm...> - 2009-05-20 12:05:36
|
On Wed, May 20, 2009 at 1:13 PM, Julian Seward <js...@ac...> wrote: > On Wednesday 20 May 2009, Nicholas Nethercote wrote: >> On Wed, May 20, 2009 at 6:22 PM, Julian Seward <js...@ac...> wrote: >> > Independently of your commit .. does this work reliably? It looks >> > distinctly un-thread-safe to me :-) >> > >> > if (init_done) >> > return; >> > init_done = 1; >> > // actually do said initialisation >> >> Probably not, but Valgrind is single-threaded and I expect there are a >> lot of other un-thread-safe things like this...? > > But this is a bit different .. it runs on the VCPU, not the real one, > hence is not as a whole protected by the standard BigLock scheme. > iiuc .. If the assignment to the variable init_done would be triggering a race condition, both DRD and Helgrind would report this race. By the way, although the init() function in coregrind/m_replacemalloc/vg_replace_malloc.c has been declared __attribute__((constructor)), it is not safe to remove the variable init_done. This is because it is possible that malloc() and hence init() gets called before shared library initialization finished. Bart. |
|
From: Konstantin S. <kon...@gm...> - 2009-05-20 11:58:56
|
On Wed, May 20, 2009 at 12:07 PM, Tom Hughes <to...@co...> wrote: > Konstantin Serebryany wrote: > >> Memcheck, Helgrind and other valgrind tools use LD_PRELOAD to replace >> or wrap functions in the users code. > > It does use LD_PRELOAD but not in the normal way where the preloaded library > contains functions with the same name as the ones being replaced. > > Instead the preloaded library contains functions with special mangled names > which valgrind recognises and adds to it's internal redirection table so > that when it sees the relevant function it can redirect it. > >> This makes it impossible to use the tools on statically linked binaries. >> Meanwhile, PIN is capable of replacing/wrapping functions in static >> binaries, so it is at least theoretically possible to do the same in >> Valgrind. > > Indeed, and so long as the static binary has a symbol table it would already > work I think except that: > > (a) a statically linked binary won't use ld.so so won't process > the LD_PRELOAD at all. > > (b) the symbols in our preload libraries are deliberately designed > to only intercept symbols in the 'right' so's - so malloc will > only be intercepted in libc.so and so on. > > I think globally intercepting something like malloc (which would be needed > for a statically linked binary) could only ever be done on an > optional basis really but I guess we could support. > > I'm not sure how to get round the LD_PRELOAD issue though? > > At the end of the day the question may be one of how much work it is worth > doing to support something that is fairly uncommon these days. Static binaries are not that uncommon, at least in out environment. Quite often I get questions "what does this weird Memcheck/ThreadSanitizer report mean?" and the answer is "you are using it on a static binary". Can valgrind driver issue a warning and exit if requested to run on a static binary (only for those tools that use LD_PRELOAD)? This will at least avoid confusion... ? --kcc > > Tom > > -- > Tom Hughes (to...@co...) > http://www.compton.nu/ > |
|
From: Julian S. <js...@ac...> - 2009-05-20 11:11:02
|
On Wednesday 20 May 2009, Nicholas Nethercote wrote: > On Wed, May 20, 2009 at 6:22 PM, Julian Seward <js...@ac...> wrote: > > Independently of your commit .. does this work reliably? It looks > > distinctly un-thread-safe to me :-) > > > > if (init_done) > > return; > > init_done = 1; > > // actually do said initialisation > > Probably not, but Valgrind is single-threaded and I expect there are a > lot of other un-thread-safe things like this...? But this is a bit different .. it runs on the VCPU, not the real one, hence is not as a whole protected by the standard BigLock scheme. iiuc .. Anyway, more an idle observation than anything else. J |
|
From: Nicholas N. <n.n...@gm...> - 2009-05-20 10:38:34
|
On Wed, May 20, 2009 at 6:22 PM, Julian Seward <js...@ac...> wrote: > > Independently of your commit .. does this work reliably? It looks > distinctly un-thread-safe to me :-) > > if (init_done) > return; > init_done = 1; > // actually do said initialisation Probably not, but Valgrind is single-threaded and I expect there are a lot of other un-thread-safe things like this...? Nick |
|
From: Nicholas N. <n.n...@gm...> - 2009-05-20 10:37:08
|
On Wed, May 20, 2009 at 6:18 PM, Julian Seward <js...@ac...> wrote: > > Are you sure these are unused? I seem to remember adding IP_AT_SYSCALL > as a pseudo register in all guest states, specifically to support syscall > backouts on Darwin. Yes. You can't see it from the diff, but the removed lines were duplicated nearby. N |
|
From: Bart V. A. <bar...@gm...> - 2009-05-20 08:32:03
|
On Wed, May 20, 2009 at 10:22 AM, Julian Seward <js...@ac...> wrote: [ ... ] (commenting on coregrind/m_replacemalloc/vg_replace_malloc.c) [ ... ] > Independently of your commit .. does this work reliably? It looks > distinctly un-thread-safe to me :-) > > if (init_done) > return; > init_done = 1; > // actually do said initialisation Every program I know of calls malloc() at least once before calling pthread_create(). So init_done gets initialized before any thread is created, and is only read when multiple threads are active simultaneously. Such an access pattern is safe. But it deserves at least a comment. Bart. |
|
From: Julian S. <js...@ac...> - 2009-05-20 08:21:49
|
Are you sure these are unused? I seem to remember adding IP_AT_SYSCALL as a pseudo register in all guest states, specifically to support syscall backouts on Darwin. J On Wednesday 20 May 2009, sv...@va... wrote: > Author: njn > Date: 2009-05-20 04:40:55 +0100 (Wed, 20 May 2009) > New Revision: 10010 > > Log: > Remove two redundant lines. > > > > Modified: > branches/DARWIN/memcheck/mc_machine.c > > > Modified: branches/DARWIN/memcheck/mc_machine.c > =================================================================== > --- branches/DARWIN/memcheck/mc_machine.c 2009-05-20 03:35:22 UTC (rev > 10009) +++ branches/DARWIN/memcheck/mc_machine.c 2009-05-20 03:40:55 UTC > (rev 10010) @@ -494,7 +494,6 @@ > if (o == GOF(GS_0x60) && sz == 8) return -1; /* slot unused */ > if (o == GOF(TISTART) && sz == 8) return -1; /* slot unused */ > if (o == GOF(TILEN) && sz == 8) return -1; /* slot unused */ > - if (o == GOF(IP_AT_SYSCALL) && sz == 8) return -1; /* slot unused */ > > /* Treat %AH, %BH, %CH, %DH as independent registers. To do this > requires finding 4 unused 32-bit slots in the second-shadow > @@ -606,7 +605,6 @@ > if (o == GOF(ACFLAG) && sz == 4) return -1; /* slot unused */ > if (o == GOF(TISTART) && sz == 4) return -1; /* slot unused */ > if (o == GOF(TILEN) && sz == 4) return -1; /* slot unused */ > - if (o == GOF(IP_AT_SYSCALL) && sz == 4) return -1; /* slot unused */ > > /* Treat %AH, %BH, %CH, %DH as independent registers. To do this > requires finding 4 unused 32-bit slots in the second-shadow > > > --------------------------------------------------------------------------- >--- Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: Julian S. <js...@ac...> - 2009-05-20 08:21:39
|
Independently of your commit .. does this work reliably? It looks
distinctly un-thread-safe to me :-)
if (init_done)
return;
init_done = 1;
// actually do said initialisation
J
On Wednesday 20 May 2009, sv...@va... wrote:
> Author: njn
> Date: 2009-05-20 05:03:56 +0100 (Wed, 20 May 2009)
> New Revision: 10017
>
> Log:
> Trunk sync: whitespace.
>
>
>
> Modified:
> branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
>
>
> Modified: branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c
> ===================================================================
> ---
> branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-05-20
> 04:02:50 UTC (rev 10016) +++
> branches/DARWIN/coregrind/m_replacemalloc/vg_replace_malloc.c 2009-05-20
> 04:03:56 UTC (rev 10017) @@ -797,9 +797,12 @@
> static void init(void)
> {
> int res;
> +
> if (init_done)
> return;
> +
> init_done = 1;
> +
> VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__GET_MALLOCFUNCS, &info,
> 0, 0, 0, 0);
> }
>
>
> ---------------------------------------------------------------------------
>--- Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|
|
From: Julian S. <js...@ac...> - 2009-05-20 08:15:12
|
> > $ svn diff -r9114:9121 auxprogs/Makefile.am > > [ ... ] > > ## cleanery > > clean-local: > > rm -f libmpiwrap-.c \ > > - libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c \ > > - libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c > > + libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.c \ > > + libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.c > > So to summarise in a comprehensible fashion: on the trunk, > auxprogs/Makefile.am refers to VGCONF_ARCH_SEC, a configure variable > that doesn't exist. It seems that Julian tried to fix this on the > MESSAGING_TIDYUP branch, but his fix was bogus. That bogus fix needs > to be undone on the branch, and a correct fix is required for the > trunk (that correct fix could optionally be merged onto the branch if > desired). Yes. That syncs with my understanding. J |
|
From: <sv...@va...> - 2009-05-20 08:14:41
|
Author: njn
Date: 2009-05-20 09:14:23 +0100 (Wed, 20 May 2009)
New Revision: 10052
Log:
DARWIN sync: whitespace change only.
Modified:
trunk/coregrind/m_syswrap/priv_types_n_macros.h
Modified: trunk/coregrind/m_syswrap/priv_types_n_macros.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 08:07:30 UTC (rev 10051)
+++ trunk/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 08:14:23 UTC (rev 10052)
@@ -366,16 +366,16 @@
since the least significant parts of the guest register are stored
in memory at the lowest address.
*/
-#define PRRAn_LE(n,s,t,a) \
- do { \
- Int here = layout->o_arg##n; \
- vg_assert(sizeof(t) <= sizeof(UWord)); \
- vg_assert(here >= 0); \
- VG_(tdict).track_pre_reg_read( \
- Vg_CoreSysCall, tid, s"("#a")", \
- here, sizeof(t) \
- ); \
- } while (0)
+#define PRRAn_LE(n,s,t,a) \
+ do { \
+ Int here = layout->o_arg##n; \
+ vg_assert(sizeof(t) <= sizeof(UWord)); \
+ vg_assert(here >= 0); \
+ VG_(tdict).track_pre_reg_read( \
+ Vg_CoreSysCall, tid, s"("#a")", \
+ here, sizeof(t) \
+ ); \
+ } while (0)
/* big-endian: the part of the guest state being read is
let next = offset_of_reg + sizeof(reg)
@@ -383,17 +383,17 @@
since the least significant parts of the guest register are stored
in memory at the highest address.
*/
-#define PRRAn_BE(n,s,t,a) \
- do { \
- Int here = layout->o_arg##n; \
- Int next = layout->o_arg##n + sizeof(UWord); \
- vg_assert(sizeof(t) <= sizeof(UWord)); \
- vg_assert(here >= 0); \
- VG_(tdict).track_pre_reg_read( \
- Vg_CoreSysCall, tid, s"("#a")", \
- next-sizeof(t), sizeof(t) \
- ); \
- } while (0)
+#define PRRAn_BE(n,s,t,a) \
+ do { \
+ Int here = layout->o_arg##n; \
+ Int next = layout->o_arg##n + sizeof(UWord); \
+ vg_assert(sizeof(t) <= sizeof(UWord)); \
+ vg_assert(here >= 0); \
+ VG_(tdict).track_pre_reg_read( \
+ Vg_CoreSysCall, tid, s"("#a")", \
+ next-sizeof(t), sizeof(t) \
+ ); \
+ } while (0)
#if defined(VG_BIGENDIAN)
# define PRRAn(n,s,t,a) PRRAn_BE(n,s,t,a)
|
|
From: Tom H. <to...@co...> - 2009-05-20 08:07:49
|
Konstantin Serebryany wrote:
> Memcheck, Helgrind and other valgrind tools use LD_PRELOAD to replace
> or wrap functions in the users code.
It does use LD_PRELOAD but not in the normal way where the preloaded
library contains functions with the same name as the ones being replaced.
Instead the preloaded library contains functions with special mangled
names which valgrind recognises and adds to it's internal redirection
table so that when it sees the relevant function it can redirect it.
> This makes it impossible to use the tools on statically linked binaries.
> Meanwhile, PIN is capable of replacing/wrapping functions in static
> binaries, so it is at least theoretically possible to do the same in
> Valgrind.
Indeed, and so long as the static binary has a symbol table it would
already work I think except that:
(a) a statically linked binary won't use ld.so so won't process
the LD_PRELOAD at all.
(b) the symbols in our preload libraries are deliberately designed
to only intercept symbols in the 'right' so's - so malloc will
only be intercepted in libc.so and so on.
I think globally intercepting something like malloc (which would be
needed for a statically linked binary) could only ever be done on an
optional basis really but I guess we could support.
I'm not sure how to get round the LD_PRELOAD issue though?
At the end of the day the question may be one of how much work it is
worth doing to support something that is fairly uncommon these days.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: <sv...@va...> - 2009-05-20 08:07:34
|
Author: njn
Date: 2009-05-20 09:07:30 +0100 (Wed, 20 May 2009)
New Revision: 10051
Log:
Fix Darwin compile breakage.
Modified:
branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
Modified: branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 08:04:11 UTC (rev 10050)
+++ branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 08:07:30 UTC (rev 10051)
@@ -496,7 +496,7 @@
*/
#define PSRAn_LE(n,s,t,a) \
do { \
- Addr here = layout->s_arg##n + VG_(threads)[tid].arch.vex.VG_STACK_PTR; \
+ Addr here = layout->s_arg##n + VG_(get_SP)(tid); \
vg_assert(sizeof(t) <= sizeof(UWord)); \
VG_(tdict).track_pre_mem_read( \
Vg_CoreSysCallArgInMem, tid, s"("#a")", \
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-05-20 08:04:11 UTC (rev 10050)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-05-20 08:07:30 UTC (rev 10051)
@@ -44,6 +44,7 @@
#include "pub_core_libcprint.h"
#include "pub_core_libcproc.h"
#include "pub_core_libcsignal.h"
+#include "pub_core_machine.h" // VG_(get_SP)
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
#include "pub_core_scheduler.h"
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-05-20 08:04:11 UTC (rev 10050)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-05-20 08:07:30 UTC (rev 10051)
@@ -45,6 +45,7 @@
#include "pub_core_libcprint.h"
#include "pub_core_libcproc.h"
#include "pub_core_libcsignal.h"
+#include "pub_core_machine.h" // VG_(get_SP)
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
#include "pub_core_scheduler.h"
|
|
From: <sv...@va...> - 2009-05-20 08:04:21
|
Author: njn
Date: 2009-05-20 09:04:11 +0100 (Wed, 20 May 2009)
New Revision: 10050
Log:
Tweak syscall param handling macros.
Modified:
branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
Modified: branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 07:46:42 UTC (rev 10049)
+++ branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 08:04:11 UTC (rev 10050)
@@ -387,20 +387,44 @@
*/
#if defined(VGO_linux)
- /* All parameters are in registers (though max is less than 8) */
-# define SYSCALL_PARAMS_IN_REGISTERS 8
+ /* Up to 6 parameters, all in registers. */
+# define PRA1(s,t,a) PRRAn(1,s,t,a)
+# define PRA2(s,t,a) PRRAn(2,s,t,a)
+# define PRA3(s,t,a) PRRAn(3,s,t,a)
+# define PRA4(s,t,a) PRRAn(4,s,t,a)
+# define PRA5(s,t,a) PRRAn(5,s,t,a)
+# define PRA6(s,t,a) PRRAn(6,s,t,a)
+
+#elif defined(VGO_aix5)
+# error Need to fill this in for AIX5
+
#elif defined(VGP_x86_darwin)
- /* All parameters are on the stack */
-# define SYSCALL_PARAMS_IN_REGISTERS 0
-# define SYSCALL_SP VG_(threads)[tid].arch.vex.guest_ESP;
+ /* Up to 8 parameters, all on the stack. */
+# define PRA1(s,t,a) PSRAn(1,s,t,a)
+# define PRA2(s,t,a) PSRAn(2,s,t,a)
+# define PRA3(s,t,a) PSRAn(3,s,t,a)
+# define PRA4(s,t,a) PSRAn(4,s,t,a)
+# define PRA5(s,t,a) PSRAn(5,s,t,a)
+# define PRA6(s,t,a) PSRAn(6,s,t,a)
+# define PRA7(s,t,a) PSRAn(7,s,t,a)
+# define PRA8(s,t,a) PSRAn(8,s,t,a)
+
#elif defined(VGP_amd64_darwin)
- /* 6 parameters are in registers; the rest are on the stack */
-# define SYSCALL_PARAMS_IN_REGISTERS 6
-# define SYSCALL_SP VG_(threads)[tid].arch.vex.guest_RSP;
+ /* Up to 8 parameters, 6 in registers, 2 on the stack. */
+# define PRA1(s,t,a) PRRAn(1,s,t,a)
+# define PRA2(s,t,a) PRRAn(2,s,t,a)
+# define PRA3(s,t,a) PRRAn(3,s,t,a)
+# define PRA4(s,t,a) PRRAn(4,s,t,a)
+# define PRA5(s,t,a) PRRAn(5,s,t,a)
+# define PRA6(s,t,a) PRRAn(6,s,t,a)
+# define PRA7(s,t,a) PSRAn(7,s,t,a)
+# define PRA8(s,t,a) PSRAn(8,s,t,a)
+
#else
-# error unknown architecture
+# error Unknown platform
#endif
+
/* Tell the tool that the syscall number is being read. */
#define PRRSN \
VG_(tdict).track_pre_reg_read(Vg_CoreSysCall, tid, "(syscallno)", \
@@ -472,7 +496,7 @@
*/
#define PSRAn_LE(n,s,t,a) \
do { \
- Addr here = layout->s_arg##n + SYSCALL_SP; \
+ Addr here = layout->s_arg##n + VG_(threads)[tid].arch.vex.VG_STACK_PTR; \
vg_assert(sizeof(t) <= sizeof(UWord)); \
VG_(tdict).track_pre_mem_read( \
Vg_CoreSysCallArgInMem, tid, s"("#a")", \
@@ -488,7 +512,8 @@
*/
#define PSRAn_BE(n,s,t,a) \
do { \
- Addr next = layout->o_arg##n + sizeof(UWord) + SYSCALL_SP; \
+ Addr next = layout->o_arg##n + sizeof(UWord) + \
+ VG_(threads)[tid].arch.vex.VG_STACK_PTR; \
vg_assert(sizeof(t) <= sizeof(UWord)); \
VG_(tdict).track_pre_mem_read( \
Vg_CoreSysCallArgInMem, tid, s"("#a")", \
@@ -505,39 +530,6 @@
#endif
-#if SYSCALL_PARAMS_IN_REGISTERS == 8
-# define PRA1(s,t,a) PRRAn(1,s,t,a)
-# define PRA2(s,t,a) PRRAn(2,s,t,a)
-# define PRA3(s,t,a) PRRAn(3,s,t,a)
-# define PRA4(s,t,a) PRRAn(4,s,t,a)
-# define PRA5(s,t,a) PRRAn(5,s,t,a)
-# define PRA6(s,t,a) PRRAn(6,s,t,a)
-# define PRA7(s,t,a) PRRAn(7,s,t,a)
-# define PRA8(s,t,a) PRRAn(8,s,t,a)
-#elif SYSCALL_PARAMS_IN_REGISTERS == 6
-# define PRA1(s,t,a) PRRAn(1,s,t,a)
-# define PRA2(s,t,a) PRRAn(2,s,t,a)
-# define PRA3(s,t,a) PRRAn(3,s,t,a)
-# define PRA4(s,t,a) PRRAn(4,s,t,a)
-# define PRA5(s,t,a) PRRAn(5,s,t,a)
-# define PRA6(s,t,a) PRRAn(6,s,t,a)
-# define PRA7(s,t,a) PSRAn(7,s,t,a)
-# define PRA8(s,t,a) PSRAn(8,s,t,a)
-#elif SYSCALL_PARAMS_IN_REGISTERS == 0
-# define PRA1(s,t,a) PSRAn(1,s,t,a)
-# define PRA2(s,t,a) PSRAn(2,s,t,a)
-# define PRA3(s,t,a) PSRAn(3,s,t,a)
-# define PRA4(s,t,a) PSRAn(4,s,t,a)
-# define PRA5(s,t,a) PSRAn(5,s,t,a)
-# define PRA6(s,t,a) PSRAn(6,s,t,a)
-# define PRA7(s,t,a) PSRAn(7,s,t,a)
-# define PRA8(s,t,a) PSRAn(8,s,t,a)
-#else
-# error unknown SYSCALL_PARAMS_IN_REGISTERS value
-#endif
-
-#undef SYSCALL_PARAMS_IN_REGISTERS
-
#define PRE_REG_READ0(tr, s) \
if (VG_(tdict).track_pre_reg_read) { \
PRRSN; \
|
|
From: <sv...@va...> - 2009-05-20 07:46:47
|
Author: njn
Date: 2009-05-20 08:46:42 +0100 (Wed, 20 May 2009)
New Revision: 10049
Log:
Improve conditional compilation guards.
Modified:
branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
Modified: branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 07:41:01 UTC (rev 10048)
+++ branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 07:46:42 UTC (rev 10049)
@@ -275,12 +275,14 @@
vgSysWrap_##auxstr##_##name##_after
/* Add a generic wrapper to a syscall table. */
-#if defined(VGO_darwin)
-#define GENX_(sysno, name) WRAPPER_ENTRY_X_(generic, VG_DARWIN_SYSNO_INDEX(sysno), name)
-#define GENXY(sysno, name) WRAPPER_ENTRY_XY(generic, VG_DARWIN_SYSNO_INDEX(sysno), name)
+#if defined(VGO_linux) || defined(VGO_aix5)
+# define GENX_(sysno, name) WRAPPER_ENTRY_X_(generic, sysno, name)
+# define GENXY(sysno, name) WRAPPER_ENTRY_XY(generic, sysno, name)
+#elif defined(VGO_darwin)
+# define GENX_(sysno, name) WRAPPER_ENTRY_X_(generic, VG_DARWIN_SYSNO_INDEX(sysno), name)
+# define GENXY(sysno, name) WRAPPER_ENTRY_XY(generic, VG_DARWIN_SYSNO_INDEX(sysno), name)
#else
-#define GENX_(sysno, name) WRAPPER_ENTRY_X_(generic, sysno, name)
-#define GENXY(sysno, name) WRAPPER_ENTRY_XY(generic, sysno, name)
+# error Unknown OS
#endif
/* Add a Linux-specific, arch-independent wrapper to a syscall
|
|
From: <sv...@va...> - 2009-05-20 07:41:05
|
Author: njn
Date: 2009-05-20 08:41:01 +0100 (Wed, 20 May 2009)
New Revision: 10048
Log:
Trunk sync: wibble.
Modified:
branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
Modified: branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 07:37:42 UTC (rev 10047)
+++ branches/DARWIN/coregrind/m_syswrap/priv_types_n_macros.h 2009-05-20 07:41:01 UTC (rev 10048)
@@ -79,7 +79,7 @@
/* Guest state layout info for syscall args. */
typedef
- struct SyscallArgLayout {
+ struct {
// Note that, depending on the platform, arguments may be found in
// registers or on the stack. (See the comment at the top of
// syswrap-main.c for per-platform details.) For register arguments
|
|
From: <sv...@va...> - 2009-05-20 07:37:50
|
Author: njn
Date: 2009-05-20 08:37:42 +0100 (Wed, 20 May 2009)
New Revision: 10047
Log:
Trunk sync: field order.
Modified:
branches/DARWIN/coregrind/pub_core_ume.h
Modified: branches/DARWIN/coregrind/pub_core_ume.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_ume.h 2009-05-20 07:37:13 UTC (rev 10046)
+++ branches/DARWIN/coregrind/pub_core_ume.h 2009-05-20 07:37:42 UTC (rev 10047)
@@ -64,13 +64,6 @@
Addr exe_base; // INOUT: lowest (allowed) address of exe
Addr exe_end; // INOUT: highest (allowed) address
- Addr entry; // OUT: entrypoint in main executable
- Addr init_ip; // OUT: address of first instruction to execute
- Addr brkbase; // OUT: base address of brk segment
- Addr init_toc; // OUT: address of table-of-contents, on
- // platforms for which that makes sense
- // (ppc64-linux only)
-
#if !defined(VGO_darwin)
Addr phdr; // OUT: address phdr was mapped at
Int phnum; // OUT: number of phdrs
@@ -83,9 +76,16 @@
char* executable_path; // OUT: path passed to execve()
#endif
+ Addr entry; // OUT: entrypoint in main executable
+ Addr init_ip; // OUT: address of first instruction to execute
+ Addr brkbase; // OUT: base address of brk segment
+ Addr init_toc; // OUT: address of table-of-contents, on
+ // platforms for which that makes sense
+ // (ppc64-linux only)
+
// These are the extra args added by #! scripts
- HChar* interp_name; // OUT: the interpreter name
- HChar* interp_args; // OUT: the args for the interpreter
+ HChar* interp_name; // OUT: the interpreter name
+ HChar* interp_args; // OUT: the args for the interpreter
}
ExeInfo;
|
|
From: <sv...@va...> - 2009-05-20 07:37:19
|
Author: njn
Date: 2009-05-20 08:37:13 +0100 (Wed, 20 May 2009)
New Revision: 10046
Log:
Trunk sync: param name.
Modified:
branches/DARWIN/coregrind/pub_core_debuglog.h
Modified: branches/DARWIN/coregrind/pub_core_debuglog.h
===================================================================
--- branches/DARWIN/coregrind/pub_core_debuglog.h 2009-05-20 07:36:18 UTC (rev 10045)
+++ branches/DARWIN/coregrind/pub_core_debuglog.h 2009-05-20 07:37:13 UTC (rev 10046)
@@ -74,11 +74,11 @@
const HChar* format, ... );
-/* A simple vprintf(). For each emitted byte, (*send) is called with
+/* A simple vprintf(). For each emitted byte, (*send_fn) is called with
that byte, and 'send_arg2' as its second param. */
extern
UInt VG_(debugLog_vprintf) (
- void (*send_fn)(HChar,void*), /* byte sink */
+ void (*send_fn)(HChar,void*),/* byte sink */
void* send_arg2, /* 2nd arg for byte sink */
const HChar *format,
va_list vargs
|
|
From: <sv...@va...> - 2009-05-20 07:36:24
|
Author: njn
Date: 2009-05-20 08:36:18 +0100 (Wed, 20 May 2009)
New Revision: 10045
Log:
DARWIN sync: param name.
Modified:
trunk/coregrind/pub_core_debuglog.h
Modified: trunk/coregrind/pub_core_debuglog.h
===================================================================
--- trunk/coregrind/pub_core_debuglog.h 2009-05-20 07:10:48 UTC (rev 10044)
+++ trunk/coregrind/pub_core_debuglog.h 2009-05-20 07:36:18 UTC (rev 10045)
@@ -74,11 +74,11 @@
const HChar* format, ... );
-/* A simple vprintf(). For each emitted byte, (*send) is called with
+/* A simple vprintf(). For each emitted byte, (*send_fn) is called with
that byte, and 'send_arg2' as its second param. */
extern
UInt VG_(debugLog_vprintf) (
- void (*send)(HChar,void*), /* byte sink */
+ void (*send_fn)(HChar,void*),/* byte sink */
void* send_arg2, /* 2nd arg for byte sink */
const HChar *format,
va_list vargs
|
|
From: Nicholas N. <n.n...@gm...> - 2009-05-20 07:31:36
|
On Wed, May 20, 2009 at 4:51 PM, Bart Van Assche <bar...@gm...> wrote: > Some more information: the above comments apply to the trunk. > According to the information in Subversion a.o. the following changes > were introduced via r9121: > > $ svn diff -r9114:9121 auxprogs/Makefile.am > [ ... ] > ## cleanery > clean-local: > rm -f libmpiwrap-.c \ > - libmpiwrap-@VGCONF_PLATFORM_PRI_CAPS@.c \ > - libmpiwrap-@VGCONF_PLATFORM_SEC_CAPS@.c > + libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.c \ > + libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.c So to summarise in a comprehensible fashion: on the trunk, auxprogs/Makefile.am refers to VGCONF_ARCH_SEC, a configure variable that doesn't exist. It seems that Julian tried to fix this on the MESSAGING_TIDYUP branch, but his fix was bogus. That bogus fix needs to be undone on the branch, and a correct fix is required for the trunk (that correct fix could optionally be merged onto the branch if desired). N |
|
From: <sv...@va...> - 2009-05-20 07:10:55
|
Author: njn
Date: 2009-05-20 08:10:48 +0100 (Wed, 20 May 2009)
New Revision: 10044
Log:
Merge r9472 (tkill() param renaming) from the DARWIN branch.
Modified:
trunk/coregrind/m_libcsignal.c
trunk/coregrind/pub_core_libcsignal.h
Modified: trunk/coregrind/m_libcsignal.c
===================================================================
--- trunk/coregrind/m_libcsignal.c 2009-05-20 07:05:02 UTC (rev 10043)
+++ trunk/coregrind/m_libcsignal.c 2009-05-20 07:10:48 UTC (rev 10044)
@@ -225,14 +225,13 @@
return sr_isError(res) ? -1 : 0;
}
-
-Int VG_(tkill)( ThreadId tid, Int signo )
+Int VG_(tkill)( Int lwpid, Int signo )
{
# if defined(__NR_tkill)
SysRes res = VG_(mk_SysRes_Error)(VKI_ENOSYS);
- res = VG_(do_syscall2)(__NR_tkill, tid, signo);
+ res = VG_(do_syscall2)(__NR_tkill, lwpid, signo);
if (sr_isError(res) && sr_Err(res) == VKI_ENOSYS)
- res = VG_(do_syscall2)(__NR_kill, tid, signo);
+ res = VG_(do_syscall2)(__NR_kill, lwpid, signo);
return sr_isError(res) ? -1 : 0;
# else
Modified: trunk/coregrind/pub_core_libcsignal.h
===================================================================
--- trunk/coregrind/pub_core_libcsignal.h 2009-05-20 07:05:02 UTC (rev 10043)
+++ trunk/coregrind/pub_core_libcsignal.h 2009-05-20 07:10:48 UTC (rev 10044)
@@ -76,7 +76,7 @@
extern Int VG_(kill) ( Int pid, Int signo );
-extern Int VG_(tkill) ( ThreadId tid, Int signo );
+extern Int VG_(tkill) ( Int lwpid, Int signo );
/* A cut-down version of POSIX sigtimedwait: poll for pending signals
mentioned in the sigset_t, and if any are present, select one
|
|
From: <sv...@va...> - 2009-05-20 07:05:09
|
Author: njn Date: 2009-05-20 08:05:02 +0100 (Wed, 20 May 2009) New Revision: 10043 Log: Augment a note. Modified: branches/DARWIN/docs/internals/Darwin-notes.txt Modified: branches/DARWIN/docs/internals/Darwin-notes.txt =================================================================== --- branches/DARWIN/docs/internals/Darwin-notes.txt 2009-05-20 07:01:07 UTC (rev 10042) +++ branches/DARWIN/docs/internals/Darwin-notes.txt 2009-05-20 07:05:02 UTC (rev 10043) @@ -107,6 +107,9 @@ VG_(post_syscall): contains important-looking code that is #if 0'd out. Said code does VG_TRACK( post_reg_write). Needs looking into. +[The 'post_reg_write' call has been moved into +putSyscallStatusIntoGuestState(). This might be an improvement, as on some +platforms more than one register is written with a result.] VG_(di_notify_mmap): Linux version is also used for Darwin, and |
|
From: <sv...@va...> - 2009-05-20 07:01:13
|
Author: njn
Date: 2009-05-20 08:01:07 +0100 (Wed, 20 May 2009)
New Revision: 10042
Log:
Merge 10041 (send debuglog output to stdout) and do likewise for Darwin.
Modified:
branches/DARWIN/coregrind/m_debuglog.c
Modified: branches/DARWIN/coregrind/m_debuglog.c
===================================================================
--- branches/DARWIN/coregrind/m_debuglog.c 2009-05-20 06:59:19 UTC (rev 10041)
+++ branches/DARWIN/coregrind/m_debuglog.c 2009-05-20 07:01:07 UTC (rev 10042)
@@ -76,7 +76,7 @@
"movl 0(%%ebx), %%ecx\n" /* %ecx = buf */
"movl 4(%%ebx), %%edx\n" /* %edx = n */
"movl $"VG_STRINGIFY(__NR_write)", %%eax\n" /* %eax = __NR_write */
- "movl $1, %%ebx\n" /* %ebx = stderr */
+ "movl $2, %%ebx\n" /* %ebx = stderr */
"int $0x80\n" /* write(stderr, buf, n) */
"popl %%ebx\n" /* reestablish &block */
"movl %%eax, 0(%%ebx)\n" /* block[0] = result */
@@ -413,7 +413,7 @@
"pushl %%eax\n"
"movl %1, %%eax\n" /* push buf */
"pushl %%eax\n"
- "movl $1, %%eax\n" /* push stderr */
+ "movl $2, %%eax\n" /* push stderr */
"pushl %%eax\n"
"movl $"VG_STRINGIFY(VG_DARWIN_SYSNO_INDEX(__NR_write_nocancel))
", %%eax\n"
@@ -451,7 +451,7 @@
{
UInt __res;
__asm__ volatile (
- "movq $1, %%rdi\n" /* push stderr */
+ "movq $2, %%rdi\n" /* push stderr */
"movq %1, %%rsi\n" /* push buf */
"movl %2, %%edx\n" /* push n */
"movl $"VG_STRINGIFY(VG_DARWIN_SYSNO_NUM(__NR_write_nocancel))
|
|
From: <sv...@va...> - 2009-05-20 06:59:28
|
Author: njn
Date: 2009-05-20 07:59:19 +0100 (Wed, 20 May 2009)
New Revision: 10041
Log:
On x86-linux, send debuglog output to stderr, not stdout.
Modified:
trunk/coregrind/m_debuglog.c
Modified: trunk/coregrind/m_debuglog.c
===================================================================
--- trunk/coregrind/m_debuglog.c 2009-05-20 06:55:05 UTC (rev 10040)
+++ trunk/coregrind/m_debuglog.c 2009-05-20 06:59:19 UTC (rev 10041)
@@ -71,7 +71,7 @@
"movl 0(%%ebx), %%ecx\n" /* %ecx = buf */
"movl 4(%%ebx), %%edx\n" /* %edx = n */
"movl $"VG_STRINGIFY(__NR_write)", %%eax\n" /* %eax = __NR_write */
- "movl $1, %%ebx\n" /* %ebx = stderr */
+ "movl $2, %%ebx\n" /* %ebx = stderr */
"int $0x80\n" /* write(stderr, buf, n) */
"popl %%ebx\n" /* reestablish &block */
"movl %%eax, 0(%%ebx)\n" /* block[0] = result */
|