{"action":"created","comment":{"url":"https://api.github.com/repos/karies/root/pulls/comments/58999890","id":58999890,"diff_hunk":"@@ -0,0 +1,69 @@\n+//--------------------------------------------------------------------*- C++ -*-\n+// CLING - the C++ LLVM-based InterpreterG :)\n+// author:  Vassil Vassilev <vasil.georgiev.vasilev@cern.ch>\n+//\n+// This file is dual-licensed: you can choose to license it under the University\n+// of Illinois Open Source License or the GNU Lesser General Public License. See\n+// LICENSE.TXT for details.\n+//------------------------------------------------------------------------------\n+\n+#include \"cling/Utils/Validation.h\"\n+\n+#include <assert.h>\n+#include <errno.h>\n+#ifdef LLVM_ON_WIN32\n+# include <Windows.h>\n+#else\n+#include <fcntl.h>\n+# include <unistd.h>\n+#endif\n+\n+\n+\n+namespace cling {\n+  namespace utils {\n+\n+    static int getNullDevFileDescriptor() {\n+#ifdef LLVM_ON_WIN32\n+      return 0;\n+#else\n+      struct FileDescriptor {\n+        int FD;\n+        const char* file = \"/dev/null\";\n+        FileDescriptor() { FD = open(file, O_WRONLY); }\n+        ~FileDescriptor() {\n+          close(FD);\n+        }\n+      };\n+      static FileDescriptor nullDev;\n+      return nullDev.FD;\n+#endif\n+    }\n+\n+    // Checking whether the pointer points to a valid memory location\n+    // Used for checking of void* output\n+    // Should be moved to earlier stages (ex. IR) in the future","path":"interpreter/cling/lib/Utils/Validation.cpp","position":45,"original_position":45,"commit_id":"933010b326264dc6e95b07d890a7808da866fe9a","original_commit_id":"933010b326264dc6e95b07d890a7808da866fe9a","user":{"login":"CristinaCristescu","id":4940839,"avatar_url":"https://avatars.githubusercontent.com/u/4940839?v=3","gravatar_id":"","url":"https://api.github.com/users/CristinaCristescu","html_url":"https://github.com/CristinaCristescu","followers_url":"https://api.github.com/users/CristinaCristescu/followers","following_url":"https://api.github.com/users/CristinaCristescu/following{/other_user}","gists_url":"https://api.github.com/users/CristinaCristescu/gists{/gist_id}","starred_url":"https://api.github.com/users/CristinaCristescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CristinaCristescu/subscriptions","organizations_url":"https://api.github.com/users/CristinaCristescu/orgs","repos_url":"https://api.github.com/users/CristinaCristescu/repos","events_url":"https://api.github.com/users/CristinaCristescu/events{/privacy}","received_events_url":"https://api.github.com/users/CristinaCristescu/received_events","type":"User","site_admin":false},"body":"You are right","created_at":"2016-04-08T09:19:56Z","updated_at":"2016-04-08T09:19:56Z","html_url":"https://github.com/karies/root/pull/166#discussion_r58999890","pull_request_url":"https://api.github.com/repos/karies/root/pulls/166","_links":{"self":{"href":"https://api.github.com/repos/karies/root/pulls/comments/58999890"},"html":{"href":"https://github.com/karies/root/pull/166#discussion_r58999890"},"pull_request":{"href":"https://api.github.com/repos/karies/root/pulls/166"}}},"pull_request":{"url":"https://api.github.com/repos/karies/root/pulls/166","id":58727611,"html_url":"https://github.com/karies/root/pull/166","diff_url":"https://github.com/karies/root/pull/166.diff","patch_url":"https://github.com/karies/root/pull/166.patch","issue_url":"https://api.github.com/repos/karies/root/issues/166","number":166,"state":"open","locked":false,"title":"Null deref constexpr","user":{"login":"CristinaCristescu","id":4940839,"avatar_url":"https://avatars.githubusercontent.com/u/4940839?v=3","gravatar_id":"","url":"https://api.github.com/users/CristinaCristescu","html_url":"https://github.com/CristinaCristescu","followers_url":"https://api.github.com/users/CristinaCristescu/followers","following_url":"https://api.github.com/users/CristinaCristescu/following{/other_user}","gists_url":"https://api.github.com/users/CristinaCristescu/gists{/gist_id}","starred_url":"https://api.github.com/users/CristinaCristescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CristinaCristescu/subscriptions","organizations_url":"https://api.github.com/users/CristinaCristescu/orgs","repos_url":"https://api.github.com/users/CristinaCristescu/repos","events_url":"https://api.github.com/users/CristinaCristescu/events{/privacy}","received_events_url":"https://api.github.com/users/CristinaCristescu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-09T10:19:39Z","updated_at":"2016-04-08T09:19:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f53632161433fbbf465411ffed2a23c03dadda2e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/karies/root/pulls/166/commits","review_comments_url":"https://api.github.com/repos/karies/root/pulls/166/comments","review_comment_url":"https://api.github.com/repos/karies/root/pulls/comments{/number}","comments_url":"https://api.github.com/repos/karies/root/issues/166/comments","statuses_url":"https://api.github.com/repos/karies/root/statuses/933010b326264dc6e95b07d890a7808da866fe9a","head":{"label":"CristinaCristescu:NullDerefCostexpr","ref":"NullDerefCostexpr","sha":"933010b326264dc6e95b07d890a7808da866fe9a","user":{"login":"CristinaCristescu","id":4940839,"avatar_url":"https://avatars.githubusercontent.com/u/4940839?v=3","gravatar_id":"","url":"https://api.github.com/users/CristinaCristescu","html_url":"https://github.com/CristinaCristescu","followers_url":"https://api.github.com/users/CristinaCristescu/followers","following_url":"https://api.github.com/users/CristinaCristescu/following{/other_user}","gists_url":"https://api.github.com/users/CristinaCristescu/gists{/gist_id}","starred_url":"https://api.github.com/users/CristinaCristescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CristinaCristescu/subscriptions","organizations_url":"https://api.github.com/users/CristinaCristescu/orgs","repos_url":"https://api.github.com/users/CristinaCristescu/repos","events_url":"https://api.github.com/users/CristinaCristescu/events{/privacy}","received_events_url":"https://api.github.com/users/CristinaCristescu/received_events","type":"User","site_admin":false},"repo":{"id":11178465,"name":"root","full_name":"CristinaCristescu/root","owner":{"login":"CristinaCristescu","id":4940839,"avatar_url":"https://avatars.githubusercontent.com/u/4940839?v=3","gravatar_id":"","url":"https://api.github.com/users/CristinaCristescu","html_url":"https://github.com/CristinaCristescu","followers_url":"https://api.github.com/users/CristinaCristescu/followers","following_url":"https://api.github.com/users/CristinaCristescu/following{/other_user}","gists_url":"https://api.github.com/users/CristinaCristescu/gists{/gist_id}","starred_url":"https://api.github.com/users/CristinaCristescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CristinaCristescu/subscriptions","organizations_url":"https://api.github.com/users/CristinaCristescu/orgs","repos_url":"https://api.github.com/users/CristinaCristescu/repos","events_url":"https://api.github.com/users/CristinaCristescu/events{/privacy}","received_events_url":"https://api.github.com/users/CristinaCristescu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CristinaCristescu/root","description":"Mirror of official ROOT git repository located at ","fork":true,"url":"https://api.github.com/repos/CristinaCristescu/root","forks_url":"https://api.github.com/repos/CristinaCristescu/root/forks","keys_url":"https://api.github.com/repos/CristinaCristescu/root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CristinaCristescu/root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CristinaCristescu/root/teams","hooks_url":"https://api.github.com/repos/CristinaCristescu/root/hooks","issue_events_url":"https://api.github.com/repos/CristinaCristescu/root/issues/events{/number}","events_url":"https://api.github.com/repos/CristinaCristescu/root/events","assignees_url":"https://api.github.com/repos/CristinaCristescu/root/assignees{/user}","branches_url":"https://api.github.com/repos/CristinaCristescu/root/branches{/branch}","tags_url":"https://api.github.com/repos/CristinaCristescu/root/tags","blobs_url":"https://api.github.com/repos/CristinaCristescu/root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CristinaCristescu/root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CristinaCristescu/root/git/refs{/sha}","trees_url":"https://api.github.com/repos/CristinaCristescu/root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CristinaCristescu/root/statuses/{sha}","languages_url":"https://api.github.com/repos/CristinaCristescu/root/languages","stargazers_url":"https://api.github.com/repos/CristinaCristescu/root/stargazers","contributors_url":"https://api.github.com/repos/CristinaCristescu/root/contributors","subscribers_url":"https://api.github.com/repos/CristinaCristescu/root/subscribers","subscription_url":"https://api.github.com/repos/CristinaCristescu/root/subscription","commits_url":"https://api.github.com/repos/CristinaCristescu/root/commits{/sha}","git_commits_url":"https://api.github.com/repos/CristinaCristescu/root/git/commits{/sha}","comments_url":"https://api.github.com/repos/CristinaCristescu/root/comments{/number}","issue_comment_url":"https://api.github.com/repos/CristinaCristescu/root/issues/comments{/number}","contents_url":"https://api.github.com/repos/CristinaCristescu/root/contents/{+path}","compare_url":"https://api.github.com/repos/CristinaCristescu/root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CristinaCristescu/root/merges","archive_url":"https://api.github.com/repos/CristinaCristescu/root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CristinaCristescu/root/downloads","issues_url":"https://api.github.com/repos/CristinaCristescu/root/issues{/number}","pulls_url":"https://api.github.com/repos/CristinaCristescu/root/pulls{/number}","milestones_url":"https://api.github.com/repos/CristinaCristescu/root/milestones{/number}","notifications_url":"https://api.github.com/repos/CristinaCristescu/root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CristinaCristescu/root/labels{/name}","releases_url":"https://api.github.com/repos/CristinaCristescu/root/releases{/id}","deployments_url":"https://api.github.com/repos/CristinaCristescu/root/deployments","created_at":"2013-07-04T13:59:54Z","updated_at":"2014-06-26T09:36:02Z","pushed_at":"2016-04-07T14:50:30Z","git_url":"git://github.com/CristinaCristescu/root.git","ssh_url":"git@github.com:CristinaCristescu/root.git","clone_url":"https://github.com/CristinaCristescu/root.git","svn_url":"https://github.com/CristinaCristescu/root","homepage":"http://root.cern.ch","size":545982,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"karies:master","ref":"master","sha":"801d859b4f5fc4f60561693ec3486633ab74e4e4","user":{"login":"karies","id":144675,"avatar_url":"https://avatars.githubusercontent.com/u/144675?v=3","gravatar_id":"","url":"https://api.github.com/users/karies","html_url":"https://github.com/karies","followers_url":"https://api.github.com/users/karies/followers","following_url":"https://api.github.com/users/karies/following{/other_user}","gists_url":"https://api.github.com/users/karies/gists{/gist_id}","starred_url":"https://api.github.com/users/karies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karies/subscriptions","organizations_url":"https://api.github.com/users/karies/orgs","repos_url":"https://api.github.com/users/karies/repos","events_url":"https://api.github.com/users/karies/events{/privacy}","received_events_url":"https://api.github.com/users/karies/received_events","type":"User","site_admin":false},"repo":{"id":11053789,"name":"root","full_name":"karies/root","owner":{"login":"karies","id":144675,"avatar_url":"https://avatars.githubusercontent.com/u/144675?v=3","gravatar_id":"","url":"https://api.github.com/users/karies","html_url":"https://github.com/karies","followers_url":"https://api.github.com/users/karies/followers","following_url":"https://api.github.com/users/karies/following{/other_user}","gists_url":"https://api.github.com/users/karies/gists{/gist_id}","starred_url":"https://api.github.com/users/karies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karies/subscriptions","organizations_url":"https://api.github.com/users/karies/orgs","repos_url":"https://api.github.com/users/karies/repos","events_url":"https://api.github.com/users/karies/events{/privacy}","received_events_url":"https://api.github.com/users/karies/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karies/root","description":"Mirror of official ROOT git repository located at ","fork":true,"url":"https://api.github.com/repos/karies/root","forks_url":"https://api.github.com/repos/karies/root/forks","keys_url":"https://api.github.com/repos/karies/root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karies/root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karies/root/teams","hooks_url":"https://api.github.com/repos/karies/root/hooks","issue_events_url":"https://api.github.com/repos/karies/root/issues/events{/number}","events_url":"https://api.github.com/repos/karies/root/events","assignees_url":"https://api.github.com/repos/karies/root/assignees{/user}","branches_url":"https://api.github.com/repos/karies/root/branches{/branch}","tags_url":"https://api.github.com/repos/karies/root/tags","blobs_url":"https://api.github.com/repos/karies/root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karies/root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karies/root/git/refs{/sha}","trees_url":"https://api.github.com/repos/karies/root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karies/root/statuses/{sha}","languages_url":"https://api.github.com/repos/karies/root/languages","stargazers_url":"https://api.github.com/repos/karies/root/stargazers","contributors_url":"https://api.github.com/repos/karies/root/contributors","subscribers_url":"https://api.github.com/repos/karies/root/subscribers","subscription_url":"https://api.github.com/repos/karies/root/subscription","commits_url":"https://api.github.com/repos/karies/root/commits{/sha}","git_commits_url":"https://api.github.com/repos/karies/root/git/commits{/sha}","comments_url":"https://api.github.com/repos/karies/root/comments{/number}","issue_comment_url":"https://api.github.com/repos/karies/root/issues/comments{/number}","contents_url":"https://api.github.com/repos/karies/root/contents/{+path}","compare_url":"https://api.github.com/repos/karies/root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karies/root/merges","archive_url":"https://api.github.com/repos/karies/root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karies/root/downloads","issues_url":"https://api.github.com/repos/karies/root/issues{/number}","pulls_url":"https://api.github.com/repos/karies/root/pulls{/number}","milestones_url":"https://api.github.com/repos/karies/root/milestones{/number}","notifications_url":"https://api.github.com/repos/karies/root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karies/root/labels{/name}","releases_url":"https://api.github.com/repos/karies/root/releases{/id}","deployments_url":"https://api.github.com/repos/karies/root/deployments","created_at":"2013-06-29T14:35:42Z","updated_at":"2016-02-12T18:23:03Z","pushed_at":"2016-04-07T14:50:31Z","git_url":"git://github.com/karies/root.git","ssh_url":"git@github.com:karies/root.git","clone_url":"https://github.com/karies/root.git","svn_url":"https://github.com/karies/root","homepage":"http://root.cern.ch","size":556204,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":14,"forks":4,"open_issues":14,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/karies/root/pulls/166"},"html":{"href":"https://github.com/karies/root/pull/166"},"issue":{"href":"https://api.github.com/repos/karies/root/issues/166"},"comments":{"href":"https://api.github.com/repos/karies/root/issues/166/comments"},"review_comments":{"href":"https://api.github.com/repos/karies/root/pulls/166/comments"},"review_comment":{"href":"https://api.github.com/repos/karies/root/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/karies/root/pulls/166/commits"},"statuses":{"href":"https://api.github.com/repos/karies/root/statuses/933010b326264dc6e95b07d890a7808da866fe9a"}}}}