Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++]: Crash in std::type_info::hash_code() on Apple ARM64 because of junk address dereference #58561

Open
victorstewart opened this issue Oct 23, 2022 · 0 comments
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Comments

@victorstewart
Copy link

victorstewart commented Oct 23, 2022

Please see linked issue, but below code produces a SEGFAULT because __non_unique_impl::__hash(__type_name_t __ptr) tries to dereference a junk address.

template<typename TBase>
static size_t get(TBase& obj) {
   return typeid(obj).hash_code();
}

fraillt/bitsery#101 (comment)

@EugeneZelenko EugeneZelenko added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. and removed new issue labels Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

No branches or pull requests

2 participants