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

Segfault when a public function uses a private type alias #794

Closed
anarthal opened this issue Jan 14, 2025 · 0 comments
Closed

Segfault when a public function uses a private type alias #794

anarthal opened this issue Jan 14, 2025 · 0 comments

Comments

@anarthal
Copy link

namespace repro {

class S
{
    using type = int;

public:
    void f(type) {}
};

}  // namespace repro

int main() {}

Crashes with:

/usr/include/c++/14/bits/unique_ptr.h:447: typename std::add_lvalue_reference<_Tp>::type std::unique_ptr<_Tp, _Dp>::operator*() const [with _Tp = clang::mrdocs::TypeInfo; _Dp = std::default_delete<clang::mrdocs::TypeInfo>; typename std::add_lvalue_reference<_Tp>::type = clang::mrdocs::TypeInfo&]: Assertion 'get() != pointer()' failed.
PLEASE submit a bug report to https://github.com/cppalliance/mrdocs/issues/ and include the crash backtrace.
 #0 0x000000000327dc20 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/mrdocs-0.0.3/bin/mrdocs+0x327dc20)
 #1 0x000000000327ab9b SignalHandler(int) Signals.cpp:0:0
 #2 0x00000000033a87b0 __restore_rt libc_sigaction.o:0:0
 #3 0x00000000033cc35c __pthread_kill (/opt/mrdocs-0.0.3/bin/mrdocs+0x33cc35c)
 #4 0x00000000033a872e raise (/opt/mrdocs-0.0.3/bin/mrdocs+0x33a872e)
 #5 0x000000000043cb39 abort (/opt/mrdocs-0.0.3/bin/mrdocs+0x43cb39)
 #6 0x00000000032aefed (/opt/mrdocs-0.0.3/bin/mrdocs+0x32aefed)
 #7 0x00000000005b2f57 clang::mrdocs::TagfileWriter::writeFunctionMember(clang::mrdocs::FunctionInfo const&) (/opt/mrdocs-0.0.3/bin/mrdocs+0x5b2f57)
 #8 0x00000000005b5314 void clang::mrdocs::TagfileWriter::writeClassLike<clang::mrdocs::RecordInfo>(clang::mrdocs::RecordInfo const&) (/opt/mrdocs-0.0.3/bin/mrdocs+0x5b5314)
 #9 0x00000000005bc5dc clang::mrdocs::TagfileWriter::writeNamespace(clang::mrdocs::NamespaceInfo const&) (/opt/mrdocs-0.0.3/bin/mrdocs+0x5bc5dc)
#10 0x00000000005bc5bc clang::mrdocs::TagfileWriter::writeNamespace(clang::mrdocs::NamespaceInfo const&) (/opt/mrdocs-0.0.3/bin/mrdocs+0x5bc5bc)
#11 0x00000000005bd838 clang::mrdocs::TagfileWriter::build() (/opt/mrdocs-0.0.3/bin/mrdocs+0x5bd838)
#12 0x0000000000586fa2 clang::mrdocs::hbs::HandlebarsGenerator::build(std::basic_string_view<char, std::char_traits<char>>, clang::mrdocs::Corpus const&) const (/opt/mrdocs-0.0.3/bin/mrdocs+0x586fa2)
#13 0x00000000005418ec clang::mrdocs::Generator::build(clang::mrdocs::Corpus const&) const (/opt/mrdocs-0.0.3/bin/mrdocs+0x5418ec)
#14 0x000000000049616a clang::mrdocs::DoGenerateAction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, clang::mrdocs::ReferenceDirectories const&, char const**) (/opt/mrdocs-0.0.3/bin/mrdocs+0x49616a)
#15 0x000000000049cf33 clang::mrdocs::mrdocs_main(int, char const**) (/opt/mrdocs-0.0.3/bin/mrdocs+0x49cf33)
#16 0x000000000043d42d main (/opt/mrdocs-0.0.3/bin/mrdocs+0x43d42d)
#17 0x000000000338f7b8 __libc_start_call_main libc-start.o:0:0
#18 0x0000000003391980 __libc_start_main (/opt/mrdocs-0.0.3/bin/mrdocs+0x3391980)
#19 0x000000000048cda5 _start (/opt/mrdocs-0.0.3/bin/mrdocs+0x48cda5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant