Skip to content

libclang crash-recovery test fail #9230

@pwo

Description

@pwo
Bugzilla Link 8858
Version trunk
OS FreeBSD
CC @DimitryAndric

Extended Description

llvm/clang r122550.

These three test fail on FreeBSD with a segfault.
Clang :: Index/crash-recovery-code-complete.c
Clang :: Index/crash-recovery.c
Clang :: Index/crash-recovery-reparse.c

Valgrind says:

env LD_LIBRARY_PATH=/data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib valgrind /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/bin/c-index-test -test-load-source all /data/buildslave/freebsd-clang-amd64/src-llvm/tools/clang/test/Index/crash-recovery.c
==82744== Memcheck, a memory error detector
==82744== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==82744== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==82744== Command: /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/bin/c-index-test -test-load-source all /data/buildslave/freebsd-clang-amd64/src-llvm/tools/clang/test/Index/crash-recovery.c
==82744==
==82744== Thread 3:
==82744== Invalid write of size 4
==82744== at 0x13A387C: (anonymous namespace)::PragmaDebugHandler::HandlePragma(clang::Preprocessor&, clang::PragmaIntroducerKind, clang::Token&) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0x13A32A8: clang::PragmaNamespace::HandlePragma(clang::Preprocessor&, clang::PragmaIntroducerKind, clang::Token&) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0x13A32A8: clang::PragmaNamespace::HandlePragma(clang::Preprocessor&, clang::PragmaIntroducerKind, clang::Token&) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0x139B82A: clang::Preprocessor::HandlePragmaDirective(unsigned int) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0x138BF8C: clang::Preprocessor::HandleDirective(clang::Token&) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0x137845B: clang::Lexer::LexTokenInternal(clang::Token&) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0x137836B: clang::Lexer::LexTokenInternal(clang::Token&) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0xF2F763: clang::Parser::ConsumeToken() (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0xF404D5: clang::Parser::ExpectAndConsume(clang::tok::TokenKind, unsigned int, char const*, clang::tok::TokenKind) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0xF4C120: clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0xF5644E: clang::Parser::ParseSimpleDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, bool) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== by 0xF56533: clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) (in /data/buildslave/freebsd-clang-amd64/obj/obj-llvm.1/Release+Asserts/lib/libclang.so)
==82744== Address 0x11 is not stack'd, malloc'd or (recently) free'd
==82744==
libclang: crash detected during parsing: {
'source_filename' : '(null)'
'command_line_args' : ['/data/buildslave/freebsd-clang-amd64/src-llvm/tools/clang/test/Index/crash-recovery.c'],
'unsaved_files' : [],
'options' : 1,
}
Unable to load translation unit!
==82744==
==82744== HEAP SUMMARY:
==82744== in use at exit: 411,475 bytes in 300 blocks
==82744== total heap usage: 572 allocs, 272 frees, 464,809 bytes allocated
==82744==
==82744== LEAK SUMMARY:
==82744== definitely lost: 1,645 bytes in 6 blocks
==82744== indirectly lost: 406,222 bytes in 258 blocks
==82744== possibly lost: 0 bytes in 0 blocks
==82744== still reachable: 3,608 bytes in 36 blocks
==82744== suppressed: 0 bytes in 0 blocks
==82744== Rerun with --leak-check=full to see details of leaked memory
==82744==
==82744== For counts of detected and suppressed errors, rerun with: -v
==82744== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]obsoleteIssues with old (unsupported) versions of LLVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions