History log of /external/valgrind/coregrind/m_libcbase.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b3a1e4bffbdbbf38304f216af405009868f43628 21-Aug-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates, to include 2015. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
ad4e979f408239dabbaae955d8ffcb84a51a5c85 05-Jul-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Fixes BZ #349874


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15394 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
bb1a7873b2a2e8978c936ca822772256f4964b97 10-Mar-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for building with -fsanitize=undefined.
- add configure option --enable-ubsan
- add __ubsan helpers (by Julian)

This requires gcc 4.9.2 or later. Not all platforms are supported, though.
With this change and VEX r3099 regression tests pass on amd64
with a valgrind compiled with -fsanitize=undefined.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14995 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
10ef725f1e8e9f1615c483555348eb75b69c4713 27-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge revisions 14255, 14293, and 14294 from the BUF_REMOVAL branch to trunk.
The functions VG_(get_filename) and VG_(get_filename_lineno) now return
a pointer to filename and directory name instead of copying them into
buffers passed in from the caller.
The returned strings are persistent as long as the DebugInfo to which
they belong is not discarded. The caller therefore needs to stash them
away as needed.
Function VG_(strncpy_safely) has been removed as it is no longer needed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14668 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
70a5de1d6c1a5c74b91b564b0ead8ae8a460173c 22-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Enable -Wcast-qual when compiling the valgrind source.
Testcases are not compiled with -Wcast-qual.
Introduce CONST_CAST macro to work around in the few spots
where a cast that drops type qualifiers is needed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14652 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
ec905f7ed1659f2251045114c785659fbb11ea88 17-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> The attached patch cleanups the clo processing
of clo which are (or should be) 'enum set'.

* pub_tool_options.h : add new macrox VG_USET_CLO and VG_USETX_CLO to
parse an 'enum set' command line option (with or without "all" keyword).

* use VG_USET_CLO for existing enum set clo options:
memcheck --errors-for-leak-kinds, --show-leak-kinds, --leak-check-heuristics
coregrind --vgdb-stop-at

* change --sim-hints and --kernel-variants to enum set
(this allows to detect user typos: currently, a typo in a sim-hint
or kernel variant is silently ignored. Now, an error will be given
to the user)

* The 2 new sets (--sim-hints and --kernel-variants) should not make
use of the 'all' keyword => VG_(parse_enum_set) has a new argument
to enable/disable the use of the "all" keyword.

