History log of /external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.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_syswrap/syswrap-x86-darwin.c
b26101c4d128f0bfed780434c4e4f8d67f8aeee4 08-Aug-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15510 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.c
4432618e4e47c09d3ab576e64cf5858e3086434b 12-Jul-2015 rhyskidd <rhyskidd@a5019735-40e9-0310-863c-91ae7b9d1cf9> OS X 10.11: Tweak magic offset, which was amended prior to xnu-3247.1.36~7 (DP3). Also align some debug output text between x86 and amd64. bz#348909.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15411 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.c
9090d2f691fd59c3a67c55e74f3c66c9c5671b01 08-Jul-2015 rhyskidd <rhyskidd@a5019735-40e9-0310-863c-91ae7b9d1cf9> Preliminary support for OS X 10.11 (El Capitan). Refer BZ#348909 for ongoing work.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15403 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.c
faaf86055a7af8ff13c591cdf692724aab94c960 18-Apr-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove a few unneeded header files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15111 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.c
bfe3813bc23c690b51d4322e5c2e8634bddf6afd 26-Jan-2015 rhyskidd <rhyskidd@a5019735-40e9-0310-863c-91ae7b9d1cf9> Partial fix for bz339745. Mac OS: Further progress worker queue thread support. Additional magic constants have been checked against OS X 10.9 and 10.10

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14888 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.c
38a74d2cc4670e3eb559adff51a376cd6ec98005 30-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> The semantic of the stack bounds is not consistent or is not described.
At various places, there were either some assumption that the 'end'
boundary (highest address) was either not included, included,
or was the highest addressable word, or the highest addressable byte.
This e.g. was very visible when doing:
./vg-in-place -d -d ./helgrind/tests/tc01_simple_race|&grep regi
giving
--24040:2:stacks register 0xBEDB4000-0xBEDB4FFF as stack 0
--24040:2:stacks register 0x402C000-0x4A2C000 as stack 1
showing that the main stack end was (on x86) not the highest word
but the highest byte, while for the thread 1, the registered end
was a byte not part of the stack.

The attached patch ensures that stack bounds semantic are documented and
consistent. Also, some of the stack handling code is factorised.

The convention that the patch ensures and documents is:
start is the lowest addressable byte, end is the highest addressable byte.
(the words 'min' and 'max' have been kept when already used, as this wording is
consistent with the new semantic of start/end).

In various debug log, used brackets [ and ] to make clear that
both bounds are included.

The code to guess and register the client stack was duplicated
in all the platform specific syswrap-<plat>-<os>.c files.
Code has been factorised in syswrap-generic.c

The patch has been regression tested on
x86, amd64, ppc32/64, s390x.
It has been compiled and one test run on arm64.
Not compiled/not tested on darwin, android, mips32/64, arm


More in details, the patch does the following:

coregrind/pub_core_aspacemgr.h
include/valgrind.h
include/pub_tool_machine.h
coregrind/pub_core_scheduler.h
coregrind/pub_core_stacks.h
- document start/end semantic in various functions
also in pub_tool_machine.h:
- replaces unclear 'bottommost address' by 'lowest address'
(unclear as stack bottom is or at least can be interpreted as
the 'functional' bottom of the stack, which is the highest
address for 'stack growing downwards').
coregrind/pub_core_initimg.h
replace unclear clstack_top by clstack_end
coregrind/m_main.c
updated to clstack_end

coregrind/pub_core_threadstate.h
renamed client_stack_highest_word to client_stack_highest_byte
coregrind/m_scheduler/scheduler.c
computes client_stack_highest_byte as the highest addressable byte
Update comments in call to VG_(show_sched_status)
coregrind/m_machine.c
coregrind/m_stacktrace.c
updated to client_stack_highest_byte, and switched
stack_lowest/highest_word to stack_lowest/highest_byte accordingly

coregrind/m_stacks.c
clarify semantic of start/end,
added a comment to indicate why we invert start/end in register call
(note that the code find_stack_by_addr was already assuming that
end was included as the checks were doing e.g.
sp >= i->start && sp <= i->end

coregrind/pub_core_clientstate.h
coregrind/m_clientstate.c
renames Addr VG_(clstk_base) to Addr VG_(clstk_start_base)
(start to indicate it is the lowest address, base suffix kept
to indicate it is the initial lowest address).

coregrind/m_initimg/initimg-darwin.c
updated to VG_(clstk_start_base)
replace unclear iicii.clstack_top by iicii.clstack_end
updated clstack_max_size computation according to both bounds included.

coregrind/m_initimg/initimg-linux.c
updated to VG_(clstk_start_base)
updated VG_(clstk_end) computation according to both bounds included.
replace unclear iicii.clstack_top by iicii.clstack_end

coregrind/pub_core_aspacemgr.h
extern Addr VG_(am_startup) : clarify semantic of the returned value
coregrind/m_aspacemgr/aspacemgr-linux.c
removed a copy of a comment that was already in pub_core_aspacemgr.h
(avoid double maintenance)
renamed unclear suggested_clstack_top to suggested_clstack_end
(note that here, it looks like suggested_clstack_top was already
the last addressable byte)

* factorisation of the stack guessing and registration causes
mechanical changes in the following files:
coregrind/m_syswrap/syswrap-ppc64-linux.c
coregrind/m_syswrap/syswrap-x86-darwin.c
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-arm-linux.c
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-mips64-linux.c
coregrind/m_syswrap/syswrap-ppc32-linux.c
coregrind/m_syswrap/syswrap-amd64-darwin.c
coregrind/m_syswrap/syswrap-mips32-linux.c
coregrind/m_syswrap/priv_syswrap-generic.h
coregrind/m_syswrap/syswrap-x86-linux.c
coregrind/m_syswrap/syswrap-s390x-linux.c
coregrind/m_syswrap/syswrap-darwin.c
coregrind/m_syswrap/syswrap-arm64-linux.c
Some files to look at more in details:
syswrap-darwin.c : the handling of sysctl(kern.usrstack) looked
buggy to me, and has probably be made correct by the fact that
VG_(clstk_end) is now the last addressable byte. However,unsure
about this, as I could not find any documentation about
sysctl(kern.usrstack). I only find several occurences on the web,
showing that the result of this is page aligned, which I guess
means it must be 1+ the last addressable byte.
syswrap-x86-darwin.c and syswrap-amd64-darwin.c
I suspect the code that was computing client_stack_highest_word
was wrong, and the patch makes it correct.
syswrap-mips64-linux.c
not sure what to do for this code. This is the only code
that was guessing the stack differently from others.
Kept (almost) untouched. To be discussed with mips maintainers.

coregrind/pub_core_libcassert.h
coregrind/m_libcassert.c
* void VG_(show_sched_status):
renamed Bool valgrind_stack_usage to Bool stack_usage
if stack_usage, shows both the valgrind stack usage and
the client stack boundaries
coregrind/m_scheduler/scheduler.c
coregrind/m_gdbserver/server.c
coregrind/m_gdbserver/remote-utils.c
Updated comments in callers to VG_(show_sched_status)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14392 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.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_syswrap/syswrap-x86-darwin.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_syswrap/syswrap-x86-darwin.c
ae284e5cc0830afcdec7b436564ea9f18bbedff8 02-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add initial support for MacOSX 10.8. Note this is still very borked
and pretty much unusable for real work.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12814 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.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_syswrap/syswrap-x86-darwin.c
b578406c413ecb5340e8f86b9a6d747ebee21643 30-Sep-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make wqthread_hijack not assert on x86-darwin. Same hack as
for the 64-bit case.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12073 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.c
38a285981de6e289d0993c57a35508a7f1daed5c 12-Apr-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make MacOS builds work again following fixes for #259977
(revs 11687,8,9)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11690 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.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_syswrap/syswrap-x86-darwin.c
3847cd3a1c85cc4cecd034a8d2a91e3e240815f4 07-Aug-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Resync after {wq,p}thread_hijack rather than merely doing a check.
Believed to help with, although not fix, the underlying problem in
#192634.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10751 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.c
8b68b64759254d514d98328c496cbd88cde4c9a5 24-Jun-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
preprocessor, rather than via the build system. This is more consistent
(we use the pre-processor for small arch/OS/platform-specific chunks
within files) and makes the build system much simpler, as the sources for
all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out. If a
new platform is implemented, you need to add 11 extra Makefile.am lines.
Previously it was over 100 lines.

- Vex has been autotoolised. Dependency checking now works in Vex (no more
incomplete builds). Parallel builds now also work. --with-vex no longer
works; it's little use and a pain to support. VEX/Makefile is still in
the Vex repository and gets overwritten at configure-time; it should
probably be renamed Makefile-gcc to avoid possible problems, such as
accidentally committing a generated Makefile. There's a bunch of hacky
copying to deal with the fact that autotools don't handle same-named files
in different directories. Julian plans to rename the files to avoid this
problem.

- Various small Makefile.am things have been made more standard automake
style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
own.

- The existing five top-level Makefile.am include files have been
consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
headers separating sections, declarations relating to the same things next
to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed. And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_syswrap/syswrap-x86-darwin.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_syswrap/syswrap-x86-darwin.c