Ticket #21525: patch-valgrind-global.diff
File patch-valgrind-global.diff, 39.0 KB (added by guillaume-jean@…, 15 years ago) |
---|
-
Makefile.all.am
88 88 -Wpointer-arith \ 89 89 -Wstrict-prototypes \ 90 90 -Wmissing-declarations \ 91 -Wno-pointer-sign \ 91 92 @FLAG_W_NO_FORMAT_ZERO_LENGTH@ \ 92 93 -fno-strict-aliasing 93 94 -
mpi/Makefile.am
56 56 57 57 58 58 if BUILD_MPIWRAP_PRI 59 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c60 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = -I ../include59 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = $(srcdir)/libmpiwrap.c 60 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = -I$(srcdir)/../include 61 61 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \ 62 62 $(CFLAGS_MPI) $(MPI_FLAG_M3264_PRI) 63 63 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) 64 64 endif 65 65 if BUILD_MPIWRAP_SEC 66 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c67 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = -I ../include66 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = $(srcdir)/libmpiwrap.c 67 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = -I$(srcdir)/../include 68 68 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \ 69 69 $(CFLAGS_MPI) $(MPI_FLAG_M3264_SEC) 70 70 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) -
darwin10-drd.supp
1 2 # DRD suppressions for Darwin 10.x / Mac OS X 10.6 Snow Leopard -
include/vki/vki-darwin.h
792 792 typedef struct eventreq vki_eventreq; 793 793 794 794 795 #include <sys/acl.h> 796 797 #define vki_kauth_filesec kauth_filesec 798 799 795 800 #include <sys/ptrace.h> 796 801 797 802 #define VKI_PTRACE_TRACEME PT_TRACE_ME … … 1021 1026 #define VKI_A_GETPINFO_ADDR A_GETPINFO_ADDR 1022 1027 #define VKI_A_GETKAUDIT A_GETKAUDIT 1023 1028 #define VKI_A_SETKAUDIT A_SETKAUDIT 1029 #if DARWIN_VERS >= DARWIN_10_6 1030 #define VKI_A_SENDTRIGGER A_SENDTRIGGER 1031 #define VKI_A_GETSINFO_ADDR A_GETSINFO_ADDR 1032 #endif 1024 1033 1025 1034 1026 1035 #include <sys/aio.h> -
include/vki/vki-scnums-darwin.h
32 32 #define __VKI_SCNUMS_DARWIN_H 33 33 34 34 35 // need DARWIN_10_x definitions 36 #include "config.h" 37 35 38 // osfmk/mach/i386/syscall_sw.h 36 39 37 40 // There are two syscall number encodings in Darwin. … … 376 379 #define __NR_sigreturn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(184) 377 380 #define __NR_chud VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(185) 378 381 /* 186 */ 382 #if DARWIN_VERS >= DARWIN_10_6 383 #define __NR_fdatasync VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(187) 384 #else 379 385 /* 187 */ 386 #endif 380 387 #define __NR_stat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(188) 381 388 #define __NR_fstat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(189) 382 389 #define __NR_lstat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(190) … … 403 410 #define __NR_ATPgetreq VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(211) 404 411 #define __NR_ATPgetrsp VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(212) 405 412 /* 213 Reserved for AppleTalk */ 406 #define __NR_kqueue_from_portset_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(214) 407 #define __NR_kqueue_portset_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(215) 413 #if DARWIN_VERS >= DARWIN_10_6 414 /* 214 old kqueue_from_portset_np*/ 415 /* 215 old kqueue_portset_np*/ 416 #else 417 #define __NR_kqueue_from_portset_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(214) 418 #define __NR_kqueue_portset_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(215) 419 #endif 408 420 #define __NR_mkcomplex VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(216) 409 421 #define __NR_statv VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(217) 410 422 #define __NR_lstatv VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(218) … … 413 425 #define __NR_setattrlist VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(221) 414 426 #define __NR_getdirentriesattr VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(222) 415 427 #define __NR_exchangedata VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(223) 416 /* 224 checkuseraccess */428 /* 224 old checkuseraccess */ 417 429 #define __NR_searchfs VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(225) 418 430 #define __NR_delete VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(226) 419 431 #define __NR_copyfile VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(227) 432 #if DARWIN_VERS >= DARWIN_10_6 433 #define __NR_fgetattrlist VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(228) 434 #define __NR_fsetattrlist VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(229) 435 #else 420 436 /* 228 */ 421 437 /* 229 */ 438 #endif 422 439 #define __NR_poll VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(230) 423 440 #define __NR_watchevent VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(231) 424 441 #define __NR_waitevent VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(232) … … 434 451 #define __NR_fsctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(242) 435 452 #define __NR_initgroups VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(243) 436 453 #define __NR_posix_spawn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(244) 454 #if DARWIN_VERS >= DARWIN_10_6 455 #define __NR_ffsctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(245) 456 #else 437 457 /* 245 */ 458 #endif 438 459 /* 246 */ 439 460 #define __NR_nfsclnt VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(247) 440 461 #define __NR_fhopen VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(248) … … 485 506 #define __NR_identitysvc VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(293) 486 507 #define __NR_shared_region_check_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(294) 487 508 #define __NR_shared_region_map_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(295) 509 #if DARWIN_VERS >= DARWIN_10_6 510 #define __NR_vm_pressure_monitor VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(296) 511 #else 488 512 /* 296 old load_shared_file */ 513 #endif 489 514 /* 297 old reset_shared_file */ 490 515 /* 298 old new_system_shared_regions */ 491 516 /* 299 old shared_region_map_file_np */ 492 517 /* 300 old shared_region_make_private_np */ 493 #define __NR___pthread_mutex_destroy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301) 494 #define __NR___pthread_mutex_init VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302) 495 #define __NR___pthread_mutex_lock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303) 496 #define __NR___pthread_mutex_trylock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304) 497 #define __NR___pthread_mutex_unlock VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305) 498 #define __NR___pthread_cond_init VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306) 499 #define __NR___pthread_cond_destroy VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307) 500 #define __NR___pthread_cond_broadcast VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308) 501 #define __NR___pthread_cond_signal VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309) 518 /* 301 */ 519 /* 302 */ 520 /* 303 */ 521 /* 304 */ 522 /* 305 */ 523 /* 306 */ 524 /* 307 */ 525 /* 308 */ 526 /* 309 */ 502 527 #define __NR_getsid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(310) 503 528 #define __NR_settid_with_pid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(311) 504 #define __NR___pthread_cond_timedwait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(312) 529 /* 312 */ 505 530 #define __NR_aio_fsync VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(313) 506 531 #define __NR_aio_return VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(314) 507 532 #define __NR_aio_suspend VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(315) … … 510 535 #define __NR_aio_read VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(318) 511 536 #define __NR_aio_write VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(319) 512 537 #define __NR_lio_listio VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(320) 513 #define __NR___pthread_cond_wait VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(321) 538 /* 321 */ 514 539 #define __NR_iopolicysys VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(322) 515 540 /* 323 */ 516 541 #define __NR_mlockall VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(324) … … 559 584 #define __NR_bsdthread_register VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(366) 560 585 #define __NR_workq_open VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(367) 561 586 #define __NR_workq_ops VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(368) 587 #if DARWIN_VERS >= DARWIN_10_6 588 #define __NR_kevent64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(369) 589 #else 562 590 /* 369 */ 591 #endif 563 592 /* 370 */ 564 593 /* 371 */ 594 #if DARWIN_VERS >= DARWIN_10_6 595 #define __NR___thread_selfid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(372) // was UX64 596 #else 565 597 /* 372 */ 598 #endif 566 599 /* 373 */ 567 600 /* 374 */ 568 601 /* 375 */ … … 617 650 #define __NR___mac_mount VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(424) 618 651 #define __NR___mac_get_mount VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(425) 619 652 #define __NR___mac_getfsstat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(426) 653 #if DARWIN_VERS >= DARWIN_10_6 654 #define __NR_fsgetpath VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(427) 655 #define __NR_audit_session_self VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(428) 656 #define __NR_audit_session_join VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(429) 657 #endif 658 659 #if DARWIN_VERS <= DARWIN_10_6 620 660 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(427) 661 #elif DARWIN_VERSION < DARWIN_10_7 662 #define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430) 663 #else 664 #error unknown darwin version 665 #endif 621 666 622 667 #define __NR_DARWIN_FAKE_SIGRETURN (1 + __NR_MAXSYSCALL) 623 668 -
configure.in
247 247 *darwin*) 248 248 AC_MSG_RESULT([ok (${host_os})]) 249 249 VGCONF_OS="darwin" 250 AC_DEFINE([DARWIN_10_5], 100500, [DARWIN_VERS value for Mac OS X 10.5]) 251 AC_DEFINE([DARWIN_10_6], 100600, [DARWIN_VERS value for Mac OS X 10.6]) 252 AC_DEFINE([DARWIN_10_7], 100700, [DARWIN_VERS value for Mac OS X 10.7]) 250 253 251 254 AC_MSG_CHECKING([for the kernel version]) 252 255 kernel=`uname -r` … … 254 257 # Nb: for Darwin we set DEFAULT_SUPP here. That's because Darwin 255 258 # has only one relevant version, the OS version. The `uname` check 256 259 # is a good way to get that version (i.e. "Darwin 9.6.0" is Mac OS 257 # X 10.5.6, and "Darwin 10.x" would presumably be Mac OS X 10.6.x 258 # Snow Leopard and darwin10.supp), and we don't know of an macros 259 # similar to __GLIBC__ to get that info. 260 # X 10.5.6, and "Darwin 10.x" is Mac OS X 10.6.x Snow Leopard), 261 # and we don't know of an macros similar to __GLIBC__ to get that info. 260 262 # 261 263 # XXX: `uname -r` won't do the right thing for cross-compiles, but 262 264 # that's not a problem yet. 263 265 case "${kernel}" in 264 266 9.*) 265 267 AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) 268 AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version]) 266 269 DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}" 267 270 DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}" 268 271 ;; 272 10.*) 273 AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) 274 AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version]) 275 DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}" 276 DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" 277 ;; 269 278 *) 270 279 AC_MSG_RESULT([unsupported (${kernel})]) 271 AC_MSG_ERROR([Valgrind works on Darwin 9.x (Mac OS X 10.5)])280 AC_MSG_ERROR([Valgrind works on Darwin 9.x and 10.x (Mac OS X 10.5 and 10.6)]) 272 281 ;; 273 282 esac 274 283 ;; … … 1471 1480 1472 1481 #---------------------------------------------------------------------------- 1473 1482 # Check for /proc filesystem 1483 # This doesn't work when cross-compiling, including Darwin universal builds. 1474 1484 #---------------------------------------------------------------------------- 1485 if test "x$cross_compiling" = "xno"; then 1475 1486 AC_CHECK_FILES(/proc/self/fd /proc/self/exe /proc/self/maps, 1476 1487 [ AC_DEFINE([HAVE_PROC], 1, [can use /proc filesystem]) ], 1477 1488 []) 1489 else 1490 # assume /proc/self/* is available everywhere except Darwin 1491 case "$VGCONF_OS" in 1492 darwin) 1493 ;; 1494 *) 1495 AC_DEFINE([HAVE_PROC], 1, [can use /proc filesystem]) 1496 ;; 1497 esac 1498 fi 1478 1499 1479 1500 1480 1501 #---------------------------------------------------------------------------- -
configure
old new 4296 4296 DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}" 4297 4297 DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}" 4298 4298 ;; 4299 10.*) 4300 echo "$as_me:$LINENO: result: Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard" >&5 4301 echo "${ECHO_T}Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard" >&6 4302 DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}" 4303 DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" 4304 ;; 4299 4305 *) 4300 4306 echo "$as_me:$LINENO: result: unsupported (${kernel})" >&5 4301 4307 echo "${ECHO_T}unsupported (${kernel})" >&6 -
auxprogs/Makefile.am
29 29 valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) 30 30 valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI) 31 31 valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI) 32 -
Makefile.am
26 26 27 27 # Put docs last because building the HTML is slow and we want to get 28 28 # everything else working before we try it. 29 # GrP SnowLeopard: 30 # mpi 29 31 SUBDIRS = \ 30 32 include \ 31 33 VEX \ … … 36 38 tests \ 37 39 perf \ 38 40 auxprogs \ 39 mpi \40 41 docs 41 42 DIST_SUBDIRS = $(SUBDIRS) 42 43 … … 48 49 glibc-2.2-LinuxThreads-helgrind.supp \ 49 50 glibc-2.X-drd.supp \ 50 51 exp-ptrcheck.supp \ 51 darwin9.supp darwin9-drd.supp 52 darwin9.supp darwin9-drd.supp \ 53 darwin10.supp darwin10-drd.supp 52 54 DEFAULT_SUPP_FILES = @DEFAULT_SUPP@ 53 55 54 56 # We include all the base .supp files in the distribution, but not … … 63 65 BUILT_SOURCES = default.supp valgrind.pc 64 66 CLEANFILES = default.supp 65 67 66 default.supp: $( DEFAULT_SUPP_FILES)68 default.supp: $(addprefix $(srcdir)/,$(DEFAULT_SUPP_FILES)) 67 69 echo "# This is a generated file, composed of the following suppression rules:" > default.supp 68 70 echo "# " $(DEFAULT_SUPP_FILES) >> default.supp 69 cat $( DEFAULT_SUPP_FILES) >> default.supp71 cat $(addprefix $(srcdir)/,$(DEFAULT_SUPP_FILES)) >> default.supp 70 72 71 73 ## Preprend @PERL@ because tests/vg_regtest isn't executable 72 74 regtest: check -
darwin9-drd.supp
1 2 # DRD suppressions for Darwin 9.x / Mac OS X 10.5 Leopard 3 1 4 # 2 5 # Suppression patterns for dyld, the dynamic loader. 3 6 # -
Makefile.vex.am
51 51 # This is very uggerly. Need to sed out both "xyzzyN" and 52 52 # "xyzzy$N" since gcc on different targets emits the constants 53 53 # differently -- with a leading $ on x86/amd64 but none on ppc32/64. 54 pub/libvex_guest_offsets.h: 55 rm -f auxprogs/genoffsets.s 56 $(CC) $(LIBVEX_CFLAGS) -O -S -o auxprogs/genoffsets.s \ 57 auxprogs/genoffsets.c 58 grep xyzzy auxprogs/genoffsets.s | grep define \ 54 pub/libvex_guest_offsets.h: $(srcdir)/auxprogs/genoffsets.c 55 $(CC) $(LIBVEX_CFLAGS) -O -S -o - $(srcdir)/auxprogs/genoffsets.c \ 56 | grep xyzzy | grep define \ 59 57 | sed "s/xyzzy\\$$//g" | sed "s/xyzzy//g" \ 60 > pub/libvex_guest_offsets.h 61 rm -f auxprogs/genoffsets.s 58 > $(srcdir)/pub/libvex_guest_offsets.h 62 59 63 60 #---------------------------------------------------------------------------- 64 61 # libvex-<platform>.a -
darwin10.supp
1 2 # Suppressions for Darwin 10.x / Mac OS X 10.6 Snow Leopard -
coregrind/m_syswrap/priv_syswrap-darwin.h
429 429 // 369 430 430 // 370 431 431 // 371 432 // 372432 DECL_TEMPLATE(darwin, __thread_selfid); // 372 433 433 // 373 434 434 // 374 435 435 // 375 … … 484 484 // NYI __mac_mount 424 485 485 // NYI __mac_get_mount 425 486 486 // NYI __mac_getfsstat 426 487 DECL_TEMPLATE(darwin, fsgetpath); // 427 488 // NYI audit_session_self 428 489 // NYI audit_session_join 429 487 490 488 491 // Mach message helpers 489 492 DECL_TEMPLATE(darwin, host_info); … … 498 501 DECL_TEMPLATE(darwin, mach_port_get_refs); 499 502 DECL_TEMPLATE(darwin, mach_port_mod_refs); 500 503 DECL_TEMPLATE(darwin, mach_port_get_set_status); 504 DECL_TEMPLATE(darwin, mach_port_move_member); 501 505 DECL_TEMPLATE(darwin, mach_port_destroy); 502 506 DECL_TEMPLATE(darwin, mach_port_request_notification); 503 507 DECL_TEMPLATE(darwin, mach_port_insert_right); 508 DECL_TEMPLATE(darwin, mach_port_extract_right); 504 509 DECL_TEMPLATE(darwin, mach_port_get_attributes); 505 510 DECL_TEMPLATE(darwin, mach_port_set_attributes); 506 511 DECL_TEMPLATE(darwin, mach_port_insert_member); … … 537 542 DECL_TEMPLATE(darwin, thread_suspend); 538 543 DECL_TEMPLATE(darwin, thread_get_state); 539 544 DECL_TEMPLATE(darwin, thread_policy); 545 DECL_TEMPLATE(darwin, thread_policy_set); 540 546 DECL_TEMPLATE(darwin, thread_info); 541 547 DECL_TEMPLATE(darwin, bootstrap_register); 542 548 DECL_TEMPLATE(darwin, bootstrap_look_up); -
coregrind/m_syswrap/syswrap-amd64-darwin.c
378 378 VexGuestAMD64State *vex; 379 379 Addr stack; 380 380 SizeT stacksize; 381 vki_sigset_t blockall; 381 382 383 /* When we enter here we hold no lock (!), so we better acquire it 384 pronto. Why do we hold no lock? Because (presumably) the only 385 way to get here is as a result of a SfMayBlock syscall 386 "workq_ops(WQOPS_THREAD_RETURN)", which will have dropped the 387 lock. At least that's clear for the 'reuse' case. The 388 non-reuse case? Dunno, perhaps it's a new thread the kernel 389 pulled out of a hat. In any case we still need to take a 390 lock. */ 391 VG_(acquire_BigLock_LL)("wqthread_hijack"); 392 393 /* Start the thread with all signals blocked. VG_(scheduler) will 394 set the mask correctly when we finally get there. */ 395 VG_(sigfillset)(&blockall); 396 VG_(sigprocmask)(VKI_SIG_SETMASK, &blockall, NULL); 397 382 398 if (reuse) { 383 399 // This thread already exists; we're merely re-entering 384 400 // after leaving via workq_ops(WQOPS_THREAD_RETURN). … … 418 434 if (reuse) { 419 435 // Continue V's thread back in the scheduler. 420 436 // The client thread is of course in another location entirely. 437 438 /* Drop the lock before going into 439 ML_(wqthread_continue_NORETURN). The latter will immediately 440 attempt to reacquire it in non-LL mode, which is a bit 441 wasteful but I don't think is harmful. A better solution 442 would be to not drop the lock but instead "upgrade" it from a 443 LL lock to a full lock, but that's too much like hard work 444 right now. */ 445 VG_(release_BigLock_LL)("wqthread_hijack(1)"); 421 446 ML_(wqthread_continue_NORETURN)(tst->tid); 422 447 } 423 448 else { … … 450 475 VG_(am_do_sync_check)("after", "wqthread_hijack", 0); 451 476 452 477 // Go! 478 /* Same comments as the 'release' in the then-clause. 479 start_thread_NORETURN calls run_thread_NORETURN calls 480 thread_wrapper which acquires the lock before continuing. 481 Let's hope nothing non-thread-local happens until that point. 482 483 DDD: I think this is plain wrong .. if we get to 484 thread_wrapper not holding the lock, and someone has recycled 485 this thread slot in the meantime, we're hosed. Is that 486 possible, though? */ 487 VG_(release_BigLock_LL)("wqthread_hijack(2)"); 453 488 call_on_new_stack_0_1(tst->os_state.valgrind_stack_init_SP, 0, 454 489 start_thread_NORETURN, (Word)tst); 455 490 } -
coregrind/m_syswrap/priv_syswrap-generic.h
200 200 DECL_TEMPLATE(generic, sys_getrlimit); // * (?) 201 201 DECL_TEMPLATE(generic, sys_truncate64); // %% (P?) 202 202 DECL_TEMPLATE(generic, sys_ftruncate64); // %% (P?) 203 DECL_TEMPLATE(generic, sys_lchown); // * (L?) 203 DECL_TEMPLATE(generic, sys_lchown); // * (L?) FreeBSD 3.0 204 204 DECL_TEMPLATE(generic, sys_mincore); // * L? 205 205 DECL_TEMPLATE(generic, sys_getdents64); // * (SVr4,SVID?) 206 206 DECL_TEMPLATE(generic, sys_statfs64); // * (?) -
coregrind/m_syswrap/syswrap-main.c
1155 1155 # error Unknown OS 1156 1156 # endif 1157 1157 1158 return sys == NULL ? &bad_sys :sys;1158 return (sys && sys->before) ? sys : &bad_sys; 1159 1159 } 1160 1160 1161 1161 -
coregrind/m_syswrap/syswrap-darwin.c
66 66 #include <mach/mach.h> 67 67 #include <mach/mach_vm.h> 68 68 #include <semaphore.h> 69 #include <sys/acl.h> /* struct kauth_filesec */70 69 /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */ 71 70 72 71 #define msgh_request_port msgh_remote_port … … 1240 1239 { 1241 1240 PRINT("futimes ( %ld, %#lx )", ARG1,ARG2); 1242 1241 PRE_REG_READ2(long, "futimes", int, fd, struct timeval *, tvp); 1243 if (ARG2 != 0) { 1242 if (!ML_(fd_allowed)(ARG1, "futimes", tid, False)) { 1243 SET_STATUS_Failure( VKI_EBADF ); 1244 } else if (ARG2 != 0) { 1244 1245 PRE_timeval_READ( "futimes(tvp[0])", ARG2 ); 1245 1246 PRE_timeval_READ( "futimes(tvp[1])", ARG2+sizeof(struct vki_timeval) ); 1246 1247 } … … 1635 1636 { 1636 1637 PRINT("kdebug_trace(%ld, %ld, %ld, %ld, %ld, %ld)", 1637 1638 ARG1, ARG2, ARG3, ARG4, ARG5, ARG6); 1639 /* 1640 Don't check anything - some clients pass fewer arguments. 1638 1641 PRE_REG_READ6(long, "kdebug_trace", 1639 1642 int,"code", int,"arg1", int,"arg2", 1640 1643 int,"arg3", int,"arg4", int,"arg5"); 1641 // GrP fixme anything else?1644 */ 1642 1645 } 1643 1646 1644 1647 … … 2018 2021 is just way wrong. [The trouble is with the size, which depends on a 2019 2022 non-trival kernel computation] */ 2020 2023 PRE_MEM_READ( "fchmod_extended(xsecurity)", ARG5, 2021 sizeof(struct kauth_filesec) );2024 sizeof(struct vki_kauth_filesec) ); 2022 2025 } 2023 2026 2024 2027 PRE(chmod_extended) … … 2038 2041 is just way wrong. [The trouble is with the size, which depends on a 2039 2042 non-trival kernel computation] */ 2040 2043 PRE_MEM_READ( "chmod_extended(xsecurity)", ARG5, 2041 sizeof(struct kauth_filesec) );2044 sizeof(struct vki_kauth_filesec) ); 2042 2045 } 2043 2046 2044 2047 … … 2241 2244 } attrspec; 2242 2245 static const attrspec commonattr[] = { 2243 2246 // This order is important. 2247 #if DARWIN_VERS >= DARWIN_10_6 2248 { ATTR_CMN_RETURNED_ATTRS, sizeof(attribute_set_t) }, 2249 #endif 2244 2250 { ATTR_CMN_NAME, -1 }, 2245 2251 { ATTR_CMN_DEVID, sizeof(dev_t) }, 2246 2252 { ATTR_CMN_FSID, sizeof(fsid_t) }, … … 2263 2269 { ATTR_CMN_NAMEDATTRLIST, -1 }, 2264 2270 { ATTR_CMN_FLAGS, sizeof(uint32_t) }, 2265 2271 { ATTR_CMN_USERACCESS, sizeof(uint32_t) }, 2272 { ATTR_CMN_EXTENDED_SECURITY, -1 }, 2273 { ATTR_CMN_UUID, sizeof(guid_t) }, 2274 { ATTR_CMN_GRPUUID, sizeof(guid_t) }, 2266 2275 { ATTR_CMN_FILEID, sizeof(uint64_t) }, 2267 2276 { ATTR_CMN_PARENTID, sizeof(uint64_t) }, 2277 #if DARWIN_VERS >= DARWIN_10_6 2278 { ATTR_CMN_FULLPATH, -1 }, 2279 #endif 2268 2280 { 0, 0 } 2269 2281 }; 2270 2282 static const attrspec volattr[] = { … … 2288 2300 { ATTR_VOL_MOUNTEDDEVICE, -1 }, 2289 2301 { ATTR_VOL_ENCODINGSUSED, sizeof(uint64_t) }, 2290 2302 { ATTR_VOL_CAPABILITIES, sizeof(vol_capabilities_attr_t) }, 2303 #if DARWIN_VERS >= DARWIN_10_6 2304 { ATTR_VOL_UUID, sizeof(uuid_t) }, 2305 #endif 2291 2306 { ATTR_VOL_ATTRIBUTES, sizeof(vol_attributes_attr_t) }, 2292 2307 { 0, 0 } 2293 2308 }; … … 2336 2351 d = attrBuf; 2337 2352 dend = d + attrBufSize; 2338 2353 2354 #if DARWIN_VERS >= DARWIN_10_6 2355 // ATTR_CMN_RETURNED_ATTRS tells us what's really here, if set 2356 if (a[0] & ATTR_CMN_RETURNED_ATTRS) { 2357 // fixme range check this? 2358 a[0] &= ~ATTR_CMN_RETURNED_ATTRS; 2359 fn(tid, d, sizeof(attribute_set_t)); 2360 VG_(memcpy)(a, d, sizeof(a)); 2361 } 2362 #endif 2363 2339 2364 for (g = 0; g < 5; g++) { 2340 2365 for (i = 0; attrdefs[g][i].attrBit; i++) { 2341 2366 uint32_t bit = attrdefs[g][i].attrBit; … … 2398 2423 POST(getattrlist) 2399 2424 { 2400 2425 if (ARG4 > sizeof(vki_uint32_t)) { 2401 // attrBuf is uint32_t bytes writtenfollowed by attr data2426 // attrBuf is uint32_t size followed by attr data 2402 2427 vki_uint32_t *sizep = (vki_uint32_t *)ARG3; 2403 2428 POST_MEM_WRITE(ARG3, sizeof(vki_uint32_t)); 2404 scan_attrlist(tid, (struct vki_attrlist *)ARG2, sizep+1, *sizep, &get1attr); 2429 if (ARG5 & FSOPT_REPORT_FULLSIZE) { 2430 // *sizep is bytes required for return value, including *sizep 2431 } else { 2432 // *sizep is actual bytes returned, including *sizep 2433 } 2434 scan_attrlist(tid, (struct vki_attrlist *)ARG2, sizep+1, MIN(*sizep, ARG4), &get1attr); 2405 2435 } 2406 2436 } 2407 2437 … … 2457 2487 2458 2488 POST_MEM_WRITE(ARG3, p - (char *)ARG3); 2459 2489 2460 PRINT("got %d records, % d/%lu bytes\n", count, p-(char *)ARG3, ARG4);2490 PRINT("got %d records, %ld/%lu bytes\n", count, p-(char *)ARG3, ARG4); 2461 2491 } 2462 2492 2463 2493 2494 PRE(fsgetpath) 2495 { 2496 #if VG_WORDSIZE == 4 2497 PRINT("fsgetpath(%#lx, %ld, %#lx {%lu,%lu}, %llu)", 2498 ARG1, ARG2, ARG3, ((unsigned int *)ARG3)[0], ((unsigned int *)ARG3)[1], LOHI64(ARG4, ARG5)); 2499 PRE_REG_READ5(ssize_t, "fsgetpath", 2500 void*,"buf", size_t,"bufsize", 2501 fsid_t *,"fsid", 2502 vki_uint32_t, "objid_low32", vki_uint32_t, "objid_high32"); 2503 #else 2504 PRINT("fsgetpath(%#lx, %ld, %#lx {%u,%u}, %llu)", 2505 ARG1, ARG2, ARG3, ((unsigned int *)ARG3)[0], ((unsigned int *)ARG3)[1], ARG4); 2506 PRE_REG_READ4(ssize_t, "fsgetpath", 2507 void*,"buf", size_t,"bufsize", 2508 fsid_t *,"fsid", uint64_t,"objid"); 2509 #endif 2510 PRE_MEM_READ("fsgetpath(fsid)", ARG3, sizeof(fsid_t)); 2511 PRE_MEM_WRITE("fsgetpath(buf)", ARG1, ARG2); 2512 } 2513 2514 POST(fsgetpath) 2515 { 2516 POST_MEM_WRITE(ARG1, RES); 2517 } 2518 2519 2464 2520 PRE(exchangedata) 2465 2521 { 2466 2522 PRINT("exchangedata(%#lx(%s), %#lx(%s), %lu)", … … 3242 3298 case VKI_A_SETCLASS: 3243 3299 case VKI_A_SETPMASK: 3244 3300 case VKI_A_SETFSIZE: 3301 #if DARWIN_VERS >= DARWIN_10_6 3302 case VKI_A_SENDTRIGGER: 3303 #endif 3245 3304 // kernel reads data..data+length 3246 3305 PRE_MEM_READ("auditon(data)", ARG2, ARG3); 3247 3306 break; … … 3260 3319 case VKI_A_GETCLASS: 3261 3320 case VKI_A_GETPINFO: 3262 3321 case VKI_A_GETPINFO_ADDR: 3322 #if DARWIN_VERS >= DARWIN_10_6 3323 case VKI_A_GETSINFO_ADDR: 3324 #endif 3263 3325 // kernel reads and writes data..data+length 3264 3326 // GrP fixme be precise about what gets read and written 3265 3327 PRE_MEM_READ("auditon(data)", ARG2, ARG3); … … 3293 3355 case VKI_A_SETCLASS: 3294 3356 case VKI_A_SETPMASK: 3295 3357 case VKI_A_SETFSIZE: 3358 #if DARWIN_VERS >= DARWIN_10_6 3359 case VKI_A_SENDTRIGGER: 3360 #endif 3296 3361 // kernel reads data..data+length 3297 3362 break; 3298 3363 … … 3310 3375 case VKI_A_GETCLASS: 3311 3376 case VKI_A_GETPINFO: 3312 3377 case VKI_A_GETPINFO_ADDR: 3378 #if DARWIN_VERS >= DARWIN_10_6 3379 case VKI_A_GETSINFO_ADDR: 3380 #endif 3313 3381 // kernel reads and writes data..data+length 3314 3382 // GrP fixme be precise about what gets read and written 3315 3383 POST_MEM_WRITE(ARG2, ARG3); … … 4378 4446 } 4379 4447 4380 4448 4449 PRE(mach_port_move_member) 4450 { 4451 #pragma pack(4) 4452 typedef struct { 4453 mach_msg_header_t Head; 4454 NDR_record_t NDR; 4455 mach_port_name_t member; 4456 mach_port_name_t after; 4457 } Request; 4458 #pragma pack() 4459 4460 Request *req = (Request *)ARG1; 4461 4462 PRINT("mach_port_move_member(%s, %s, %s)", 4463 name_for_port(MACH_REMOTE), 4464 name_for_port(req->member), 4465 name_for_port(req->after)); 4466 /* 4467 MACH_ARG(mach_port_move_member.member) = req->member; 4468 MACH_ARG(mach_port_move_member.after) = req->after; 4469 */ 4470 AFTER = POST_FN(mach_port_move_member); 4471 } 4472 4473 POST(mach_port_move_member) 4474 { 4475 #pragma pack(4) 4476 typedef struct { 4477 mach_msg_header_t Head; 4478 NDR_record_t NDR; 4479 kern_return_t RetCode; 4480 mach_msg_trailer_t trailer; 4481 } Reply; 4482 #pragma pack() 4483 4484 Reply *reply = (Reply *)ARG1; 4485 4486 if (!reply->RetCode) { 4487 // fixme port set tracker? 4488 } else { 4489 PRINT("mig return %d", reply->RetCode); 4490 } 4491 } 4492 4493 4381 4494 PRE(mach_port_destroy) 4382 4495 { 4383 4496 #pragma pack(4) … … 4498 4611 } 4499 4612 4500 4613 4614 PRE(mach_port_extract_right) 4615 { 4616 #pragma pack(4) 4617 typedef struct { 4618 mach_msg_header_t Head; 4619 NDR_record_t NDR; 4620 mach_port_name_t name; 4621 mach_msg_type_name_t msgt_name; 4622 } Request; 4623 #pragma pack() 4624 4625 Request *req = (Request *)ARG1; 4626 4627 PRINT("mach_port_extract_right(%s, %s, %d)", 4628 name_for_port(MACH_REMOTE), 4629 name_for_port(req->name), req->msgt_name); 4630 4631 AFTER = POST_FN(mach_port_extract_right); 4632 4633 // fixme port tracker? 4634 } 4635 4636 POST(mach_port_extract_right) 4637 { 4638 // fixme import_complex_message handles the returned result, right? 4639 } 4640 4641 4501 4642 PRE(mach_port_get_attributes) 4502 4643 { 4503 4644 #pragma pack(4) … … 6086 6227 6087 6228 // GrP fixme semaphore destroy needed when thread creation fails 6088 6229 // GrP fixme probably other cleanup too 6230 // GrP fixme spinlocks might be good enough? 6089 6231 6090 6232 // DDD: I'm not at all sure this is the right spot for this. It probably 6091 6233 // should be in pthread_hijack instead, just before the call to … … 6204 6346 } 6205 6347 6206 6348 6207 POST(thread_policy)6208 {6209 }6210 6211 6349 PRE(thread_policy) 6212 6350 { 6213 6351 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1; … … 6222 6360 AFTER = POST_FN(thread_policy); 6223 6361 } 6224 6362 6363 POST(thread_policy) 6364 { 6365 } 6225 6366 6367 6368 PRE(thread_policy_set) 6369 { 6370 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1; 6371 6372 PRINT("thread_policy_set(%s, ...)", name_for_port(mh->msgh_request_port)); 6373 6374 AFTER = POST_FN(thread_policy_set); 6375 } 6376 6377 POST(thread_policy_set) 6378 { 6379 } 6380 6381 6226 6382 PRE(thread_info) 6227 6383 { 6228 6384 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1; … … 6449 6605 case 3211: 6450 6606 CALL_PRE(mach_port_get_set_status); 6451 6607 return; 6608 case 3212: 6609 CALL_PRE(mach_port_move_member); 6610 return; 6452 6611 case 3213: 6453 6612 CALL_PRE(mach_port_request_notification); 6454 6613 return; 6455 6614 case 3214: 6456 6615 CALL_PRE(mach_port_insert_right); 6457 6616 return; 6617 case 3215: 6618 CALL_PRE(mach_port_extract_right); 6619 return; 6458 6620 case 3217: 6459 6621 CALL_PRE(mach_port_get_attributes); 6460 6622 return; … … 6596 6758 case 3616: 6597 6759 CALL_PRE(thread_policy); 6598 6760 return; 6761 case 3617: 6762 CALL_PRE(thread_policy_set); 6763 return; 6599 6764 default: 6600 6765 // unknown message to a thread 6601 6766 VG_(printf)("UNKNOWN thread message [id %d, to %s, reply 0x%x]\n", … … 6760 6925 6761 6926 POST(mach_msg_unhandled) 6762 6927 { 6763 ML_(sync_mappings)("after", "mach_msg_ unhandled", 0);6928 ML_(sync_mappings)("after", "mach_msg_receive (unhandled)", 0); 6764 6929 } 6765 6930 6766 6931 … … 6900 7065 } 6901 7066 6902 7067 7068 #if DARWIN_VERS <= DARWIN_10_5 6903 7069 PRE(__semwait_signal) 6904 7070 { 6905 /* args: int cond_sem, int mutex_sem,6906 int timeout, int relative,6907 time_t tv_sec, time_t tv_nsec */7071 /* 10.5 args: int cond_sem, int mutex_sem, 7072 int timeout, int relative, 7073 time_t tv_sec, time_t tv_nsec */ 6908 7074 PRINT("__semwait_signal(wait %s, signal %s, %ld, %ld, %lds:%ldns)", 6909 7075 name_for_port(ARG1), name_for_port(ARG2), ARG3, ARG4, ARG5, ARG6); 6910 7076 PRE_REG_READ6(long, "__semwait_signal", … … 6914 7080 6915 7081 *flags |= SfMayBlock; 6916 7082 } 7083 #else 7084 PRE(__semwait_signal) 7085 { 7086 /* 10.5 args: int cond_sem, int mutex_sem, 7087 int timeout, int relative, 7088 const timespec *ts */ 7089 PRINT("__semwait_signal(wait %s, signal %s, %ld, %ld, %#lx)", 7090 name_for_port(ARG1), name_for_port(ARG2), ARG3, ARG4, ARG5); 7091 PRE_REG_READ5(int, "__semwait_signal", 7092 int,cond_sem, int,mutex_sem, 7093 int,timeout, int,relative, 7094 const struct vki_timespec *,ts); 7095 7096 if (ARG5) PRE_MEM_READ ("__semwait_signal(ts)", 7097 ARG5, sizeof(struct vki_timespec)); 7098 7099 *flags |= SfMayBlock; 7100 } 7101 #endif 6917 7102 6918 7103 7104 PRE(__thread_selfid) 7105 { 7106 PRINT("__thread_selfid ()"); 7107 PRE_REG_READ0(vki_uint64_t, "__thread_selfid"); 7108 } 7109 6919 7110 PRE(task_for_pid) 6920 7111 { 6921 7112 PRINT("task_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), ARG2, ARG3); … … 7468 7659 MACX_(__NR_sigreturn, sigreturn), 7469 7660 // _____(__NR_chud), 7470 7661 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(186)), // ??? 7662 #if DARWIN_VERS >= DARWIN_10_6 7663 // _____(__NR_fdatasync), 7664 #else 7471 7665 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(187)), // ??? 7666 #endif 7472 7667 GENXY(__NR_stat, sys_newstat), 7473 7668 GENXY(__NR_fstat, sys_newfstat), 7474 7669 GENXY(__NR_lstat, sys_newlstat), … … 7495 7690 // _____(__NR_ATPgetreq), 7496 7691 // _____(__NR_ATPgetrsp), 7497 7692 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(213)), // Reserved for AppleTalk 7693 #if DARWIN_VERS >= DARWIN_10_6 7694 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(214)), // old kqueue_from_portset_np 7695 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(215)), // old kqueue_portset_np 7696 #else 7498 7697 // _____(__NR_kqueue_from_portset_np), 7499 7698 // _____(__NR_kqueue_portset_np), 7699 #endif 7500 7700 // _____(__NR_mkcomplex), 7501 7701 // _____(__NR_statv), 7502 7702 // _____(__NR_lstatv), … … 7509 7709 // _____(__NR_searchfs), 7510 7710 GENX_(__NR_delete, sys_unlink), 7511 7711 // _____(__NR_copyfile), 7712 #if DARWIN_VERS >= DARWIN_10_6 7713 // _____(__NR_fgetattrlist), 7714 // _____(__NR_fsetattrlist), 7715 #else 7512 7716 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(228)), // ?? 7513 7717 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(229)), // ?? 7718 #endif 7514 7719 GENXY(__NR_poll, sys_poll), 7515 7720 MACX_(__NR_watchevent, watchevent), 7516 7721 MACXY(__NR_waitevent, waitevent), … … 7526 7731 MACXY(__NR_fsctl, fsctl), 7527 7732 MACX_(__NR_initgroups, initgroups), 7528 7733 MACXY(__NR_posix_spawn, posix_spawn), 7734 #if DARWIN_VERS >= DARWIN_10_6 7735 // _____(__NR_ffsctl), 7736 #else 7529 7737 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(245)), // ??? 7738 #endif 7530 7739 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(246)), // ??? 7531 7740 // _____(__NR_nfsclnt), 7532 7741 // _____(__NR_fhopen), … … 7577 7786 // _____(__NR_identitysvc), 7578 7787 // _____(__NR_shared_region_check_np), 7579 7788 // _____(__NR_shared_region_map_np), 7789 #if DARWIN_VERS >= DARWIN_10_6 7790 // _____(__NR_vm_pressure_monitor), 7791 #else 7580 7792 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(296)), // old load_shared_file 7793 #endif 7581 7794 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(297)), // old reset_shared_file 7582 7795 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(298)), // old new_system_shared_regions 7583 7796 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(299)), // old shared_region_map_file_np 7584 7797 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(300)), // old shared_region_make_private_np 7585 // _____(__NR___pthread_mutex_destroy), 7586 // _____(__NR___pthread_mutex_init), 7587 // _____(__NR___pthread_mutex_lock), 7588 // _____(__NR___pthread_mutex_trylock), 7589 // _____(__NR___pthread_mutex_unlock), 7590 // _____(__NR___pthread_cond_init), 7591 // _____(__NR___pthread_cond_destroy), 7592 // _____(__NR___pthread_cond_broadcast), 7593 // _____(__NR___pthread_cond_signal), 7798 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(301)), // ??? 7799 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(302)), // ??? 7800 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(303)), // ??? 7801 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(304)), // ??? 7802 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(305)), // ??? 7803 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(306)), // ??? 7804 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(307)), // ??? 7805 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(308)), // ??? 7806 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(309)), // ??? 7594 7807 // _____(__NR_getsid), 7595 7808 // _____(__NR_settid_with_pid), 7596 // _____(__NR___pthread_cond_timedwait), 7809 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(312)), // ??? 7597 7810 // _____(__NR_aio_fsync), 7598 7811 MACXY(__NR_aio_return, aio_return), 7599 7812 MACX_(__NR_aio_suspend, aio_suspend), … … 7602 7815 MACXY(__NR_aio_read, aio_read), 7603 7816 MACX_(__NR_aio_write, aio_write), 7604 7817 // _____(__NR_lio_listio), // 320 7605 // _____(__NR___pthread_cond_wait), 7818 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(321)), // ??? 7606 7819 // _____(__NR_iopolicysys), 7607 7820 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(323)), // ??? 7608 7821 // _____(__NR_mlockall), … … 7645 7858 MACX_(__NR_bsdthread_terminate, bsdthread_terminate), 7646 7859 MACXY(__NR_kqueue, kqueue), 7647 7860 MACXY(__NR_kevent, kevent), 7648 // _____(__NR_lchown),7861 GENX_(__NR_lchown, sys_lchown), 7649 7862 // _____(__NR_stack_snapshot), 7650 7863 MACX_(__NR_bsdthread_register, bsdthread_register), 7651 7864 MACX_(__NR_workq_open, workq_open), 7652 7865 MACXY(__NR_workq_ops, workq_ops), 7866 #if DARWIN_VERS >= DARWIN_10_6 7867 // _____(__NR_kevent64), 7868 #else 7653 7869 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(369)), // ??? 7870 #endif 7654 7871 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(370)), // ??? 7655 7872 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(371)), // ??? 7873 #if DARWIN_VERS >= DARWIN_10_6 7874 MACX_(__NR___thread_selfid, __thread_selfid), 7875 #else 7656 7876 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(372)), // ??? 7877 #endif 7657 7878 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(373)), // ??? 7658 7879 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(374)), // ??? 7659 7880 _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(375)), // ??? … … 7709 7930 // _____(__NR___mac_mount), 7710 7931 // _____(__NR___mac_get_mount), 7711 7932 // _____(__NR___mac_getfsstat), 7933 #if DARWIN_VERS >= DARWIN_10_6 7934 MACXY(__NR_fsgetpath, fsgetpath), 7935 // _____(__NR_audit_session_self), 7936 // _____(__NR_audit_session_join), 7937 #endif 7938 7712 7939 // _____(__NR_MAXSYSCALL) 7713 7940 MACX_(__NR_DARWIN_FAKE_SIGRETURN, FAKE_SIGRETURN) 7714 7941 }; -
coregrind/m_main.c
1510 1510 VG_(do_syscall2)(__NR_munmap, 0x00000000, 0xf0000000); 1511 1511 # else 1512 1512 // open up client space 1513 VG_(do_syscall2)(__NR_munmap, 0x100000000, 0x7 00000000000-0x100000000);1513 VG_(do_syscall2)(__NR_munmap, 0x100000000, 0x7fff50000000-0x100000000); 1514 1514 // open up client stack and dyld 1515 1515 VG_(do_syscall2)(__NR_munmap, 0x7fff5c000000, 0x4000000); 1516 1516 # endif -
coregrind/Makefile.am
111 111 112 112 # Be careful w.r.t. parellel builds. See section 27.9 of the automake info 113 113 # page, "Handling Tools that Produce many Outputs". 114 $(mach_user_srcs): $(mach_defs) 114 $(abs_builddir)/m_mach: 115 mkdir -p $@ 116 $(mach_user_srcs): $(mach_defs) $(abs_builddir)/m_mach 115 117 (cd m_mach && mig $(mach_defs)) 116 $(mach_hdrs): $(mach_defs) $(mach_user_srcs) 118 $(mach_hdrs): $(mach_defs) $(mach_user_srcs) $(abs_builddir)/m_mach 117 119 (cd m_mach && mig $(mach_defs)) 118 120 119 121 #----------------------------------------------------------------------------