Skip to content

Instantly share code, notes, and snippets.

@cablehead
Created September 11, 2017 08:47
Show Gist options
  • Save cablehead/dca0cdf18e8ff6e2d14321750e6b58e0 to your computer and use it in GitHub Desktop.
Save cablehead/dca0cdf18e8ff6e2d14321750e6b58e0 to your computer and use it in GitHub Desktop.
local h = levee.Hub()
local r, w = h.io:pipe()
h:spawn(function()
local err = w:write(("X"):rep(128*1024))
print(err)
w:close()
end)
local buf = d.Buffer()
while true do
buf:ensure(4096)
local err, n = r:read(buf:tail())
if err then break end
buf:bump(n)
end
print(buf:value())
bad address in system call argument (system.EFAULT)
cdata<unsigned char *>: 0x0c1b0000 65536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment