Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ strace -e open,read out/Release/node -pe 'require("fs").readFileSync("/proc/self/mem")'
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\0\0\0\0\0\0"..., 832) = 832
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
open("/usr/lib/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\243\5\0\0\0\0\0"..., 832) = 832
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360>\0\0\0\0\0\0"..., 832) = 832
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P-\0\0\0\0\0\0"..., 832) = 832
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360Y\0\0\0\0\0\0"..., 832) = 832
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\355\1\0\0\0\0\0"..., 832) = 832
open("/proc/self/mem", O_RDONLY) = 5
read(5, 0x2aec650, 4048) = -1 EIO (Input/output error)
fs.js:316
var r = binding.read(fd, buffer, offset, length, position);
^
Error: UNKNOWN, unknown error
at Object.readSync (fs.js:316:19)
at Object.readFileSync (fs.js:161:19)
at Object.<anonymous> (eval at <anonymous> (eval:1:82))
at Object.<anonymous> (eval:1:70)
at Module._compile (module.js:444:26)
at startup (node.js:77:27)
at node.js:595:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.