{"action":"created","issue":{"url":"https://api.github.com/repos/mono/mono/issues/7353","repository_url":"https://api.github.com/repos/mono/mono","labels_url":"https://api.github.com/repos/mono/mono/issues/7353/labels{/name}","comments_url":"https://api.github.com/repos/mono/mono/issues/7353/comments","events_url":"https://api.github.com/repos/mono/mono/issues/7353/events","html_url":"https://github.com/mono/mono/pull/7353","id":301237590,"number":7353,"title":"[runtime] Workaround GCC inlining bug when building FullAOT config","user":{"login":"akoeplinger","id":1376924,"avatar_url":"https://avatars2.githubusercontent.com/u/1376924?v=4","gravatar_id":"","url":"https://api.github.com/users/akoeplinger","html_url":"https://github.com/akoeplinger","followers_url":"https://api.github.com/users/akoeplinger/followers","following_url":"https://api.github.com/users/akoeplinger/following{/other_user}","gists_url":"https://api.github.com/users/akoeplinger/gists{/gist_id}","starred_url":"https://api.github.com/users/akoeplinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akoeplinger/subscriptions","organizations_url":"https://api.github.com/users/akoeplinger/orgs","repos_url":"https://api.github.com/users/akoeplinger/repos","events_url":"https://api.github.com/users/akoeplinger/events{/privacy}","received_events_url":"https://api.github.com/users/akoeplinger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2018-03-01T00:39:30Z","updated_at":"2018-03-01T16:14:38Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/mono/mono/pulls/7353","html_url":"https://github.com/mono/mono/pull/7353","diff_url":"https://github.com/mono/mono/pull/7353.diff","patch_url":"https://github.com/mono/mono/pull/7353.patch"},"body":"When building the FullAOT configuration on Jenkins we're hitting\r\nthe following issue since we switched to Debian 9:\r\n\r\n```\r\nobject.c: In function 'mono_object_new_alloc_specific':\r\ncc1: error: call to 'mono_object_new_specific.localalias.36' declared with attribute error: The mono runtime must not call this function\r\n```\r\n\r\nThe function doesn't call `mono_object_new_specific` though.\r\n\r\nIt looks like we're hitting an inliner bug on the newer GCC since marking the `mono_object_new_specific` function as noinline prevents the issue. (as does compiling with anything other than -O2, or with -finline-functions interestingly)\r\n\r\nThis is with `gcc (Debian 6.3.0-18) 6.3.0` and `gcc-7 (Debian 7.3.0-5) 7.3.0`, `clang 4.0.1-10` doesn't show the issue.\r\n\r\nTo fix the problem and workaround the GCC bug we decided to mark all `MONO_RT_EXTERNAL_ONLY` as noinline.\r\n\r\n\r\n\r\n<!--\r\nThank you for your Pull Request!\r\n\r\nIf you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.\r\n\r\nDoes your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/mono/mono/issues/comments/369643405","html_url":"https://github.com/mono/mono/pull/7353#issuecomment-369643405","issue_url":"https://api.github.com/repos/mono/mono/issues/7353","id":369643405,"user":{"login":"akoeplinger","id":1376924,"avatar_url":"https://avatars2.githubusercontent.com/u/1376924?v=4","gravatar_id":"","url":"https://api.github.com/users/akoeplinger","html_url":"https://github.com/akoeplinger","followers_url":"https://api.github.com/users/akoeplinger/followers","following_url":"https://api.github.com/users/akoeplinger/following{/other_user}","gists_url":"https://api.github.com/users/akoeplinger/gists{/gist_id}","starred_url":"https://api.github.com/users/akoeplinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akoeplinger/subscriptions","organizations_url":"https://api.github.com/users/akoeplinger/orgs","repos_url":"https://api.github.com/users/akoeplinger/repos","events_url":"https://api.github.com/users/akoeplinger/events{/privacy}","received_events_url":"https://api.github.com/users/akoeplinger/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T16:14:38Z","updated_at":"2018-03-01T16:14:38Z","author_association":"MEMBER","body":"@lambdageek if you agree that #7362 is the better approach then let's just abandon this, #7362 solves the issue too."}}
{"actor":{"display_login":"akoeplinger"}}