- Change various incorrect direct references to errno into
*(__errno_location()).
- In __errno_location and __h_errno_location, treat the tid==1 case
(root thread) specially, as with __res_state().
This seems to fix a bug in threaded handling of errno on R H 9 and SuSE8.2,
and almost makes OpenOffice work again on R H 9.
MERGE TO STABLE, if it doesn't break anything.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1625
Hi,
recently I found that there is sometimes cost attributed to some
strange lines (with cachegrind/calltree) with GCC 3.x (using the
DWARF2 debug info format).
I had time to look at this. There is a bug in the DWARF2 debug line
info loader when instructions following each other have source lines
far from each other (e.g. with inlined functions).
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1619
under some setups.
Also fixed problem with Cachegrind tests, by filtering out P4s'
warning message.
Also fixed 'mismatches'.
------------------------------------------------------------
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1616
requiring "make install". This is good for two reasons:
1. shorter compile times ("make" instead of "make install")
2. don't need to install before running the regression tests
Changes:
- root Makefile now builds a libpthread.so.0 symlink to libpthread.so, which
was needed.
- startup script accepts a --in-place=<dir> option for running a non-installed
version, where <dir> is the root of the src tree
- VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH) had to be fiddled with a bit
- tests/vg_regtest now uses the --in-place option to test the non-installed
version
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1614
because there was no point exposing them to clients, as they don't know the
ThreadState type.
Also, removed the LOGMESSAGE request type, replaced it with calls to
VG_(message) via the generic VALGRIND_NON_SIMD_CALL2.
In fact, almost every single pthread client request could be removed in this
same way. That would result in less code, which would be nice... yeah, real
nice.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1584
recordable, etc. Thanks to Tom Hughes <thh@cyberscience.com> for the patch.
Also fixed a minor bug in the reporting -- the src/dst pointers given for
strncat(), strcpy(), strcat().
And I updated the relevent regression test.
And I even added relevant documentation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1582
- getcwd() now uses the result for the post_mem_write length rather than
the argument, which would have over-estimated
- accept(), recvfrom() and getsockopt() can now all take NULL buffers (which
are quite legitimate) without Memcheck giving spurious errors
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1579
#defined constants. I hope I got all the right places. I also hope that they
can be different sizes; experiments seem to indicate so. Also if I reduce the
size of the main stack at all below its current 10000 I get problems, but that
was happening before anyway, I think.
Julian, you may want to sanity check this.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1577
the output file wouldn't get written. No longer creating the file at startup
and then writing it at the end; just writing it at the end. Also recording
the start directory at the start so that the output ends up in it even if the
program does change directory.
Had to add VG_(getcwd)() to vg_mylibc.c for this.
Added a regression test for it too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1576
("if (0)"'d it out).
2. Fixed the SSE state alignment in the baseBlock -- it worked for Memcheck,
Nulgrind and Corecheck, but not for Addrcheck, Cachegrind, Lackey, Helgrind,
due to variable numbers of shadow registers and registered compact helpers
coming before the SSE/FPU state.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1575
to include the SSE/SSE2 architectural state. Automagically detect
at startup, in vg_startup.S, whether or not this is a SSE-enabled
CPU and act accordingly. All subsequent FPU/SSE state transfers
between the simulated and real machine are then done either with
fsave/frstor (as before) or fxsave/fxrstor (the SSE equivalents).
Fragile and fiddly; (1) the SSE state needs to be stored on a 16-byte
boundary, and (2) certain bits in the saved MXCSR reg in a state
written by fxsave need to be anded out before we can safely restore
using fxrstor.
It does appear to work. I'd appreciate people trying it out on
various CPUs to establish whether the SSE / not-SSE check works
right, and/or anything else is broken.
Unfortunately makes some programs run significantly slower.
I don't know why. Perhaps due to copying around more processor
state than there was before (SSE state is 512 bytes, FPU state
was only 108). I will look into this.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1574
- don't keel over if run on an empty file
- abort if the "summary:" line is missing; previously it gave a warning
and tried to keep going but then other things broke.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1572
startup. I don't know if this is actually of interest, since surely
the flags are not live at the point where the section's .init function
is called, but still, it's a form of state pollution.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1570
is exiting normally. There's no point, and it causes breakage when
programs which write their environment variables, finish normally.
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1567
Read symbols from both "symtab" and "dynsym" sections, rather than
merely from the one that comes last in the file.
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1562
NPTL support.
The behaviour of weak vs strong symbols seems to have changed in
glibc-2.3.2. This caused problems in coregrind/vg_intercept.c,
wherein strong symbols in vg_libpthread.c were intended to
override weak symbols in vg_intercept.c, in order to give alternative
thread-safe implementations of some functions, poll(), select(), etc.
The change involves moving the nonblocking implementations of poll, etc
into vg_intercept.c, renaming them to (eg) VGR_(poll), and routing
all calls to poll to VGR_(poll) [dually for other such fns]. This
means even single-threaded programs now use these functions, but
that doesn't strike me as harmful.
MERGE TO STABLE, if it doesn't break anything
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1559
Fixed bug in strncpy() and strncat() -- they were giving the right answers, but
could read the (n+1)th char, which could possibly be inaccessible. Thanks to
Adam Gundy <arg@cyberscience.com> for spotting it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1557
installed, as it was silly since the reg tests themselves aren't installed.
Updated the "make regtest" target to use the uninstalled version in tests/.
Also, vg_regtest now no longer uses the installed version of Valgrind to do the
testing, but instead coregrind/valgrind. This means that you don't have to do
make install with your buggy changes before running the regtests on them :)
I even updated the RPM package .spec file!
Thanks to Dirk M�ller for the suggestion.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1551