Skip to content

Instantly share code, notes, and snippets.

@oprypin

oprypin/test.cr Secret

Last active November 25, 2020 19:54
Show Gist options
  • Save oprypin/a73a07a847028dec9e0cf83e99db100b to your computer and use it in GitHub Desktop.
Save oprypin/a73a07a847028dec9e0cf83e99db100b to your computer and use it in GitHub Desktop.
require "http"
def get(host, &block)
HTTP::Client.new(host).exec("GET", "/") do
block.call
end
end
a = "example.org"
while a
get(a) do
a = nil
end
end
Invalid memory access (signal 11) at address 0xc
[0x55c0dbf2cf76] print_backtrace at crystal/src/exception/call_stack.cr:121:5
[0x55c0dbf1576c] __crystal_sigfault_handler at crystal/src/signal.cr:347:3
[0x55c0dc043a00] sigfault_handler +40
[0x7facdc9170f0] ???
[0x55c0dbf238a6] [] at crystal/src/pointer.cr:117:6
[0x55c0dbf46a17] calc_excess_left at crystal/src/string.cr:1921:11
[0x55c0dbf469a3] strip at rystal/src/string.cr:1705:5
[0x55c0dc02cce5] initialize at crystal/src/uri/uri_parser.cr:17:16
[0x55c0dc02cc95] new at crystal/src/uri/uri_parser.cr:15:5
[0x55c0dbfd2b61] parse at crystal/src/uri.cr:477:5
[0x55c0dc02b69b] check_host_only at crystal/src/http/client.cr:164:11
[0x55c0dc02b5c8] initialize at crystal/src/http/client.cr:132:5
[0x55c0dc02b580] new at crystal/src/http/client.cr:129:3
[0x55c0dbf18fec] get at /tmp/test.cr:4:3
[0x55c0dbf10f3d] __crystal_main at /tmp/test.cr:11:3
[0x55c0dc0439d6] main_user_code at crystal/src/crystal/main.cr:105:5
[0x55c0dc04386c] main at crystal/src/crystal/main.cr:91:7
[0x55c0dbf120c6] main at crystal/src/crystal/main.cr:114:3
[0x7facdc6de152] __libc_start_main +242
[0x55c0dbf0295e] _start +46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment