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
(15) |
2
(17) |
3
(23) |
4
(13) |
5
(7) |
6
(8) |
7
(9) |
|
8
(8) |
9
(31) |
10
(31) |
11
(19) |
12
(11) |
13
(38) |
14
(14) |
|
15
(8) |
16
(11) |
17
(7) |
18
(17) |
19
(12) |
20
(12) |
21
(17) |
|
22
(19) |
23
(33) |
24
(42) |
25
(37) |
26
(23) |
27
(27) |
28
(27) |
|
29
(16) |
30
(52) |
31
(33) |
|
|
|
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-01 23:31:33
|
On Sun, 1 Aug 2004, Doug Rabson wrote: >> Valgrind Linux >> -------- ----- >> include/vki_linux.h include/linux/*.h >> include/vki_asm-generic.h include/asm-generic/*.h >> include/vki_asm-x86_64.h include/asm-x86_64/*.h >> include/vki_asm-i386.h include/asm-i386/*.h > > For FreeBSD, I would really prefer to use the system headers directly. > We don't have the same problems as Linux wrt. libc redefining headers. > Since the same people maintain libc and kernel, there is never an > opportunity to get out of sync. That's good; one less thing to get wrong. I realised my above-mentioned dir/*.h --> vki_dir.h scheme won't work, because the dependencies between the various .h files under Linux are complex enough that you can't reduce a directory's worth of .h files into a single one. I'm contemplating using as many of the kernel headers as necessary, keeping them separate, but only copying the used parts. That way, with the current usage, there would be about 45 .h files, each one typically very short with only one or two vki_/VKI_ types or constants used. That's kind of sucky, but I can't think of anything better. N |
|
From: Nicholas N. <nj...@ca...> - 2004-08-01 23:06:31
|
CVS commit by nethercote:
Factor out commonality between VG_(synth_fault*)().
M +13 -27 vg_signals.c 1.74
--- valgrind/coregrind/vg_signals.c #1.73:1.74
@@ -1821,7 +1821,5 @@ 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)
+static void synth_fault_common(ThreadId tid, Addr addr, Int si_code)
{
vki_ksiginfo_t info;
@@ -1830,5 +1828,5 @@ void VG_(synth_fault_perms)(ThreadId tid
info.si_signo = VKI_SIGSEGV;
- info.si_code = 2;
+ info.si_code = si_code;
info._sifields._sigfault._addr = (void*)addr;
@@ -1837,33 +1835,21 @@ void VG_(synth_fault_perms)(ThreadId tid
}
-/* Synthesize a fault where the address there's nothing mapped at the
- address */
-void VG_(synth_fault_mapping)(ThreadId tid, Addr addr)
+// 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 = 1;
- info._sifields._sigfault._addr = (void*)addr;
+ synth_fault_common(tid, addr, 2);
+}
- VG_(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)
+{
+ synth_fault_common(tid, addr, 1);
}
-/* Synthesize a misc memory fault */
+// 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;
-
- VG_(resume_scheduler)(VKI_SIGSEGV, &info);
- VG_(deliver_signal)(tid, &info, False);
+ synth_fault_common(tid, 0, 0x80);
}
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-01 22:59:33
|
CVS commit by nethercote:
Replaced three global variables in vg_include.h with a single global function;
much neater.
M +2 -9 vg_include.h 1.206
M +24 -12 vg_scheduler.c 1.159
M +5 -19 vg_signals.c 1.73
--- valgrind/coregrind/vg_include.h #1.205:1.206
@@ -984,13 +984,6 @@ extern void VG_(scheduler_init) ( void )
extern void VG_(pp_sched_status) ( void );
-/* vg_oursignalhandler() might longjmp(). Here's the jmp_buf. */
-extern jmp_buf VG_(scheduler_jmpbuf);
-/* This says whether scheduler_jmpbuf is actually valid. Needed so
- that our signal handler doesn't longjmp when the buffer isn't
- actually valid. */
-extern Bool VG_(scheduler_jmpbuf_valid);
-/* ... and if so, here's the signal which caused it to do so. */
-extern Int VG_(longjmpd_on_signal);
-
+// Longjmp back to the scheduler and thus enter the sighandler immediately.
+extern void VG_(resume_scheduler) ( Int sigNo, vki_ksiginfo_t *info );
/* The red-zone size which we put at the bottom (highest address) of
--- valgrind/coregrind/vg_scheduler.c #1.158:1.159
@@ -89,11 +89,11 @@ static ThreadId vg_tid_last_in_baseBlock
/* vg_oursignalhandler() might longjmp(). Here's the jmp_buf. */
-jmp_buf VG_(scheduler_jmpbuf);
+jmp_buf scheduler_jmpbuf;
/* This says whether scheduler_jmpbuf is actually valid. Needed so
that our signal handler doesn't longjmp when the buffer isn't
actually valid. */
-Bool VG_(scheduler_jmpbuf_valid) = False;
+Bool scheduler_jmpbuf_valid = False;
/* ... and if so, here's the signal which caused it to do so. */
-Int VG_(longjmpd_on_signal);
+Int longjmpd_on_signal;
/* If the current thread gets a syncronous unresumable signal, then
its details are placed here by the signal handler, to be passed to
@@ -524,4 +524,16 @@ void VG_(save_thread_state) ( ThreadId t
+void VG_(resume_scheduler)(Int sigNo, vki_ksiginfo_t *info)
+{
+ if (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));
+
+ longjmpd_on_signal = sigNo;
+ __builtin_longjmp(scheduler_jmpbuf,1);
+ }
+}
+
/* Run the thread tid for a while, and return a VG_TRC_* value to the
scheduler indicating what happened. */
@@ -532,5 +544,5 @@ UInt run_thread_for_a_while ( ThreadId t
vg_assert(VG_(is_valid_tid)(tid));
vg_assert(VG_(threads)[tid].status == VgTs_Runnable);
- vg_assert(!VG_(scheduler_jmpbuf_valid));
+ vg_assert(!scheduler_jmpbuf_valid);
VGP_PUSHCC(VgpRun);
@@ -540,19 +552,19 @@ UInt run_thread_for_a_while ( ThreadId t
vg_assert(VG_(unresumable_siginfo).si_signo == 0);
- if (__builtin_setjmp(VG_(scheduler_jmpbuf)) == 0) {
+ if (__builtin_setjmp(scheduler_jmpbuf) == 0) {
/* try this ... */
- VG_(scheduler_jmpbuf_valid) = True;
+ scheduler_jmpbuf_valid = True;
trc = VG_(run_innerloop)();
- VG_(scheduler_jmpbuf_valid) = False;
+ scheduler_jmpbuf_valid = False;
/* We get here if the client didn't take a fault. */
} else {
/* We get here if the client took a fault, which caused our
signal handler to longjmp. */
- VG_(scheduler_jmpbuf_valid) = False;
+ scheduler_jmpbuf_valid = False;
vg_assert(trc == 0);
trc = VG_TRC_UNRESUMABLE_SIGNAL;
}
- vg_assert(!VG_(scheduler_jmpbuf_valid));
+ vg_assert(!scheduler_jmpbuf_valid);
VG_(save_thread_state) ( tid );
@@ -644,5 +656,5 @@ void VG_(scheduler_init) ( void )
/* Not running client code right now. */
- VG_(scheduler_jmpbuf_valid) = False;
+ scheduler_jmpbuf_valid = False;
/* Proxy for main thread */
@@ -1235,8 +1247,8 @@ VgSchedReturnCode VG_(scheduler) ( Int*
VG_(unresumable_siginfo).si_signo == VKI_SIGILL ||
VG_(unresumable_siginfo).si_signo == VKI_SIGFPE);
- vg_assert(VG_(longjmpd_on_signal) == VG_(unresumable_siginfo).si_signo);
+ vg_assert(longjmpd_on_signal == VG_(unresumable_siginfo).si_signo);
/* make sure we've unblocked the signals which the handler blocked */
- VG_(unblock_host_signal)(VG_(longjmpd_on_signal));
+ VG_(unblock_host_signal)(longjmpd_on_signal);
VG_(deliver_signal)(tid, &VG_(unresumable_siginfo), False);
--- valgrind/coregrind/vg_signals.c #1.72:1.73
@@ -65,6 +65,5 @@
the only signals it needs to handle.
- If we get a synchronous signal, the details are placed into
- VG_(unresumable_siginfo) and we longjmp back into the scheduler,
+ If we get a synchronous signal, we longjmp back into the scheduler,
since we can't resume executing the client code. The scheduler
immediately starts signal delivery to the thread which generated
@@ -101,5 +100,4 @@ 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);
@@ -1835,5 +1833,5 @@ void VG_(synth_fault_perms)(ThreadId tid
info._sifields._sigfault._addr = (void*)addr;
- resume_scheduler(VKI_SIGSEGV, &info);
+ VG_(resume_scheduler)(VKI_SIGSEGV, &info);
VG_(deliver_signal)(tid, &info, False);
}
@@ -1851,5 +1849,5 @@ void VG_(synth_fault_mapping)(ThreadId t
info._sifields._sigfault._addr = (void*)addr;
- resume_scheduler(VKI_SIGSEGV, &info);
+ VG_(resume_scheduler)(VKI_SIGSEGV, &info);
VG_(deliver_signal)(tid, &info, False);
}
@@ -1866,5 +1864,5 @@ void VG_(synth_fault)(ThreadId tid)
info._sifields._sigfault._addr = (void*)0;
- resume_scheduler(VKI_SIGSEGV, &info);
+ VG_(resume_scheduler)(VKI_SIGSEGV, &info);
VG_(deliver_signal)(tid, &info, False);
}
@@ -2025,16 +2023,4 @@ 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.
@@ -2177,5 +2163,5 @@ void vg_sync_signalhandler ( Int sigNo,
/* Can't continue; must longjmp back to the scheduler and thus
enter the sighandler immediately. */
- resume_scheduler(sigNo, info);
+ VG_(resume_scheduler)(sigNo, info);
if (info->si_code <= VKI_SI_USER) {
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-01 22:36:58
|
CVS commit by nethercote:
Cleaned up vg_include.h:
- removed various things that are no longer used
- made (module-)local some things that were global
- improved the formatting in places
Removed about 160 lines of code, and non-trivially reduced the number
of global entities.
M +4 -3 vg_from_ucode.c 1.78
M +32 -109 vg_include.h 1.205
M +1 -32 vg_main.c 1.179
M +0 -22 vg_malloc2.c 1.28
M +2 -11 vg_messages.c 1.11
M +7 -42 vg_mylibc.c 1.83
M +0 -1 vg_needs.c 1.16
M +3 -4 vg_proxylwp.c 1.17
M +17 -5 vg_scheduler.c 1.158
M +23 -20 vg_symtab2.c 1.84
M +29 -30 vg_syscalls.c 1.116
M +6 -0 vg_translate.c 1.80
--- valgrind/coregrind/vg_from_ucode.c #1.77:1.78
@@ -2173,5 +2173,6 @@ static void emit_ret ( void )
/* Predicate used in sanity checks elsewhere - returns true if any
jump-site is an actual chained jump */
-Bool VG_(is_chained_jumpsite)(Addr a)
+__attribute__((unused))
+static Bool is_chained_jumpsite(Addr a)
{
UChar *cp = (UChar *)a;
@@ -2193,5 +2194,5 @@ Bool is_fresh_jumpsite(UChar *cp)
/* Predicate used in sanity checks elsewhere - returns true if all
jump-sites are calls to VG_(patch_me) */
-Bool VG_(is_unchained_jumpsite)(Addr a)
+static Bool is_unchained_jumpsite(Addr a)
{
UChar *cp = (UChar *)a;
@@ -2233,5 +2234,5 @@ void VG_(unchain_jumpsite)(Addr a)
UChar *cp = (UChar *)a;
- if (VG_(is_unchained_jumpsite)(a))
+ if (is_unchained_jumpsite(a))
return; /* don't write unnecessarily */
--- valgrind/coregrind/vg_include.h #1.204:1.205
@@ -141,13 +141,4 @@
/* ---------------------------------------------------------------------
- Basic types
- ------------------------------------------------------------------ */
-
-/* Just pray that gcc's constant folding works properly ... */
-#define BITS(bit7,bit6,bit5,bit4,bit3,bit2,bit1,bit0) \
- ( ((bit7) << 7) | ((bit6) << 6) | ((bit5) << 5) | ((bit4) << 4) \
- | ((bit3) << 3) | ((bit2) << 2) | ((bit1) << 1) | (bit0))
-
-/* ---------------------------------------------------------------------
Command-line-settable options
------------------------------------------------------------------ */
@@ -279,11 +270,7 @@ extern void VG_(intercept_libc_freeres_w
/* ---------------------------------------------------------------------
- Debugging and profiling stuff
+ Profiling stuff
------------------------------------------------------------------ */
-/* Create a log file into which messages can be dumped. */
-extern void VG_(startup_logging) ( void );
-extern void VG_(shutdown_logging)( void );
-
extern void VGP_(init_profiling) ( void );
extern void VGP_(done_profiling) ( void );
@@ -399,9 +385,4 @@ extern void VG_(show_all_arena_stats) (
extern Bool VG_(is_empty_arena) ( ArenaId aid );
-/* Returns True if aa is inside any block mmap'd /dev/zero
- by our low-level memory manager. */
-extern Bool VG_(is_inside_segment_mmapd_by_low_level_MM)( Addr aa );
-
-
/* ---------------------------------------------------------------------
Exports of vg_intercept.c
@@ -630,10 +611,7 @@ typedef struct _LDT_ENTRY {
/* Alloc & copy, and dealloc. */
-extern VgLdtEntry*
- VG_(allocate_LDT_for_thread) ( VgLdtEntry* parent_ldt );
-extern void
- VG_(deallocate_LDT_for_thread) ( VgLdtEntry* ldt );
-extern void
- VG_(clear_TLS_for_thread) ( VgLdtEntry* tls );
+extern VgLdtEntry* VG_(allocate_LDT_for_thread) ( VgLdtEntry* parent_ldt );
+extern void VG_(deallocate_LDT_for_thread) ( VgLdtEntry* ldt );
+extern void VG_(clear_TLS_for_thread) ( VgLdtEntry* tls );
/* Simulate the modify_ldt syscall. */
@@ -1083,16 +1061,11 @@ extern void VG_(route_signals) ( void );
extern void VG_(do__NR_sigaltstack) ( ThreadId tid );
extern void VG_(do__NR_sigaction) ( ThreadId tid );
-extern void VG_(do__NR_sigprocmask) ( ThreadId tid,
- Int how,
+extern void VG_(do__NR_sigprocmask) ( ThreadId tid, Int how,
vki_ksigset_t* set,
vki_ksigset_t* oldset );
-extern void VG_(do_pthread_sigmask_SCSS_upd) ( ThreadId tid,
- Int how,
+extern void VG_(do_pthread_sigmask_SCSS_upd) ( ThreadId tid, Int how,
vki_ksigset_t* set,
vki_ksigset_t* oldset );
-extern void VG_(send_signal_to_thread) ( ThreadId thread,
- Int signo );
-
-extern void VG_(do_sigpending) ( ThreadId tid, vki_ksigset_t* set );
+extern void VG_(send_signal_to_thread) ( ThreadId thread, Int signo );
@@ -1138,12 +1111,5 @@ extern Char* VG_(arena_strdup) ( ArenaId
extern Int VG_(fcntl) ( Int fd, Int cmd, Int arg );
-extern Int VG_(select)( Int n,
- vki_fd_set* readfds,
- vki_fd_set* writefds,
- vki_fd_set* exceptfds,
- struct vki_timeval * timeout );
extern Int VG_(poll)( struct vki_pollfd *, UInt nfds, Int timeout);
-extern Int VG_(nanosleep)( const struct vki_timespec *req,
- struct vki_timespec *rem );
/* system/mman.h */
@@ -1163,6 +1129,4 @@ extern Int VG_(connect_via_socket)( UCha
/* Environment manipulations */
-extern Char **VG_(env_clone) ( Char **oldenv );
-extern Char* VG_(env_getenv) ( Char **env, Char* varname );
extern Char **VG_(env_setenv) ( Char ***envp, const Char* varname, const Char *val );
extern void VG_(env_unsetenv) ( Char **env, const Char *varname );
@@ -1178,15 +1142,4 @@ extern void VG_(send_bytes_to_logging_si
/* ---------------------------------------------------------------------
- Definitions for the JITter (vg_translate.c, vg_to_ucode.c,
- vg_from_ucode.c).
- ------------------------------------------------------------------ */
-
-#define VG_IS_FLAG_SUBSET(set1,set2) \
- (( ((FlagSet)set1) & ((FlagSet)set2) ) == ((FlagSet)set1) )
-
-#define VG_UNION_FLAG_SETS(set1,set2) \
- ( ((FlagSet)set1) | ((FlagSet)set2) )
-
-/* ---------------------------------------------------------------------
Exports of vg_demangle.c
------------------------------------------------------------------ */
@@ -1205,6 +1158,4 @@ extern void VG_(print_UInstr_histogram
extern void VG_(unchain_jumpsite) ( Addr jumpsite );
extern Addr VG_(get_jmp_dest) ( Addr jumpsite );
-extern Bool VG_(is_unchained_jumpsite) ( Addr jumpsite );
-extern Bool VG_(is_chained_jumpsite) ( Addr jumpsite );
/* ---------------------------------------------------------------------
@@ -1377,6 +1328,6 @@ extern
void VG_(parse_procselfmaps) (
void (*record_mapping)( Addr addr, UInt len, Char rr, Char ww, Char xx,
- UInt dev, UInt ino, ULong foff, const UChar *filename )
-);
+ UInt dev, UInt ino, ULong foff,
+ const UChar *filename ) );
@@ -1390,5 +1341,4 @@ extern Bool VG_(is_object_file) ( cons
extern void VG_(mini_stack_dump) ( Addr eips[], UInt n_eips );
extern SegInfo * VG_(read_seg_symbols) ( Segment *seg );
-extern void VG_(unload_symbols) ( Addr start, UInt length );
extern void VG_(symtab_incref) ( SegInfo * );
extern void VG_(symtab_decref) ( SegInfo *, Addr a, UInt len );
@@ -1400,9 +1350,5 @@ extern void VG_(setup_code_redirect_tabl
/* Redirection machinery */
-extern void VG_(add_redirect_sym)(const Char *from_lib, const Char *from_sym,
- const Char *to_lib, const Char *to_sym);
-extern void VG_(add_redirect_addr)(const Char *from_lib, const Char *from_sym,
- Addr to_addr);
-extern Addr VG_(code_redirect) (Addr orig);
+extern Addr VG_(code_redirect) ( Addr orig );
/* ---------------------------------------------------------------------
@@ -1464,21 +1410,7 @@ extern Int VG_(vg_argc);
extern Char **VG_(vg_argv);
-/* Indicates presence, and holds address of client's sysinfo page, a
- feature of some modern kernels used to provide vsyscalls, etc. */
-extern Bool VG_(sysinfo_page_exists);
-extern Addr VG_(sysinfo_page_addr);
-
-/* Walk through a colon separated list variable, removing entries
- which match pattern. */
-extern void VG_(mash_colon_env)(Char *varp, const Char *pattern);
-
/* Something of a function looking for a home ... start up debugger. */
extern void VG_(start_debugger) ( Int tid );
-/* VG_(bbs_done) in include/vg_skin.h */
-
-/* 64-bit counter for the number of bbs to go before a debug exit. */
-extern ULong VG_(bbs_to_go);
-
/* Counts downwards in vg_run_innerloop. */
extern UInt VG_(dispatch_ctr);
@@ -1538,8 +1470,4 @@ extern UInt VG_(num_scheduling_events_MI
extern UInt VG_(num_scheduling_events_MAJOR);
-/* Insert and extract the D flag from eflags */
-UInt VG_(insertDflag)(UInt eflags, Int d);
-Int VG_(extractDflag)(UInt eflags);
-
/* ---------------------------------------------------------------------
Exports of vg_memory.c
@@ -1551,19 +1479,19 @@ Int VG_(extractDflag)(UInt eflags);
We try to encode everything we know about a particular segment here.
*/
-#define SF_FIXED (1 << 0) /* client asked for MAP_FIXED */
-#define SF_SHARED (1 << 1) /* shared */
-#define SF_SHM (1 << 2) /* SYSV SHM (also SF_SHARED) */
-#define SF_MMAP (1 << 3) /* mmap memory */
-#define SF_FILE (1 << 4) /* mapping is backed by a file */
-#define SF_STACK (1 << 5) /* is a stack */
-#define SF_GROWDOWN (1 << 6) /* segment grows down */
-#define SF_GROWUP (1 << 7) /* segment grows up */
-#define SF_EXEC (1 << 8) /* segment created by exec */
-#define SF_DYNLIB (1 << 9) /* mapped from dynamic library */
-#define SF_NOSYMS (1 << 10) /* don't load syms, even if present */
-#define SF_BRK (1 << 11) /* brk segment */
-#define SF_CORE (1 << 12) /* allocated by core on behalf of the client */
-#define SF_VALGRIND (1 << 13) /* a valgrind-internal mapping - not in client*/
-#define SF_CODE (1 << 14) /* segment contains cached code */
+#define SF_FIXED (1 << 0) // client asked for MAP_FIXED
+#define SF_SHARED (1 << 1) // shared
+#define SF_SHM (1 << 2) // SYSV SHM (also SF_SHARED)
+#define SF_MMAP (1 << 3) // mmap memory
+#define SF_FILE (1 << 4) // mapping is backed by a file
+#define SF_STACK (1 << 5) // is a stack
+#define SF_GROWDOWN (1 << 6) // segment grows down
+#define SF_GROWUP (1 << 7) // segment grows up
+#define SF_EXEC (1 << 8) // segment created by exec
+#define SF_DYNLIB (1 << 9) // mapped from dynamic library
+#define SF_NOSYMS (1 << 10) // don't load syms, even if present
+#define SF_BRK (1 << 11) // brk segment
+#define SF_CORE (1 << 12) // allocated by core on behalf of the client
+#define SF_VALGRIND (1 << 13) // a valgrind-internal mapping - not in client
+#define SF_CODE (1 << 14) // segment contains cached code
struct _Segment {
@@ -1629,7 +1557,7 @@ extern void VG_(proxy_waitsig) ( void )
extern void VG_(proxy_wait_sys) (ThreadId tid, Bool restart);
-extern void VG_(proxy_shutdown) ( void ); /* shut down the syscall workers */
-extern Int VG_(proxy_resfd) ( void ); /* FD something can select on to know
- a syscall finished */
+extern void VG_(proxy_shutdown) ( void ); // shut down the syscall workers
+extern Int VG_(proxy_resfd) ( void ); // FD something can select on to know
+ // a syscall finished
/* Sanity-check the whole proxy-LWP machinery */
@@ -1642,8 +1570,4 @@ extern void VG_(proxy_handlesig)( const
const struct vki_sigcontext *sigcontext );
-/* Get the PID/TID of the ProxyLWP. */
-extern Int VG_(proxy_id)(ThreadId tid);
-
-
/* ---------------------------------------------------------------------
Exports of vg_syscalls.c
@@ -1654,5 +1578,4 @@ extern Char *VG_(resolve_filename)(Int f
extern Bool VG_(pre_syscall) ( ThreadId tid );
extern void VG_(post_syscall)( ThreadId tid, Bool restart );
-extern void VG_(restart_syscall) ( ThreadId tid );
extern Bool VG_(is_kerror) ( Int res );
@@ -1666,4 +1589,8 @@ extern void VG_(init_preopened_fds) ( vo
extern void VG_(fd_stats) ( void );
+/* Walk through a colon separated list variable, removing entries
+ which match pattern. */
+extern void VG_(mash_colon_env)(Char *varp, const Char *pattern);
+
/* ---------------------------------------------------------------------
Exports of vg_transtab.c
@@ -1673,6 +1600,4 @@ extern void VG_(fd_stats) ( void );
extern Addr VG_(tt_fast)[VG_TT_FAST_SIZE];
-extern void VG_(get_tt_tc_used) ( UInt* tt_used, UInt* tc_used );
-
extern void VG_(add_to_trans_tab) ( Addr orig_addr, Int orig_size,
Addr trans_addr, Int trans_size,
--- valgrind/coregrind/vg_main.c #1.178:1.179
@@ -117,9 +117,4 @@ vki_rlimit VG_(client_rlimit_data);
Bool VG_(have_ssestate);
-/* Indicates presence, and holds address of client's sysinfo page, a
- feature of some modern kernels used to provide vsyscalls, etc. */
-Bool VG_(sysinfo_page_exists) = False;
-Addr VG_(sysinfo_page_addr) = 0;
-
/* stage1 (main) executable */
Int VG_(vgexecfd) = -1;
@@ -1676,7 +1671,5 @@ static void process_cmd_line_options( UI
switch(auxp[0]) {
case VKI_AT_SYSINFO:
- VG_(sysinfo_page_exists) = True;
auxp[1] = (Int)(VG_(client_trampoline_code) + VG_(tramp_syscall_offset));
- VG_(sysinfo_page_addr) = auxp[1];
break;
}
@@ -2174,27 +2167,4 @@ static Int baB_off = 0;
-UInt VG_(insertDflag)(UInt eflags, Int d)
-{
- vg_assert(d == 1 || d == -1);
- eflags &= ~EFlagD;
-
- if (d < 0)
- eflags |= EFlagD;
-
- return eflags;
-}
-
-Int VG_(extractDflag)(UInt eflags)
-{
- Int ret;
-
- if (eflags & EFlagD)
- ret = -1;
- else
- ret = 1;
-
- return ret;
-}
-
/* Returns the offset, in words. */
static Int alloc_BaB ( Int words )
@@ -3075,6 +3045,5 @@ int main(int argc, char **argv)
switch (src) {
case VgSrc_ExitSyscall: /* the normal way out */
- vg_assert(VG_(last_run_tid) > 0
- && VG_(last_run_tid) < VG_N_THREADS);
+ vg_assert(VG_(last_run_tid) > 0 && VG_(last_run_tid) < VG_N_THREADS);
VG_(proxy_shutdown)();
--- valgrind/coregrind/vg_malloc2.c #1.27:1.28
@@ -299,26 +299,4 @@ void ensure_mm_init ( void )
-/* Returns True if aa is inside any segment mmap'd /dev/zero
- by our low-level memory manager. */
-Bool VG_(is_inside_segment_mmapd_by_low_level_MM)( Addr aa )
-{
- ArenaId ar;
- Superblock* sb;
-
- ensure_mm_init();
-
- for (ar = 0; ar < VG_N_ARENAS; ar++) {
- for (sb = vg_arena[ar].sblocks; sb; sb = sb->next) {
- Addr sb_first_word = (Addr)sb;
- Addr sb_last_word
- = (Addr)&(sb->payload_words[sb->n_payload_words-1]);
- if (aa >= sb_first_word && aa <= sb_last_word)
- return True;
- }
- }
- return False;
-}
-
-
/*------------------------------------------------------------*/
/*--- Superblock management stuff ---*/
--- valgrind/coregrind/vg_messages.c #1.10:1.11
@@ -2,5 +2,5 @@
/*--------------------------------------------------------------------*/
/*--- For sending error/informative messages. ---*/
-/*--- vg_message.c ---*/
+/*--- vg_messages.c ---*/
/*--------------------------------------------------------------------*/
@@ -127,14 +127,5 @@ void VG_(send_bytes_to_logging_sink) ( C
}
-
-void VG_(startup_logging) ( void )
-{
-}
-
-void VG_(shutdown_logging) ( void )
-{
-}
-
/*--------------------------------------------------------------------*/
-/*--- end vg_message.c ---*/
+/*--- end vg_messages.c ---*/
/*--------------------------------------------------------------------*/
--- valgrind/coregrind/vg_mylibc.c #1.82:1.83
@@ -335,22 +335,4 @@ Int VG_(fcntl) ( Int fd, Int cmd, Int ar
}
-/* Returns -1 on error. */
-Int VG_(select)( Int n,
- vki_fd_set* readfds,
- vki_fd_set* writefds,
- vki_fd_set* exceptfds,
- struct vki_timeval * timeout )
-{
- Int res;
- UInt args[5];
- args[0] = n;
- args[1] = (UInt)readfds;
- args[2] = (UInt)writefds;
- args[3] = (UInt)exceptfds;
- args[4] = (UInt)timeout;
- res = VG_(do_syscall)(__NR_select, (UInt)(&(args[0])) );
- return VG_(is_kerror)(res) ? -1 : res;
-}
-
Int VG_(poll)( struct vki_pollfd *ufds, UInt nfds, Int timeout)
{
@@ -360,15 +342,4 @@ Int VG_(poll)( struct vki_pollfd *ufds,
}
-/* Returns -1 on error, 0 if ok, 1 if interrupted. */
-Int VG_(nanosleep)( const struct vki_timespec *req,
- struct vki_timespec *rem )
-{
- Int res;
- res = VG_(do_syscall)(__NR_nanosleep, (UInt)req, (UInt)rem);
- if (res == -VKI_EINVAL) return -1;
- if (res == -VKI_EINTR) return 1;
- return 0;
-}
-
/* ---------------------------------------------------------------------
@@ -1147,5 +1118,4 @@ static void report_and_quit ( const Char
VG_(printf)("In the bug report, send all the above text, the valgrind\n");
VG_(printf)("version, and what Linux distro you are using. Thanks.\n\n");
- VG_(shutdown_logging)();
VG_(exit)(1);
}
@@ -1351,5 +1321,5 @@ Bool VG_(getcwd_alloc) ( Char** out )
/* clone the environment */
-Char **VG_(env_clone) ( Char **oldenv )
+static Char **env_clone ( Char **oldenv )
{
Char **oldenvp;
@@ -1433,10 +1403,12 @@ Char **VG_(env_setenv) ( Char ***envp, c
}
-Char* VG_(env_getenv) ( Char **env, Char* varname )
+/* We do getenv without libc's help by snooping around in
+ VG_(client_envp) as determined at startup time. */
+Char *VG_(getenv)(Char *varname)
{
Int i, n;
n = VG_(strlen)(varname);
- for (i = 0; env[i] != NULL; i++) {
- Char* s = env[i];
+ for (i = 0; VG_(client_envp)[i] != NULL; i++) {
+ Char* s = VG_(client_envp)[i];
if (VG_(strncmp)(varname, s, n) == 0 && s[n] == '=') {
return & s[n+1];
@@ -1446,11 +1418,4 @@ Char* VG_(env_getenv) ( Char **env, Char
}
-/* We do getenv without libc's help by snooping around in
- VG_(client_envp) as determined at startup time. */
-Char *VG_(getenv)(Char *varname)
-{
- return VG_(env_getenv)(VG_(client_envp), varname);
-}
-
/* Support for getrlimit. */
Int VG_(getrlimit) (Int resource, struct vki_rlimit *rlim)
@@ -1548,5 +1513,5 @@ Int VG_(system) ( Char* cmd )
Char* buf;
- envp = VG_(env_clone)(VG_(client_envp));
+ envp = env_clone(VG_(client_envp));
for (i = 0; envp[i] != NULL; i++) {
--- valgrind/coregrind/vg_needs.c #1.15:1.16
@@ -126,5 +126,4 @@ void VG_(sanity_check_needs) ( void)
#undef CHECK_NOT
-#undef INVALID_Bool
}
--- valgrind/coregrind/vg_proxylwp.c #1.16:1.17
@@ -1373,10 +1373,9 @@ void VG_(proxy_sanity)(void)
/* Get the PID/TID of the ProxyLWP. */
-Int VG_(proxy_id)(ThreadId tid)
+__attribute__((unused))
+static Int proxy_id(ThreadId tid)
{
ThreadState *tst = VG_(get_ThreadState)(tid);
- ProxyLWP *proxy = tst->proxy;
-
- return proxy->lwp;
+ return tst->proxy->lwp;
}
--- valgrind/coregrind/vg_scheduler.c #1.157:1.158
@@ -333,4 +333,17 @@ ThreadId VG_(get_current_or_recent_tid)
}
+static UInt insertDflag(UInt eflags, Int d)
+{
+ vg_assert(d == 1 || d == -1);
+ eflags &= ~EFlagD;
+ if (d < 0) eflags |= EFlagD;
+ return eflags;
+}
+
+static Int extractDflag(UInt eflags)
+{
+ return ( eflags & EFlagD ? -1 : 1 );
+}
+
/* Copy the saved state of a thread into VG_(baseBlock), ready for it
to be run. */
@@ -360,5 +373,5 @@ void VG_(load_thread_state) ( ThreadId t
= VG_(threads)[tid].m_eflags & ~EFlagD;
VG_(baseBlock)[VGOFF_(m_dflag)]
- = VG_(extractDflag)(VG_(threads)[tid].m_eflags);
+ = extractDflag(VG_(threads)[tid].m_eflags);
VG_(baseBlock)[VGOFF_(m_eip)] = VG_(threads)[tid].m_eip;
@@ -452,5 +465,5 @@ void VG_(save_thread_state) ( ThreadId t
VG_(threads)[tid].m_esp = VG_(baseBlock)[VGOFF_(m_esp)];
VG_(threads)[tid].m_eflags
- = VG_(insertDflag)(VG_(baseBlock)[VGOFF_(m_eflags)],
+ = insertDflag(VG_(baseBlock)[VGOFF_(m_eflags)],
VG_(baseBlock)[VGOFF_(m_dflag)]);
VG_(threads)[tid].m_eip = VG_(baseBlock)[VGOFF_(m_eip)];
@@ -1049,6 +1062,5 @@ VgSchedReturnCode VG_(scheduler) ( Int*
if (trans_addr == (Addr)0) {
/* Not found; we need to request a translation. */
- create_translation_for(
- tid, VG_(threads)[tid].m_eip );
+ create_translation_for( tid, VG_(threads)[tid].m_eip );
trans_addr = VG_(search_transtab) ( VG_(threads)[tid].m_eip );
if (trans_addr == (Addr)0)
--- valgrind/coregrind/vg_symtab2.c #1.83:1.84
@@ -831,4 +831,8 @@ VG_(intercept_demangle)(const Char* symb
}
+// Forward declaration
+static void add_redirect_addr(const Char *from_lib, const Char *from_sym,
+ Addr to_addr);
+
static
void handle_intercept( SegInfo* si, Char* symbol, Elf32_Sym* sym)
@@ -844,5 +848,5 @@ void handle_intercept( SegInfo* si, Char
*func = '\0';
- VG_(add_redirect_addr)(lib, func+1, si->offset + sym->st_value);
+ add_redirect_addr(lib, func+1, si->offset + sym->st_value);
VG_(free)(lib);
}
@@ -1596,5 +1600,5 @@ SegInfo *VG_(read_seg_symbols) ( Segment
maintain the no-overlapping invariant.
*/
-void VG_(unload_symbols) ( Addr start, UInt length )
+static void unload_symbols ( Addr start, UInt length )
{
SegInfo *prev, *curr;
@@ -1634,5 +1638,5 @@ void VG_(symtab_decref)(SegInfo *si, Add
vg_assert(si->ref >= 1);
if (--si->ref == 0)
- VG_(unload_symbols)(si->start, si->size);
+ unload_symbols(si->start, si->size);
}
@@ -2450,5 +2454,5 @@ static Bool resolve_redir_allsegs(CodeRe
/* Redirect a lib/symbol reference to a function at lib/symbol */
-void VG_(add_redirect_sym)(const Char *from_lib, const Char *from_sym,
+static void add_redirect_sym(const Char *from_lib, const Char *from_sym,
const Char *to_lib, const Char *to_sym)
{
@@ -2476,5 +2480,5 @@ void VG_(add_redirect_sym)(const Char *f
/* Redirect a lib/symbol reference to a function at lib/symbol */
-void VG_(add_redirect_addr)(const Char *from_lib, const Char *from_sym,
+static void add_redirect_addr(const Char *from_lib, const Char *from_sym,
Addr to_addr)
{
@@ -2523,5 +2527,5 @@ void VG_(setup_code_redirect_table) ( vo
for(i = 0; i < sizeof(redirects)/sizeof(*redirects); i++) {
- VG_(add_redirect_sym)("soname:libc.so.6", redirects[i].from,
+ add_redirect_sym("soname:libc.so.6", redirects[i].from,
"soname:libpthread.so.0", redirects[i].to);
}
@@ -2531,5 +2535,5 @@ void VG_(setup_code_redirect_table) ( vo
special sysinfo unwind hack in vg_execontext.c will kick in.
*/
- VG_(add_redirect_addr)("soname:ld-linux.so.2", "_dl_sysinfo_int80",
+ add_redirect_addr("soname:ld-linux.so.2", "_dl_sysinfo_int80",
VG_(client_trampoline_code)+VG_(tramp_syscall_offset));
@@ -2538,12 +2542,11 @@ void VG_(setup_code_redirect_table) ( vo
implementations of said, in mac_replace_strmem.c.
*/
- VG_(add_redirect_sym)("soname:libc.so.6", "stpcpy",
+ add_redirect_sym("soname:libc.so.6", "stpcpy",
"*vgpreload_memcheck.so*", "stpcpy");
- VG_(add_redirect_sym)("soname:libc.so.6", "strnlen",
+ add_redirect_sym("soname:libc.so.6", "strnlen",
"*vgpreload_memcheck.so*", "strnlen");
-
- VG_(add_redirect_sym)("soname:ld-linux.so.2", "stpcpy",
+ add_redirect_sym("soname:ld-linux.so.2", "stpcpy",
"*vgpreload_memcheck.so*", "stpcpy");
- VG_(add_redirect_sym)("soname:ld-linux.so.2", "strchr",
+ add_redirect_sym("soname:ld-linux.so.2", "strchr",
"*vgpreload_memcheck.so*", "strchr");
}
--- valgrind/coregrind/vg_syscalls.c #1.115:1.116
@@ -5909,4 +5909,32 @@ Bool VG_(pre_syscall) ( ThreadId tid )
}
+static void restart_syscall(ThreadId tid)
+{
+ ThreadState* tst;
+ tst = VG_(get_ThreadState)(tid);
+
+ vg_assert(tst != NULL);
+ vg_assert(tst->status == VgTs_WaitSys);
+ vg_assert(tst->syscallno != -1);
+
+ tst->m_eax = tst->syscallno;
+ tst->m_eip -= 2; /* sizeof(int $0x80) */
+
+ /* Make sure our caller is actually sane, and we're really backing
+ back over a syscall.
+
+ int $0x80 == CD 80
+ */
+ {
+ UChar *p = (UChar *)tst->m_eip;
+
+ if (p[0] != 0xcd || p[1] != 0x80)
+ VG_(message)(Vg_DebugMsg,
+ "?! restarting over syscall at %p %02x %02x\n",
+ tst->m_eip, p[0], p[1]);
+
+ vg_assert(p[0] == 0xcd && p[1] == 0x80);
+ }
+}
void VG_(post_syscall) ( ThreadId tid, Bool restart )
@@ -5955,5 +5983,5 @@ void VG_(post_syscall) ( ThreadId tid, B
if (restart) {
restarted = True;
- VG_(restart_syscall)(tid);
+ restart_syscall(tid);
} else
tst->m_eax = -VKI_EINTR;
@@ -5985,33 +6013,4 @@ void VG_(post_syscall) ( ThreadId tid, B
}
-void VG_(restart_syscall)(ThreadId tid)
-{
- ThreadState* tst;
- tst = VG_(get_ThreadState)(tid);
-
- vg_assert(tst != NULL);
- vg_assert(tst->status == VgTs_WaitSys);
- vg_assert(tst->syscallno != -1);
-
- tst->m_eax = tst->syscallno;
- tst->m_eip -= 2; /* sizeof(int $0x80) */
-
- /* Make sure our caller is actually sane, and we're really backing
- back over a syscall.
-
- int $0x80 == CD 80
- */
- {
- UChar *p = (UChar *)tst->m_eip;
-
- if (p[0] != 0xcd || p[1] != 0x80)
- VG_(message)(Vg_DebugMsg,
- "?! restarting over syscall at %p %02x %02x\n",
- tst->m_eip, p[0], p[1]);
-
- vg_assert(p[0] == 0xcd && p[1] == 0x80);
- }
-}
-
/*--------------------------------------------------------------------*/
/*--- end vg_syscalls.c ---*/
--- valgrind/coregrind/vg_translate.c #1.79:1.80
@@ -43,4 +43,10 @@
/*------------------------------------------------------------*/
+#define VG_IS_FLAG_SUBSET(set1,set2) \
+ (( ((FlagSet)set1) & ((FlagSet)set2) ) == ((FlagSet)set1) )
+
+#define VG_UNION_FLAG_SETS(set1,set2) \
+ ( ((FlagSet)set1) | ((FlagSet)set2) )
+
/* This one is called by the core */
UCodeBlock* VG_(alloc_UCodeBlock) ( void )
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-01 20:37:37
|
Hi, VALGRIND_INTERNAL_PRINTF() is *defined* in coregrind/vg_include.h. Any reason why? Surely this should not be defined in a .h file? Thanks. N |
|
From: Nicholas N. <nj...@ca...> - 2004-08-01 20:25:06
|
CVS commit by nethercote:
Fix bug #86254 -- symtab sorting was going array in very obscure circumstances
due to a signed/unsigned int problem.
M +9 -3 vg_symtab2.c 1.83
--- valgrind/coregrind/vg_symtab2.c #1.82:1.83
@@ -398,5 +398,7 @@ static Int compare_RiSym(void *va, void
RiSym *b = (RiSym *)vb;
- return a->addr - b->addr;
+ if (a->addr < b->addr) return -1;
+ if (a->addr > b->addr) return 1;
+ return 0;
}
@@ -605,5 +607,7 @@ static Int compare_ScopeRange(void *va,
ScopeRange *b = (ScopeRange *)vb;
- return a->addr - b->addr;
+ if (a->addr < b->addr) return -1;
+ if (a->addr > b->addr) return 1;
+ return 0;
}
@@ -674,5 +678,7 @@ static Int compare_RiLoc(void *va, void
RiLoc *b = (RiLoc *)vb;
- return a->addr - b->addr;
+ if (a->addr < b->addr) return -1;
+ if (a->addr > b->addr) return 1;
+ return 0;
}
|
|
From: Doug R. <df...@nl...> - 2004-08-01 15:49:47
|
On Friday 30 July 2004 22:46, Nicholas Nethercote wrote: > Hi, > > Continuing the discussions about headers and multiple > architectures... for getting the kernel headers at least, I'm > imagining a setup like this: > > Valgrind Linux > -------- ----- > include/vki_linux.h include/linux/*.h > include/vki_asm-generic.h include/asm-generic/*.h > include/vki_asm-x86_64.h include/asm-x86_64/*.h > include/vki_asm-i386.h include/asm-i386/*.h > > Here each Valgrind .h file (on the left) represents an entire > Linux-source directory (on the right). Because we only use a small > fraction of the declarations in the Linux files, it makes sense to > compress an entire directory of Linux .h files into a single Valgrind > .h file. > > This setup would work for multiple archs with Linux, but doesn't > consider other OSes. I guess Valgrind could use include-linux/, > include-freebsd/, etc, or something similar. > > This is specific to the headers, where it makes great sense to mirror > the Linux header structure as closely as possible. The arch- and > OS-specific code in Valgrind would be structured differently, > possible with arch/, OS/ and arch-OS/ directories under arch/. For FreeBSD, I would really prefer to use the system headers directly. We don't have the same problems as Linux wrt. libc redefining headers. Since the same people maintain libc and kernel, there is never an opportunity to get out of sync. |
|
From: Tom H. <th...@cy...> - 2004-08-01 07:34:52
|
In message <166...@ca...>
Paul Mackerras <pa...@sa...> wrote:
> Tom Hughes writes:
>
> > Well the kernel using magic numbers is pretty screwy, yes ;-)
>
> Why? It's not like the kernel could ever change to using different
> numbers. I would consider 0, 1 and 2 to be well-known constants. :)
It's still bad software engineering practice if only because it makes
the code harder to read - if I see a condition that tests for origin
being SEEK_CUR then I can immediately understand it. If I see a condition
testing for the number 1 then I have no idea what that means without
going and looking up details elsewhere.
Plus if somebody is writing the code to handle seeks in a new filesystem
what is the risk of them making a mistake with the numbers relative to
that of them making a mistake with named constants?
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: <js...@ac...> - 2004-08-01 03:10:22
|
Nightly build on nemesis ( SuSE 9.1 ) started at 2004-08-01 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 169 tests, 4 stderr failures, 0 stdout failures ================= corecheck/tests/as_mmap (stderr) corecheck/tests/fdleak_fcntl (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <to...@co...> - 2004-08-01 02:25:09
|
Nightly build on dunsmere ( Fedora Core 2 ) started at 2004-08-01 03:20:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 174 tests, 7 stderr failures, 1 stdout failure ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/writev (stderr) none/tests/exec-sigmask (stdout) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-08-01 02:19:20
|
Nightly build on audi ( Red Hat 9 ) started at 2004-08-01 03:15:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 174 tests, 7 stderr failures, 0 stdout failures ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-08-01 02:13:17
|
Nightly build on ginetta ( Red Hat 8.0 ) started at 2004-08-01 03:10:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow seg_override: valgrind ./seg_override sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 174 tests, 3 stderr failures, 0 stdout failures ================= helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-08-01 02:08:20
|
Nightly build on alvis ( Red Hat 7.3 ) started at 2004-08-01 03:05:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 174 tests, 9 stderr failures, 1 stdout failure ================= addrcheck/tests/toobig-allocs (stderr) helgrind/tests/deadlock (stderr) helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/badjump (stderr) memcheck/tests/brk (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/new_nothrow (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-08-01 02:07:45
|
Nightly build on standard ( Red Hat 7.2 ) started at 2004-08-01 03:00:01 BST 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 rlimit_nofile: valgrind ./rlimit_nofile seg_override: valgrind ./seg_override sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 174 tests, 0 stderr failures, 0 stdout failures ================= |
|
From: Paul M. <pa...@sa...> - 2004-08-01 01:27:18
|
Tom Hughes writes: > Well the kernel using magic numbers is pretty screwy, yes ;-) Why? It's not like the kernel could ever change to using different numbers. I would consider 0, 1 and 2 to be well-known constants. :) Paul. |