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
(2) |
3
|
4
(1) |
5
(6) |
6
|
|
7
(1) |
8
|
9
(1) |
10
(2) |
11
(6) |
12
(3) |
13
(3) |
|
14
|
15
(11) |
16
(8) |
17
(5) |
18
(5) |
19
(5) |
20
(3) |
|
21
(2) |
22
(4) |
23
(5) |
24
(4) |
25
|
26
|
27
|
|
28
(8) |
|
|
|
|
|
|
|
From: Konstantin S. <kon...@gm...> - 2010-02-15 13:23:50
|
On Mon, Feb 15, 2010 at 3:17 PM, Bart Van Assche <bva...@ac...> wrote: > On Mon, Feb 15, 2010 at 12:52 PM, Konstantin Serebryany > <kon...@gm...> wrote: >> On Mon, Feb 15, 2010 at 2:45 PM, Bart Van Assche <bva...@ac...> wrote: >>> On Mon, Feb 15, 2010 at 12:11 PM, <dat...@go...> wrote: >>>> Revision: 1655 >>>> Author: kon...@gm... >>>> Date: Mon Feb 15 03:10:36 2010 >>>> Log: added ANNOTATE_BENIGN_RACE_SIZED; ANNOTATE_BENIGN_RACE_STATIC uses >>>> *_SIZED variant now >>>> http://code.google.com/p/data-race-test/source/detail?r=1655 >>> [ ... ] >>> >>> Hello Konstantin, >>> >>> Have you already considered deprecating ANNOTATE_BENIGN_RACE(), since >>> this annotation doesn't have precisely defined semantics ? >> >> Well, it does have precisely defined semantics now. :) >> It is equivalent to ANNOTATE_BENIGN_RACE_SIZED(mem, 1, descr); > > As far as I know this is the first time it is specified how many bytes > ANNOTATE_BENIGN_RACE() applies to. I'm not sure it is a good idea to > choose a range of one byte, given that e.g. the following code is > present in the TSAN unittests: > > int GLOB = 0; > ... > ANNOTATE_BENIGN_RACE(&GLOB, "test56. Use of ANNOTATE_BENIGN_RACE."); Yes, I agree. In ThreadSanitizer, when 2, 4 or 8 bytes are accessed by a single instruction and all previous accesses had the same size, the tool will only deal with the first byte. So, the annotation in this test still works correctly with ThreadSanitizer. This does not have to be a part of the definition of this annotation though. What do you think? The lack of 'size' argument in this annotation is my mistake from almost 2 years ago, but I can't just drop the current code now... :( --kcc > > Bart. > > -- > You received this message because you are subscribed to the Google Groups "data-race-test" group. > To post to this group, send email to dat...@go.... > To unsubscribe from this group, send email to dat...@go.... > For more options, visit this group at http://groups.google.com/group/data-race-test?hl=en. > > |
|
From: Bart V. A. <bva...@ac...> - 2010-02-15 13:23:44
|
On Mon, Feb 15, 2010 at 12:52 PM, Konstantin Serebryany <kon...@gm...> wrote: > On Mon, Feb 15, 2010 at 2:45 PM, Bart Van Assche <bva...@ac...> wrote: >> On Mon, Feb 15, 2010 at 12:11 PM, <dat...@go...> wrote: >>> Revision: 1655 >>> Author: kon...@gm... >>> Date: Mon Feb 15 03:10:36 2010 >>> Log: added ANNOTATE_BENIGN_RACE_SIZED; ANNOTATE_BENIGN_RACE_STATIC uses >>> *_SIZED variant now >>> http://code.google.com/p/data-race-test/source/detail?r=1655 >> [ ... ] >> >> Hello Konstantin, >> >> Have you already considered deprecating ANNOTATE_BENIGN_RACE(), since >> this annotation doesn't have precisely defined semantics ? > > Well, it does have precisely defined semantics now. :) > It is equivalent to ANNOTATE_BENIGN_RACE_SIZED(mem, 1, descr); As far as I know this is the first time it is specified how many bytes ANNOTATE_BENIGN_RACE() applies to. I'm not sure it is a good idea to choose a range of one byte, given that e.g. the following code is present in the TSAN unittests: int GLOB = 0; ... ANNOTATE_BENIGN_RACE(&GLOB, "test56. Use of ANNOTATE_BENIGN_RACE."); Bart. |
|
From: <sv...@va...> - 2010-02-15 12:00:39
|
Author: sewardj
Date: 2010-02-15 12:00:28 +0000 (Mon, 15 Feb 2010)
New Revision: 11047
Log:
Guard new debug print statement in r11045 correctly (at all!)
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2010-02-15 10:07:05 UTC (rev 11046)
+++ trunk/coregrind/m_debuginfo/readelf.c 2010-02-15 12:00:28 UTC (rev 11047)
@@ -964,8 +964,8 @@
return 0;
}
- VG_(message)(Vg_DebugMsg,
- " .. CRC is valid\n");
+ if (VG_(clo_verbosity) > 1)
+ VG_(message)(Vg_DebugMsg, " .. CRC is valid\n");
return sr_Res(sres);
}
|
|
From: Konstantin S. <kon...@gm...> - 2010-02-15 11:53:03
|
On Mon, Feb 15, 2010 at 2:45 PM, Bart Van Assche <bva...@ac...> wrote: > On Mon, Feb 15, 2010 at 12:11 PM, <dat...@go...> wrote: >> Revision: 1655 >> Author: kon...@gm... >> Date: Mon Feb 15 03:10:36 2010 >> Log: added ANNOTATE_BENIGN_RACE_SIZED; ANNOTATE_BENIGN_RACE_STATIC uses >> *_SIZED variant now >> http://code.google.com/p/data-race-test/source/detail?r=1655 > [ ... ] > > Hello Konstantin, > > Have you already considered deprecating ANNOTATE_BENIGN_RACE(), since > this annotation doesn't have precisely defined semantics ? Well, it does have precisely defined semantics now. :) It is equivalent to ANNOTATE_BENIGN_RACE_SIZED(mem, 1, descr); Deprecating it will be rather hard for us, since a lot of code depends on it. --kcc > > Bart. > > -- > You received this message because you are subscribed to the Google Groups "data-race-test" group. > To post to this group, send email to dat...@go.... > To unsubscribe from this group, send email to dat...@go.... > For more options, visit this group at http://groups.google.com/group/data-race-test?hl=en. > > |
|
From: Bart V. A. <bva...@ac...> - 2010-02-15 11:45:47
|
On Mon, Feb 15, 2010 at 12:11 PM, <dat...@go...> wrote: > Revision: 1655 > Author: kon...@gm... > Date: Mon Feb 15 03:10:36 2010 > Log: added ANNOTATE_BENIGN_RACE_SIZED; ANNOTATE_BENIGN_RACE_STATIC uses > *_SIZED variant now > http://code.google.com/p/data-race-test/source/detail?r=1655 [ ... ] Hello Konstantin, Have you already considered deprecating ANNOTATE_BENIGN_RACE(), since this annotation doesn't have precisely defined semantics ? Bart. |
|
From: <sv...@va...> - 2010-02-15 10:07:13
|
Author: sewardj
Date: 2010-02-15 10:07:05 +0000 (Mon, 15 Feb 2010)
New Revision: 11046
Log:
Get rid of kludgey and non-functional PID caching in the printing
mechanism.
Modified:
trunk/coregrind/m_libcprint.c
Modified: trunk/coregrind/m_libcprint.c
===================================================================
--- trunk/coregrind/m_libcprint.c 2010-02-15 10:05:40 UTC (rev 11045)
+++ trunk/coregrind/m_libcprint.c 2010-02-15 10:07:05 UTC (rev 11046)
@@ -374,15 +374,13 @@
leftmost column? */
/* Current message kind - changes from call to call */
VgMsgKind kind;
- /* PID; acquired just once and stays constant */
- Int my_pid;
/* destination */
OutputSink* sink;
}
vmessage_buf_t;
static vmessage_buf_t vmessage_buf
- = { "", 0, True, Vg_UserMsg, -1, &VG_(log_output_sink) };
+ = { "", 0, True, Vg_UserMsg, &VG_(log_output_sink) };
// Adds a single char to the buffer. We aim to have at least 128
@@ -430,7 +428,7 @@
b->buf[b->buf_used++] = tmp[i];
}
- VG_(sprintf)(tmp, "%d", b->my_pid);
+ VG_(sprintf)(tmp, "%d", VG_(getpid)());
tmp[sizeof(tmp)-1] = 0;
for (i = 0; tmp[i]; i++)
b->buf[b->buf_used++] = tmp[i];
@@ -468,15 +466,6 @@
of preamble is emitted at each \n. */
b->kind = kind;
- /* Cache the results of getpid just once, so we don't have to call
- getpid once for each line of text output. */
- b->my_pid = -1; /* LATER: cacheing is confusing in presence of fork(),
- disable for now. */
- if (UNLIKELY(b->my_pid == -1)) {
- b->my_pid = VG_(getpid)();
- vg_assert(b->my_pid >= 0);
- }
-
ret = VG_(debugLog_vprintf) ( add_to__vmessage_buf,
b, format, vargs );
|
|
From: <sv...@va...> - 2010-02-15 10:05:47
|
Author: sewardj
Date: 2010-02-15 10:05:40 +0000 (Mon, 15 Feb 2010)
New Revision: 11045
Log:
Make -v messages w.r.t. finding of auxiliary debuginfo files less confusing.
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2010-02-15 10:04:46 UTC (rev 11044)
+++ trunk/coregrind/m_debuginfo/readelf.c 2010-02-15 10:05:40 UTC (rev 11045)
@@ -942,7 +942,7 @@
}
if (VG_(clo_verbosity) > 1)
- VG_(message)(Vg_DebugMsg, "Reading debug info from %s ..\n", name);
+ VG_(message)(Vg_DebugMsg, " Considering %s ..\n", name);
*size = stat_buf.size;
@@ -960,9 +960,12 @@
vg_assert(!sr_isError(res));
if (VG_(clo_verbosity) > 1)
VG_(message)(Vg_DebugMsg,
- ".. CRC mismatch (computed %08x wanted %08x)\n", calccrc, crc);
+ " .. CRC mismatch (computed %08x wanted %08x)\n", calccrc, crc);
return 0;
}
+
+ VG_(message)(Vg_DebugMsg,
+ " .. CRC is valid\n");
return sr_Res(sres);
}
|
|
From: <sv...@va...> - 2010-02-15 10:04:54
|
Author: sewardj Date: 2010-02-15 10:04:46 +0000 (Mon, 15 Feb 2010) New Revision: 11044 Log: Make this usable on Ubuntu by explicitly specifying bash rather than dash. Modified: trunk/auxprogs/gsl19test Modified: trunk/auxprogs/gsl19test =================================================================== --- trunk/auxprogs/gsl19test 2010-02-15 09:58:10 UTC (rev 11043) +++ trunk/auxprogs/gsl19test 2010-02-15 10:04:46 UTC (rev 11044) @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Do an automated test which involves building and regtesting version # 1.9 of the GNU Scientific Library (gsl). This has proven to be a |
|
From: <sv...@va...> - 2010-02-15 09:58:18
|
Author: sewardj
Date: 2010-02-15 09:58:10 +0000 (Mon, 15 Feb 2010)
New Revision: 11043
Log:
Handle sys_inotify_init1.
Modified:
trunk/exp-ptrcheck/h_main.c
Modified: trunk/exp-ptrcheck/h_main.c
===================================================================
--- trunk/exp-ptrcheck/h_main.c 2010-02-15 09:57:49 UTC (rev 11042)
+++ trunk/exp-ptrcheck/h_main.c 2010-02-15 09:58:10 UTC (rev 11043)
@@ -2331,6 +2331,9 @@
ADD(0, __NR_getxattr);
ADD(0, __NR_inotify_add_watch);
ADD(0, __NR_inotify_init);
+# if defined(__NR_inotify_init1)
+ ADD(0, __NR_inotify_init1);
+# endif
ADD(0, __NR_inotify_rm_watch);
ADD(0, __NR_ioctl); // ioctl -- assuming no pointers returned
ADD(0, __NR_ioprio_get);
|
|
From: <sv...@va...> - 2010-02-15 09:57:58
|
Author: sewardj
Date: 2010-02-15 09:57:49 +0000 (Mon, 15 Feb 2010)
New Revision: 11042
Log:
Add some intercepts to make Ptrcheck usable-ish on Ubuntu 9.10 (amd64).
Modified:
trunk/exp-ptrcheck/h_intercepts.c
Modified: trunk/exp-ptrcheck/h_intercepts.c
===================================================================
--- trunk/exp-ptrcheck/h_intercepts.c 2010-02-15 09:54:37 UTC (rev 11041)
+++ trunk/exp-ptrcheck/h_intercepts.c 2010-02-15 09:57:49 UTC (rev 11042)
@@ -45,6 +45,60 @@
them in the same order as in mc_replace_strmem.c. */
+#define STRRCHR(soname, fnname) \
+ char* VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* s, int c ); \
+ char* VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* s, int c ) \
+ { \
+ UChar ch = (UChar)((UInt)c); \
+ UChar* p = (UChar*)s; \
+ UChar* last = NULL; \
+ while (True) { \
+ if (*p == ch) last = p; \
+ if (*p == 0) return last; \
+ p++; \
+ } \
+ }
+
+// Apparently rindex() is the same thing as strrchr()
+STRRCHR(VG_Z_LIBC_SONAME, strrchr)
+STRRCHR(VG_Z_LIBC_SONAME, rindex)
+#if defined(VGO_linux)
+STRRCHR(VG_Z_LIBC_SONAME, __GI_strrchr)
+STRRCHR(VG_Z_LD_LINUX_SO_2, rindex)
+#elif defined(VGO_darwin)
+STRRCHR(VG_Z_DYLD, strrchr)
+STRRCHR(VG_Z_DYLD, rindex)
+#endif
+
+
+#define STRCHR(soname, fnname) \
+ char* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* s, int c ); \
+ char* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* s, int c ) \
+ { \
+ UChar ch = (UChar)((UInt)c); \
+ UChar* p = (UChar*)s; \
+ while (True) { \
+ if (*p == ch) return p; \
+ if (*p == 0) return NULL; \
+ p++; \
+ } \
+ }
+
+// Apparently index() is the same thing as strchr()
+STRCHR(VG_Z_LIBC_SONAME, strchr)
+STRCHR(VG_Z_LIBC_SONAME, index)
+#if defined(VGO_linux)
+STRCHR(VG_Z_LIBC_SONAME, __GI_strchr)
+STRCHR(VG_Z_LD_LINUX_SO_2, strchr)
+STRCHR(VG_Z_LD_LINUX_SO_2, index)
+STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, strchr)
+STRCHR(VG_Z_LD_LINUX_X86_64_SO_2, index)
+#elif defined(VGO_darwin)
+STRCHR(VG_Z_DYLD, strchr)
+STRCHR(VG_Z_DYLD, index)
+#endif
+
+
#define STRNLEN(soname, fnname) \
SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* str, SizeT n ); \
SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* str, SizeT n ) \
@@ -105,6 +159,24 @@
#endif
+#define MEMCHR(soname, fnname) \
+ void* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const void *s, int c, SizeT n); \
+ void* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const void *s, int c, SizeT n) \
+ { \
+ SizeT i; \
+ UChar c0 = (UChar)c; \
+ UChar* p = (UChar*)s; \
+ for (i = 0; i < n; i++) \
+ if (p[i] == c0) return (void*)(&p[i]); \
+ return NULL; \
+ }
+
+MEMCHR(VG_Z_LIBC_SONAME, memchr)
+#if defined(VGO_darwin)
+MEMCHR(VG_Z_DYLD, memchr)
+#endif
+
+
#define MEMCPY(soname, fnname) \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) \
( void *dst, const void *src, SizeT sz ); \
@@ -173,6 +245,25 @@
#endif
+/* Find the first occurrence of C in S. */
+#define GLIBC232_RAWMEMCHR(soname, fnname) \
+ char* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const char* s, int c_in); \
+ char* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const char* s, int c_in) \
+ { \
+ unsigned char c = (unsigned char) c_in; \
+ unsigned char* char_ptr = (unsigned char *)s; \
+ while (1) { \
+ if (*char_ptr == c) return char_ptr; \
+ char_ptr++; \
+ } \
+ }
+
+GLIBC232_RAWMEMCHR(VG_Z_LIBC_SONAME, rawmemchr)
+#if defined (VGO_linux)
+GLIBC232_RAWMEMCHR(VG_Z_LIBC_SONAME, __GI___rawmemchr)
+#endif
+
+
/*--------------------------------------------------------------------*/
/*--- end pc_intercepts.c ---*/
/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2010-02-15 09:54:47
|
Author: sewardj
Date: 2010-02-15 09:54:37 +0000 (Mon, 15 Feb 2010)
New Revision: 11041
Log:
Add debug printing for the env-mashing machinery, to help investigate
#215914 ("Valgrind inserts bogus empty environment variable").
Modified:
trunk/coregrind/m_initimg/initimg-linux.c
Modified: trunk/coregrind/m_initimg/initimg-linux.c
===================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c 2010-02-12 12:19:36 UTC (rev 11040)
+++ trunk/coregrind/m_initimg/initimg-linux.c 2010-02-15 09:54:37 UTC (rev 11041)
@@ -132,6 +132,7 @@
Int v_launcher_len = VG_(strlen)( v_launcher );
Bool ld_preload_done = False;
Int vglib_len = VG_(strlen)(VG_(libdir));
+ Bool debug = False;
HChar** cpp;
HChar** ret;
@@ -172,9 +173,12 @@
VG_(debugLog)(2, "initimg", " \"%s\"\n", preload_string);
/* Count the original size of the env */
+ if (debug) VG_(printf)("\n\n");
envc = 0;
- for (cpp = origenv; cpp && *cpp; cpp++)
+ for (cpp = origenv; cpp && *cpp; cpp++) {
envc++;
+ if (debug) VG_(printf)("XXXXXXXXX: BEFORE %s\n", *cpp);
+ }
/* Allocate a new space */
ret = VG_(malloc) ("initimg-linux.sce.3",
@@ -182,8 +186,10 @@
vg_assert(ret);
/* copy it over */
- for (cpp = ret; *origenv; )
+ for (cpp = ret; *origenv; ) {
+ if (debug) VG_(printf)("XXXXXXXXX: COPY %s\n", *origenv);
*cpp++ = *origenv++;
+ }
*cpp = NULL;
vg_assert(envc == (cpp - ret));
@@ -202,6 +208,7 @@
ld_preload_done = True;
}
+ if (debug) VG_(printf)("XXXXXXXXX: MASH %s\n", *cpp);
}
/* Add the missing bits */
@@ -213,6 +220,7 @@
VG_(snprintf)(cp, len, "%s%s", ld_preload, preload_string);
ret[envc++] = cp;
+ if (debug) VG_(printf)("XXXXXXXXX: ADD %s\n", cp);
}
/* ret[0 .. envc-1] is live now. */
@@ -230,6 +238,10 @@
VG_(free)(preload_string);
ret[envc] = NULL;
+ for (i = 0; i < envc; i++) {
+ if (debug) VG_(printf)("XXXXXXXXX: FINAL %s\n", ret[i]);
+ }
+
return ret;
}
|