265 Commits

Author SHA1 Message Date
Nicholas Nethercote
4e8bcf9076 Move the last remaining tests out of corecheck.
Also introduced VG_(showing_core_errors)() to make core error display
more consistent.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4073
2005-07-01 04:15:36 +00:00
Julian Seward
2d19fe5d84 Update expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4071
2005-06-30 23:32:30 +00:00
Julian Seward
c53b36df0f Update expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4069
2005-06-30 12:40:17 +00:00
Nicholas Nethercote
b5a0177d11 Allow for glibc-2.4.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4063
2005-06-30 04:06:38 +00:00
Nicholas Nethercote
7a954963d7 Try to make toobig-allocs work on 64-bit platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4061
2005-06-30 02:34:32 +00:00
Donna Robinson
b655e45a8e argh! there were loads of the little beggars ....
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3999
2005-06-23 00:17:51 +00:00
Nicholas Nethercote
514f201d55 Added VG_() prefixes to functions exported from m_ume to avoid
namespace pollution.

Also broadened a couple of _dl_* suppressions so that vgtest_ume
passes on my machine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3993
2005-06-21 23:03:36 +00:00
Cerion Armour-Brown
d5f7c8aed3 Finally, valgrind on ppc32.
Plenty still to do, but simple programs like ls seem to run ok

Thanks, Paul, for having your ppc port of valgrind 2.4 to work from!




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3969
2005-06-20 15:51:07 +00:00
Julian Seward
a7d31aa20e Get rid of the ELFSZ define, which is created at the configure stage
and use VG_WORDSIZE, as that is used everywhere else.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3952
2005-06-19 16:14:06 +00:00
Nicholas Nethercote
b2f4f4cba0 Get "make dist" closer to working again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3946
2005-06-19 05:43:21 +00:00
Nicholas Nethercote
f174930b23 Final commit for the initial modularisation pass:
- Broke part of m_scheduler off into a new module m_threadstate.  It
  contains ThreadState, VG_(threads)[] and some basic operations on the
  thread table.  All simple stuff, the complex stuff stays in m_scheduler.
  This avoids lots of circular dependencies between m_scheduler and other
  modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
  include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944
2005-06-19 01:24:32 +00:00
Robert Walsh
d9cbc3ffec Fix x86_64 build.
Also fix vgtest_ume (although it fails on x86_64.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3943
2005-06-18 18:58:14 +00:00
Nicholas Nethercote
a0a6af2854 Make the stage2.lds building platform-independent by not trying to match
an exact address (idea from Paul Mackerras' PPC port).  Thus it could be
moved into coregrind/Makefile.am.

Let me know if this breaks anything on other platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3939
2005-06-18 16:41:30 +00:00
Nicholas Nethercote
67424caf39 Fix strchr. It was rather bogus.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3921
2005-06-17 19:28:29 +00:00
Nicholas Nethercote
c9a033dc8c Forgot to add strchrc.stderr.exp.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3918
2005-06-16 13:14:51 +00:00
Nicholas Nethercote
3ae4d1a0ab A cleanup of the redirection stuff.
- Renamed VG_INTERCEPT as VG_REPLACE_FUNCTION to make its purpose
  clearer.

- Renamed VG_WRAPPER as VG_NOTIFY_ON_LOAD to make its purpose cleare.
  Started calling that stuff "load notification".

- Moved various things into m_redir.c, a much more sensible place for
  them.  This reduced the number of exported functions overall.  Renamed
  intercept_demangle() as Z_decode() as part of this.

- Improved the documentation of this stuff, especially in
  pub_core_redir.c.

- Got --run-libc-freeres=yes working again.  It was doing nothing.

- Renamed vg_inject.so as vg_preload_core.so to match
  vg_preload_<tool>.so

- Renamed vg_intercept.c as vg_preloaded.c.  (I kept the "vg_" prefix
  because this filename can appear in stack traces, so the "vg_" is a
  useful hint for users that it belongs to Valgrind.)

- Removed all the Memcheck-specific calls to add_redirect_sym_to_sym()
  from VG_(setup_redirect_table)(), instead using VG_REPLACE_FUNCTION in
  mac_replace_strmem.c, just like vg_replace_malloc.c.  This is the
  right way to do it.  This required moving some of
  coregrind/pub_core_redir.h into the newly added
  include/pub_tool_redir.h.  add_redirect_sym_to_sym() is no longer
  used...

- Now only handing off symbols to m_redir for inspection/decoding after
  they have been deemed to be interesting by the symbol table reader.

- Factored out commonality between the add_redirect_*_to_* functions
  into add_redirect_X_to_X().

- Added "Zh", meaning '-' ('h' for "hyphen"), to the Z-decoding scheme,
  to handle sonames like "ld-linux-x86-64.so.2".

- Added a FAQ explaining the newly found issue of glibc aliasing 
  sometimes causing the wrong function name to appear in stack traces.

- Added a new regtest strchr.c.  It's possible this will fail on some
  platforms.  If so, an alternative output file can be provided, but
  I'd like to see it in practice first.

It's possible that there will be minor breakage on other
platforms/setups, but it should be minimal and easily fixable.

Plus some ordinary cleanups in symtab.c:

- Removed the old optimisation from VG_(addStr)() whereby it kept track
  of the previous 5 added strings and avoiding duplicating any of them.
  Turns out it was barely having any effect any more, and just
  complicated things.

- Made read_symtab() more readable, by introducing a new variable
  "sym_name" and introducing the auxiliary function
  is_symbol_interesting().

- renamed the module variable 'segInfo' as 'segInfo_list' to make it
  more obvious it's a module variable and not just some ordinary local
  variable (which was an easy mistake to make).

-----------------------------------------------------------------------------

XXX: [later] remove add_redirect_sym_to_sym, and everything related to
     X_to_sym?  (ie. only need X_to_addr)

XXX: better function names?  all those 'resolved' names...
     [later...]




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3916
2005-06-16 03:56:58 +00:00
Julian Seward
d0029796b7 Update expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3915
2005-06-15 21:34:35 +00:00
Nicholas Nethercote
1d0e2e6e41 Created m_machine, for various machine-related things.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3903
2005-06-13 04:21:38 +00:00
Julian Seward
2541030659 Update expected outputs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3866
2005-06-10 10:25:02 +00:00
Julian Seward
60f21ea327 More expected outputs for FC4.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3827
2005-05-31 20:01:34 +00:00
Julian Seward
d905bd778e Expected outputs on Fedora Core 4.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3826
2005-05-31 19:49:28 +00:00
Nicholas Nethercote
5198d87cbe Renamed the $PLATFORM/vki_unistd.h files as vki_unistd-$PLATFORM.h, to
match the headers files in include/.

As a consequence, coregrind/$PLATFORM directories are no longer needed,
hooray!





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3814
2005-05-29 23:30:48 +00:00
Julian Seward
2ad0acd102 amd64-linux output
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3798
2005-05-24 15:09:14 +00:00
Julian Seward
677d0d746e More XML output futzing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3797
2005-05-24 15:00:55 +00:00
Julian Seward
01383ef160 Test XML output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3796
2005-05-24 14:46:02 +00:00
Tom Hughes
2713ff3519 Use longs to get the error counts as valgrind will expect to return a
machine word. Based on diagnosis by Robert Walsh <rjwalsh@durables.org>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3792
2005-05-24 07:22:13 +00:00
Tom Hughes
9e1e1a37d6 Use EOL as the termination condition so that we terminate correctly
on 64 bit systems. Patch from Robert Walsh <rjwalsh@durables.org>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3791
2005-05-24 07:21:22 +00:00
Julian Seward
7e143bf34f Add another possible output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3783
2005-05-23 14:02:51 +00:00
Julian Seward
637c341f56 64-bit fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3685
2005-05-12 18:02:50 +00:00
Julian Seward
232a4a67f8 Another expected output file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3684
2005-05-12 18:02:01 +00:00
Julian Seward
81307e483b 64-bit fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3683
2005-05-12 18:01:15 +00:00
Nicholas Nethercote
c9134db6ec Try to fix this test case.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3624
2005-05-06 15:11:04 +00:00
Julian Seward
93d542f1d9 Add expected output file for 64-bit platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3621
2005-05-05 01:37:46 +00:00
Julian Seward
9f22797506 Add expected output files for 64-bit platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3620
2005-05-05 01:32:24 +00:00
Julian Seward
5c34e62c3b Add expected output files for 64-bit platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3619
2005-05-05 01:29:11 +00:00
Julian Seward
af4afafd2a Add expected output files for 64-bit platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3618
2005-05-05 01:23:50 +00:00
Julian Seward
bf6bf8fbbe Move all the 'scalar' (syscall-arg) tests into x86/. In fact they are
really x86-linux specific, but fixing it all properly will have to
wait for another day.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3615
2005-05-04 13:53:00 +00:00
Julian Seward
faa09bd038 Add a new acceptable-output file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3613
2005-05-04 12:27:48 +00:00
Julian Seward
f9b54012bf Move this test to a more sensible place. Originally it was intended
to check that the threading library hadn't messed up errno.  Now that
doesn't make much sense any more.  Anyway, now it annoyingly fails due
to memcheck reporting bugs in libpthread et al.  Move it to corecheck
so at least it can continue to run and hopefully not continually fail.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3611
2005-05-04 00:26:57 +00:00
Julian Seward
af48fdcbc2 Disable this test for the time being, since the functionality it tests
is currently commented out, and may eventually disappear entirely.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3607
2005-05-03 17:45:20 +00:00
Julian Seward
8cc6d78dc7 Fix expected output. It could be that having CFI-based tracebacks
made the stack traces in the error messages less crappy.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3606
2005-05-03 17:36:08 +00:00
Nicholas Nethercote
1826c24b7f Bah, get the compiler-warning avoidance right this time.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3422
2005-03-24 04:41:16 +00:00
Nicholas Nethercote
3f724359ac Avoid compile warning.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3420
2005-03-24 04:39:33 +00:00
Julian Seward
2e5e444f34 amd64-linux build fix
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3412
2005-03-23 13:09:55 +00:00
Julian Seward
cdb6df5b59 Track recent jmp_with_stack hackery.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3405
2005-03-22 02:43:14 +00:00
Julian Seward
2eb10d8e1c Add another possible .stderr output for memcheck/tests/writev.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3379
2005-03-16 13:10:44 +00:00
Julian Seward
bdca1d1f3d Remove pth_once from memcheck/tests. It already exists in
corecheck/tests and there is no point in duplicating it.  Given that
it was intended to check the behaviour of our now-defunct pthread
implementation there's not much point in keeping it at all.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3378
2005-03-16 12:37:30 +00:00
Julian Seward
d56fb1f475 Update expected outputs to include missing stack frames that old UCode
machinery caused to be missed due to not keeping %EBP up to date.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3375
2005-03-16 11:55:34 +00:00
Nicholas Nethercote
3b6dc1d548 Make scalar.c slightly more robust against certain kinds of failures.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3372
2005-03-16 03:29:08 +00:00
Nicholas Nethercote
05cbc6b2e1 Tweak manuel2 so that the Memcheck-detected error is more reliable, and that
we never accidentally also get an undefined-condition-error.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3371
2005-03-16 03:07:33 +00:00