Create a gist now

Instantly share code, notes, and snippets.

@Xe /libsum Secret
Created Dec 20, 2015

What would you like to do?
➜ strace ./libsum ±[master] [0]
execve("./libsum", ["./libsum"], [/* 33 vars */]) = 0
brk(0) = 0x1277000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34922fa000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=127113, ...}) = 0
mmap(NULL, 127113, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f34922da000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14664, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3491ed8000
mprotect(0x7f3491edb000, 2093056, PROT_NONE) = 0
mmap(0x7f34920da000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f34920da000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1729984, ...}) = 0
mmap(NULL, 3836448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3491b2f000
mprotect(0x7f3491cce000, 2097152, PROT_NONE) = 0
mmap(0x7f3491ece000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19f000) = 0x7f3491ece000
mmap(0x7f3491ed4000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f3491ed4000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34922d9000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34922d8000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34922d7000
arch_prctl(ARCH_SET_FS, 0x7f34922d8700) = 0
mprotect(0x7f3491ece000, 16384, PROT_READ) = 0
mprotect(0x7f34920da000, 4096, PROT_READ) = 0
mprotect(0x7f34922fc000, 4096, PROT_READ) = 0
munmap(0x7f34922da000, 127113) = 0
mmap(NULL, 524288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3492257000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34922f9000
rt_sigaction(SIGINT, {0x40f958, [INT], SA_RESTORER|SA_RESTART, 0x7f3491b64180}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSEGV, {0x40f958, [SEGV], SA_RESTORER|SA_RESTART, 0x7f3491b64180}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGABRT, {0x40f958, [ABRT], SA_RESTORER|SA_RESTART, 0x7f3491b64180}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGFPE, {0x40f958, [FPE], SA_RESTORER|SA_RESTART, 0x7f3491b64180}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGILL, {0x40f958, [ILL], SA_RESTORER|SA_RESTART, 0x7f3491b64180}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSEGV, {0x40f958, [SEGV], SA_RESTORER|SA_RESTART, 0x7f3491b64180}, {0x40f958, [SEGV], SA_RESTORER|SA_RESTART, 0x7f3491b64180}, 8) = 0
rt_sigaction(SIGPIPE, {0x40f958, [PIPE], SA_RESTORER|SA_RESTART, 0x7f3491b64180}, {SIG_DFL, [], 0}, 8) = 0
brk(0) = 0x1277000
brk(0x1298000) = 0x1298000
open("./libsum.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\340\5\0\0\0\0\0"..., 832) = 832
lseek(3, 1164384, SEEK_SET) = 1164384
read(3, "\4\0\0\0(\0\0\0\4\0\0\0Go\0\0ac8c1c19f3fcd0c8"..., 56) = 56
fstat(3, {st_mode=S_IFREG|0644, st_size=1572904, ...}) = 0
getcwd("/home/xena/code/code/experiments/go-nim", 128) = 40
mmap(NULL, 3436352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f34917e8000
mprotect(0x7f3491905000, 2097152, PROT_NONE) = 0
mmap(0x7f3491b05000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11d000) = 0x7f3491b05000
mmap(0x7f3491b07000, 163648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f3491b07000
close(3) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=127113, ...}) = 0
mmap(NULL, 127113, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3492237000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20o\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=137440, ...}) = 0
mmap(NULL, 2213008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f34915cb000
mprotect(0x7f34915e3000, 2093056, PROT_NONE) = 0
mmap(0x7f34917e2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f34917e2000
mmap(0x7f34917e4000, 13456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f34917e4000
close(3) = 0
mprotect(0x7f34917e2000, 4096, PROT_READ) = 0
mprotect(0x7f34917e8000, 1167360, PROT_READ|PROT_WRITE) = 0
mprotect(0x7f34917e8000, 1167360, PROT_READ|PROT_EXEC) = 0
set_tid_address(0x7f34922d89d0) = 18806
set_robust_list(0x7f34922d89e0, 24) = 0
rt_sigaction(SIGRTMIN, {0x7f34915d19f0, [], SA_RESTORER|SA_SIGINFO, 0x7f34915da8d0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f34915d1a80, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f34915da8d0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f3490dca000
mprotect(0x7f3490dca000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f34915c9ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f34915ca9d0, tls=0x7f34915ca700, child_tidptr=0x7f34915ca9d0) = 18807
munmap(0x7f3492237000, 127113) = 0
futex(0x7f3491b2a3c4, FUTEX_WAIT_PRIVATE, 1, NULL) = 0
futex(0x7f3491b2a380, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
sigaltstack({ss_sp=0xc820036000, ss_flags=0, ss_size=32672}, NULL) = 0
gettid() = 18806
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0x7f3491b06f80, FUTEX_WAKE, 1) = 1
futex(0x7f3491b06ec0, FUTEX_WAKE, 1) = 0
rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
sigaltstack({ss_sp=0, ss_flags=SS_DISABLE, ss_size=0}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 31), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34922e8000
write(1, "9\n", 29
) = 2
exit_group(0) = ?
+++ exited with 0 +++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment