[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [creduce-dev] Close to New C-Reduce Release



Here is valgrind's opinion.

John


pc96:~ regehr$ valgrind -q /Users/regehr/creduce-install/libexec
/clang_delta --transformation=replace-function-def-with-decl --counter=1 foo.c --33669-- run: /usr/bin/dsymutil "/Users/regehr/creduce-install/libexec/clang_delta"
==33669== Conditional jump or move depends on uninitialised value(s)
==33669== at 0x1005080EF: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::TraverseDeclRefExpr(clang::DeclRefExpr*) (RecursiveASTVisitor.h:737) ==33669== by 0x10050351F: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::TraverseStmt(clang::Stmt*) (StmtNodes.inc:427) ==33669== by 0x100505048: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::dataTraverse(clang::Stmt*) (RecursiveASTVisitor.h:485) ==33669== by 0x10050312D: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::TraverseStmt(clang::Stmt*) (RecursiveASTVisitor.h:561) ==33669== by 0x1005058A7: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::TraverseCompoundStmt(clang::CompoundStmt*) (RecursiveASTVisitor.h:1960) ==33669== by 0x1005031B9: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::TraverseStmt(clang::Stmt*) (StmtNodes.inc:79) ==33669== by 0x10050E99A: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) (RecursiveASTVisitor.h:1825) ==33669== by 0x100500B15: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::TraverseDecl(clang::Decl*) (RecursiveASTVisitor.h:1830) ==33669== by 0x100501122: clang::RecursiveASTVisitor<ReplaceFunctionDefWithDeclCollectionVisitor>::TraverseDecl(clang::Decl*) (RecursiveASTVisitor.h:1267) ==33669== by 0x1004FECC2: ReplaceFunctionDefWithDecl::HandleTranslationUnit(clang::ASTContext&) (ReplaceFunctionDefWithDecl.cpp:67) ==33669== by 0x10094BBE3: clang::ParseAST(clang::Sema&, bool, bool) (in /Users/regehr/creduce-install/libexec/clang_delta) ==33669== by 0x100701FF4: TransformationManager::doTransformation(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, int&) (TransformationManager.cpp:223)
==33669==
==33669== Argument 'size' of function malloc has a fishy (possibly negative) value: -3307472 ==33669== at 0x101D1EE4B: malloc (in /usr/local/Cellar/valgrind/HEAD/lib/valgrind/vgpreload_memcheck-amd64-darwin.so) ==33669== by 0x101DF143D: operator new(unsigned long) (in /usr/lib/libc++.1.dylib) ==33669== by 0x101DF4E53: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*) (in /usr/lib/libc++.1.dylib) ==33669== by 0x101DF4580: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*, unsigned long) (in /usr/lib/libc++.1.dylib) ==33669== by 0x1004FF66A: ReplaceFunctionDefWithDecl::removeInlineKeywordFromOneFunctionDecl(clang::FunctionDecl const*) (ReplaceFunctionDefWithDecl.cpp:214) ==33669== by 0x1004FFA93: ReplaceFunctionDefWithDecl::rewriteOneFunctionDef(clang::FunctionDecl const*) (ReplaceFunctionDefWithDecl.cpp:239) ==33669== by 0x1004FED50: ReplaceFunctionDefWithDecl::HandleTranslationUnit(clang::ASTContext&) (ReplaceFunctionDefWithDecl.cpp:295) ==33669== by 0x10094BBE3: clang::ParseAST(clang::Sema&, bool, bool) (in /Users/regehr/creduce-install/libexec/clang_delta) ==33669== by 0x100701FF4: TransformationManager::doTransformation(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, int&) (TransformationManager.cpp:223)
==33669==    by 0x1000415F7: main (ClangDelta.cpp:211)
==33669==
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
==33669==
==33669== Process terminating with default action of signal 6 (SIGABRT)
==33669== at 0x1021282B6: __pthread_sigmask (in /usr/lib/system/libsystem_kernel.dylib)
==33669==    by 0x10203CA40: __abort (in /usr/lib/system/libsystem_c.dylib)
==33669==    by 0x10203C9C1: abort (in /usr/lib/system/libsystem_c.dylib)
==33669==    by 0x10254CA20: abort_message (in /usr/lib/libc++abi.dylib)
==33669== by 0x1025749B8: default_terminate_handler() (in /usr/lib/libc++abi.dylib)
==33669==    by 0x1022E17EA: _objc_terminate() (in /usr/lib/libobjc.A.dylib)
==33669== by 0x1025720A0: std::__terminate(void (*)()) (in /usr/lib/libc++abi.dylib)
==33669==    by 0x102571B2F: __cxa_throw (in /usr/lib/libc++abi.dylib)
==33669== by 0x101DF147D: operator new(unsigned long) (in /usr/lib/libc++.1.dylib) ==33669== by 0x101DF4E53: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*) (in /usr/lib/libc++.1.dylib) ==33669== by 0x101DF4580: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*, unsigned long) (in /usr/lib/libc++.1.dylib) ==33669== by 0x1004FF66A: ReplaceFunctionDefWithDecl::removeInlineKeywordFromOneFunctionDecl(clang::FunctionDecl const*) (ReplaceFunctionDefWithDecl.cpp:214)
Abort trap: 6
pc96:~ regehr$


On 9/23/15 8:40 AM, Yang Chen wrote:


On 09/22/2015 11:33 PM, John Regehr wrote:
What's the command to reproduce the crash? Thanks.

Oops it was in the file but then got reduced away, see below.

John


$ /Users/regehr/creduce-install/libexec/clang_delta
--transformation=replace-function-def-with-decl --counter=1 foo.c
clang_delta(24623,0x7fff7e92e300) malloc: ***
mach_vm_map(size=140513733828608) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminating with uncaught exception of type
std::bad_alloc: std::bad_alloc
Abort trap: 6

Thanks.

Seems it's a Mac-specific issue. I can't reproduce it on Linux. I will
try it out tomorrow when I have a Mac around.

- Yang