{"action":"created","issue":{"url":"https://api.github.com/repos/sfackler/rust-postgres/issues/31","labels_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/31/comments","events_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/31/events","html_url":"https://github.com/sfackler/rust-postgres/issues/31","id":30572516,"number":31,"title":"Segfault","user":{"login":"jeff-davis","id":214386,"avatar_url":"https://avatars.githubusercontent.com/u/214386?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff-davis","html_url":"https://github.com/jeff-davis","followers_url":"https://api.github.com/users/jeff-davis/followers","following_url":"https://api.github.com/users/jeff-davis/following{/other_user}","gists_url":"https://api.github.com/users/jeff-davis/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff-davis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff-davis/subscriptions","organizations_url":"https://api.github.com/users/jeff-davis/orgs","repos_url":"https://api.github.com/users/jeff-davis/repos","events_url":"https://api.github.com/users/jeff-davis/events{/privacy}","received_events_url":"https://api.github.com/users/jeff-davis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-04-01T05:35:20Z","updated_at":"2015-02-13T03:07:12Z","closed_at":null,"body":"```\r\nextern crate postgres;\r\n\r\nuse postgres::{PostgresConnection, NoSsl};\r\nuse postgres::types::ToSql;\r\n\r\nfn main() {\r\n  let mut content : ~str = ~\"\";\r\n  {\r\n    let conn = PostgresConnection::connect(\"postgres://jdavis@localhost:5432/postgres\", &NoSsl).unwrap();\r\n    let stmt = conn.prepare(\"SELECT x FROM t\").unwrap();\r\n    for row in stmt.query([]).unwrap() {\r\n      let val : i32 = row[1];\r\n      content.push_str(format!(\"<li>{}</li>\\n\", val));\r\n    }\r\n  }\r\n\r\n  println!(\"{}\", content);\r\n}\r\n```\r\n\r\nCauses a segfault on the rust-nightly package I installed today (rustc 0.10-pre).\r\n\r\nBacktrace:\r\n\r\n```\r\n(gdb) bt\r\n#0  0x00007ffff7a9235d in _int_free (av=0x7ffff7dd3740 <main_arena>, p=0x8743a0, have_lock=0) at malloc.c:3924\r\n#1  0x0000000000511ccb in _$UP$$UP$reseeding..ReseedingRng$LT$StdRng$C$TaskRngReseeder$GT$::glue_drop.5898::hca63f8a2631aec80 ()\r\n#2  0x00000000008736d8 in ?? ()\r\n#3  0x00000000005c352b in rt::task::Task::run::closure.41636 ()\r\n#4  0x00000000005c3432 in rt::task::Task::run::closure.41627 ()\r\n#5  0x00000000005ce9fc in rust_try ()\r\n#6  0x00000000005c3282 in rt::task::Task::run::h3233312d889b0104os9::v0.10.pre ()\r\n#7  0x0000000000441ef4 in start::h6478af498774a94fzvd::v0.10.pre ()\r\n#8  0x0000000000441ce4 in lang_start::hdd717b0e84ff646bTud::v0.10.pre ()\r\n#9  0x000000000040664f in main ()\r\n```"},"comment":{"url":"https://api.github.com/repos/sfackler/rust-postgres/issues/comments/74197976","html_url":"https://github.com/sfackler/rust-postgres/issues/31#issuecomment-74197976","issue_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/31","id":74197976,"user":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T03:07:12Z","updated_at":"2015-02-13T03:07:12Z","body":"I believe this should be fixed by rust-lang/rust#21972."}}