226 Commits

Author SHA1 Message Date
Julian Seward
aa02efa1a0 More symbol versioning stuff
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@250
2002-05-10 01:52:58 +00:00
Julian Seward
ee775d8b61 Add a version script so as to create the right versioned symbols for
libpthread.so.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@249
2002-05-10 01:42:33 +00:00
Julian Seward
6a123a63ea Build fixes for Red Hat 6.2.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@248
2002-05-10 00:46:59 +00:00
Julian Seward
d71098cf53 More IOCTL futzing from Reuben Thomas.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@247
2002-05-09 18:40:45 +00:00
Julian Seward
ba6a5f6242 Minor ioctl fixes from Reuben Thomas.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@246
2002-05-09 17:56:57 +00:00
Julian Seward
11f71832b9 Make sense of, and clean up, shmctl wrapper. (Reuben Thomas).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@245
2002-05-09 17:45:06 +00:00
Julian Seward
5bf4e3319d Remove valgrind's use of libc-supplied stat() and sbrk(). Now the only
sysbols we need from libc are __umoddi3 and __udivdi3 ; other than that
valgrind.so is completely self-contained.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@244
2002-05-09 17:38:13 +00:00
Nicholas Nethercote
74bb5ef434 Minor corrections about cache profiling cost centres.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@243
2002-05-09 15:43:33 +00:00
Julian Seward
fc18649d8a Reinstate a condition in the IPCOP_shmctl wrapper without which the
system dies to the recently-rejuvenated
first-and-last-secondaries-look-plausible assertions around syscalls.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@242
2002-05-09 12:01:14 +00:00
Julian Seward
564a510b88 Fix assertions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@241
2002-05-09 11:03:57 +00:00
Julian Seward
5c7db51c11 ---> 20020509
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@240
2002-05-09 02:38:18 +00:00
Julian Seward
d8d97d9e36 Fix off-by-one error in definition of MAX_LINENO and MAX_LOC_SIZE.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@239
2002-05-09 01:32:57 +00:00
Julian Seward
44f0d41089 Yesterday's push/pop merging optimisations break the cache profiler:
vg_cachesim.c:536 (vgPlain_cachesim_instrument):
    Assertion `instr_size >= 1 && instr_size <= 16' failed.
so disable them when cache profiling.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@238
2002-05-08 21:26:01 +00:00
Julian Seward
8b15df18c2 Change _pthread_cleanup_push and _pthread_cleanup_pop into no-ops
rather than aborts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@237
2002-05-08 14:08:22 +00:00
Julian Seward
9518212384 Do __pthread_initialize.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@236
2002-05-08 02:01:14 +00:00
Julian Seward
9bcb60e01a Complain about NVidia's libGL.so also when an 0x8C opcode is encountered.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@235
2002-05-08 01:58:18 +00:00
Julian Seward
257b64c505 Implement SBB Ib, AL.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@234
2002-05-08 01:44:03 +00:00
Julian Seward
4ce9c33335 Do LODSW / LODSL. (Sami Farin)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@233
2002-05-08 01:38:43 +00:00
Julian Seward
f1ce22b738 More shmctl() fixes. (Helge Deller)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@232
2002-05-08 01:31:15 +00:00
Julian Seward
9a320a2d83 --> 20020508
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@231
2002-05-08 01:29:53 +00:00
Julian Seward
68a929a7ca Only show the giant-basic-block message at verbosity >= 2.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@230
2002-05-08 00:42:25 +00:00
Julian Seward
ef33a1672e Improvements to the error-collecting machinery:
- Don't waste a potentially huge amount of time calling describe_addr
  on addresses in errors we aren't going to show.

- If an invalid address is just below %ESP, say that it might be due
  to a gcc bug.  Increase the window in which this is allowed to
  1024 bytes below %ESP.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@229
2002-05-08 00:32:50 +00:00
Julian Seward
b9c76f1080 Actually call VG_(first_and_last_secondaries_look_plausible) and make
assertions about the return value, rather than asserting the
non-NULL-ness of the function's address :) Classic beginner's mistake,
compounded by C's crappy (non-existent) type system, which allows me
to silently confuse Bool with Pointer-to-Function.  What a great
programming language.  Come back Haskell, all is forgiven.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@228
2002-05-07 23:45:03 +00:00
Julian Seward
6a3788061f Generate better ucode for back-to-back sequences of register pushes and
pops, as appear at function prologues/epilogues.  Specifically, update %ESP
just once for the whole sequence.  This reduces by about 20% the number
of calls to handle_esp_assignment (for kate in KDE 3.0, -O), which is a
good thing since that is quite expensive.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@227
2002-05-07 23:38:30 +00:00
Nicholas Nethercote
53d40a27da vg_symtab2.c:
- No longer aborting when encountering a N_SOL symbol after the 65535th
      line in a file, just printing a warning/apology that annotations/messages
      might be wrong.

      This is a pain to fix properly, since it requires first guessing when a
      line number overflow happens, then switching to one or more other files,
      then switching back.

manual: wibble


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@225
2002-05-07 10:26:57 +00:00
Julian Seward
37f7143de6 Minor profiling improvements. Add a couple of cost centers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@223
2002-05-07 09:25:30 +00:00
Julian Seward
d40d16f01b ---> 20020305b
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@215
2002-05-04 19:49:49 +00:00
Julian Seward
15f93fef49 Fix from Lionel Ulmer to not have an infinite loop/stack overflow
with sigaction on glibc 2.1.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@214
2002-05-04 19:49:21 +00:00
Julian Seward
3cc89028c1 Fix really stupid use of uninitialised value introduced in rev 1.8.
Basically this bug invalidates all snapshots from 0501 until now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@212
2002-05-04 12:59:03 +00:00
Julian Seward
a472d679d9 glibc 2.1.3 compile fixes (Lionel Ulmer).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@211
2002-05-04 10:28:17 +00:00
Julian Seward
b8da65e6bd External namespace cleanup.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@210
2002-05-03 22:29:04 +00:00
Julian Seward
9a931de290 ---> 20020503
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@209
2002-05-03 21:29:55 +00:00
Julian Seward
78073f1e74 Implement sched_setparam(), sched_getparam() and sched_yield()
(Helge Deller)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@208
2002-05-03 21:18:11 +00:00
Julian Seward
8dd0233bec Implement chroot(). (Paul Fox)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@207
2002-05-03 21:07:55 +00:00
Julian Seward
a2e6a01f5c From: Tom Hughes <thh@i'm sure he doesn't want to be spammed.com>
The attached patch improves the validation done on sockaddr structures
passed to systems calls by extending the existing code for AF_UNIX to
cover AF_INET and AF_INET6 as well so that errors are not raised when
an unused part of the sockaddr structure is not filled in.

It also applies this new code to bind and sendto as well as connect.

Tom


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@206
2002-05-03 21:01:35 +00:00
Julian Seward
95a32b6cd6 Improve accuracy of simulation of bsf/bsr instructions when the word
being scanned is zero.  (Zoltan Hidvegi)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@205
2002-05-03 20:52:53 +00:00
Julian Seward
be21872520 Various cleanups following earlier exit fixes. Also add boilerplate
copyright notices.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@204
2002-05-03 20:43:10 +00:00
Julian Seward
3a27858aea Change the way Valgrind exits.
Until now, valgrind waited for ld.so to call the .fini code in
valgrind.so, and took this as its cue to switch back to the real CPU
for the rest of the journey.

This is a problem if ld.so subsequently calls other .so's .fini code
and threading is in use, because they do pthread_* calls which cannot
be handled by valgrind's libpthread.so without valgrind actually being
active.

So we ignore the call to valgrind's .fini code, and run the program
all the way up to the point where it calls syscall exit() to
disappear.  This makes the order in which the .fini sections are run
irrelevant, since Valgrind has control during all of them, and so
threading facilities are still available for all of them.

This change means Mozilla 1.0RC1 now exits a lot more cleanly than it
did.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@201
2002-05-03 19:09:05 +00:00
Julian Seward
7ec28cebfe Reduce TT size to 32M (was 40M for Mozilla's benefit). 40 M is just
ridiculous overkill for most "normal" apps.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@200
2002-05-03 18:59:21 +00:00
Nicholas Nethercote
ea2c63ce9e Removed description of cachegrind.out file format, since it's now in the tech
docs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@199
2002-05-03 17:54:51 +00:00
Nicholas Nethercote
ece0587a11 Added section to tech docs on how cachegrind works, including the
cachegrind.out file format.

Tiny change in user manual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@198
2002-05-03 17:51:10 +00:00
Nicholas Nethercote
c501c4beaf vg_symtab2.c:
- Can now handle file sizes > 65536 lines, despite the stabs format only
      storing line numbers in a short.  Do this heuristically, by looking for
      line number sequences that go from 65000-odd to 0-odd within the same
      file.

      This required changing the RiLoc.lineno field to 20 bytes, which gives a
      maximum file length of 1,000,000-odd lines, whichs seems reasonable.

      In order to keep RiLoc at 12 bytes (important because there are lots of
      them) this required stealing four bits from the RiLoc.size field,
      reducing it to 12 bits.  This isn't too bad because the size is unlikely
      to be larger than 4096 bytes -- we were already ignoring any ones larger
      than 10,000 bytes because they were suspicious anyway (and see next
      point).

    - Tightened up the sanity checking on line address ranges.  Previously any
      range that looked suspicious (eg. > 10000 bytes, or not within the bound
      of the segment info) was simply ignored(!)  Now it prints a warning when
      this happens and truncates the size to 1 to be safe;  also there are some
      extra assertions for totally space-cadet numbers.

      (At first these checks were all assertions, but I tried a version of GNU
      gas that produces a small handful of dodgy stabs entries;  warnings
      seemed a reasonable compromise.)

vg_cachesim.c:
    - Removed the requirement that both types of cost centre (iCC, idCC) have
      instr_addr as their second word.  Less fragile -- now the only
      requirement is that they both have their type tag as their first byte.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@197
2002-05-03 16:41:05 +00:00
Nicholas Nethercote
6503fcaf5a Added "L2 refs line" (an oversight).
Fixed minor output summary spacing wibble.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@196
2002-05-02 13:56:34 +00:00
Julian Seward
892eb8f8fc Remove comments about Mozilla 1.0RC1 crashing, since that's not a Valgrind
bug, and explain, for the benefit of Mozilla hackers, how to make 1.0RC1
work on Valgrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@195
2002-05-02 03:57:00 +00:00
Julian Seward
879db79c47 ---> 20020502
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@194
2002-05-02 03:47:32 +00:00
Julian Seward
72c633f338 Jack up the size of the translation cache from 16 MB to 40 MB (!).
This is needed to give reasonable behaviour for the insanity of a
Mozilla debug build, apparently even worse than the insanity of a
KDE 3 debug build.  Change some limit calculations to use double
rather than int, so as to avoid overflows.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@193
2002-05-02 03:47:01 +00:00
Julian Seward
feacb67fb2 Improve my implementations of strcmp() and memcpy() since Nick's profiler
indicates that KDE apps spend 20% of their simulated insns in these two
functions alone.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@192
2002-05-01 23:05:12 +00:00
Dirk Mueller
303554e3ad fix for auto-annotating C++ method names (they have :'s in it)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@191
2002-05-01 21:52:05 +00:00
Julian Seward
50ca1d2fc2 Fix free and free-mismatch err so the top frame in the bt isn't skipped.
Put a better example of free-mismatch error in the manual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@190
2002-05-01 21:46:38 +00:00
Julian Seward
6b485c7718 Bring manual up-to-date and add stuff about pthread support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@189
2002-05-01 12:38:06 +00:00