sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1 | |
| 2 | (Started this file at 14 Feb 02, 18:18 GMT) |
| 3 | |
| 4 | I decided it would be clearest for everybody (including me!) if I make |
| 5 | a record of patches that I apply. The starting point for all these is |
| 6 | valgrind-20020214; patches applied to it before that snapshot was |
| 7 | released are not recorded anywhere. |
| 8 | |
| 9 | |
| 10 | ------------------------------ 14 Feb 02 ------------------------------ |
| 11 | |
| 12 | Michael Matz <matz@kde.org>: |
| 13 | this fixes the leak (32bytes/demangled symbol)in cplus-dem.c. It also |
| 14 | again localizes the changes to libiberty's cp-demangle.c at the top with |
| 15 | some #defines. (It also has some unrelated changes like header guarding |
| 16 | and making symbol sets disjoint, these are minor and were needed for the |
| 17 | demangle_test program, and are local to the demangler) |
| 18 | |
| 19 | JRS: applied it, but it still seems to leak, running a g++2.96 compiled |
| 20 | program, at least (/usr/bin/kedit as installed with RH72). |
| 21 | (reenable VG_(show_all_arena_stats)() at vg_demangle.c:63 to see this) |
| 22 | |
| 23 | |
| 24 | Michael Matz <matz@kde.org> |
| 25 | here the patch for changing order of restorage of %esp to not trash |
| 26 | simulees stack |
| 27 | |
| 28 | |
| 29 | Simon Hausmann <hausmann@kde.org> |
| 30 | I attached a patch for the latest vg snapshot to implement better |
| 31 | support for shmat. Vg now correct marks the region returned by shmat |
| 32 | as read or read-writable (we have to do that blindly as there is no |
| 33 | way to figure out if another process initialized the data or not) . |
| 34 | Also the patch adds a paranoia check for the buffer passed with |
| 35 | shmctl. What's left todo is to make shmdt correctly mark the shm |
| 36 | segment as invalid again, but I see no easy way to figure out the |
| 37 | shm segment size just from the base address. Anyone? :) |
| 38 | Otherwise it'll probably require keeping a copy of the allocated |
| 39 | mappings inside vg -- shouldn't be expensive though. |
| 40 | [...] |
| 41 | Oops, my previous shm patch contained a little bug in that it called |
| 42 | must_be_readable/writable for shmctl even when the address was 0 |
| 43 | (which for example is the case when using IPC_RMID to remove a |
| 44 | shared memory segment, which is perfectly valid) . Attached the |
| 45 | updated patch that makes valgrinding Qt/Embedded apps possible :) |
| 46 | |
| 47 | |
| 48 | me: |
| 49 | Check for accessibility changes for first and last 64k of address |
| 50 | space after every system call, so as to catch syscall wrapper |
| 51 | bugs as soon as they happen |
| 52 | |
| 53 | |
| 54 | Simon Hausmann <hausmann@kde.org> |
| 55 | The socketpair handler checks that the two fds passed must be |
| 56 | readable, but I think the check should use must_be_writable instead |
| 57 | as the kernel does not read those values but fills them in. |
| 58 | |
| 59 | |
| 60 | Simon Hausmann <hausmann@kde.org> |
| 61 | Here's a patch that implements checking of arguments for |
| 62 | sendmsg/recvmsg, as part of the socket syscall. |
| 63 | [...] |
| 64 | Oops, I just realized that the recvmsg wrapper should mark the |
| 65 | fields of the received message as readable, as the kernel hopefully |
| 66 | initialized them :) |
| 67 | [...] |
| 68 | Corrected patch attached. |
| 69 | |
| 70 | |
| 71 | Nick Nethercote <njn25@cam.ac.uk> |
| 72 | [Implemented pushaw/pushal/popaw/popal] |
| 73 | |
| 74 | They're kind of ugly due to the special treatment of %esp, but there |
| 75 | didn't seem to be any elegant way around it. You may object to my |
| 76 | heinous magic number use with the registers. |
| 77 | |
| 78 | It seems to work ok, but I'd check it carefully if I were you. In |
| 79 | particular, I've only tried it with POPAD. (I think; gcc only accepts |
| 80 | 'popa' in assembler files, and according to the Intel docs will probably |
| 81 | choose between POPA and POPAD by looking at the D flag of the current |
| 82 | code segment's descriptor. I'm guessing this is 32-bits for my little |
| 83 | test program.) |
| 84 | |
| 85 | |
| 86 | Dirk Mueller <mueller@kde.org> |
| 87 | below a patch for checking if allocations are done correctly in C++ |
| 88 | applications. it checks if new is free'ed by delete, new [] by delete [], |
| 89 | and malloc, calloc, realloc by free(). |
| 90 | |
| 91 | It works for me <tm>, not intensively tested yet. |
| 92 | |
| 93 | |
| 94 | Michael Matz <matzmich@cs.tu-berlin.de> |
| 95 | [allow specification of length of backtrace, default 8] |
| 96 | > > another small patch. it just increases the stacktrace |
| 97 | > > length to 8 by default |
| 98 | > > (16 with --long-stacktraces=yes). a backtrace of 4 is |
| 99 | > > really short for KHTML, which often deeply nests calls. |
| 100 | > |
| 101 | > Wouldn't it be more usefull, to recognize a --bt-length=<number> |
| 102 | > option, instead of only two sizes? |
| 103 | |
| 104 | I.e. I would find the attached patch more usefull, which introduces an |
| 105 | --bt-size=<num> option (with docu ;-) ) but removes that long=yes/no |
| 106 | option. |
| 107 | |
| 108 | JRS: the final name for the option is --num-callers |
| 109 | |
| 110 | |
| 111 | ------------------------------ 15 Feb 02 ------------------------------ |
| 112 | |
| 113 | me: |
| 114 | fix assertion failure in VG_(malloc_aligned) (duh. duh. duh.) |
| 115 | |
| 116 | |
| 117 | Michael Matz <matzmich@cs.tu-berlin.de> |
| 118 | [finally fix the last space leak in the demangler] |
| 119 | this should now fix the rest of the leaks. The old c++ demangler is |
| 120 | really crappy code, therefor it took longer to find the leaks. ;) |
| 121 | |
| 122 | |
| 123 | Simon Hausmann <hausmann@kde.org> |
| 124 | Here are two micro patches for vg :) |
| 125 | |
| 126 | The first one fixes what I think is a bug: I think the result param |
| 127 | of llseek before the actual syscall should be checked for |
| 128 | writability instead of readability. |
| 129 | |
| 130 | The second one is a quick workaround for an assertion in the |
| 131 | demangler that I hit quite sometimes (I'm surprised noone else has |
| 132 | hit it before, maybe it's gcc3 specific though :) . I'm too lazy to |
| 133 | write a full strtol replacement for now ;) , so just returning an |
| 134 | error will keep the program running and output the mangled symbol |
| 135 | instead. |
| 136 | |
| 137 | |
| 138 | ------------------------------ 17 Feb 02 ------------------------------ |
| 139 | |
| 140 | me: |
| 141 | Implement cleverer semantics for 4-byte integer loads from partially |
| 142 | valid addresses, following complains from Coolo re spurious warnings |
| 143 | from gcc-inlined strlen()s. As part of this, hardwire the default |
| 144 | behaviour of --bad-addr-value and get rid of this flag entirely. |
| 145 | New flag --partial-loads-ok=no|yes [default yes] controls use of |
| 146 | new semantics. Also as a result, stop recommending people use |
| 147 | --sloppy-malloc=yes by default. |
| 148 | |
| 149 | me: |
| 150 | Options are now read from env var VALGRIND_OPTS. |
| 151 | Also remove need to edit hardware install dir in shell script. |
| 152 | |
| 153 | |
| 154 | Michael Matz <matzmich@cs.tu-berlin.de> |
| 155 | Simon Hausmann <hausmann@kde.org> |
| 156 | this fixes some leaks in the v3 demangler found by Simon (Julian: i.e. |
| 157 | those we couldn't possibly run into, as we use v2 demangling). |
| 158 | |
| 159 | |
| 160 | ------------------------------ 18 Feb 02 ------------------------------ |
| 161 | |
| 162 | me: |
| 163 | Tighten up the conditions for which --partial-loads-ok=yes is allowed |
| 164 | |
| 165 | me: |
| 166 | Error management: slow down collecting errors after the 50th |
| 167 | and stop altogether after the 500th |
| 168 | |
| 169 | me: |
| 170 | Implement --workaround-gcc296-bugs, so RH 7.X and Mandrake users |
| 171 | can use their default compilers. |
| 172 | |
| 173 | |
| 174 | ------------------------------ 20 Feb 02 ------------------------------ |
| 175 | |
| 176 | me: |
| 177 | Massive overhaul of the signal machinery so that signals can be |
| 178 | delivered to the client even when it is blocked in a system call. |
| 179 | This fixes the kmail-deadlocks-on-valgrind problem. |
| 180 | |
| 181 | ------------------------------ 21 Feb 02 ------------------------------ |
| 182 | |
| 183 | me: |
| 184 | Implement GDB attachment to the program. |
| 185 | |
| 186 | Stephan Kulow <coolo@kde.org> |
| 187 | Implement a few more syscall wrappers |
| 188 | |
| 189 | ------------------------------ 24 Feb 02 ------------------------------ |
| 190 | |
| 191 | me: |
| 192 | Cleanup of the signal machinery. Now we deal with signals purely |
| 193 | at the kernel interface, rather than muddying glibc's and the kernel's |
| 194 | conflicting concepts of some of the calls and structures. |
| 195 | |
| 196 | Kevin Dwyer <kevin@pheared.net> |
| 197 | Implement bazillions of syscall wrappers for ioctls |
| 198 | |
| 199 | me: |
| 200 | minor cleanups in vg_memory.c |
| 201 | |
| 202 | ------------------------------ 4 Mar 02 ------------------------------- |
| 203 | |
| 204 | This file is falling significantly behind reality. |
| 205 | |
| 206 | Me: get rid of this pointless and incorrect assert: |
| 207 | vg_memory.c:441 (set_address_range_perms): Assertion `len < 30000000' failed. |
| 208 | |
| 209 | Me: remove incorrect assert: |
| 210 | vg_assert(u_in->flags_w != FlagsEmpty); |
| 211 | do to with instrumentation of RCL/RCR |
| 212 | tracked down by Kevin Ryde <user42@zip.com.au> |
| 213 | |
| 214 | Malcolm Studd <mestudd@uwaterloo.ca> |
| 215 | Sanjay Ghemawat <sanjay@google.com> |
| 216 | Implement pread (180) |
| 217 | |
| 218 | Byrial Jensen <byrial@image.dk> |
| 219 | Implement getsid (147) |
| 220 | Implement TCFLSH |
| 221 | |
| 222 | Me |
| 223 | Implement pause (29) |
| 224 | |
| 225 | ------------------------------ 6 Mar 02 ------------------------------- |
| 226 | |
| 227 | Martin Nicolay <martin@osm-gmbh.de> |
| 228 | Implement fstatfs (100) |
| 229 | Implement ioctl FIOASYNC |
| 230 | Implement ioctl SIOCSPGRP (was previously noted-but-unhandled) |
| 231 | |
| 232 | Sanjay Ghemawat <sanjay@google.com> |
| 233 | Implement sync (36) |
| 234 | Make mallopt() into a no-op, rather than panic |
| 235 | |
| 236 | ------------------------------ 7 Mar 02 ------------------------------- |
| 237 | |
| 238 | Me |
| 239 | Write a great deal of technical docs about Valgrind internals |
| 240 | See docs/techdocs.html |
| 241 | |
| 242 | Me |
| 243 | Complete renaming of the kernel interface (vg_kerneliface.h) |
| 244 | definitions. |
| 245 | |
| 246 | "Byrial Jensen" <byrial@image.dk> |
| 247 | Use kernel rather than glibc sizes for struct termios |
| 248 | |
| 249 | Martin Jones <mjones@trolltech.com> |
| 250 | Implement ioctl MIXER_WRITE(0) |
| 251 | |
| 252 | Jon Trowbridge <trow@ximian.com> |
| 253 | Implement syscall pwrite (181) |
| 254 | |
| 255 | Me |
| 256 | Revamp the leak detector; fix various segfaults and bus errors in |
| 257 | it, and add the --show-reachable=no|yes flag, which makes it more |
| 258 | useful. |
| 259 | |
| 260 | ------------------------------ 8 Mar 02 ------------------------------- |
| 261 | |
| 262 | Me |
| 263 | Split up huge basic blocks into pieces, to avoid this: |
| 264 | vg_main.c:495 (vgPlain_create_translation_for): Assertion |
| 265 | `trans_size > 0 && trans_size < 65536' failed |
| 266 | |
| 267 | Crispin Flowerday <cflowerday@zeus.com> |
| 268 | Implement syscall sendfile (187) |
| 269 | Allow accept to have NULL 3rd argument |
| 270 | |
| 271 | Me |
| 272 | Write some more tech docs on the instrumentation and JITter |
| 273 | |
| 274 | ----------------------------- 10 Mar 02 ------------------------------- |
| 275 | |
| 276 | Crispin Flowerday <cflowerday@zeus.com> |
| 277 | SYS_SOCKETPAIR: on success, mark file descriptors as readable |
| 278 | |
| 279 | Ulrich Drepper <drepper@redhat.com> |
| 280 | Be cleverer on SYS_CONNECT |
| 281 | |
| 282 | Me |
| 283 | Fix strange parse error at vg_symtab2.c:1017 |
| 284 | Complete tech docs to do with the instrumenting JITter |
| 285 | Write tech docs re future ideas |
| 286 | |
| 287 | ----------------------------- 11 Mar 02 ------------------------------- |
| 288 | |
| 289 | Me |
| 290 | Fix some compile problems on Debian Potato, and add some supps |
| 291 | |
| 292 | Julian Brown <brown@cs.bris.ac.uk> |
| 293 | Handle ioctl 0x40045431 |
| 294 | |
| 295 | ----------------------------- 12 Mar 02 ------------------------------- |
| 296 | |
| 297 | Martin Burchell <martin.burchell@antlimited.com> |
| 298 | Some ioctls. |
| 299 | |
| 300 | Crispin Flowerday <cflowerday@zeus.com> |
| 301 | Improved handling of SIOCGIFCONF. |
| 302 | |
| 303 | Frank Zago <fzago@greshamstorage.com> |
| 304 | Various ioctls for the SCSI generic (sg) driver. Currently #if 0'd. |
| 305 | |
| 306 | Me |
| 307 | Fix obscure simulated CPU bug causing this: |
| 308 | -1: CMOVW t34, t36 (-rOSZACP) |
| 309 | valgrind: vg_to_ucode.c:4197 (disInstr): Assertion `sane' failed. |
| 310 | (Spotted by Thorsten Schnebeck <thorsten.schnebeck@gmx.net>) |
| 311 | |
| 312 | Me |
| 313 | Add yet more suppressions to linux24.supp |
| 314 | |
| 315 | Me [subrev b only] |
| 316 | In the leak checker, use __builtin_{setjmp,longjmp} instead of the |
| 317 | glibc (pthread) versions. This avoids a subtle memory corruption |
| 318 | problem caused by pthread_longjmp (or whatever it is called), which |
| 319 | finally manifests itself in this assertion failure: |
| 320 | vgPlain_primary_map[i] == & vg_distinguished_secondary_map |
| 321 | Many thanks to Michael Matz for coming up with an easy solution |
| 322 | which saved me hours of pissing around. |
| 323 | |
| 324 | ----------------------------- 15 Mar 02 ------------------------------- |
| 325 | |
| 326 | Stephan Kulow <coolo@kde.org> |
| 327 | Ioctls TIOCGPTN and TIOCSPTLCK |
| 328 | |
| 329 | Frank Zago <fzago@greshamstorage.com> |
| 330 | Various ioctls for the SCSI generic (sg) driver; these are now engaged. |
| 331 | |
| 332 | Harri Porten <porten@trolltech.com> |
| 333 | Fix "tiny omission" in debug outputs in vg_clientmalloc.c. |
| 334 | |
| 335 | Wolfram Gloger <wg@malloc.de> |
| 336 | mallopt returns 1 on success, not 0. |
| 337 | Implement __posix_memalign. |
| 338 | |
| 339 | Alasdair G Kergon <agk@arachsys.com> |
| 340 | Syscalls |
| 341 | setfsgid (139), setregid(71), setresuid(164), setfsuid(138). |
| 342 | (argc,argv,envp) hack: reject candidate alignments giving argc==0. |
| 343 | |
| 344 | Malte Starostik <malte@kde.org> |
| 345 | Various ioctls, including some ISDN ones. |
| 346 | |
| 347 | Richard Moore <rich@xmelegance.org> |
| 348 | Syscalls mlockall (152), munlockall (153), sched_get_priority_max (159), |
| 349 | sched_getscheduler (156), NR_sched_setscheduler (157). |
| 350 | Ioctl SG_IO. |
| 351 | Print ioctl numbers in hex. |
| 352 | |
| 353 | Me |
| 354 | Syscall _sysctl (149). |
| 355 | |
sewardj | 497e52a | 2002-03-30 02:02:04 +0000 | [diff] [blame] | 356 | Aaron M. Ucko <amu@alum.mit.edu> |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 357 | Use the size/dir info encoded in the top 16 bits of an ioctl number, |
| 358 | where appropriate. |
| 359 | |
| 360 | Dirk Mueller <dirk@kde.org> |
| 361 | Syscall setfsuid32 (215), and bazillions of ioctls, mostly linux |
| 362 | soundcard ones. |
| 363 | |
| 364 | Me |
| 365 | (following request from Dirk Mueller) |
| 366 | Rehash of context management system. Now --num-callers= accepts |
| 367 | values from 2 to 50. Also --leak-resolution=low|med|high adjusts |
| 368 | how the leak detector presents results. RTFM ... |
| 369 | |
| 370 | ----------------------------- 15 Mar 02 second snapshot (0315b) ------- |
| 371 | |
| 372 | Me |
| 373 | Allow suppression of invalid free and mismatching free errors. |
| 374 | |
| 375 | Resurrect the internal profiling stuff (VG_PROFILE) and then fail |
| 376 | to find anything obvious that I could speed up :-( |
| 377 | |
| 378 | Start playing with using AMD cache prefetch insns as described |
| 379 | in docs/techdocs.html. |
| 380 | |
| 381 | Wrap ioctl SNDCTL_DSP_GETSPDIF in #ifdef; apparently undefined in |
| 382 | RH 7.2. |
| 383 | |
| 384 | ----------------------------- 17 Mar 02 ------------------------------- |
| 385 | |
| 386 | Me |
| 387 | New flag -q --quiet, so it just prints error messages and nothing |
| 388 | else |
| 389 | |
| 390 | Experimental feature: allow clients to set/check memory range |
| 391 | permissions. Read documentation pertaining to the --client-perms |
| 392 | flag. |
sewardj | 7ed2615 | 2002-03-24 10:18:41 +0000 | [diff] [blame] | 393 | |
| 394 | ----------------------------- 19 Mar 02 ------------------------------- |
| 395 | |
| 396 | Harri Porten <porten@trolltech.com> |
| 397 | Syscalls fchown (95), fchown32 (207) |
| 398 | |
| 399 | Ulrich Drepper <drepper@redhat.com> |
| 400 | Syscall ftruncate64 (194) |
| 401 | |
| 402 | <hansen> (?? on irc; can't remember) |
| 403 | Syscall chown32 (212) |
| 404 | |
| 405 | Me |
| 406 | Modify implementation of "sahf" insn, so that the instrumenter |
| 407 | creates code which checks the definedness of just %AH rather than |
| 408 | all of %EAX. Fixes a spurious warning reported by Daniel |
| 409 | Veillard <veillard@redhat.com>. |
| 410 | |
| 411 | ----------------------------- 20 Mar 02 ------------------------------- |
| 412 | |
| 413 | Me |
| 414 | Allow suppressions with a single top-stack-frame spec, to help folks |
| 415 | who have to suppress errors in libraries compiled with |
| 416 | -fomit-frame-pointer. |
| 417 | |
| 418 | Implement x86 "das" insn. Stranger than strange. |
| 419 | |
| 420 | Adam Gundy <arg@cyberscience.com> |
| 421 | ioctls TCSETA, TCGETA. |
| 422 | |
| 423 | ----------------------------- 24 Mar 02 ------------------------------- |
| 424 | |
| 425 | Move to putting stuff in ChangeLog. This file finishes here. |