{"action":"created","issue":{"url":"https://api.github.com/repos/google/sanitizers/issues/1037","repository_url":"https://api.github.com/repos/google/sanitizers","labels_url":"https://api.github.com/repos/google/sanitizers/issues/1037/labels{/name}","comments_url":"https://api.github.com/repos/google/sanitizers/issues/1037/comments","events_url":"https://api.github.com/repos/google/sanitizers/issues/1037/events","html_url":"https://github.com/google/sanitizers/issues/1037","id":394727452,"node_id":"MDU6SXNzdWUzOTQ3Mjc0NTI=","number":1037,"title":"FP: AddressSanitizer CHECK failed when throwing from function with a specific var on stack","user":{"login":"rayrapetyan","id":4700523,"node_id":"MDQ6VXNlcjQ3MDA1MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4700523?v=4","gravatar_id":"","url":"https://api.github.com/users/rayrapetyan","html_url":"https://github.com/rayrapetyan","followers_url":"https://api.github.com/users/rayrapetyan/followers","following_url":"https://api.github.com/users/rayrapetyan/following{/other_user}","gists_url":"https://api.github.com/users/rayrapetyan/gists{/gist_id}","starred_url":"https://api.github.com/users/rayrapetyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayrapetyan/subscriptions","organizations_url":"https://api.github.com/users/rayrapetyan/orgs","repos_url":"https://api.github.com/users/rayrapetyan/repos","events_url":"https://api.github.com/users/rayrapetyan/events{/privacy}","received_events_url":"https://api.github.com/users/rayrapetyan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-28T22:01:10Z","updated_at":"2019-01-05T06:20:26Z","closed_at":"2019-01-05T00:34:37Z","author_association":"NONE","body":"**How to reproduce**\r\n```\r\n#include <iostream>\r\n\r\nusing namespace std;\r\n\r\nstruct error_info {\r\n    error_info() {}\r\n};\r\n\r\n\r\nvoid init2() {\r\n    error_info err;\r\n    throw std::exception();\r\n}\r\n\r\nvoid init() {\r\n    try {\r\n        init2();\r\n    }\r\n    catch (std::exception &ex) {\r\n        try {\r\n            throw std::exception();\r\n        }\r\n        catch (...) {\r\n        }\r\n    }\r\n}\r\n\r\nint main() {\r\n    init();\r\n    std::cout << \"hi there\" << std::endl;\r\n}\r\n```\r\ncompile with clang (tested with v. 6.0.0) and  `-fsanitize=address`.\r\n\r\n**Expected** \r\n\"hi there\" should be printed\r\n\r\n**Actual**\r\n```\r\n==44009==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffffffff000; bottom 0x7fffdffff000; size: 0x000020000000 (536870912)\r\nFalse positive error reports may follow\r\nFor details see https://github.com/google/sanitizers/issues/189\r\n=================================================================\r\n==44009==AddressSanitizer CHECK failed: /usr/src/contrib/compiler-rt/lib/asan/asan_thread.cc:342 \"((ptr[0] == kCurrentStackFrameMagic)) != (0)\" (0x0, 0x0)\r\n    #0 0x428f16 in __asan::AsanCheckFailed(char const*, int, char const, unsigned long long, unsigned long long) (/ara/devel/sandbox/testzero/cmake-build-debug/testzero+0x428f16)\r\n    #1 0x418d67 in __sanitizer::CheckFailed(char const*, int, char const, unsigned long long, unsigned long long) (/ara/devel/sandbox/testzero/cmake-build-debug/testzero+0x418d67)\r\n    #2 0x4248f7 in __asan::AsanThread::GetStackFrameAccessByAddr(unsigned long, __asan::AsanThread::StackFrameAccess*) (/ara/devel/sandbox/testzero/cmake-build-debug/testzero+0x4248f7)\r\n    #3 0x47dc47 in __asan::AddressDescription::AddressDescription(unsigned long, unsigned long, bool) (/ara/devel/sandbox/testzero/cmake-build-debug/testzero+0x47dc47)\r\n    #4 0x47b4d1 in __asan::ErrorGeneric::ErrorGeneric(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long) (/ara/devel/sandbox/testzero/cmake-build-debug/testzero+0x47b4d1)\r\n    #5 0x42e58c in __asan::ReportGenericError(unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool) (/ara/devel/sandbox/testzero/cmake-build-debug/testzero+0x42e58c)\r\n    #6 0x435c67 in memcpy (/ara/devel/sandbox/testzero/cmake-build-debug/testzero+0x435c67)\r\n    #7 0x801420cd6 in _Unwind_RaiseException (/lib/libgcc_s.so.1+0x2cd6)\r\n    #8 0x800bb7d05 in __cxa_throw (/lib/libcxxrt.so.1+0x13d05)\r\n    #9 0x494178 in init(void) /ara/devel/sandbox/testzero/main.cpp:21:13\r\n    #10 0x4941fc in main /ara/devel/sandbox/testzero/main.cpp:29:5\r\n    #11 0x40e954 in _start (/ara/devel/sandbox/testzero/cmake-build-debug/testzero+0x40e954)\r\n    #12 0x8006d7fff  (<unknown module>)\r\n```"},"comment":{"url":"https://api.github.com/repos/google/sanitizers/issues/comments/451631737","html_url":"https://github.com/google/sanitizers/issues/1037#issuecomment-451631737","issue_url":"https://api.github.com/repos/google/sanitizers/issues/1037","id":451631737,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTYzMTczNw==","user":{"login":"rayrapetyan","id":4700523,"node_id":"MDQ6VXNlcjQ3MDA1MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4700523?v=4","gravatar_id":"","url":"https://api.github.com/users/rayrapetyan","html_url":"https://github.com/rayrapetyan","followers_url":"https://api.github.com/users/rayrapetyan/followers","following_url":"https://api.github.com/users/rayrapetyan/following{/other_user}","gists_url":"https://api.github.com/users/rayrapetyan/gists{/gist_id}","starred_url":"https://api.github.com/users/rayrapetyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayrapetyan/subscriptions","organizations_url":"https://api.github.com/users/rayrapetyan/orgs","repos_url":"https://api.github.com/users/rayrapetyan/repos","events_url":"https://api.github.com/users/rayrapetyan/events{/privacy}","received_events_url":"https://api.github.com/users/rayrapetyan/received_events","type":"User","site_admin":false},"created_at":"2019-01-05T06:20:26Z","updated_at":"2019-01-05T06:20:26Z","author_association":"NONE","body":"@kcc, confirming it's a clang 6.0.0 issue.\r\nCan't reproduce with:\r\nclang version 7.0.1\r\nclang version 8.0.0\r\nReproducing issue with code above and clang 6.0.0 is trivial:\r\n```\r\nclang++ -fsanitize=address main.cpp\r\n./a.out\r\n```"}}
{"actor":{"display_login":"rayrapetyan"}}