{"action":"created","issue":{"url":"https://api.github.com/repos/manastech/crystal/issues/917","labels_url":"https://api.github.com/repos/manastech/crystal/issues/917/labels{/name}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/917/comments","events_url":"https://api.github.com/repos/manastech/crystal/issues/917/events","html_url":"https://github.com/manastech/crystal/issues/917","id":92577241,"number":917,"title":"Compiler bug (crash)","user":{"login":"bararchy","id":1631073,"avatar_url":"https://avatars.githubusercontent.com/u/1631073?v=3","gravatar_id":"","url":"https://api.github.com/users/bararchy","html_url":"https://github.com/bararchy","followers_url":"https://api.github.com/users/bararchy/followers","following_url":"https://api.github.com/users/bararchy/following{/other_user}","gists_url":"https://api.github.com/users/bararchy/gists{/gist_id}","starred_url":"https://api.github.com/users/bararchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bararchy/subscriptions","organizations_url":"https://api.github.com/users/bararchy/orgs","repos_url":"https://api.github.com/users/bararchy/repos","events_url":"https://api.github.com/users/bararchy/events{/privacy}","received_events_url":"https://api.github.com/users/bararchy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-02T08:09:21Z","updated_at":"2015-07-02T08:14:34Z","closed_at":null,"body":"```\r\n; ModuleID = 'RSAccess::API::Helper'\r\n\r\n%String.1 = type { i32, i32, i32, i8 }\r\n%TCPSocket = type { i32, i1, i1, i1, i1, i32, %\"Slice(UInt8).11\", i32, %\"Array(Fiber).17\"*, %\"Array(Fiber).17\"*, i8*, i8* }\r\n%\"Slice(UInt8).11\" = type { i8*, i32 }\r\n%\"Array(Fiber).17\" = type { i32, i32, i32, %Fiber.3** }\r\n%Fiber.3 = type { i32, i8*, %\"(( -> Nil) | ( -> Void)).4\", i8*, i8*, i8*, %Fiber.3*, %Fiber.3* }\r\n%\"(( -> Nil) | ( -> Void)).4\" = type { i32, [2 x i64] }\r\n\r\n@symbol_table = external global [43 x %String.1*]\r\n\r\ndefine %String.1* @\"*RSAccess::API::Helper::read_sock<TCPSocket, Int32>:String?\"(%TCPSocket* %socket, i32 %to_read) {\r\nalloca:\r\n  %buf = alloca [512 x i8]\r\n  %len = alloca i32\r\n  %data = alloca %String.1*\r\n  store %String.1* null, %String.1** %data\r\n\r\nentry:                                            ; No predecessors!\r\n  %0 = icmp eq i32 %to_read, 10\r\n  br i1 %0, label %then, label %else\r\n\r\nthen:                                             ; preds = %entry\r\n  br label %exit\r\n\r\nelse:                                             ; preds = %entry\r\n  %1 = icmp eq i32 %to_read, 16384\r\n  br i1 %1, label %then1, label %else2\r\n\r\nexit:                                             ; preds = %exit3, %then\r\n\r\nthen1:                                            ; preds = %else\r\n  br label %exit3\r\n\r\nelse2:                                            ; preds = %else\r\n  br label %exit3\r\n\r\nexit3:                                            ; preds = %else2, %then1\r\n  br label %exit\r\n}\r\nBug: trying to downcast (StaticArray(UInt8, 16384) | StaticArray(UInt8, 512) | StaticArray(UInt8, 10)) <- StaticArray(UInt8, 512)\r\n_init +167814 [78050720]\r\n_init +3226138 [78050720]\r\n_init +3328272 [78050720]\r\n_init +3244878 [78050720]\r\n_init +3338921 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3359497 [78050720]\r\n_init +3338314 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3318753 [78050720]\r\n_init +3246899 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3318753 [78050720]\r\n_init +3246899 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3321894 [78050720]\r\n_init +3246844 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3258008 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3324967 [78050720]\r\n_init +3251582 [78050720]\r\n_init +3324967 [78050720]\r\n_init +3251608 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3324967 [78050720]\r\n_init +3251582 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3324967 [78050720]\r\n_init +3251582 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3253704 [78050720]\r\n_init +3359497 [78050720]\r\n_init +3338314 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3347392 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3359497 [78050720]\r\n_init +3338314 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3324967 [78050720]\r\n_init +3251608 [78050720]\r\n_init +3318753 [78050720]\r\n_init +3246899 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3318753 [78050720]\r\n_init +3246899 [78050720]\r\n_init +3324967 [78050720]\r\n_init +3251582 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3347392 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3318753 [78050720]\r\n_init +3246899 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3318753 [78050720]\r\n_init +3246899 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3252001 [78050720]\r\n_init +3258008 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3258008 [78050720]\r\n_init +3292286 [78050720]\r\n_init +3251854 [78050720]\r\n_init +3338418 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3318753 [78050720]\r\n_init +3246899 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3292286 [78050720]\r\n_init +3251854 [78050720]\r\n_init +3359031 [78050720]\r\n_init +3338314 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3252001 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3246157 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3307352 [78050720]\r\n_init +3302676 [78050720]\r\n_init +3340279 [78050720]\r\n_init +3245939 [78050720]\r\n_init +3125099 [78050720]\r\n_init +3110489 [78050720]\r\n_init +2437557 [78050720]\r\n_init +6086062 [78050720]\r\n_init +6084024 [78050720]\r\n__libc_start_main +240 [78050720]\r\n_init +164585 [78050720]\r\n +164585 [78050720]\r\n\r\nError: you've found a bug in the Crystal compiler. Please open an issue: https://github.com/manastech/crystal/issues\r\n```"},"comment":{"url":"https://api.github.com/repos/manastech/crystal/issues/comments/117953541","html_url":"https://github.com/manastech/crystal/issues/917#issuecomment-117953541","issue_url":"https://api.github.com/repos/manastech/crystal/issues/917","id":117953541,"user":{"login":"jhass","id":141294,"avatar_url":"https://avatars.githubusercontent.com/u/141294?v=3","gravatar_id":"","url":"https://api.github.com/users/jhass","html_url":"https://github.com/jhass","followers_url":"https://api.github.com/users/jhass/followers","following_url":"https://api.github.com/users/jhass/following{/other_user}","gists_url":"https://api.github.com/users/jhass/gists{/gist_id}","starred_url":"https://api.github.com/users/jhass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhass/subscriptions","organizations_url":"https://api.github.com/users/jhass/orgs","repos_url":"https://api.github.com/users/jhass/repos","events_url":"https://api.github.com/users/jhass/events{/privacy}","received_events_url":"https://api.github.com/users/jhass/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T08:14:34Z","updated_at":"2015-07-02T08:14:34Z","body":"Please provide a test case to reproduce."}}