Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-6650

TF1 constructor crashes using undefined lambda function

    Details

      Description

      During the tutorial with Axel we found the following problem and he asked me to report it. The second line contains a call with an undefined lambda function.

      root [0] auto myErf0Lambda = [](double* x, double* p)

      { return TMath::Erf(x[0]); }

      ;
      root [1] TF1* myErf0 = new TF1("myErf0", myErfLambda, -10, 10);

          • Break *** segmentation violation

      ===========================================================
      There was a crash.
      This is the entire stack trace of all threads:
      ===========================================================
      #0 0x000000327b4ac5de in waitpid () from /lib64/libc.so.6
      #1 0x000000327b43e619 in do_system () from /lib64/libc.so.6
      #2 0x00007f48ca6ec90f in TUnixSystem::StackTrace() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCore.so
      #3 0x00007f48ca6eefdc in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCore.so
      #4 <signal handler called>
      #5 0x00007f48c8b9f451 in clang::QualType::getSplitDesugaredType(clang::QualType) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #6 0x00007f48c8a67bc8 in clang::ASTContext::getBaseElementType(clang::QualType) const () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #7 0x00007f48c859d114 in clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, clang::CodeGen::AggValueSlot) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #8 0x00007f48c85a1918 in StoreAnyExprIntoOneUnit(clang::CodeGen::CodeGenFunction&, clang::Expr const*, clang::QualType, llvm::Value*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #9 0x00007f48c85aadc2 in clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(clang::CXXNewExpr const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #10 0x00007f48c85bd5b8 in clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #11 0x00007f48c85bee3d in clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #12 0x00007f48c857653f in clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #13 0x00007f48c857fb38 in clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(clang::VarDecl const&, llvm::Constant*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #14 0x00007f48c857fccc in clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(llvm::Function*, clang::VarDecl const*, llvm::GlobalVariable*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #15 0x00007f48c8580327 in clang::CodeGen::CodeGenModule::EmitCXXGlobalVarDeclInitFunc(clang::VarDecl const*, llvm::GlobalVariable*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #16 0x00007f48c8501913 in clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #17 0x00007f48c8501c2e in clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #18 0x00007f48c8503fa5 in clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #19 0x00007f48c8504423 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #20 0x00007f48c84a3e43 in clang::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #21 0x00007f48c82b6580 in cling::IncrementalParser::codeGenTransaction(cling::Transaction*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #22 0x00007f48c82b642c in cling::IncrementalParser::commitTransaction(cling::Transaction*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #23 0x00007f48c82b70f4 in cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #24 0x00007f48c82be12e in cling::Interpreter::EvaluateInternal(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions const&, cling::Value*, cling::Transaction**) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #25 0x00007f48c82be3ad in cling::Interpreter::process(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #26 0x00007f48c82f2a2b in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #27 0x00007f48c81f9089 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #28 0x00007f48ca620ab5 in TApplication::ProcessLine(char const*, bool, int*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCore.so
      #29 0x00007f48ca269dff in TRint::ProcessLineNr(char const*, char const*, int*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libRint.so
      #30 0x00007f48ca26a0f1 in TRint::HandleTermInput() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libRint.so
      #31 0x00007f48ca6ee7e5 in TUnixSystem::CheckDescriptors() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCore.so
      #32 0x00007f48ca6ef2da in TUnixSystem::DispatchOneEvent(bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCore.so
      #33 0x00007f48ca6779f6 in TSystem::InnerLoop() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCore.so
      #34 0x00007f48ca6785a0 in TSystem::Run() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCore.so
      #35 0x00007f48ca61f1af in TApplication::Run(bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCore.so
      #36 0x00007f48ca26b5a7 in TRint::Run(bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libRint.so
      #37 0x000000000040128c in main ()
      ===========================================================

      The lines below might hint at the cause of the crash.
      If they do not help you then please submit a bug report at
      http://root.cern.ch/bugs. Please post the ENTIRE stack trace
      from above as an attachment in addition to anything else
      that might help us fixing this issue.
      ===========================================================
      #5 0x00007f48c8b9f451 in clang::QualType::getSplitDesugaredType(clang::QualType) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #6 0x00007f48c8a67bc8 in clang::ASTContext::getBaseElementType(clang::QualType) const () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #7 0x00007f48c859d114 in clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, clang::CodeGen::AggValueSlot) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #8 0x00007f48c85a1918 in StoreAnyExprIntoOneUnit(clang::CodeGen::CodeGenFunction&, clang::Expr const*, clang::QualType, llvm::Value*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #9 0x00007f48c85aadc2 in clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(clang::CXXNewExpr const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #10 0x00007f48c85bd5b8 in clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #11 0x00007f48c85bee3d in clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #12 0x00007f48c857653f in clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #13 0x00007f48c857fb38 in clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(clang::VarDecl const&, llvm::Constant*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #14 0x00007f48c857fccc in clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(llvm::Function*, clang::VarDecl const*, llvm::GlobalVariable*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #15 0x00007f48c8580327 in clang::CodeGen::CodeGenModule::EmitCXXGlobalVarDeclInitFunc(clang::VarDecl const*, llvm::GlobalVariable*, bool) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #16 0x00007f48c8501913 in clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #17 0x00007f48c8501c2e in clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #18 0x00007f48c8503fa5 in clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #19 0x00007f48c8504423 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #20 0x00007f48c84a3e43 in clang::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #21 0x00007f48c82b6580 in cling::IncrementalParser::codeGenTransaction(cling::Transaction*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #22 0x00007f48c82b642c in cling::IncrementalParser::commitTransaction(cling::Transaction*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #23 0x00007f48c82b70f4 in cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #24 0x00007f48c82be12e in cling::Interpreter::EvaluateInternal(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions const&, cling::Value*, cling::Transaction**) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #25 0x00007f48c82be3ad in cling::Interpreter::process(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      #26 0x00007f48c82f2a2b in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.00.02-x86_64-slc6-gcc48-opt/lib/libCling.so
      ===========================================================

        Attachments

          Activity

            People

            • Assignee:
              axel Axel Naumann
              Reporter:
              stilling Jan Andre Stillings
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: