{"action":"created","comment":{"url":"https://api.github.com/repos/libuv/libuv/pulls/comments/157386100","pull_request_review_id":84017743,"id":157386100,"diff_hunk":"@@ -229,4 +231,61 @@ UNUSED static int can_ipv6(void) {\n   \"Cygwin runtime hangs on listen+connect in same process.\"\n #endif\n \n+#if !defined(MAP_ANONYMOUS)\n+#if defined(MAP_ANON)\n+#define MAP_ANONYMOUS MAP_ANON\n+#else\n+#define MAP_ANONYMOUS 0 // MAP_FILE\n+#endif\n+#endif\n+\n+/* Allocate a large, mostly-zero'd, mostly-readonly memory region */\n+UNUSED static void *zalloc_2gb(void) {\n+#if defined(_WIN32)\n+  /* Win32 just can't allocate large blocks of memory reliably,\n+   * and Win64 can't use them in IO,\n+   * so we actually aren't going to test for it's behavior */\n+  const size_t nbytes = (1u << 30u) + 1;\n+  return calloc(1, nbytes);\n+#else\n+  const size_t nbytes = (1u << 31u) + 1;\n+  char* const addr = (char*)0x20000000L + ((sizeof(void*) > 4) ? 0x200000000L : 0);\n+  char* const endaddr = addr + nbytes;\n+  char *p;\n+  long pagesize;\n+  int fd;\n+  if (sizeof(void*) > 4) {\n+    /* If we can, first just try to allocate something normally. */\n+    p = calloc(1, nbytes);\n+    if (p)\n+      return p;\n+  }\n+  /* If this allocation would occupy most of memory, try instead just to make a\n+   * large consecutive region of memory readable (ignoring its contents). */","path":"test/task.h","position":43,"original_position":43,"commit_id":"b77e32e785dda3aa80e9c78a4bfc8147606b30e9","original_commit_id":"b77e32e785dda3aa80e9c78a4bfc8147606b30e9","user":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars1.githubusercontent.com/u/330950?v=4","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"body":"The alternative is that many of the buildbots (especially the 32-bit ones, but also it seems some 64-bit ones) can't run this test at all. And it seems to work fairly well on x86.","created_at":"2017-12-18T00:43:46Z","updated_at":"2017-12-18T00:43:46Z","html_url":"https://github.com/libuv/libuv/pull/1501#discussion_r157386100","pull_request_url":"https://api.github.com/repos/libuv/libuv/pulls/1501","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/libuv/libuv/pulls/comments/157386100"},"html":{"href":"https://github.com/libuv/libuv/pull/1501#discussion_r157386100"},"pull_request":{"href":"https://api.github.com/repos/libuv/libuv/pulls/1501"}},"in_reply_to_id":157384195},"pull_request":{"url":"https://api.github.com/repos/libuv/libuv/pulls/1501","id":136831189,"html_url":"https://github.com/libuv/libuv/pull/1501","diff_url":"https://github.com/libuv/libuv/pull/1501.diff","patch_url":"https://github.com/libuv/libuv/pull/1501.patch","issue_url":"https://api.github.com/repos/libuv/libuv/issues/1501","number":1501,"state":"open","locked":false,"title":"stream: limit unix read/write to 2GB at a time","user":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars1.githubusercontent.com/u/330950?v=4","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"body":"On some platforms, notably OSX, read/readv/write/writev all return\r\nan EINVAL if the requested number of bytes is greater than INT32_MAX.\r\n\r\nWe therefore limit each such call to 2GB on all platforms. On\r\nplatforms where this is not an issue, the overhead of an extra syscall\r\nfor every 2GB of read/write is negligible.\r\n\r\n(For original PR and issue report, see https://github.com/JuliaLang/libuv/pull/33)","created_at":"2017-08-21T19:58:04Z","updated_at":"2017-12-18T00:43:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d0f066f65ba624c24ff5f0d68263bb0ec3b4617","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/libuv/libuv/pulls/1501/commits","review_comments_url":"https://api.github.com/repos/libuv/libuv/pulls/1501/comments","review_comment_url":"https://api.github.com/repos/libuv/libuv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libuv/libuv/issues/1501/comments","statuses_url":"https://api.github.com/repos/libuv/libuv/statuses/b77e32e785dda3aa80e9c78a4bfc8147606b30e9","head":{"label":"vtjnash:jn/mach-read-write-limit","ref":"jn/mach-read-write-limit","sha":"b77e32e785dda3aa80e9c78a4bfc8147606b30e9","user":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars1.githubusercontent.com/u/330950?v=4","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"repo":{"id":76082560,"name":"libuv","full_name":"vtjnash/libuv","owner":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars1.githubusercontent.com/u/330950?v=4","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vtjnash/libuv","description":"Cross-platform asynchronous I/O","fork":true,"url":"https://api.github.com/repos/vtjnash/libuv","forks_url":"https://api.github.com/repos/vtjnash/libuv/forks","keys_url":"https://api.github.com/repos/vtjnash/libuv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vtjnash/libuv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vtjnash/libuv/teams","hooks_url":"https://api.github.com/repos/vtjnash/libuv/hooks","issue_events_url":"https://api.github.com/repos/vtjnash/libuv/issues/events{/number}","events_url":"https://api.github.com/repos/vtjnash/libuv/events","assignees_url":"https://api.github.com/repos/vtjnash/libuv/assignees{/user}","branches_url":"https://api.github.com/repos/vtjnash/libuv/branches{/branch}","tags_url":"https://api.github.com/repos/vtjnash/libuv/tags","blobs_url":"https://api.github.com/repos/vtjnash/libuv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vtjnash/libuv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vtjnash/libuv/git/refs{/sha}","trees_url":"https://api.github.com/repos/vtjnash/libuv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vtjnash/libuv/statuses/{sha}","languages_url":"https://api.github.com/repos/vtjnash/libuv/languages","stargazers_url":"https://api.github.com/repos/vtjnash/libuv/stargazers","contributors_url":"https://api.github.com/repos/vtjnash/libuv/contributors","subscribers_url":"https://api.github.com/repos/vtjnash/libuv/subscribers","subscription_url":"https://api.github.com/repos/vtjnash/libuv/subscription","commits_url":"https://api.github.com/repos/vtjnash/libuv/commits{/sha}","git_commits_url":"https://api.github.com/repos/vtjnash/libuv/git/commits{/sha}","comments_url":"https://api.github.com/repos/vtjnash/libuv/comments{/number}","issue_comment_url":"https://api.github.com/repos/vtjnash/libuv/issues/comments{/number}","contents_url":"https://api.github.com/repos/vtjnash/libuv/contents/{+path}","compare_url":"https://api.github.com/repos/vtjnash/libuv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vtjnash/libuv/merges","archive_url":"https://api.github.com/repos/vtjnash/libuv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vtjnash/libuv/downloads","issues_url":"https://api.github.com/repos/vtjnash/libuv/issues{/number}","pulls_url":"https://api.github.com/repos/vtjnash/libuv/pulls{/number}","milestones_url":"https://api.github.com/repos/vtjnash/libuv/milestones{/number}","notifications_url":"https://api.github.com/repos/vtjnash/libuv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vtjnash/libuv/labels{/name}","releases_url":"https://api.github.com/repos/vtjnash/libuv/releases{/id}","deployments_url":"https://api.github.com/repos/vtjnash/libuv/deployments","created_at":"2016-12-10T01:19:11Z","updated_at":"2016-12-10T01:19:14Z","pushed_at":"2017-12-15T17:08:28Z","git_url":"git://github.com/vtjnash/libuv.git","ssh_url":"git@github.com:vtjnash/libuv.git","clone_url":"https://github.com/vtjnash/libuv.git","svn_url":"https://github.com/vtjnash/libuv","homepage":"http://libuv.org/","size":12747,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v1.x"}},"base":{"label":"libuv:v1.x","ref":"v1.x","sha":"e771ede0699f0b4a05d9ab2d824a32a4df73964e","user":{"login":"libuv","id":4030929,"avatar_url":"https://avatars1.githubusercontent.com/u/4030929?v=4","gravatar_id":"","url":"https://api.github.com/users/libuv","html_url":"https://github.com/libuv","followers_url":"https://api.github.com/users/libuv/followers","following_url":"https://api.github.com/users/libuv/following{/other_user}","gists_url":"https://api.github.com/users/libuv/gists{/gist_id}","starred_url":"https://api.github.com/users/libuv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libuv/subscriptions","organizations_url":"https://api.github.com/users/libuv/orgs","repos_url":"https://api.github.com/users/libuv/repos","events_url":"https://api.github.com/users/libuv/events{/privacy}","received_events_url":"https://api.github.com/users/libuv/received_events","type":"Organization","site_admin":false},"repo":{"id":14812739,"name":"libuv","full_name":"libuv/libuv","owner":{"login":"libuv","id":4030929,"avatar_url":"https://avatars1.githubusercontent.com/u/4030929?v=4","gravatar_id":"","url":"https://api.github.com/users/libuv","html_url":"https://github.com/libuv","followers_url":"https://api.github.com/users/libuv/followers","following_url":"https://api.github.com/users/libuv/following{/other_user}","gists_url":"https://api.github.com/users/libuv/gists{/gist_id}","starred_url":"https://api.github.com/users/libuv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libuv/subscriptions","organizations_url":"https://api.github.com/users/libuv/orgs","repos_url":"https://api.github.com/users/libuv/repos","events_url":"https://api.github.com/users/libuv/events{/privacy}","received_events_url":"https://api.github.com/users/libuv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libuv/libuv","description":"Cross-platform asynchronous I/O","fork":false,"url":"https://api.github.com/repos/libuv/libuv","forks_url":"https://api.github.com/repos/libuv/libuv/forks","keys_url":"https://api.github.com/repos/libuv/libuv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libuv/libuv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libuv/libuv/teams","hooks_url":"https://api.github.com/repos/libuv/libuv/hooks","issue_events_url":"https://api.github.com/repos/libuv/libuv/issues/events{/number}","events_url":"https://api.github.com/repos/libuv/libuv/events","assignees_url":"https://api.github.com/repos/libuv/libuv/assignees{/user}","branches_url":"https://api.github.com/repos/libuv/libuv/branches{/branch}","tags_url":"https://api.github.com/repos/libuv/libuv/tags","blobs_url":"https://api.github.com/repos/libuv/libuv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libuv/libuv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libuv/libuv/git/refs{/sha}","trees_url":"https://api.github.com/repos/libuv/libuv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libuv/libuv/statuses/{sha}","languages_url":"https://api.github.com/repos/libuv/libuv/languages","stargazers_url":"https://api.github.com/repos/libuv/libuv/stargazers","contributors_url":"https://api.github.com/repos/libuv/libuv/contributors","subscribers_url":"https://api.github.com/repos/libuv/libuv/subscribers","subscription_url":"https://api.github.com/repos/libuv/libuv/subscription","commits_url":"https://api.github.com/repos/libuv/libuv/commits{/sha}","git_commits_url":"https://api.github.com/repos/libuv/libuv/git/commits{/sha}","comments_url":"https://api.github.com/repos/libuv/libuv/comments{/number}","issue_comment_url":"https://api.github.com/repos/libuv/libuv/issues/comments{/number}","contents_url":"https://api.github.com/repos/libuv/libuv/contents/{+path}","compare_url":"https://api.github.com/repos/libuv/libuv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libuv/libuv/merges","archive_url":"https://api.github.com/repos/libuv/libuv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libuv/libuv/downloads","issues_url":"https://api.github.com/repos/libuv/libuv/issues{/number}","pulls_url":"https://api.github.com/repos/libuv/libuv/pulls{/number}","milestones_url":"https://api.github.com/repos/libuv/libuv/milestones{/number}","notifications_url":"https://api.github.com/repos/libuv/libuv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libuv/libuv/labels{/name}","releases_url":"https://api.github.com/repos/libuv/libuv/releases{/id}","deployments_url":"https://api.github.com/repos/libuv/libuv/deployments","created_at":"2013-11-30T00:29:56Z","updated_at":"2017-12-17T23:31:26Z","pushed_at":"2017-12-17T23:56:24Z","git_url":"git://github.com/libuv/libuv.git","ssh_url":"git@github.com:libuv/libuv.git","clone_url":"https://github.com/libuv/libuv.git","svn_url":"https://github.com/libuv/libuv","homepage":"http://libuv.org/","size":12439,"stargazers_count":7988,"watchers_count":7988,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1340,"mirror_url":null,"archived":false,"open_issues_count":164,"license":null,"forks":1340,"open_issues":164,"watchers":7988,"default_branch":"v1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/libuv/libuv/pulls/1501"},"html":{"href":"https://github.com/libuv/libuv/pull/1501"},"issue":{"href":"https://api.github.com/repos/libuv/libuv/issues/1501"},"comments":{"href":"https://api.github.com/repos/libuv/libuv/issues/1501/comments"},"review_comments":{"href":"https://api.github.com/repos/libuv/libuv/pulls/1501/comments"},"review_comment":{"href":"https://api.github.com/repos/libuv/libuv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libuv/libuv/pulls/1501/commits"},"statuses":{"href":"https://api.github.com/repos/libuv/libuv/statuses/b77e32e785dda3aa80e9c78a4bfc8147606b30e9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vtjnash"}}