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
(4) |
2
|
3
(2) |
4
(11) |
5
(3) |
6
(15) |
|
7
(8) |
8
(8) |
9
(9) |
10
(13) |
11
(11) |
12
(2) |
13
(13) |
|
14
(12) |
15
(15) |
16
(15) |
17
(18) |
18
(10) |
19
(2) |
20
(11) |
|
21
(14) |
22
(10) |
23
(2) |
24
(11) |
25
(5) |
26
|
27
|
|
28
(1) |
29
(22) |
30
(7) |
31
(2) |
|
|
|
Author: florian
Date: Fri Dec 19 20:29:22 2014
New Revision: 14824
Log:
Buffer audit. Resize a few.
Modified:
trunk/callgrind/main.c
trunk/callgrind/threads.c
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_gdbserver/server.c
trunk/coregrind/m_gdbserver/target.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c
trunk/coregrind/m_signals.c
trunk/coregrind/vgdb-invoker-ptrace.c
trunk/helgrind/libhb_core.c
Modified: trunk/callgrind/main.c
==============================================================================
--- trunk/callgrind/main.c (original)
+++ trunk/callgrind/main.c Fri Dec 19 20:29:22 2014
@@ -1656,8 +1656,9 @@
case VG_USERREQ__DUMP_STATS_AT:
{
- HChar buf[512];
- VG_(sprintf)(buf,"Client Request: %s", (HChar*)args[1]);
+ const HChar *arg = (HChar*)args[1];
+ HChar buf[30 + VG_(strlen)(arg)]; // large enough
+ VG_(sprintf)(buf,"Client Request: %s", arg);
CLG_(dump_profile)(buf, True);
*ret = 0; /* meaningless */
}
Modified: trunk/callgrind/threads.c
==============================================================================
--- trunk/callgrind/threads.c (original)
+++ trunk/callgrind/threads.c Fri Dec 19 20:29:22 2014
@@ -179,7 +179,7 @@
{
/* check for dumps needed */
static ULong bbs_done = 0;
- static HChar buf[512];
+ HChar buf[50]; // large enough
if (CLG_(clo).dump_every_bb >0) {
if (CLG_(stat).bb_executions - bbs_done > CLG_(clo).dump_every_bb) {
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Fri Dec 19 20:29:22 2014
@@ -1116,7 +1116,7 @@
# if 0
{
- HChar buf[100];
+ HChar buf[100]; // large enough
VG_(am_show_nsegments)(0,"post syncheck failure");
VG_(sprintf)(buf, "/bin/cat /proc/%d/maps", VG_(getpid)());
VG_(system)(buf);
Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Fri Dec 19 20:29:22 2014
@@ -720,7 +720,6 @@
unsigned long gdb_id;
struct thread_info *ti;
ThreadState *tst;
- char status[100];
gdb_id = strtoul (&arg_own_buf[17], NULL, 16);
ti = gdb_id_to_thread (gdb_id);
@@ -728,6 +727,13 @@
tst = (ThreadState *) inferior_target_data (ti);
/* Additional info is the tid, the thread status and the thread's
name, if any. */
+ SizeT len = strlen(VG_(name_of_ThreadStatus)(tst->status)) + 20;
+ if (tst->thread_name) len += strlen(tst->thread_name);
+ /* As the string will be hexified and copied into own_buf we need
+ to limit the length to avoid buffer overflow. */
+ if (len * 2 > (PBUFSIZ + POVERHSIZ))
+ len = (PBUFSIZ + POVERHSIZ) / 2;
+ char status[len];
if (tst->thread_name) {
VG_(snprintf) (status, sizeof(status), "tid %d %s %s",
tst->tid,
Modified: trunk/coregrind/m_gdbserver/target.c
==============================================================================
--- trunk/coregrind/m_gdbserver/target.c (original)
+++ trunk/coregrind/m_gdbserver/target.c Fri Dec 19 20:29:22 2014
@@ -43,7 +43,7 @@
static
char *image_ptid(unsigned long ptid)
{
- static char result[100];
+ static char result[50]; // large enough
VG_(sprintf) (result, "id %ld", ptid);
return result;
}
Modified: trunk/coregrind/m_scheduler/scheduler.c
==============================================================================
--- trunk/coregrind/m_scheduler/scheduler.c (original)
+++ trunk/coregrind/m_scheduler/scheduler.c Fri Dec 19 20:29:22 2014
@@ -267,8 +267,7 @@
#if 0
if (VG_(clo_trace_sched)) {
- HChar buf[100];
- vg_assert(VG_(strlen)(who) <= 100-50);
+ HChar buf[VG_(strlen)(who) + 30];
VG_(sprintf)(buf, "waiting for lock (%s)", who);
print_sched_event(tid, buf);
}
@@ -298,8 +297,7 @@
}
if (VG_(clo_trace_sched)) {
- HChar buf[150];
- vg_assert(VG_(strlen)(who) <= 150-50);
+ HChar buf[VG_(strlen)(who) + 30];
VG_(sprintf)(buf, " acquired lock (%s)", who);
print_sched_event(tid, buf);
}
@@ -328,10 +326,9 @@
VG_(running_tid) = VG_INVALID_THREADID;
if (VG_(clo_trace_sched)) {
- HChar buf[200];
- vg_assert(VG_(strlen)(who) <= 200-100);
- VG_(sprintf)(buf, "releasing lock (%s) -> %s",
- who, VG_(name_of_ThreadStatus)(sleepstate));
+ const HChar *status = VG_(name_of_ThreadStatus)(sleepstate);
+ HChar buf[VG_(strlen)(who) + VG_(strlen)(status) + 30];
+ VG_(sprintf)(buf, "releasing lock (%s) -> %s", who, status);
print_sched_event(tid, buf);
}
Modified: trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c Fri Dec 19 20:29:22 2014
@@ -107,7 +107,7 @@
struct vki_sigcontext sigcontext;
struct vki_mcontext mcontext;
struct vg_sig_private priv;
- unsigned char abigap[224];
+ unsigned char abigap[224]; // unused
};
/* Structure put on stack for signal handlers with SA_SIGINFO set. */
@@ -116,7 +116,7 @@
vki_siginfo_t siginfo;
struct vki_ucontext ucontext;
struct vg_sig_private priv;
- unsigned char abigap[224];
+ unsigned char abigap[224]; // unused
};
#define SET_SIGNAL_LR(zztst, zzval) \
Modified: trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c Fri Dec 19 20:29:22 2014
@@ -114,7 +114,7 @@
void* puc;
vki_siginfo_t info;
struct vg_sig_private priv;
- UChar abigap[288];
+ UChar abigap[288]; // unused
};
#define SET_SIGNAL_LR(zztst, zzval) \
Modified: trunk/coregrind/m_signals.c
==============================================================================
--- trunk/coregrind/m_signals.c (original)
+++ trunk/coregrind/m_signals.c Fri Dec 19 20:29:22 2014
@@ -1219,7 +1219,7 @@
static
HChar* format_sigset ( const vki_sigset_t* set )
{
- static HChar buf[128];
+ static HChar buf[_VKI_NSIG_WORDS * 16 + 1];
int w;
VG_(strcpy)(buf, "");
@@ -1647,7 +1647,7 @@
}
#if 0
{
- HChar buf[110];
+ HChar buf[50]; // large enough
VG_(am_show_nsegments)(0,"post segfault");
VG_(sprintf)(buf, "/bin/cat /proc/%d/maps", VG_(getpid)());
VG_(system)(buf);
Modified: trunk/coregrind/vgdb-invoker-ptrace.c
==============================================================================
--- trunk/coregrind/vgdb-invoker-ptrace.c (original)
+++ trunk/coregrind/vgdb-invoker-ptrace.c Fri Dec 19 20:29:22 2014
@@ -226,7 +226,7 @@
static
char *status_image (int status)
{
- static char result[256];
+ static char result[256]; // large enough
int sz = 0;
#define APPEND(...) sz += snprintf (result+sz, 256 - sz - 1, __VA_ARGS__)
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Fri Dec 19 20:29:22 2014
@@ -1089,7 +1089,7 @@
static Bool is_sane_Descr_and_Tree ( UShort descr, SVal* tree ) {
Word i;
UChar validbits = descr_to_validbits(descr);
- HChar buf[128], buf2[128];
+ HChar buf[128], buf2[128]; // large enough
if (validbits == 0)
goto bad;
for (i = 0; i < 8; i++) {
|
|
From: <sv...@va...> - 2014-12-19 20:25:55
|
Author: florian
Date: Fri Dec 19 20:25:46 2014
New Revision: 14823
Log:
Fix a buffer overflow (in case read had returned 1000).
Write out the whole command line.
Modified:
trunk/coregrind/vgdb.c
Modified: trunk/coregrind/vgdb.c
==============================================================================
--- trunk/coregrind/vgdb.c (original)
+++ trunk/coregrind/vgdb.c Fri Dec 19 20:25:46 2014
@@ -1066,33 +1066,39 @@
static
void report_pid (int pid, Bool on_stdout)
{
- char cmdline_file[100];
- char cmdline[1000];
- int fd;
- int i, sz;
+ char cmdline_file[50]; // large enough
+ int fd, i;
+ FILE *out = on_stdout ? stdout : stderr;
sprintf(cmdline_file, "/proc/%d/cmdline", pid);
fd = open (cmdline_file, O_RDONLY);
if (fd == -1) {
DEBUG(1, "error opening cmdline file %s %s\n",
cmdline_file, strerror(errno));
- sprintf(cmdline, "(could not open process command line)");
+ XERROR(errno, "could not open process command line for pid %d\n", pid);
} else {
- sz = read(fd, cmdline, 1000);
- for (i = 0; i < sz; i++)
- if (cmdline[i] == 0)
- cmdline[i] = ' ';
- if (sz >= 0)
- cmdline[sz] = 0;
- else {
- DEBUG(1, "error reading cmdline file %s %s\n",
- cmdline_file, strerror(errno));
- sprintf(cmdline, "(could not read process command line)");
+ char cmdline[100];
+ ssize_t sz;
+
+ fprintf(out, "use --pid=%d for ", pid);
+ while ((sz = read(fd, cmdline, sizeof cmdline - 1)) != 0) {
+ if (sz == -1) {
+ DEBUG(1, "error reading cmdline file %s %s\n",
+ cmdline_file, strerror(errno));
+ XERROR(errno, "could not read process command line for pid %d\n",
+ pid);
+ } else {
+ for (i = 0; i < sz; i++)
+ if (cmdline[i] == 0)
+ cmdline[i] = ' ';
+ cmdline[sz] = 0;
+ fprintf(out, "%s", cmdline);
+ }
}
+ fprintf(out, "\n");
close (fd);
}
- fprintf((on_stdout ? stdout : stderr), "use --pid=%d for %s\n", pid, cmdline);
- fflush((on_stdout ? stdout : stderr));
+ fflush(out);
}
static
|