of other tidying too.
* All these word-based abstractions (WordFM, WordSet, WordBag) now
operate on unsigned words (UWord), whereas they previously operated
on signed words (Word). This became a problem, when using unboxed
comparisons, with the introduction of HG_(initIterAtFM), which
allows iteration over parts of mappings. Iterating over a mapping in
increasing order of signed Word keys is not what callers expect when
iterating through maps whose keys representing addresses (Addr) since
Addr is unsigned, and causes logical problems and assertion
failures.
* Change various size-of-things types from signed to unsigned, and
make them consistently word sized. For example the return type
of HG_(sizeFM) used to be an Int, which never made any sense
(the size can't be negative, and, on a 64-bit platform, the
map could have more than 2G elements, in which case an Int can't
represent the result). So make the return value a UWord instead.
This should generally help avoid obscure overflow problems on 64-bit
platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7409
- Fix helgrind/tests/tc18_semabuse.c on glibc 2.7 (RedHat 8).
- Fixed a glibc 2.7 specific assertion failure in exp-drd, namely one
that was triggered when sem_post()'s return value is not zero.
- exp-drd/test/matinv.c compiles now also on RedHat 7.3.
Note: more work will be required to get exp-drd working correctly on
RedHat 7.3.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7354
values below a given value. This allows efficiently iterating over
small subsets of a mapping. Use this in Helgrind to avoid a
performance bad case. Patch from Konstantin Serebryany.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7353
this does not always produce correct results. Instead use a slower
but correct method. Analogous fix to that applied to m_oset.c by
r7283.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7284
aliasing rules by casting through (char*) as an intermediate type,
rather than through (void*). This seems at least moderately
justifiable since the ANSI C standard explicitly says that any object
may be accessed through a char pointer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7141
Allow hashtables to dynamically resize (patch from Christoph
Bartoschek). Results in the following interface changes:
* HT_construct: no need to supply an initial table size.
Instead, supply a text string used to "name" the table, so
that debugging messages ("resizing the table") can say which
one they are resizing.
* Remove VG_(HT_get_node). This exposes the chain structure to
callers (via the next_ptr parameter), which is a problem since
callers could get some info about the chain structure which then
changes when the table is resized. Fortunately is not used.
* Remove VG_(HT_first_match) and VG_(HT_apply_to_all_nodes) as
they are unused.
* Make the iteration mechanism more paranoid, so any adding or
deleting of nodes part way through an iteration causes VG_(HT_next)
to assert.
* Fix the comment on VG_(HT_to_array) so it no longer speaks
specifically about MC's leak detector.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6778
post_mutex_unlock. The core can't detect them anyway any more, so
there's no point in having them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6456
Makefile.am changes for AIX5. Almost all boilerplate stuff fitting in
with the existing factorisation scheme. The only change of interest
is that configure.in now generates automake symbols of name
VGP_platform and VGO_os, whereas previously it just made VG_platform
which was a bit inconsistent with the VGP/VGO/VGA scheme used in C
code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6242
interface, except for the syscall numbers, into that. Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.
include/pub_tool_basics.h previously dragged in the entire kernel
interface. I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly. This is why there are many modified .c files -- they have
all acquired an extra #include line.
This certainly breaks all platforms except x86. Will fix shortly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225
Instrumentation functions now take a callback closure structure
(VgCallbackClosure*), so this commit changes the signatures
accordingly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5535