• Ian Lance Taylor's avatar
    runtime: intercept munmap as we do mmap · f425f549
    Ian Lance Taylor authored
    For cgo programs on linux-amd64 we call the C function mmap.
    This supports programs such as the C memory sanitizer that need to
    intercept all calls to mmap. It turns out that there are programs that
    intercept both mmap and munmap, or that at least expect that if they
    intercept mmap, they also intercept munmap. So, if we permit mmap
    to be intercepted, also permit munmap to be intercepted.
    
    No test, as it requires two odd things: a C program that intercepts
    mmap and munmap, and a Go program that calls munmap.
    
    Change-Id: Iec33f47d59f70dbb7463fd12d30728c24cd4face
    Reviewed-on: https://go-review.googlesource.com/45016Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: 's avatarAustin Clements <austin@google.com>
    f425f549
Name
Last commit
Last update
..
asm_386.s Loading commit data...
asm_amd64.s Loading commit data...
asm_arm.s Loading commit data...
asm_arm64.s Loading commit data...
asm_mips64x.s Loading commit data...
asm_mipsx.s Loading commit data...
asm_nacl_amd64p32.s Loading commit data...
asm_ppc64x.s Loading commit data...
asm_s390x.s Loading commit data...
callbacks.go Loading commit data...
callbacks_traceback.go Loading commit data...
cgo.go Loading commit data...
dragonfly.go Loading commit data...
freebsd.go Loading commit data...
gcc_386.S Loading commit data...
gcc_amd64.S Loading commit data...
gcc_android.c Loading commit data...
gcc_android_386.c Loading commit data...
gcc_android_amd64.c Loading commit data...
gcc_android_arm.c Loading commit data...
gcc_android_arm64.c Loading commit data...
gcc_arm.S Loading commit data...
gcc_arm64.S Loading commit data...
gcc_context.c Loading commit data...
gcc_darwin_386.c Loading commit data...
gcc_darwin_amd64.c Loading commit data...
gcc_darwin_arm.c Loading commit data...
gcc_darwin_arm64.c Loading commit data...
gcc_dragonfly_amd64.c Loading commit data...
gcc_fatalf.c Loading commit data...
gcc_freebsd_386.c Loading commit data...
gcc_freebsd_amd64.c Loading commit data...
gcc_freebsd_arm.c Loading commit data...
gcc_libinit.c Loading commit data...
gcc_libinit_windows.c Loading commit data...
gcc_linux_386.c Loading commit data...
gcc_linux_amd64.c Loading commit data...
gcc_linux_arm.c Loading commit data...
gcc_linux_arm64.c Loading commit data...
gcc_linux_mips64x.c Loading commit data...
gcc_linux_mipsx.c Loading commit data...
gcc_linux_ppc64x.c Loading commit data...
gcc_linux_s390x.c Loading commit data...
gcc_mips64x.S Loading commit data...
gcc_mipsx.S Loading commit data...
gcc_mmap.c Loading commit data...
gcc_netbsd_386.c Loading commit data...
gcc_netbsd_amd64.c Loading commit data...
gcc_netbsd_arm.c Loading commit data...
gcc_openbsd_386.c Loading commit data...
gcc_openbsd_amd64.c Loading commit data...
gcc_ppc64x.S Loading commit data...
gcc_s390x.S Loading commit data...
gcc_setenv.c Loading commit data...
gcc_sigaction.c Loading commit data...
gcc_signal_darwin_armx.c Loading commit data...
gcc_signal_darwin_lldb.c Loading commit data...
gcc_solaris_amd64.c Loading commit data...
gcc_traceback.c Loading commit data...
gcc_util.c Loading commit data...
gcc_windows_386.c Loading commit data...
gcc_windows_amd64.c Loading commit data...
iscgo.go Loading commit data...
libcgo.h Loading commit data...
libcgo_unix.h Loading commit data...
mmap.go Loading commit data...
netbsd.go Loading commit data...
openbsd.go Loading commit data...
setenv.go Loading commit data...
sigaction.go Loading commit data...
signal_darwin_arm.s Loading commit data...
signal_darwin_arm64.s Loading commit data...
signal_darwin_armx.go Loading commit data...