{"action":"created","issue":{"url":"https://api.github.com/repos/cznic/sqlite/issues/12","repository_url":"https://api.github.com/repos/cznic/sqlite","labels_url":"https://api.github.com/repos/cznic/sqlite/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/cznic/sqlite/issues/12/comments","events_url":"https://api.github.com/repos/cznic/sqlite/issues/12/events","html_url":"https://github.com/cznic/sqlite/issues/12","id":233935509,"number":12,"title":"Need real malloc in cznic/crt.","user":{"login":"cznic","id":729580,"avatar_url":"https://avatars2.githubusercontent.com/u/729580?v=3","gravatar_id":"","url":"https://api.github.com/users/cznic","html_url":"https://github.com/cznic","followers_url":"https://api.github.com/users/cznic/followers","following_url":"https://api.github.com/users/cznic/following{/other_user}","gists_url":"https://api.github.com/users/cznic/gists{/gist_id}","starred_url":"https://api.github.com/users/cznic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cznic/subscriptions","organizations_url":"https://api.github.com/users/cznic/orgs","repos_url":"https://api.github.com/users/cznic/repos","events_url":"https://api.github.com/users/cznic/events{/privacy}","received_events_url":"https://api.github.com/users/cznic/received_events","type":"User","site_admin":false},"labels":[{"id":588435742,"url":"https://api.github.com/repos/cznic/sqlite/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"cznic","id":729580,"avatar_url":"https://avatars2.githubusercontent.com/u/729580?v=3","gravatar_id":"","url":"https://api.github.com/users/cznic","html_url":"https://github.com/cznic","followers_url":"https://api.github.com/users/cznic/followers","following_url":"https://api.github.com/users/cznic/following{/other_user}","gists_url":"https://api.github.com/users/cznic/gists{/gist_id}","starred_url":"https://api.github.com/users/cznic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cznic/subscriptions","organizations_url":"https://api.github.com/users/cznic/orgs","repos_url":"https://api.github.com/users/cznic/repos","events_url":"https://api.github.com/users/cznic/events{/privacy}","received_events_url":"https://api.github.com/users/cznic/received_events","type":"User","site_admin":false},"assignees":[{"login":"cznic","id":729580,"avatar_url":"https://avatars2.githubusercontent.com/u/729580?v=3","gravatar_id":"","url":"https://api.github.com/users/cznic","html_url":"https://github.com/cznic","followers_url":"https://api.github.com/users/cznic/followers","following_url":"https://api.github.com/users/cznic/following{/other_user}","gists_url":"https://api.github.com/users/cznic/gists{/gist_id}","starred_url":"https://api.github.com/users/cznic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cznic/subscriptions","organizations_url":"https://api.github.com/users/cznic/orgs","repos_url":"https://api.github.com/users/cznic/repos","events_url":"https://api.github.com/users/cznic/events{/privacy}","received_events_url":"https://api.github.com/users/cznic/received_events","type":"User","site_admin":false}],"milestone":null,"comments":85,"created_at":"2017-06-06T15:40:45Z","updated_at":"2017-06-25T17:20:57Z","closed_at":null,"body":"```go\r\nfunc TestMemDB(t *testing.T) {\r\n\t// Verify we can create out-of-the heap memory DB instance.\r\n\tdb, err := sql.Open(driverName, \"file::memory:\")\r\n\tif err != nil {\r\n\t\tt.Fatal(err)\r\n\t}\r\n\r\n\tdefer func() {\r\n\t\tdb.Close()\r\n\t}()\r\n\r\n\tv := strings.Repeat(\"a\", 1024)\r\n\tif _, err := db.Exec(`\r\n\tcreate table t(s string);\r\n\tbegin;\r\n\t`); err != nil {\r\n\t\tt.Fatal(err)\r\n\t}\r\n\r\n\ts, err := db.Prepare(\"insert into t values(?)\")\r\n\tif err != nil {\r\n\t\tt.Fatal(err)\r\n\t}\r\n\r\n\tfor i := 0; i < 2*heapSize/len(v); i++ {\r\n\t\tif _, err := s.Exec(v); err != nil {\r\n\t\t\tt.Fatalf(\"%v * %v= %v: %v\", i, len(v), i*len(v), err)\r\n\t\t}\r\n\t}\r\n\tif _, err := db.Exec(`commit;`); err != nil {\r\n\t\tt.Fatal(err)\r\n\t}\r\n}\r\n```\r\n\r\n`6861 * 1024= 7025664: out of memory (7)`\r\n\r\nNote: Perhaps use ccgo to convert musl malloc to Go."},"comment":{"url":"https://api.github.com/repos/cznic/sqlite/issues/comments/310915675","html_url":"https://github.com/cznic/sqlite/issues/12#issuecomment-310915675","issue_url":"https://api.github.com/repos/cznic/sqlite/issues/12","id":310915675,"user":{"login":"cznic","id":729580,"avatar_url":"https://avatars2.githubusercontent.com/u/729580?v=3","gravatar_id":"","url":"https://api.github.com/users/cznic","html_url":"https://github.com/cznic","followers_url":"https://api.github.com/users/cznic/followers","following_url":"https://api.github.com/users/cznic/following{/other_user}","gists_url":"https://api.github.com/users/cznic/gists{/gist_id}","starred_url":"https://api.github.com/users/cznic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cznic/subscriptions","organizations_url":"https://api.github.com/users/cznic/orgs","repos_url":"https://api.github.com/users/cznic/repos","events_url":"https://api.github.com/users/cznic/events{/privacy}","received_events_url":"https://api.github.com/users/cznic/received_events","type":"User","site_admin":false},"created_at":"2017-06-25T17:20:57Z","updated_at":"2017-06-25T17:20:57Z","body":"To be sure about that: Please commit the code you use to the repro branch, or maybe better to some repro2 or similar branch, and I'll try it here, thanks."}}
{"actor":{"display_login":"cznic"}}