* The macros defining an 'all enum' set definition was duplicating
all enum values (so addition of a new enum value could easily
give a bug). Removing these macros as they are unused
(to the exception of the leak-kind set).
For this set, the 'all macro' has been replaced by an 'all function',
coded using parse_enum_set parsing the "all" keyword.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14301 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
9d1aeea1f0e7e08f4a96a0c0294d736bc00a4955 11-Aug-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Give static variable function scope.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14260 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
6625f7115ce012b84712770af22765c01f96ba44 29-Jul-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Back out r14186 as it was identified to have caused a performance regression.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14201 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
8f9b0d20a3452164ee7c6fb4492a6989aeefe772 25-Jul-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add LIKELY as suggested by Philippe.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14191 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
4f11c7fb16853af28a89a992dbca168427617873 24-Jul-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change VG_(strncpy_safely) to use VG_(strncpy) to get the same padding
behaviour.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14186 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
421c26e30de64ccf441ec398c1f8beda7afbb47c 24-Jul-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factor out VG_(exit_now) to contain the syscall incantation to terminate
the process. Make ML_(am_exit) and VG_(exit) use it, thereby avoiding
double maintenance.
Introduce libcbase_assert macro and use it in VG_(strncpy_safely) to
document the case that function cannot handle.
Add stub functions to memcheck/tests/unit_libcbase.c to satisfy new
dependencies.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14185 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
0c2923fb395e1dd3aa43e36d73a164e5718dcad6 19-Apr-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factorise enum set parsing code
* add a function Bool VG_(parse_enum_set) in pub_tool_libcbase.h/m_libcbase.c
(close to Bool VG_(parse_Addr)
* Implement Bool MC_(parse_leak_heuristics) and MC_(parse_leak_kinds)
as a call to VG_(parse_enum_set)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13898 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
5d616dfbb8439dfd51a40ddf1dba970938baa1eb 02-Jul-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r13421:HEAD from branches/DISRV. This merges the debuginfo-server
stuff into the trunk.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13440 a5019735-40e9-0310-863c-91ae7b9d1cf9
3e7986312a0ffc7646b0552d4c4ea3744a870e73 24-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix some casts that removed const-ness as pointed out by
GCC's -Wcast-qual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13138 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
6bd9dc18c043927c1196caba20a327238a179c42 23-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changes to allow compilation with -Wwrite-strings. That compiler option
is not used for testcases, just for valgrind proper.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13137 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
19f91bbaedb4caef8a60ce94b0f507193cc0bc10 10-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix more Char/HChar mixups. Closing in...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
660c5a4a6478ee40d9a810bcbb4859d7d411e835 18-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix some prototypes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13054 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
56ddd5b59ed16ee508e8c1567a23bf0557441a2e 27-Jul-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> micro-optimisation in m_libcbase.c cmp functions



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12790 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
aebbf1c8483de7ef7e5496f96ba4cb868342f439 13-Jun-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Try to handle LL caches which are of size 50% above a power of 2 (eg,
6MB, 12MB) and have a non-power-of-2 number of sets.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11812 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
3b290486cd4cd601b20e04340e593c9ed9717e5f 06-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
4634b01d127517e294766218ac4ded5f0c98e223 03-Nov-2009 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Rework VG_(memmove) in the case where the destination address is greater
that the source address to use the same logic as the mc_replace_strmem.c
version so that underflow is avoided. Fixes #211008.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10925 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
f76d27a697a7b0bf3b84490baf60623fc96a23af 28-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge the DARWIN branch onto the trunk.

I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts. So instead I just took the diff between
the branch and trunk at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
f9dcb3bf1aa5a0ddd984cb6ff901ecdc121a85c2 19-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Param names sync wibble.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9957 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
132fdb03f69d704bb4777831936e169bd2380242 26-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add more testing to memcheck/tests/unit_libcbase.c.

Remove VG_(strcmp_ws) and VG_(strncmp_ws); they're no longer needed by CLO
handling, and they're not much use elsewhere.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9270 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
83df0b67a14425c484d8dda42b53f3ff0b598894 25-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> atoll() is a terrible function -- you can't do any error checking with it.
Some of our option processing code uses it. This means that eg.
'--log-fd=9xxx' logs to fd 9, and '--log-fd=blahblahblah' logs to 0 (because
atoll() returns 0 if the string doesn't contain a number!)

It turns out that most of our option processing uses VG_(strtoll*) instead
of VG_(atoll). The reason that not all of it does is that the
option-processing macros are underpowered -- they currently work well if you
just want to assign the value to a variable, eg:

VG_BOOL_CLO(arg, "--heap", clo_heap)
else VG_BOOL_CLO(arg, "--stacks", clo_stacks)

else VG_NUM_CLO(arg, "--heap-admin", clo_heap_admin)
else VG_NUM_CLO(arg, "--depth", clo_depth)

(This works because they are actually an if-statement, but it looks odd.)

VG_NUM_CLO uses VG_(stroll10). But if you want to do any checking or
processing, you can't use those macros, leading to code like this:

else if (VG_CLO_STREQN(9, arg, "--log-fd=")) {
log_to = VgLogTo_Fd;
VG_(clo_log_name) = NULL;
tmp_log_fd = (Int)VG_(atoll)(&arg[9]);
}

So this commit:
- Improves the *_CLO_* macros so that they can be used in all circumstances.
They're now just expressions (albeit ones with side-effects, setting the
named variable appropriately). Thus they can be used as if-conditions,
and any post-checking or processing can occur in the then-statement. And
malformed numeric arguments (eg. --log-fd=foo) aren't accepted. This also
means you don't have to specify the lengths of any option strings anywhere
(eg. the 9 in the --log-fd example above). The use of a wrong number
caused at least one bug, in Massif.
- Updates all places where the macros were used.
- Updates Helgrind to use the *_CLO_* macros (it didn't use them).
- Updates Callgrind to use the *_CLO_* macros (it didn't use them), except
for the more esoteric option names (those with numbers in the option
name). This allowed getUInt() and getUWord() to be removed.
- Improves the cache option parsing in Cachegrind and Callgrind -- now uses
VG_(strtoll10)(), detects overflow, and is shorter.
- Uses INT instead of NUM in the macro names, to distinguish better vs. the
DBL macro.
- Removes VG_(atoll*) and the few remaining uses -- they're wretched
functions and VG_(strtoll*) should be used instead.
- Adds the VG_STREQN macro.
- Changes VG_BINT_CLO and VG_BHEX_CLO to abort if the given value is outside
the range -- the current silent truncation is likely to cause confusion as
much as anything.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9255 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
8a0b704426960219de9837deec266a208a924982 20-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> - Add 'unit_libcbase', the beginnings of a unit test module for m_libcbase.
- Rename 'oset_test' as 'unit_oset' to make its meaning more clear.
- Remove VG_(atoll36), VG_(strtoll8)() and VG_(strtoll36)(); they're not
used and so untested, but easy to crib from similar functions if they need
to be added again later.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9204 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
d7a02db0e48d2f7681a555a4594ff10f2ef54530 12-Dec-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a new module, m_seqmatch, which does very simple sequence (regexp)
matching, in the function VG_(generic_match). Patterns to be matched
against may contain only '*'-style wildcards (matches any number of
elements, we don't care what they are), '?' wildcards (matches exactly
one element, we don't care what it is) and literal elements.

It is totally abstractified, in the sense that the pattern and input
arrays may be arrays of anything. The caller provides enough
information so that VG_(generic_match) can step along both arrays, and
can ask the questions "is this pattern element a '*' ?", "is this
pattern element a '?' ?", and "does this pattern element match an
input element ?".

The existing function VG_(string_match) is reimplemented using
VG_(generic_match), although the ability to escape metacharacters in
the pattern string is removed -- I don't think it was ever used.

In m_errormgr, matching of suppression stacks (including wildcard
"..." lines) against error stacks is re-implemented using
VG_(generic_match).

Further detailed comments are in m_seqmatch.h and pub_tool_seqmatch.h.

A negative side effect is that VG_(string_match) will be much slower
than before, due to the abstractification. It may be necessary to
reimplement a specialised version later.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8816 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
4f2683ace412ca2c8266f2dd860dee4461df3caf 26-Oct-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update the C++ demangler to that from libiberty in the gcc svn trunk,
rev 141363.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8710 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
fab2990adf80eda44602e7024cf02108a5ce258a 03-Mar-2008 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> update comments



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7543 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
b8b79addf04dd5d0b558916e26df0b1927cbd758 03-Mar-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in the DATASYMS branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
bbec7728efefaa650970dd1f0282b77040287133 25-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Misc changes needed to support exp-drd (Bart Van Assche).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7213 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
7d9b3af56d1f31210684811fa8cad8c27b00d003 20-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> shut GCC up



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7189 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
ea5d2357bc8d93a8d796853e7f78db2927d47980 11-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add four 'strtoll' variants, which are like 'atoll' but let you detect if
the string converted wasn't entirely numeric. Using them for numeric
command-line options -- previously if you had a option "--foo=<n>", where
<n> is supposed to be an integer, then "--foo=blah" would be interpreted as
"--foo=0", because the "blah" would be converted to zero and the remaining
chars wouldn't be noticed.

Fixed an incorrect command-line option in two massif tests that this change
exposed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7149 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
25d7dfb102496d6432189290b9234dd19c6029ae 10-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Allow VG_(atoll16) to accept a leading "0x".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7125 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
5b410922c9d62daa5897a28c2146f7609f5db89e 22-Sep-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add VG_(atoll).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6899 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
085f9364d6b020317c0d5fe88a98e52f3ec5b389 08-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Specialise VG_(ssort) for 4-word elements. This removes about 80% of
all calls to VG_(memcpy). Thanks to cachegrind for showing somebody
was calling VG_(memcpy) a huge number of times, and to callgrind for
finding out who :-)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
cda391f285a5959c8df93f7edb183e2834b0e162 22-Dec-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add comment about log2().



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5408 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
3187a4e4b005377e66acfb248ca3b7e4050be3ed 05-Dec-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Defensive hacks to detect cases where V corrupts its own heap and/or
uses memory after freeing. Check the redzones for all non-client
frees, and fill all non-client freed areas with garbage. Unroll
VG_(memset) as a precautionary measure against performance lossage.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5283 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
151a639d523a1d9b4cbd6629992e48ed8ee9408e 11-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix compiler warnings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5083 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
45f4e7c91119c7d01a59f5e827c67841632c9314 27-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive). That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome. The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
and include it in a couple of places. Building etc seems to still
work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
stuff was moved from -generic to -linux after the branch was created.
I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
is strange, and makes it hard to diagnose regtest failures. In
particular memcheck/tests/x86/scalar.stderr.exp remains in a
conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable. I'll
attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
9828b349e92343c69a34036203c8cf47490b7e27 08-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a simple random number generator to m_libcbase so we don't have
to use the one from glibc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4130 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
c7561b931e249acf3768ead77638545b0ccaa8f1 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
9abd608244d8123868d027f616fa928156615d5a 17-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved the basic syscall stuff out of m_libcbase.c into a new module
m_syscall.c. Plus some associated cleanups.

Moved VG_(sigreturn) into m_signals.c and made it local.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3922 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
978c1b96bd3bc9d72ece4c83b02a1caac6742dc9 12-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Formatting wibble



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3899 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
e7aa4ae857ab875e6b673ad5a081ff6b1b697aec 09-Jun-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Clean up after m_syscalls changes: unbreak amd64-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3856 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
a8d8e239876796bc194636b8bb4b3b3c86db8528 07-Jun-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> A major overhaul of all machinery to do with syscalls, but mostly of
the m_syscalls module. Fundamentally the aim of the overhaul is to
clean up the logic and abstractions surrounding syscalls in order that
we can cleanly support ppc32 and other new targets. Aims in detail:

* To further decouple the syscall PRE/POST wrappers from specifics of
how those values are stored on a given platform. The wrappers look
the same as they did before, mostly (eg, references to ARGn and
RES are unchanged), but now those macros refer to values in structs
SyscallArgs and SyscallStatus (see priv_types_n_macros.h).

* Complete overhaul of the driver logic for syscalls. The resulting
logic is algorithmically identical to what we had before, but is
more documented, and deals with moving arg/result data between
platform specific representations and the canonical forms in
structs SyscallArgs and SyscallStatus.

* Also as a result of this change, remove problems in the old logic
due to assignments of RES in PRE wrappers trashing the ARGs whilst
we still need to see them.

* Lots of other cleanups and documentation. There is extensive
commentary in syscalls-main.c.

The driver logic has been placed in its own file, syscalls-main.c.

New/deleted files in m_syscalls:

* syscalls.c is divided up into syscalls-main.c, containing driver
logic, and syscalls-generic.c, containing generic Unix wrappers.

* priv_syscalls.h is chopped up into priv_types_n_macros.h
and priv_syscalls-{generic,main}.h.

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

All the above changes are in m_syscalls. However there is one
system-wide change as a result of all this.

The x86-linux assumption that syscall return values in the range -4095
.. -1 are errors and all others are values, has been done away with
everywhere. Instead there is a new basic type SysRes which holds a
system call result in a platform-neutral way.

Everywhere that previously an Int would have held a system call
result, there is now a SysRes in its place.

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

Almost everything works on SuSE 9.1 (LinuxThreads) again. NPTL will
still be majorly broken; I will commit fixes shortly. AMD64 is also
totalled. I will get to that too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3849 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
36a20fa5f779a0a6fb7b4a90dcaa6376481f1faa 03-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularise printing functions in m_libcprint.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3840 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c
97405b2d134b52880d6dbec3eb2929e2002c2542 02-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Started modularising vg_mylibc. Put all the standalone stuff -- ie. not
relying on any other modules -- in m_libcbase.

Also converted the 'size' parameters to functions like VG_(memcpy) and
VG_(strncpy) from Int to SizeT, as they should be.

Also removed VG_(atoll16) and VG_(toupper), which weren't being used.

Also made VG_(atoll36) less flexible -- it now only does base-36 numbers
instead of any base in the range 2..36, since base-36 is the only one we
need. As part of that, I fixed a horrible bug in it which caused it to
return incorrect answers for any number containing the digits 'A'..'I'!
(Eg. for "A; it would return 17 instead of 10!)

Had to disable the assertions in VG_(string_match), since this module can't
see vg_assert, which wasn't ideal but also isn't a disaster.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3838 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcbase.c