{"action":"created","issue":{"url":"https://api.github.com/repos/ponylang/ponyc/issues/1186","repository_url":"https://api.github.com/repos/ponylang/ponyc","labels_url":"https://api.github.com/repos/ponylang/ponyc/issues/1186/labels{/name}","comments_url":"https://api.github.com/repos/ponylang/ponyc/issues/1186/comments","events_url":"https://api.github.com/repos/ponylang/ponyc/issues/1186/events","html_url":"https://github.com/ponylang/ponyc/issues/1186","id":174384008,"number":1186,"title":"Segfault in String.find() (maybe linked to #1146)","user":{"login":"lisael","id":893463,"avatar_url":"https://avatars.githubusercontent.com/u/893463?v=3","gravatar_id":"","url":"https://api.github.com/users/lisael","html_url":"https://github.com/lisael","followers_url":"https://api.github.com/users/lisael/followers","following_url":"https://api.github.com/users/lisael/following{/other_user}","gists_url":"https://api.github.com/users/lisael/gists{/gist_id}","starred_url":"https://api.github.com/users/lisael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lisael/subscriptions","organizations_url":"https://api.github.com/users/lisael/orgs","repos_url":"https://api.github.com/users/lisael/repos","events_url":"https://api.github.com/users/lisael/events{/privacy}","received_events_url":"https://api.github.com/users/lisael/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ponylang/ponyc/labels/bug:%201%20-%20needs%20investigation","name":"bug: 1 - needs investigation","color":"f7c6c7"},{"url":"https://api.github.com/repos/ponylang/ponyc/labels/priority:%203%20-%20high","name":"priority: 3 - high","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"Praetonus","id":5193706,"avatar_url":"https://avatars.githubusercontent.com/u/5193706?v=3","gravatar_id":"","url":"https://api.github.com/users/Praetonus","html_url":"https://github.com/Praetonus","followers_url":"https://api.github.com/users/Praetonus/followers","following_url":"https://api.github.com/users/Praetonus/following{/other_user}","gists_url":"https://api.github.com/users/Praetonus/gists{/gist_id}","starred_url":"https://api.github.com/users/Praetonus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praetonus/subscriptions","organizations_url":"https://api.github.com/users/Praetonus/orgs","repos_url":"https://api.github.com/users/Praetonus/repos","events_url":"https://api.github.com/users/Praetonus/events{/privacy}","received_events_url":"https://api.github.com/users/Praetonus/received_events","type":"User","site_admin":false},"assignees":[{"login":"Praetonus","id":5193706,"avatar_url":"https://avatars.githubusercontent.com/u/5193706?v=3","gravatar_id":"","url":"https://api.github.com/users/Praetonus","html_url":"https://github.com/Praetonus","followers_url":"https://api.github.com/users/Praetonus/followers","following_url":"https://api.github.com/users/Praetonus/following{/other_user}","gists_url":"https://api.github.com/users/Praetonus/gists{/gist_id}","starred_url":"https://api.github.com/users/Praetonus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praetonus/subscriptions","organizations_url":"https://api.github.com/users/Praetonus/orgs","repos_url":"https://api.github.com/users/Praetonus/repos","events_url":"https://api.github.com/users/Praetonus/events{/privacy}","received_events_url":"https://api.github.com/users/Praetonus/received_events","type":"User","site_admin":false}],"milestone":null,"comments":19,"created_at":"2016-08-31T21:31:21Z","updated_at":"2016-09-06T13:58:23Z","closed_at":null,"body":"Hello. I had a segfault running this code:\r\n\r\n```pony\r\nuse \"ponybench\"\r\n\r\nclass BuiltinFinder\r\n  let _n: String\r\n  let _h: String\r\n  new val create(needle: String, haystack: String) =>\r\n    _n = needle\r\n    _h = haystack\r\n\r\n  fun box apply(): ISize => try _h.find(_n) else -1 end\r\n\r\n\r\nactor Main\r\n  let bench: PonyBench\r\n  new create(env: Env) =>\r\n    bench = PonyBench(env)\r\n\r\n    var needle = \"x\"\r\n    var haystack = \"y\"\r\n    bench[ISize](\"builtin\", BuiltinFinder(needle, haystack))\r\n```\r\n\r\nI couldn't narrow the LoC using Debug.out() traces, yet (I guess in ponybench) because the error doesn't happen when I compile in debug mode (`ponyc -d`).\r\n\r\n```\r\n# ponyc --version\r\n0.3.0-5-gb2cdd03 [release]\r\n\r\n# llvm-ar-3.8 --version\r\nLLVM (http://llvm.org/):\r\n  LLVM version 3.8.0\r\n  \r\n  Optimized build.\r\n  Built Mar  8 2016 (11:05:43).\r\n  Default target: x86_64-pc-linux-gnu\r\n  Host CPU: broadwell\r\n```"},"comment":{"url":"https://api.github.com/repos/ponylang/ponyc/issues/comments/244958466","html_url":"https://github.com/ponylang/ponyc/issues/1186#issuecomment-244958466","issue_url":"https://api.github.com/repos/ponylang/ponyc/issues/1186","id":244958466,"user":{"login":"aturley","id":714337,"avatar_url":"https://avatars.githubusercontent.com/u/714337?v=3","gravatar_id":"","url":"https://api.github.com/users/aturley","html_url":"https://github.com/aturley","followers_url":"https://api.github.com/users/aturley/followers","following_url":"https://api.github.com/users/aturley/following{/other_user}","gists_url":"https://api.github.com/users/aturley/gists{/gist_id}","starred_url":"https://api.github.com/users/aturley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturley/subscriptions","organizations_url":"https://api.github.com/users/aturley/orgs","repos_url":"https://api.github.com/users/aturley/repos","events_url":"https://api.github.com/users/aturley/events{/privacy}","received_events_url":"https://api.github.com/users/aturley/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T13:58:23Z","updated_at":"2016-09-06T13:58:23Z","body":"As another data point, there is no segfault if `h` is assigned by calling the `String` constructor rather than using a string literal."}}
{"actor":{"display_login":"aturley"}}