{"action":"created","comment":{"url":"https://api.github.com/repos/LLNL/GOTCHA/pulls/comments/119423263","pull_request_review_id":41301714,"id":119423263,"diff_hunk":"@@ -0,0 +1,36 @@\n+#include \"gotcha_dl.h\"\n+#include \"tool.h\"\n+#include \"libc_wrappers.h\"\n+#include \"elf_ops.h\"\n+\n+void* dlopen_wrapper(const char* filename, int flags){\n+  void* handle = orig_dlopen(filename,flags);\n+  filterLibrariesByName(\"libdl\");\n+  struct binding_t* tool_iter = get_bindings();\n+  for(;tool_iter!=NULL;tool_iter = tool_iter->next_binding){\n+    /**\n+     * If you remove this comparison, you will overwrite\n+     * libdl's dlsym relocation with gotcha's, leading to\n+     * infinite recursion. This is cool, but inefficient.\n+     */\n+    if(gotcha_strcmp(tool_iter->tool->tool_name, \"gotcha\")!=0){\n+      gotcha_wrap(tool_iter->user_binding,tool_iter->user_binding_size,tool_iter->tool->tool_name);","path":"src/gotcha_dl.c","position":17,"original_position":17,"commit_id":"6b99822ab1b7228ce0a981fbc70fa733475c0844","original_commit_id":"6b99822ab1b7228ce0a981fbc70fa733475c0844","user":{"login":"DavidPoliakoff","id":4220361,"avatar_url":"https://avatars1.githubusercontent.com/u/4220361?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidPoliakoff","html_url":"https://github.com/DavidPoliakoff","followers_url":"https://api.github.com/users/DavidPoliakoff/followers","following_url":"https://api.github.com/users/DavidPoliakoff/following{/other_user}","gists_url":"https://api.github.com/users/DavidPoliakoff/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidPoliakoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidPoliakoff/subscriptions","organizations_url":"https://api.github.com/users/DavidPoliakoff/orgs","repos_url":"https://api.github.com/users/DavidPoliakoff/repos","events_url":"https://api.github.com/users/DavidPoliakoff/events{/privacy}","received_events_url":"https://api.github.com/users/DavidPoliakoff/received_events","type":"User","site_admin":false},"body":"Re: C\r\n\r\n```\r\n#1  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#2  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#3  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#4  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#5  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#6  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#7  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#8  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#9  0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#10 0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n#11 0x00002aaaaacd501f in dlsym_wrapper (handle=0x6041d0, symbol_name=0x400d4e \"test_return_five\") at /g/g0/dzpolia/src/gotcha/src/gotcha_dl.c:36\r\n```\r\n\r\nThat goes on for at least 2000 stack frames. I'm honestly not quite sure why any more, give me a bit to reason about why this is what it is","created_at":"2017-05-31T17:36:10Z","updated_at":"2017-05-31T17:36:10Z","html_url":"https://github.com/LLNL/GOTCHA/pull/26#discussion_r119423263","pull_request_url":"https://api.github.com/repos/LLNL/GOTCHA/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/LLNL/GOTCHA/pulls/comments/119423263"},"html":{"href":"https://github.com/LLNL/GOTCHA/pull/26#discussion_r119423263"},"pull_request":{"href":"https://api.github.com/repos/LLNL/GOTCHA/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/LLNL/GOTCHA/pulls/26","id":121827650,"html_url":"https://github.com/LLNL/GOTCHA/pull/26","diff_url":"https://github.com/LLNL/GOTCHA/pull/26.diff","patch_url":"https://github.com/LLNL/GOTCHA/pull/26.patch","issue_url":"https://api.github.com/repos/LLNL/GOTCHA/issues/26","number":26,"state":"open","locked":false,"title":"Feature/stacking","user":{"login":"DavidPoliakoff","id":4220361,"avatar_url":"https://avatars1.githubusercontent.com/u/4220361?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidPoliakoff","html_url":"https://github.com/DavidPoliakoff","followers_url":"https://api.github.com/users/DavidPoliakoff/followers","following_url":"https://api.github.com/users/DavidPoliakoff/following{/other_user}","gists_url":"https://api.github.com/users/DavidPoliakoff/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidPoliakoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidPoliakoff/subscriptions","organizations_url":"https://api.github.com/users/DavidPoliakoff/orgs","repos_url":"https://api.github.com/users/DavidPoliakoff/repos","events_url":"https://api.github.com/users/DavidPoliakoff/events{/privacy}","received_events_url":"https://api.github.com/users/DavidPoliakoff/received_events","type":"User","site_admin":false},"body":"Fixes #18\r\n\r\nMainly committing so we have a shared test. This gives us the basic stacking functionality where if tool1 wraps before tool2, tool2 will call tool1's binds","created_at":"2017-05-22T17:27:08Z","updated_at":"2017-05-31T17:36:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10e9f3a4ec2278ec9ddd064e3b9d55ddc46f5e84","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/LLNL/GOTCHA/pulls/26/commits","review_comments_url":"https://api.github.com/repos/LLNL/GOTCHA/pulls/26/comments","review_comment_url":"https://api.github.com/repos/LLNL/GOTCHA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LLNL/GOTCHA/issues/26/comments","statuses_url":"https://api.github.com/repos/LLNL/GOTCHA/statuses/6b99822ab1b7228ce0a981fbc70fa733475c0844","head":{"label":"DavidPoliakoff:feature/stacking","ref":"feature/stacking","sha":"6b99822ab1b7228ce0a981fbc70fa733475c0844","user":{"login":"DavidPoliakoff","id":4220361,"avatar_url":"https://avatars1.githubusercontent.com/u/4220361?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidPoliakoff","html_url":"https://github.com/DavidPoliakoff","followers_url":"https://api.github.com/users/DavidPoliakoff/followers","following_url":"https://api.github.com/users/DavidPoliakoff/following{/other_user}","gists_url":"https://api.github.com/users/DavidPoliakoff/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidPoliakoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidPoliakoff/subscriptions","organizations_url":"https://api.github.com/users/DavidPoliakoff/orgs","repos_url":"https://api.github.com/users/DavidPoliakoff/repos","events_url":"https://api.github.com/users/DavidPoliakoff/events{/privacy}","received_events_url":"https://api.github.com/users/DavidPoliakoff/received_events","type":"User","site_admin":false},"repo":{"id":90885528,"name":"GOTCHA","full_name":"DavidPoliakoff/GOTCHA","owner":{"login":"DavidPoliakoff","id":4220361,"avatar_url":"https://avatars1.githubusercontent.com/u/4220361?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidPoliakoff","html_url":"https://github.com/DavidPoliakoff","followers_url":"https://api.github.com/users/DavidPoliakoff/followers","following_url":"https://api.github.com/users/DavidPoliakoff/following{/other_user}","gists_url":"https://api.github.com/users/DavidPoliakoff/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidPoliakoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidPoliakoff/subscriptions","organizations_url":"https://api.github.com/users/DavidPoliakoff/orgs","repos_url":"https://api.github.com/users/DavidPoliakoff/repos","events_url":"https://api.github.com/users/DavidPoliakoff/events{/privacy}","received_events_url":"https://api.github.com/users/DavidPoliakoff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DavidPoliakoff/GOTCHA","description":"GOTCHA is a library for wrapping function calls in shared libraries","fork":true,"url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA","forks_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/forks","keys_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/teams","hooks_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/hooks","issue_events_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/issues/events{/number}","events_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/events","assignees_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/assignees{/user}","branches_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/branches{/branch}","tags_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/tags","blobs_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/git/refs{/sha}","trees_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/statuses/{sha}","languages_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/languages","stargazers_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/stargazers","contributors_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/contributors","subscribers_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/subscribers","subscription_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/subscription","commits_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/commits{/sha}","git_commits_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/git/commits{/sha}","comments_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/comments{/number}","issue_comment_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/issues/comments{/number}","contents_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/contents/{+path}","compare_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/merges","archive_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/downloads","issues_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/issues{/number}","pulls_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/pulls{/number}","milestones_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/milestones{/number}","notifications_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/labels{/name}","releases_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/releases{/id}","deployments_url":"https://api.github.com/repos/DavidPoliakoff/GOTCHA/deployments","created_at":"2017-05-10T16:27:33Z","updated_at":"2017-05-10T16:27:35Z","pushed_at":"2017-05-31T17:18:52Z","git_url":"git://github.com/DavidPoliakoff/GOTCHA.git","ssh_url":"git@github.com:DavidPoliakoff/GOTCHA.git","clone_url":"https://github.com/DavidPoliakoff/GOTCHA.git","svn_url":"https://github.com/DavidPoliakoff/GOTCHA","homepage":null,"size":224,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"LLNL:develop","ref":"develop","sha":"63a770347d78ddf1efd3832ea5e1153c2f9c1d0f","user":{"login":"LLNL","id":5921419,"avatar_url":"https://avatars3.githubusercontent.com/u/5921419?v=3","gravatar_id":"","url":"https://api.github.com/users/LLNL","html_url":"https://github.com/LLNL","followers_url":"https://api.github.com/users/LLNL/followers","following_url":"https://api.github.com/users/LLNL/following{/other_user}","gists_url":"https://api.github.com/users/LLNL/gists{/gist_id}","starred_url":"https://api.github.com/users/LLNL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLNL/subscriptions","organizations_url":"https://api.github.com/users/LLNL/orgs","repos_url":"https://api.github.com/users/LLNL/repos","events_url":"https://api.github.com/users/LLNL/events{/privacy}","received_events_url":"https://api.github.com/users/LLNL/received_events","type":"Organization","site_admin":false},"repo":{"id":90290727,"name":"GOTCHA","full_name":"LLNL/GOTCHA","owner":{"login":"LLNL","id":5921419,"avatar_url":"https://avatars3.githubusercontent.com/u/5921419?v=3","gravatar_id":"","url":"https://api.github.com/users/LLNL","html_url":"https://github.com/LLNL","followers_url":"https://api.github.com/users/LLNL/followers","following_url":"https://api.github.com/users/LLNL/following{/other_user}","gists_url":"https://api.github.com/users/LLNL/gists{/gist_id}","starred_url":"https://api.github.com/users/LLNL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLNL/subscriptions","organizations_url":"https://api.github.com/users/LLNL/orgs","repos_url":"https://api.github.com/users/LLNL/repos","events_url":"https://api.github.com/users/LLNL/events{/privacy}","received_events_url":"https://api.github.com/users/LLNL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LLNL/GOTCHA","description":"GOTCHA is a library for wrapping function calls in shared libraries","fork":false,"url":"https://api.github.com/repos/LLNL/GOTCHA","forks_url":"https://api.github.com/repos/LLNL/GOTCHA/forks","keys_url":"https://api.github.com/repos/LLNL/GOTCHA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LLNL/GOTCHA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LLNL/GOTCHA/teams","hooks_url":"https://api.github.com/repos/LLNL/GOTCHA/hooks","issue_events_url":"https://api.github.com/repos/LLNL/GOTCHA/issues/events{/number}","events_url":"https://api.github.com/repos/LLNL/GOTCHA/events","assignees_url":"https://api.github.com/repos/LLNL/GOTCHA/assignees{/user}","branches_url":"https://api.github.com/repos/LLNL/GOTCHA/branches{/branch}","tags_url":"https://api.github.com/repos/LLNL/GOTCHA/tags","blobs_url":"https://api.github.com/repos/LLNL/GOTCHA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LLNL/GOTCHA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LLNL/GOTCHA/git/refs{/sha}","trees_url":"https://api.github.com/repos/LLNL/GOTCHA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LLNL/GOTCHA/statuses/{sha}","languages_url":"https://api.github.com/repos/LLNL/GOTCHA/languages","stargazers_url":"https://api.github.com/repos/LLNL/GOTCHA/stargazers","contributors_url":"https://api.github.com/repos/LLNL/GOTCHA/contributors","subscribers_url":"https://api.github.com/repos/LLNL/GOTCHA/subscribers","subscription_url":"https://api.github.com/repos/LLNL/GOTCHA/subscription","commits_url":"https://api.github.com/repos/LLNL/GOTCHA/commits{/sha}","git_commits_url":"https://api.github.com/repos/LLNL/GOTCHA/git/commits{/sha}","comments_url":"https://api.github.com/repos/LLNL/GOTCHA/comments{/number}","issue_comment_url":"https://api.github.com/repos/LLNL/GOTCHA/issues/comments{/number}","contents_url":"https://api.github.com/repos/LLNL/GOTCHA/contents/{+path}","compare_url":"https://api.github.com/repos/LLNL/GOTCHA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LLNL/GOTCHA/merges","archive_url":"https://api.github.com/repos/LLNL/GOTCHA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LLNL/GOTCHA/downloads","issues_url":"https://api.github.com/repos/LLNL/GOTCHA/issues{/number}","pulls_url":"https://api.github.com/repos/LLNL/GOTCHA/pulls{/number}","milestones_url":"https://api.github.com/repos/LLNL/GOTCHA/milestones{/number}","notifications_url":"https://api.github.com/repos/LLNL/GOTCHA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LLNL/GOTCHA/labels{/name}","releases_url":"https://api.github.com/repos/LLNL/GOTCHA/releases{/id}","deployments_url":"https://api.github.com/repos/LLNL/GOTCHA/deployments","created_at":"2017-05-04T17:28:36Z","updated_at":"2017-05-24T07:34:05Z","pushed_at":"2017-05-25T16:55:10Z","git_url":"git://github.com/LLNL/GOTCHA.git","ssh_url":"git@github.com:LLNL/GOTCHA.git","clone_url":"https://github.com/LLNL/GOTCHA.git","svn_url":"https://github.com/LLNL/GOTCHA","homepage":null,"size":182,"stargazers_count":7,"watchers_count":7,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":7,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/LLNL/GOTCHA/pulls/26"},"html":{"href":"https://github.com/LLNL/GOTCHA/pull/26"},"issue":{"href":"https://api.github.com/repos/LLNL/GOTCHA/issues/26"},"comments":{"href":"https://api.github.com/repos/LLNL/GOTCHA/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/LLNL/GOTCHA/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/LLNL/GOTCHA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LLNL/GOTCHA/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/LLNL/GOTCHA/statuses/6b99822ab1b7228ce0a981fbc70fa733475c0844"}}}}
{"actor":{"display_login":"DavidPoliakoff"}}