{"action":"opened","number":2158,"pull_request":{"url":"https://api.github.com/repos/root-project/root/pulls/2158","id":193096558,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMDk2NTU4","html_url":"https://github.com/root-project/root/pull/2158","diff_url":"https://github.com/root-project/root/pull/2158.diff","patch_url":"https://github.com/root-project/root/pull/2158.patch","issue_url":"https://api.github.com/repos/root-project/root/issues/2158","number":2158,"state":"open","locked":false,"title":"Fix RDF interpreted snapshot, ROOT-9236","user":{"login":"pcanal","id":5175087,"node_id":"MDQ6VXNlcjUxNzUwODc=","avatar_url":"https://avatars3.githubusercontent.com/u/5175087?v=4","gravatar_id":"","url":"https://api.github.com/users/pcanal","html_url":"https://github.com/pcanal","followers_url":"https://api.github.com/users/pcanal/followers","following_url":"https://api.github.com/users/pcanal/following{/other_user}","gists_url":"https://api.github.com/users/pcanal/gists{/gist_id}","starred_url":"https://api.github.com/users/pcanal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcanal/subscriptions","organizations_url":"https://api.github.com/users/pcanal/orgs","repos_url":"https://api.github.com/users/pcanal/repos","events_url":"https://api.github.com/users/pcanal/events{/privacy}","received_events_url":"https://api.github.com/users/pcanal/received_events","type":"User","site_admin":false},"body":"The current failure in snapshot is due to an ABI incompatibility (or so it seems) that we may have encountered before.\r\nThe failing line is:\r\n{code:c++}\r\nauto snapshotRDF = std::make_shared<RInterface<RLoopManager>>(std::make_shared<RLoopManager>(nullptr, validCols));\r\n{code}\r\nand one of the component of make_shared is the call to the following shared_ptr constructor\r\n{code:c++}\r\n      // This constructor is non-standard, it is used by allocate_shared.\r\n      template<typename _Alloc, typename... _Args>\r\n        shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,\r\n                   _Args&&... __args)\r\n        : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)\r\n        { }\r\n{code}\r\nNote the use of std::forward.\r\n\r\nThe snapshot test has 2 steps:\r\n\r\n1. Do the work, including a call to SnapshotImpl which contains the problem line, with only compiled code\r\n2. Do the same work relying on interpreted code, in which case SnapshotImpl is called via the interpreter.\r\n\r\nThe symptoms of the failure is that **if** the snapshot test is compiled with optimization then\r\n\r\na. The compiled version works fine\r\nb. In the interpreted version the constructor of the RInterface is wrong because the shared_ptr its constructor sees is **not** initialized.\r\n\r\n If the snapshot test is compiled without optimization then both steps succeeds.  The main difference between the two is the amount of fully realized (i.e. non-inlined) functions emitted by the compiler.\r\n\r\nIn the success fully case we have a stack like\r\n\r\n{code}\r\ninterp SnapshotImpl calls\r\n  compiled std::make_shared<ROOT::Detail::RDF::RLoopManager …  [in debug mode. this routine and down are used compiled]\r\n    compiled  std::allocate_shared<ROOT::Detail::RDF::RLoopManager\r\n      ... implementation details .. all compiled.\r\n        compiled ROOT::Detail::RDF::RLoopManager::RLoopManager\r\n  compiled  std::make_shared<ROOT::RDF::RInterface …\r\n    compiled  std::allocate_shared<ROOT::RDF::RInterface …\r\n      compiled  std::shared_ptr< ROOT::RDF::RInterface\r\n        compiled std::__shared_ptr<ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager\r\n{code}\r\n\r\n{code}\r\ninterp SnapshotImpl calls\r\n  interp std::make_shared<ROOT::Detail::RDF::RLoopManager …\r\n    interp  std::allocate_shared<ROOT::Detail::RDF::RLoopManager\r\n      ... implementation details .. all interpreted.\r\n        compiled ROOT::Detail::RDF::RLoopManager::RLoopManager\r\n  interp  std::make_shared<ROOT::RDF::RInterface …\r\n    interp  std::allocate_shared<ROOT::RDF::RInterface …\r\n      interp  std::shared_ptr< ROOT::RDF::RInterface\r\n        compiled  std::__shared_ptr<ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager\r\n{code}\r\n\r\nI.e. the major difference is that we have the shared_ptr constructor (which contains std::forward) being interpreted  (rather than compiled) and calling a compiled function (the base class constructor) that takes (is given) an std::forward.   It seems that the parameter and then mangled/placed-wrong in that case.\r\n\r\nIf I recall correctly this is a know ABI incompatibility between clang and gcc; especially (only?) if it involves temporary.\r\n\r\nSplitting the line in two statement, works around the problem:\r\n{code:c++}\r\n      auto rlm_ptr = std::make_shared<RLoopManager>(nullptr, validCols);\r\n      auto snapshotRDF = std::make_shared<RInterface<RLoopManager>>(rlm_ptr);\r\n{code}\r\n\r\nIn my case, it solves the problem because more of the '2nd' make_shared called are inlined by the compiler (when generating code for the 1st step), including the __shared_ptr constructor ... forcing the interpreter to generate the code and hence side-stepping the issue.  [And if the std::forward issue is limited to temporary it would side-step the issue even if the  __shared_ptr constructor was still outline.","created_at":"2018-06-06T18:10:00Z","updated_at":"2018-06-06T18:10:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/root-project/root/pulls/2158/commits","review_comments_url":"https://api.github.com/repos/root-project/root/pulls/2158/comments","review_comment_url":"https://api.github.com/repos/root-project/root/pulls/comments{/number}","comments_url":"https://api.github.com/repos/root-project/root/issues/2158/comments","statuses_url":"https://api.github.com/repos/root-project/root/statuses/b52bff9fbe92e749efaac6dcc2bf4196f92a0f36","head":{"label":"pcanal:FixSnapshot","ref":"FixSnapshot","sha":"b52bff9fbe92e749efaac6dcc2bf4196f92a0f36","user":{"login":"pcanal","id":5175087,"node_id":"MDQ6VXNlcjUxNzUwODc=","avatar_url":"https://avatars3.githubusercontent.com/u/5175087?v=4","gravatar_id":"","url":"https://api.github.com/users/pcanal","html_url":"https://github.com/pcanal","followers_url":"https://api.github.com/users/pcanal/followers","following_url":"https://api.github.com/users/pcanal/following{/other_user}","gists_url":"https://api.github.com/users/pcanal/gists{/gist_id}","starred_url":"https://api.github.com/users/pcanal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcanal/subscriptions","organizations_url":"https://api.github.com/users/pcanal/orgs","repos_url":"https://api.github.com/users/pcanal/repos","events_url":"https://api.github.com/users/pcanal/events{/privacy}","received_events_url":"https://api.github.com/users/pcanal/received_events","type":"User","site_admin":false},"repo":{"id":37336900,"node_id":"MDEwOlJlcG9zaXRvcnkzNzMzNjkwMA==","name":"root","full_name":"pcanal/root","owner":{"login":"pcanal","id":5175087,"node_id":"MDQ6VXNlcjUxNzUwODc=","avatar_url":"https://avatars3.githubusercontent.com/u/5175087?v=4","gravatar_id":"","url":"https://api.github.com/users/pcanal","html_url":"https://github.com/pcanal","followers_url":"https://api.github.com/users/pcanal/followers","following_url":"https://api.github.com/users/pcanal/following{/other_user}","gists_url":"https://api.github.com/users/pcanal/gists{/gist_id}","starred_url":"https://api.github.com/users/pcanal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcanal/subscriptions","organizations_url":"https://api.github.com/users/pcanal/orgs","repos_url":"https://api.github.com/users/pcanal/repos","events_url":"https://api.github.com/users/pcanal/events{/privacy}","received_events_url":"https://api.github.com/users/pcanal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcanal/root","description":"Mirror of official ROOT git repository","fork":true,"url":"https://api.github.com/repos/pcanal/root","forks_url":"https://api.github.com/repos/pcanal/root/forks","keys_url":"https://api.github.com/repos/pcanal/root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcanal/root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcanal/root/teams","hooks_url":"https://api.github.com/repos/pcanal/root/hooks","issue_events_url":"https://api.github.com/repos/pcanal/root/issues/events{/number}","events_url":"https://api.github.com/repos/pcanal/root/events","assignees_url":"https://api.github.com/repos/pcanal/root/assignees{/user}","branches_url":"https://api.github.com/repos/pcanal/root/branches{/branch}","tags_url":"https://api.github.com/repos/pcanal/root/tags","blobs_url":"https://api.github.com/repos/pcanal/root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcanal/root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcanal/root/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcanal/root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcanal/root/statuses/{sha}","languages_url":"https://api.github.com/repos/pcanal/root/languages","stargazers_url":"https://api.github.com/repos/pcanal/root/stargazers","contributors_url":"https://api.github.com/repos/pcanal/root/contributors","subscribers_url":"https://api.github.com/repos/pcanal/root/subscribers","subscription_url":"https://api.github.com/repos/pcanal/root/subscription","commits_url":"https://api.github.com/repos/pcanal/root/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcanal/root/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcanal/root/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcanal/root/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcanal/root/contents/{+path}","compare_url":"https://api.github.com/repos/pcanal/root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcanal/root/merges","archive_url":"https://api.github.com/repos/pcanal/root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcanal/root/downloads","issues_url":"https://api.github.com/repos/pcanal/root/issues{/number}","pulls_url":"https://api.github.com/repos/pcanal/root/pulls{/number}","milestones_url":"https://api.github.com/repos/pcanal/root/milestones{/number}","notifications_url":"https://api.github.com/repos/pcanal/root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcanal/root/labels{/name}","releases_url":"https://api.github.com/repos/pcanal/root/releases{/id}","deployments_url":"https://api.github.com/repos/pcanal/root/deployments","created_at":"2015-06-12T18:07:45Z","updated_at":"2016-07-11T20:04:06Z","pushed_at":"2018-06-06T18:09:45Z","git_url":"git://github.com/pcanal/root.git","ssh_url":"git@github.com:pcanal/root.git","clone_url":"https://github.com/pcanal/root.git","svn_url":"https://github.com/pcanal/root","homepage":"http://root.cern.ch","size":691071,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"root-project:master","ref":"master","sha":"94031e0487bbf8449aeec954b8f1ab19c5afaf5c","user":{"login":"root-project","id":6450093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NTAwOTM=","avatar_url":"https://avatars1.githubusercontent.com/u/6450093?v=4","gravatar_id":"","url":"https://api.github.com/users/root-project","html_url":"https://github.com/root-project","followers_url":"https://api.github.com/users/root-project/followers","following_url":"https://api.github.com/users/root-project/following{/other_user}","gists_url":"https://api.github.com/users/root-project/gists{/gist_id}","starred_url":"https://api.github.com/users/root-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/root-project/subscriptions","organizations_url":"https://api.github.com/users/root-project/orgs","repos_url":"https://api.github.com/users/root-project/repos","events_url":"https://api.github.com/users/root-project/events{/privacy}","received_events_url":"https://api.github.com/users/root-project/received_events","type":"Organization","site_admin":false},"repo":{"id":10994345,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk5NDM0NQ==","name":"root","full_name":"root-project/root","owner":{"login":"root-project","id":6450093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NTAwOTM=","avatar_url":"https://avatars1.githubusercontent.com/u/6450093?v=4","gravatar_id":"","url":"https://api.github.com/users/root-project","html_url":"https://github.com/root-project","followers_url":"https://api.github.com/users/root-project/followers","following_url":"https://api.github.com/users/root-project/following{/other_user}","gists_url":"https://api.github.com/users/root-project/gists{/gist_id}","starred_url":"https://api.github.com/users/root-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/root-project/subscriptions","organizations_url":"https://api.github.com/users/root-project/orgs","repos_url":"https://api.github.com/users/root-project/repos","events_url":"https://api.github.com/users/root-project/events{/privacy}","received_events_url":"https://api.github.com/users/root-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/root-project/root","description":"The official repository for ROOT: analyzing, storing and visualizing big data","fork":false,"url":"https://api.github.com/repos/root-project/root","forks_url":"https://api.github.com/repos/root-project/root/forks","keys_url":"https://api.github.com/repos/root-project/root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/root-project/root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/root-project/root/teams","hooks_url":"https://api.github.com/repos/root-project/root/hooks","issue_events_url":"https://api.github.com/repos/root-project/root/issues/events{/number}","events_url":"https://api.github.com/repos/root-project/root/events","assignees_url":"https://api.github.com/repos/root-project/root/assignees{/user}","branches_url":"https://api.github.com/repos/root-project/root/branches{/branch}","tags_url":"https://api.github.com/repos/root-project/root/tags","blobs_url":"https://api.github.com/repos/root-project/root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/root-project/root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/root-project/root/git/refs{/sha}","trees_url":"https://api.github.com/repos/root-project/root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/root-project/root/statuses/{sha}","languages_url":"https://api.github.com/repos/root-project/root/languages","stargazers_url":"https://api.github.com/repos/root-project/root/stargazers","contributors_url":"https://api.github.com/repos/root-project/root/contributors","subscribers_url":"https://api.github.com/repos/root-project/root/subscribers","subscription_url":"https://api.github.com/repos/root-project/root/subscription","commits_url":"https://api.github.com/repos/root-project/root/commits{/sha}","git_commits_url":"https://api.github.com/repos/root-project/root/git/commits{/sha}","comments_url":"https://api.github.com/repos/root-project/root/comments{/number}","issue_comment_url":"https://api.github.com/repos/root-project/root/issues/comments{/number}","contents_url":"https://api.github.com/repos/root-project/root/contents/{+path}","compare_url":"https://api.github.com/repos/root-project/root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/root-project/root/merges","archive_url":"https://api.github.com/repos/root-project/root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/root-project/root/downloads","issues_url":"https://api.github.com/repos/root-project/root/issues{/number}","pulls_url":"https://api.github.com/repos/root-project/root/pulls{/number}","milestones_url":"https://api.github.com/repos/root-project/root/milestones{/number}","notifications_url":"https://api.github.com/repos/root-project/root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/root-project/root/labels{/name}","releases_url":"https://api.github.com/repos/root-project/root/releases{/id}","deployments_url":"https://api.github.com/repos/root-project/root/deployments","created_at":"2013-06-27T10:46:59Z","updated_at":"2018-06-06T15:07:59Z","pushed_at":"2018-06-06T16:53:19Z","git_url":"git://github.com/root-project/root.git","ssh_url":"git@github.com:root-project/root.git","clone_url":"https://github.com/root-project/root.git","svn_url":"https://github.com/root-project/root","homepage":"https://root.cern","size":695784,"stargazers_count":583,"watchers_count":583,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":425,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":425,"open_issues":63,"watchers":583,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/root-project/root/pulls/2158"},"html":{"href":"https://github.com/root-project/root/pull/2158"},"issue":{"href":"https://api.github.com/repos/root-project/root/issues/2158"},"comments":{"href":"https://api.github.com/repos/root-project/root/issues/2158/comments"},"review_comments":{"href":"https://api.github.com/repos/root-project/root/pulls/2158/comments"},"review_comment":{"href":"https://api.github.com/repos/root-project/root/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/root-project/root/pulls/2158/commits"},"statuses":{"href":"https://api.github.com/repos/root-project/root/statuses/b52bff9fbe92e749efaac6dcc2bf4196f92a0f36"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":7,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"pcanal"}}