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
(17) |
2
(21) |
3
(17) |
4
(28) |
5
(21) |
6
(11) |
|
7
(13) |
8
(21) |
9
(21) |
10
(9) |
11
(11) |
12
(15) |
13
(23) |
|
14
(15) |
15
(22) |
16
(28) |
17
(12) |
18
(15) |
19
(8) |
20
(7) |
|
21
(8) |
22
(12) |
23
(13) |
24
(7) |
25
(7) |
26
(3) |
27
(9) |
|
28
(13) |
29
(7) |
30
(7) |
31
(9) |
|
|
|
|
From: John C. <joh...@ta...> - 2004-03-16 23:52:17
|
On Tue, 16 Mar 2004, Nicholas Nethercote wrote:
> On Mon, 15 Mar 2004, John Carter wrote:
>
> > I'm getting the message stated in the subject line from
> > --gen-suppression=yes.
> >
> > Is this a known bug? Lack of debug symbols? (there is
> > some assembler involved) Or perhaps user error?
> >
> > ---- Print suppression ? --- [Return/N/n/Y/y/C/c] ---- y
> > {
> > <insert a suppression name here>
> > Memcheck:Param
> > sigaction(act)
> > ???:??? # unknown, suppression will not work, sorry)
> > ???:??? # unknown, suppression will not work, sorry)
> > ???:??? # unknown, suppression will not work, sorry)
> > }
>
> This means Valgrind can't find any debug info or symbol table info. Is
> the binary stripped? What does the corresponding error message look like?
I suspect the code concerned is a bit of assembler in eCos (Embedded
Configurable Operating System) thus the debug info / symbol table
might be rather strange. I would be content to suppress just that
exact address, no matter what the call stack looked like.
The error message result looks like....
==3150== Syscall param sigaction(act) contains uninitialised or unaddressable byte(s)
==3150== at 0x1009D33: ???
==3150== by 0x1008224: ???
==3150== by 0x4FFFEBBB: ???
==3150== Address 0x4FFFEA78 is on thread 1's stack
==3150==
the debugger backtrace looks like....
#0 0x01009d33 in cyg_hal_sys_sigaction ()
at /home/johnc/work/mapped/ecos/synth/rom/install/include/cyg/libc/stdio/stream.inl:91
#1 0x010099be in synth_hardware_init ()
at /opt/ecos/ecos-2.0/packages/hal/synth/arch/v2_0/src/synth_intr.c:1283
#2 0x01008225 in _linux_entry ()
at /opt/ecos/ecos-2.0/packages/hal/synth/arch/v2_0/src/synth_entry.c:143
#3 0x4fffebbc in ?? ()
The #0 frame is an assembler chunk that just invokes the sigaction syscall.
.globl cyg_hal_sys_sigaction;
cyg_hal_sys_sigaction:
push %ebx;
mov 8(%esp), %ebx;
mov 12(%esp), %ecx;
mov 16(%esp), %edx;
lea 67, %eax;
int $0x80;
pop %ebx;
ret;
.type cyg_hal_sys_sigaction,@function ; .size cyg_hal_sys_sigaction,1b - cyg_hal_sys_sigaction
Curiously enough I have checked, every field passed in is
initialised and is on the stack.
This is using valgrind cvs latest Tue Mar 16 23:50:30 UTC 2004
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : joh...@ta...
New Zealand
The universe is absolutely plastered with the dashed lines exactly one
space long.
|
|
From: Jeremy F. <je...@go...> - 2004-03-16 22:09:18
|
CVS commit by fitzhardinge:
When creating new threads, initially block all signals. It's up to the
client code (in vg_libpthread.c) to set the appropriate signal mask when
its ready. This prevents a bug where a thread gets sent a signal before
even running any of its initialization code, which can cause problems
(particularly if the signal handler directly or indirectly uses TLS).
M +12 -3 vg_libpthread.c 1.148
M +3 -2 vg_scheduler.c 1.145
--- valgrind/coregrind/vg_libpthread.c #1.147:1.148
@@ -72,4 +72,5 @@
#include <stdio.h>
#include <errno.h>
+#include <signal.h>
#include <stdlib.h>
@@ -753,4 +754,5 @@ typedef
void* (*root_fn) ( void* );
void* arg;
+ sigset_t sigmask;
}
NewThreadInfo;
@@ -818,7 +820,4 @@ void thread_wrapper ( NewThreadInfo* inf
}
- /* Free up the arg block that pthread_create malloced. */
- my_free(info);
-
/* Minimally observe the attributes supplied. */
if (attr__detachstate != PTHREAD_CREATE_DETACHED
@@ -831,4 +830,11 @@ void thread_wrapper ( NewThreadInfo* inf
init_thread_specific_state();
+ /* Now that everything is set up, restore our signal mask (we're
+ ready to accept signals) */
+ sigprocmask(SIG_SETMASK, &info->sigmask, NULL);
+
+ /* Free up the arg block that pthread_create malloced. */
+ my_free(info);
+
/* The root function might not return. But if it does we simply
move along to thread_exit_wrapper. All other ways out for the
@@ -923,4 +929,6 @@ pthread_create (pthread_t *__restrict __
info->root_fn = __start_routine;
info->arg = __arg;
+ sigprocmask(SIG_SETMASK, NULL, &info->sigmask);
+
VALGRIND_MAGIC_SEQUENCE(tid_child, VG_INVALID_THREADID /* default */,
VG_USERREQ__APPLY_IN_NEW_THREAD,
--- valgrind/coregrind/vg_scheduler.c #1.144:1.145
@@ -1919,6 +1919,7 @@ void do__apply_in_new_thread ( ThreadId
}
- /* We inherit our parent's signal mask. */
- VG_(threads)[tid].sig_mask = VG_(threads)[parent_tid].sig_mask;
+ /* Start the thread with all signals blocked; it's up to the client
+ code to set the right signal mask when it's ready. */
+ VG_(ksigfillset)(&VG_(threads)[tid].sig_mask);
/* Now that the signal mask is set up, create a proxy LWP for this thread */
|
|
From: Jeremy F. <je...@go...> - 2004-03-16 22:07:21
|
CVS commit by fitzhardinge:
Init the per-thread sigaltstacks properly. New threads should always
appear without a sigaltstack.
M +5 -0 vg_scheduler.c 1.144
M +0 -4 vg_signals.c 1.67
--- valgrind/coregrind/vg_scheduler.c #1.143:1.144
@@ -575,4 +575,9 @@ void mostly_clear_thread_record ( Thread
VG_(threads)[tid].proxy = NULL;
+
+ /* start with no altstack */
+ VG_(threads)[tid].altstack.ss_sp = (void *)0xdeadbeef;
+ VG_(threads)[tid].altstack.ss_size = 0;
+ VG_(threads)[tid].altstack.ss_flags = VKI_SS_DISABLE;
}
--- valgrind/coregrind/vg_signals.c #1.66:1.67
@@ -2392,8 +2392,4 @@ void VG_(sigstartup_actions) ( void )
VG_(ksigfillset)(&vg_scss.scss_per_sig[VKI_SIGVGKILL].scss_mask);
- /* Copy the alt stack, if any. */
- ret = VG_(ksigaltstack)(NULL, &VG_(threads)[1].altstack);
- vg_assert(ret == 0);
-
/* Copy the process' signal mask into the root thread. */
vg_assert(VG_(threads)[1].status == VgTs_Runnable);
|
|
From: Nicholas N. <nj...@ca...> - 2004-03-16 19:41:20
|
CVS commit by nethercote:
Remove Massif's version number now that it's part of the main distro.
M +1 -1 ms_main.c 1.5
--- valgrind/massif/ms_main.c #1.4:1.5
@@ -1181,5 +1181,5 @@ void SK_(pre_clo_init)()
{
VG_(details_name) ("Massif");
- VG_(details_version) ("0.0.3");
+ VG_(details_version) (NULL);
VG_(details_description) ("a space profiler");
VG_(details_copyright_author)("Copyright (C) 2003, Nicholas Nethercote");
|
|
From: Tom H. <th...@cy...> - 2004-03-16 18:16:47
|
In message <Pin...@ye...>
Nicholas Nethercote <nj...@ca...> wrote:
> Any chance of adding extra .stderr.exp* files or improving the filters so
> that the not-really-failing tests pass? With the current failures, these
> messages are little more than noise...
I haven't done that for those ones because I'm still trying to make
the sysinfo page solution that Jeremy suggested work, and that should
remove those.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Nicholas N. <nj...@ca...> - 2004-03-16 17:59:15
|
On Mon, 15 Mar 2004, John Carter wrote:
> I'm getting the message stated in the subject line from
> --gen-suppression=yes.
>
> Is this a known bug? Lack of debug symbols? (there is
> some assembler involved) Or perhaps user error?
>
> ---- Print suppression ? --- [Return/N/n/Y/y/C/c] ---- y
> {
> <insert a suppression name here>
> Memcheck:Param
> sigaction(act)
> ???:??? # unknown, suppression will not work, sorry)
> ???:??? # unknown, suppression will not work, sorry)
> ???:??? # unknown, suppression will not work, sorry)
> }
This means Valgrind can't find any debug info or symbol table info. Is
the binary stripped? What does the corresponding error message look like?
N
|
|
From: Nicholas N. <nj...@ca...> - 2004-03-16 17:09:34
|
On Sat, 13 Mar 2004 js...@ac... wrote: > == 143 tests, 13 stderr failures, 0 stdout failures ================= > corecheck/tests/as_mmap (stderr) > corecheck/tests/fdleak_cmsg (stderr) > corecheck/tests/fdleak_creat (stderr) > corecheck/tests/fdleak_dup (stderr) > corecheck/tests/fdleak_dup2 (stderr) > corecheck/tests/fdleak_fcntl (stderr) > corecheck/tests/fdleak_ipv4 (stderr) > corecheck/tests/fdleak_open (stderr) > corecheck/tests/fdleak_pipe (stderr) > corecheck/tests/fdleak_socketpair (stderr) > helgrind/tests/inherit (stderr) > memcheck/tests/writev (stderr) > memcheck/tests/zeropage (stderr) > > make: *** [regtest] Error 1 Tom, Julian, Any chance of adding extra .stderr.exp* files or improving the filters so that the not-really-failing tests pass? With the current failures, these messages are little more than noise... N |
|
From: Nicholas N. <nj...@ca...> - 2004-03-16 17:03:27
|
On Tue, 16 Mar 2004, Nicholas Nethercote wrote:
> Can we get rid of the RUNNING_ON_VALGRIND checks in
> pthread_mutex{lock,trylock,unlock) in vg_libpthread.c now that FV is
> working?
I see there's also a VG_PTHREAD_PHISTORY constant that could presumably be
removed too.
N
|
|
From: Nicholas N. <nj...@ca...> - 2004-03-16 14:40:08
|
Hi,
Can we get rid of the RUNNING_ON_VALGRIND checks in
pthread_mutex{lock,trylock,unlock) in vg_libpthread.c now that FV is
working?
N
|
|
From: Nicholas N. <nj...@ca...> - 2004-03-16 14:33:07
|
On Sat, 13 Mar 2004, Julian Seward wrote: > Announce 2.1.1. A small thing: I intended the "News" page to be a record of all news items, and that the front page gets the most recent few. So I've put back the item about the old dev release on "News" and added the 2.1.1 announcement on the front page. > Implicitly mention Massif. Hmm... it's now mentioned on the front page, but not really anywhere else, eg. on the "tools" page, valgrind.spec.in, a few other places. I guess these should be updated too, although I wonder if it's too preliminary to be embedding this when Massif is only in dev releases? N |
|
From: Nicholas N. <nj...@ca...> - 2004-03-16 14:31:50
|
CVS commit by nethercote: whoops M +3 -0 news.html 1.5 --- devel-home/valgrind/news.html #1.4:1.5 @@ -5,4 +5,7 @@ ?> +<p class="news">March 12, 2004: A new unstable release, +<a href="downloads.html">valgrind 2.1.1</a>, is available. + <p class="news">March 04, 2004: An experimental PowerPC port is available. See <a href="related.html">Related Projects</a>. |
|
From: Nicholas N. <nj...@ca...> - 2004-03-16 14:26:49
|
CVS commit by nethercote: Fixed up news. M +6 -6 index.html 1.21 M +3 -3 news.html 1.4 --- devel-home/valgrind/index.html #1.20:1.21 @@ -5,4 +5,7 @@ ?> +<p class="news">March 12, 2004: A new unstable release, +<a href="downloads.html">valgrind 2.1.1</a>, is available. + <p class="news">March 04, 2004: An experimental PowerPC port is available. See <a href="related.html">Related Projects</a>. @@ -13,12 +16,9 @@ <p class="news">January 27, 2004: We have a new page listing <a href="users.html">projects using Valgrind</a>. - -<p class="news">January 15, 2004: Valgrind awarded a merit (bronze) -<a href="http://opensource.org/OSA/awards.php">Open Source Award</a> -(<a href="http://builder.com.com/5100-6375-5136747.html">interview</a>). - <hr> + <p> -<strong>Valgrind is a GPL'd system for debugging and profiling x86-Linux programs.</strong> +<strong>Valgrind is a GPL'd system for debugging and profiling x86-Linux +programs.</strong> With the tools that come with Valgrind, you can automatically detect --- devel-home/valgrind/news.html #1.3:1.4 @@ -5,7 +5,4 @@ ?> -<p class="news">March 12, 2004: A new unstable release, -<a href="downloads.html">valgrind 2.1.1</a>, is available. - <p class="news">March 04, 2004: An experimental PowerPC port is available. See <a href="related.html">Related Projects</a>. @@ -21,4 +18,7 @@ (<a href="http://builder.com.com/5100-6375-5136747.html">interview</a>). +<p class="news">December 14, 2003: A new unstable release, +<a href="downloads.html">valgrind 2.1.0</a>, is available. + <p class="news">November 11, 2003: A new stable release, <a href="downloads.html">valgrind 2.0.0</a>, is available. |
|
From: Tom H. <th...@cy...> - 2004-03-16 11:05:25
|
CVS commit by thughes: Ignore valgrind core files. M +1 -0 memcheck/tests/.cvsignore 1.10 M +1 -0 none/tests/.cvsignore 1.13 --- valgrind/memcheck/tests/.cvsignore #1.9:1.10 @@ -56,4 +56,5 @@ realloc3 threadederrno +vgcore.pid* writev zeropage --- valgrind/none/tests/.cvsignore #1.12:1.13 @@ -65,3 +65,4 @@ *.stderr.out tls +vgcore.pid* yield |
|
From: Tom H. <th...@cy...> - 2004-03-16 11:04:08
|
CVS commit by thughes: Added badseg to the list of things to ignore. M +1 -0 .cvsignore 1.12 --- valgrind/none/tests/.cvsignore #1.11:1.12 @@ -2,4 +2,5 @@ Makefile args +badseg bitfield1 bt_everything |
|
From: Tom H. <th...@cy...> - 2004-03-16 11:03:15
|
CVS commit by thughes:
Filter out the ": core dumped" message from test results as the user
running the tests might have a ulimit set that prevents the core dumps.
M +1 -1 memcheck/tests/badjump.stderr.exp 1.8
M +1 -1 none/tests/int.stderr.exp 1.2
M +5 -1 tests/filter_stderr_basic 1.17
--- valgrind/memcheck/tests/badjump.stderr.exp #1.7:1.8
@@ -6,5 +6,5 @@
Address 0x........ is not stack'd, malloc'd or free'd
-Process terminating with default action of signal 11 (SIGSEGV): dumping core
+Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
at 0x........: ???
--- valgrind/none/tests/int.stderr.exp #1.1:1.2
@@ -3,5 +3,5 @@
at 0x........: main (int.c:5)
-Process terminating with default action of signal 4 (SIGILL): dumping core
+Process terminating with default action of signal 4 (SIGILL)
Illegal operand at address 0x........
at 0x........: main (int.c:5)
--- valgrind/tests/filter_stderr_basic #1.16:1.17
@@ -34,3 +34,7 @@
# Remove line info out of order warnings
-sed "/warning: line info addresses out of order/d"
+sed "/warning: line info addresses out of order/d" |
+
+# Remove any ": dumping core" message as the user might have a
+# limit set that prevents the core dump
+sed "s/\(signal [0-9]* (SIG[A-Z]*)\): dumping core/\1/"
|
|
From: Tom H. <th...@cy...> - 2004-03-16 10:51:49
|
CVS commit by thughes: Fixed compiler warning. M +1 -0 badseg.c 1.2 --- valgrind/none/tests/badseg.c #1.1:1.2 @@ -1,3 +1,4 @@ #include <stdio.h> +#include <stdlib.h> #include <signal.h> |
|
From: Tom H. <th...@cy...> - 2004-03-16 10:51:35
|
CVS commit by thughes:
Added the new badseg test to the list of things to build.
M +3 -1 Makefile.am 1.32
--- valgrind/none/tests/Makefile.am #1.31:1.32
@@ -6,4 +6,5 @@
EXTRA_DIST = $(noinst_SCRIPTS) \
args.stderr.exp args.stdout.exp args.vgtest \
+ badseg.stderr.exp badseg.stdout.exp badseg.vgtest \
bitfield1.stderr.exp bitfield1.vgtest \
bt_everything.stderr.exp \
@@ -56,5 +57,5 @@
check_PROGRAMS = \
- args bitfield1 bt_everything bt_literal closeall coolo_strlen \
+ args badseg bitfield1 bt_everything bt_literal closeall coolo_strlen \
cpuid dastest discard exec-sigmask floored fork fpu_lazy_eflags \
fucomip $(INSN_TESTS) \
@@ -70,4 +71,5 @@
# generic C ones
args_SOURCES = args.c
+badseg_SOURCES = badseg.c
bitfield1_SOURCES = bitfield1.c
bt_everything_SOURCES = bt_everything.c
|
|
From: Aleksander S. <A....@os...> - 2004-03-16 09:59:46
|
On Mon, 2004-03-15 at 17:22, Jeremy Fitzhardinge wrote: > It looks pretty good, but I have a few comments: > > Why still keep the big array? Can't this be made dynamic so that > there's no need for VG_N_SEMAPHORES? Maybe I will implement this in the future. But first I have to perform benchmarks to check performance penalty caused by additional malloc in every sem_init. It is really important in my use cases. Maybe I will allocate memory for vg_sem_t structures in big chunks, I don't know yet. If I will find the time, I will write an allocation scheme that eliminates VG_N_SEMAPHORES. > Also, barf() seems to be mostly used for reporting vg_libpthread > internal errors, where as the places you use it seem to be all client > bugs; maybe just using VG_INTERNAL_PRINTF_BACKTRACE. I've decided to change that barf() to pthread_error(). It seems most reasonable in these cases. Also added setting of errno to EINVAL - according to POSIX. > And finally, could you write a regression test case and add it to > none/tests? Something which would have failed before, but now works, > and exercises as much of the semaphore machinery as possible. I'm very busy, so it may take a week or two before I find the time for it. But I hope I will do it. New patch (eliminated barf()) attached. I hope you can commit it now, as it only makes things better - elimination of VG_N_SEMAPHORES may be done later. Olek S. |
|
From: Jeremy F. <je...@go...> - 2004-03-16 09:49:14
|
CVS commit by fitzhardinge:
This change does two things: one is the implementation of
VG_(synth_fault_*), which synthesize faults as if an instruction had
caused a CPU fault. This is used in two places: one in vg_translate.c,
when trying to fetch instructions from bad memory, and the other in
vg_ldt.c, when using a bad segment register. This fixes a bug where an
assertion would fail rather than getting a useful message.
A none/tests/badseg.c 1.1 [POSSIBLY UNSAFE: printf] [no copyright]
A none/tests/badseg.stderr.exp 1.1
A none/tests/badseg.stdout.exp 1.1
A none/tests/badseg.vgtest 1.1
M +8 -0 coregrind/vg_include.h 1.187
M +4 -1 coregrind/vg_ldt.c 1.14
M +62 -8 coregrind/vg_signals.c 1.66
M +2 -8 coregrind/vg_translate.c 1.72
--- valgrind/coregrind/vg_signals.c #1.65:1.66
@@ -101,4 +101,5 @@ static void vg_async_signalhandler ( Int
static void vg_babyeater ( Int sigNo, vki_ksiginfo_t *info, struct vki_ucontext * );
static void proxy_sigvg_handler ( Int sigNo, vki_ksiginfo_t *info, struct vki_ucontext * );
+static void resume_scheduler(Int signo, vki_ksiginfo_t *info);
static Bool is_correct_sigmask(void);
@@ -1818,4 +1819,50 @@ static void vg_default_action(const vki_
}
+/* Synthesize a fault where the address is OK, but the page
+ permissions are bad */
+void VG_(synth_fault_perms)(ThreadId tid, Addr addr)
+{
+ vki_ksiginfo_t info;
+
+ vg_assert(VG_(threads)[tid].status == VgTs_Runnable);
+
+ info.si_signo = VKI_SIGSEGV;
+ info.si_code = 2;
+ info._sifields._sigfault._addr = (void*)addr;
+
+ resume_scheduler(VKI_SIGSEGV, &info);
+ VG_(deliver_signal)(tid, &info, False);
+}
+
+/* Synthesize a fault where the address there's nothing mapped at the
+ address */
+void VG_(synth_fault_mapping)(ThreadId tid, Addr addr)
+{
+ vki_ksiginfo_t info;
+
+ vg_assert(VG_(threads)[tid].status == VgTs_Runnable);
+
+ info.si_signo = VKI_SIGSEGV;
+ info.si_code = 1;
+ info._sifields._sigfault._addr = (void*)addr;
+
+ resume_scheduler(VKI_SIGSEGV, &info);
+ VG_(deliver_signal)(tid, &info, False);
+}
+
+/* Synthesize a misc memory fault */
+void VG_(synth_fault)(ThreadId tid)
+{
+ vki_ksiginfo_t info;
+
+ vg_assert(VG_(threads)[tid].status == VgTs_Runnable);
+
+ info.si_signo = VKI_SIGSEGV;
+ info.si_code = 0x80;
+ info._sifields._sigfault._addr = (void*)0;
+
+ resume_scheduler(VKI_SIGSEGV, &info);
+ VG_(deliver_signal)(tid, &info, False);
+}
void VG_(deliver_signal) ( ThreadId tid, const vki_ksiginfo_t *info, Bool async )
@@ -1974,4 +2021,16 @@ void vg_async_signalhandler ( Int sigNo,
}
+static void resume_scheduler(Int sigNo, vki_ksiginfo_t *info)
+{
+ if (VG_(scheduler_jmpbuf_valid)) {
+ /* Can't continue; must longjmp back to the scheduler and thus
+ enter the sighandler immediately. */
+ VG_(memcpy)(&VG_(unresumable_siginfo), info, sizeof(vki_ksiginfo_t));
+
+ VG_(longjmpd_on_signal) = sigNo;
+ __builtin_longjmp(VG_(scheduler_jmpbuf),1);
+ }
+}
+
/*
Recieve a sync signal from the host.
@@ -2112,12 +2171,7 @@ void vg_sync_signalhandler ( Int sigNo,
}
- if (VG_(scheduler_jmpbuf_valid)) {
/* Can't continue; must longjmp back to the scheduler and thus
enter the sighandler immediately. */
- VG_(memcpy)(&VG_(unresumable_siginfo), info, sizeof(vki_ksiginfo_t));
-
- VG_(longjmpd_on_signal) = sigNo;
- __builtin_longjmp(VG_(scheduler_jmpbuf),1);
- }
+ resume_scheduler(sigNo, info);
if (info->si_code <= VKI_SI_USER) {
--- valgrind/coregrind/vg_include.h #1.186:1.187
@@ -1081,4 +1081,12 @@ extern vki_ksiginfo_t VG_(unresumable_si
extern void VG_(kill_self)(Int sigNo);
+/* These function synthesize a fault, as if the running instruction
+ had had a fault. These functions do not return - they longjmp back
+ into the scheduler so the signal can be delivered. */
+extern void VG_(synth_fault) (ThreadId tid);
+extern void VG_(synth_fault_mapping)(ThreadId tid, Addr addr);
+extern void VG_(synth_fault_perms) (ThreadId tid, Addr addr);
+
+
/* ---------------------------------------------------------------------
Exports of vg_mylibc.c
--- valgrind/coregrind/vg_translate.c #1.71:1.72
@@ -2400,19 +2400,13 @@ void VG_(translate) ( /*IN*/ ThreadId t
!VG_(seg_contains)(seg, orig_addr, 1) ||
(seg->prot & (VKI_PROT_READ|VKI_PROT_EXEC)) == 0) {
- vki_ksiginfo_t info;
-
/* Code address is bad - deliver a signal instead */
vg_assert(!VG_(is_addressable)(orig_addr, 1));
- info.si_signo = VKI_SIGSEGV;
-
if (seg != NULL && VG_(seg_contains)(seg, orig_addr, 1)) {
vg_assert((seg->prot & VKI_PROT_EXEC) == 0);
- info.si_code = 2; /* invalid permissions for mapped object */
+ VG_(synth_fault_perms)(tid, orig_addr);
} else
- info.si_code = 1; /* address not mapped to object */
- info._sifields._sigfault._addr = (void*)orig_addr;
+ VG_(synth_fault_mapping)(tid, orig_addr);
- VG_(deliver_signal)(tid, &info, False);
return;
} else
--- valgrind/coregrind/vg_ldt.c #1.13:1.14
@@ -182,5 +182,8 @@ Addr VG_(do_useseg) ( UInt seg_selector,
/* Sanity check the segment selector. Ensure that RPL=11b (least
privilege). This forms the bottom 2 bits of the selector. */
- vg_assert((seg_selector & 3) == 3);
+ if ((seg_selector & 3) != 3) {
+ VG_(synth_fault)(VG_(get_current_tid)());
+ return 0;
+ }
/* Extract the table number */
|
|
From: Jeremy F. <je...@go...> - 2004-03-16 08:27:35
|
CVS commit by fitzhardinge:
Make the sigaltstack per-thread state, so that two threads handling a
signal at once don't share the same stack.
M +3 -0 vg_include.h 1.186
M +6 -1 vg_scheduler.c 1.143
M +25 -24 vg_signals.c 1.65
--- valgrind/coregrind/vg_scheduler.c #1.142:1.143
@@ -3307,5 +3307,10 @@ void scheduler_sanity ( void )
stack_used = (Addr)VG_(threads)[i].stack_highest_word
- (Addr)VG_(threads)[i].m_esp;
- if (i > 1 /* not the root thread */
+
+ /* This test is a bit bogus - it doesn't take into account
+ alternate signal stacks, for a start. Also, if a thread
+ has it's stack pointer somewhere strange, killing Valgrind
+ isn't the right answer. */
+ if (0 && i > 1 /* not the root thread */
&& stack_used
>= (VG_PTHREAD_STACK_MIN - 1000 /* paranoia */)) {
--- valgrind/coregrind/vg_signals.c #1.64:1.65
@@ -174,7 +174,4 @@ typedef
SCSS_Per_Signal scss_per_sig[1+VKI_KNSIG];
- /* Signal delivery stack, if any. */
- vki_kstack_t altstack;
-
/* Additional elements to SCSS not stored here:
- for each thread, the thread's blocking mask
@@ -457,15 +454,19 @@ void VG_(handle_SCSS_change) ( Bool forc
/* True if we are on the alternate signal stack. */
-static Int on_sig_stack ( Addr m_esp )
+static Int on_sig_stack ( ThreadId tid, Addr m_esp )
{
- return (m_esp - (Addr)vg_scss.altstack.ss_sp
- < vg_scss.altstack.ss_size);
+ ThreadState *tst = VG_(get_ThreadState)(tid);
+
+ return (m_esp - (Addr)tst->altstack.ss_sp
+ < tst->altstack.ss_size);
}
-static Int sas_ss_flags ( Addr m_esp )
+static Int sas_ss_flags ( ThreadId tid, Addr m_esp )
{
- return (vg_scss.altstack.ss_size == 0
+ ThreadState *tst = VG_(get_ThreadState)(tid);
+
+ return (tst->altstack.ss_size == 0
? VKI_SS_DISABLE
- : on_sig_stack(m_esp) ? VKI_SS_ONSTACK : 0);
+ : on_sig_stack(tid, m_esp) ? VKI_SS_ONSTACK : 0);
}
@@ -489,11 +490,11 @@ void VG_(do__NR_sigaltstack) ( ThreadId
if (oss != NULL) {
- oss->ss_sp = vg_scss.altstack.ss_sp;
- oss->ss_size = vg_scss.altstack.ss_size;
- oss->ss_flags = vg_scss.altstack.ss_flags | sas_ss_flags(m_esp);
+ oss->ss_sp = VG_(threads)[tid].altstack.ss_sp;
+ oss->ss_size = VG_(threads)[tid].altstack.ss_size;
+ oss->ss_flags = VG_(threads)[tid].altstack.ss_flags | sas_ss_flags(tid, m_esp);
}
if (ss != NULL) {
- if (on_sig_stack(VG_(threads)[tid].m_esp)) {
+ if (on_sig_stack(tid, VG_(threads)[tid].m_esp)) {
SET_SYSCALL_RETVAL(tid, -VKI_EPERM);
return;
@@ -506,5 +507,5 @@ void VG_(do__NR_sigaltstack) ( ThreadId
}
if (ss->ss_flags == VKI_SS_DISABLE) {
- vg_scss.altstack.ss_flags = VKI_SS_DISABLE;
+ VG_(threads)[tid].altstack.ss_flags = VKI_SS_DISABLE;
} else {
if (ss->ss_size < VKI_MINSIGSTKSZ) {
@@ -513,7 +514,7 @@ void VG_(do__NR_sigaltstack) ( ThreadId
}
- vg_scss.altstack.ss_sp = ss->ss_sp;
- vg_scss.altstack.ss_size = ss->ss_size;
- vg_scss.altstack.ss_flags = 0;
+ VG_(threads)[tid].altstack.ss_sp = ss->ss_sp;
+ VG_(threads)[tid].altstack.ss_size = ss->ss_size;
+ VG_(threads)[tid].altstack.ss_flags = 0;
}
}
@@ -922,5 +923,5 @@ static void synth_ucontext(ThreadId tid,
uc->uc_link = 0;
uc->uc_sigmask = *set;
- uc->uc_stack = vg_scss.altstack;
+ uc->uc_stack = tst->altstack;
#define SC(reg) sc->reg = tst->m_##reg
@@ -976,8 +977,8 @@ void vg_push_signal_frame ( ThreadId tid
already using. Logic from get_sigframe in
arch/i386/kernel/signal.c. */
- sas_ss_flags(tst->m_esp) == 0
+ sas_ss_flags(tid, tst->m_esp) == 0
) {
esp_top_of_frame
- = (Addr)(vg_scss.altstack.ss_sp) + vg_scss.altstack.ss_size;
+ = (Addr)(tst->altstack.ss_sp) + tst->altstack.ss_size;
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
@@ -986,5 +987,5 @@ void vg_push_signal_frame ( ThreadId tid
/* Signal delivery to tools */
- VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/False );
+ VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/True );
} else {
@@ -992,5 +993,5 @@ void vg_push_signal_frame ( ThreadId tid
/* Signal delivery to tools */
- VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/True );
+ VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/False );
}
@@ -2338,5 +2339,5 @@ void VG_(sigstartup_actions) ( void )
/* Copy the alt stack, if any. */
- ret = VG_(ksigaltstack)(NULL, &vg_scss.altstack);
+ ret = VG_(ksigaltstack)(NULL, &VG_(threads)[1].altstack);
vg_assert(ret == 0);
@@ -2405,5 +2406,5 @@ void VG_(sigshutdown_actions) ( void )
/* Restore the sig alt stack. */
- ret = VG_(ksigaltstack)(&vg_scss.altstack, NULL);
+ ret = VG_(ksigaltstack)(&VG_(threads)[1].altstack, NULL);
vg_assert(ret == 0);
--- valgrind/coregrind/vg_include.h #1.185:1.186
@@ -845,4 +845,7 @@ typedef
Addr stack_highest_word;
+ /* Alternate signal stack */
+ vki_kstack_t altstack;
+
/* Pointer to this thread's Local (Segment) Descriptor Table.
Starts out as NULL, indicating there is no table, and we hope to
|
|
From: Jeremy F. <je...@go...> - 2004-03-16 08:20:19
|
CVS commit by fitzhardinge:
Print a backtrace for core-dumping signals, even if we're not actually
dumping core.
M +2 -1 vg_signals.c 1.64
--- valgrind/coregrind/vg_signals.c #1.63:1.64
@@ -1718,4 +1718,5 @@ static void vg_default_action(const vki_
if (terminate) {
struct vki_rlimit corelim;
+ Bool could_core = core;
if (core) {
@@ -1729,5 +1730,5 @@ static void vg_default_action(const vki_
}
- if (VG_(clo_verbosity) != 0 && (core || VG_(clo_verbosity) > 1)) {
+ if (VG_(clo_verbosity) != 0 && (could_core || VG_(clo_verbosity) > 1)) {
VG_(message)(Vg_UserMsg, "");
VG_(message)(Vg_UserMsg, "Process terminating with default action of signal %d (%s)%s",
|
|
From: <js...@ac...> - 2004-03-16 04:06:55
|
Nightly build on phoenix ( SuSE 8.2 ) started at 2004-03-16 04:00:00 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 143 tests, 7 stderr failures, 0 stdout failures ================= corecheck/tests/as_mmap (stderr) corecheck/tests/fdleak_fcntl (stderr) helgrind/tests/inherit (stderr) memcheck/tests/badjump (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stderr) none/tests/int (stderr) make: *** [regtest] Error 1 |
|
From: <js...@ac...> - 2004-03-16 03:47:24
|
Nightly build on nemesis ( SuSE 9.0 ) started at 2004-03-16 03:50:00 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow -- Finished tests in none/tests ---------------------------------------- == 143 tests, 15 stderr failures, 0 stdout failures ================= corecheck/tests/as_mmap (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) helgrind/tests/inherit (stderr) memcheck/tests/badjump (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stderr) none/tests/int (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <to...@co...> - 2004-03-16 03:22:48
|
Nightly build on dunsmere ( Fedora Core 1 ) started at 2004-03-16 03:20:02 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) helgrind/tests/inherit (stderr) memcheck/tests/badjump (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/fwrite (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) none/tests/exec-sigmask (stdout) none/tests/int (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-03-16 03:18:13
|
Nightly build on audi ( Red Hat 9 ) started at 2004-03-16 03:15:05 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow rcrl: valgrind ./rcrl readline1: valgrind ./readline1 resolv: valgrind ./resolv seg_override: valgrind ./seg_override sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 148 tests, 3 stderr failures, 0 stdout failures ================= helgrind/tests/inherit (stderr) memcheck/tests/badjump (stderr) none/tests/int (stderr) make: *** [regtest] Error 1 |