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

simple typo crashes cling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.04.00, 6.02/05
    • Fix Version/s: 6.04.00, 6.02/10
    • Component/s: Cling
    • Labels:
      None
    • Environment:

      all

      Description

      Hi,

      Making a typo like "q.q" instead of ".q" crashes cling (rather than elegantly failing).

      Thanks,
      Philippe.

      $ root.exe
         -------------------------------------------------------------------------
        | Welcome to ROOT 6.02/05                             http://root.cern.ch |
        |                                            (c) 1995-2014, The ROOT Team |
        | Built for macosx64                                                      |
        | From heads/v6-02-00-patches@v6-02-05-81-gfdde4f2, Mar 08 2015, 12:43:38 |
        | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'              |
         -------------------------------------------------------------------------
       
      root [0] q.q
      In file included from input_line_2:1:
      /opt/build/root_builds/v6-02-00-patch.debug/./etc/cling/Interpreter/RuntimeUniverse.h:57:7: error: cannot compile this l-value expression yet
            int InterpreterGeneratedCodeDiagnosticsMaybeIncorrect;
            ^
       
       *** Break *** segmentation violation
       
       
       
      ===========================================================
      There was a crash (kSigSegmentationViolation).
      This is the entire stack trace of all threads:
      ===========================================================
       
      Thread 6 (process 43506):
      #0  0x00007fff96eb8a1a in mach_msg_trap ()
      #1  0x00007fff96eb7d18 in mach_msg ()
      #2  0x00007fff8c5bef15 in __CFRunLoopServiceMachPort ()
      #3  0x00007fff8c5be539 in __CFRunLoopRun ()
      #4  0x00007fff8c5bde75 in CFRunLoopRunSpecific ()
      #5  0x00007fff8d5b105e in _NSEventThread ()
      #6  0x00007fff91eef899 in _pthread_body ()
      #7  0x00007fff91eef72a in _pthread_start ()
      #8  0x00007fff91ef3fc9 in thread_start ()
       
      Thread 5 (process 43506):
      #0  0x00007fff96ebce6a in __workq_kernreturn ()
      #1  0x00007fff91ef0f08 in _pthread_wqthread ()
      #2  0x00007fff91ef3fb9 in start_wqthread ()
       
      Thread 4 (process 43506):
      #0  0x00007fff96ebce6a in __workq_kernreturn ()
      #1  0x00007fff91ef0f08 in _pthread_wqthread ()
      #2  0x00007fff91ef3fb9 in start_wqthread ()
       
      Thread 3 (process 43506):
      #0  0x00007fff96ebd662 in kevent64 ()
      #1  0x00007fff8e05f421 in _dispatch_mgr_invoke ()
      #2  0x00007fff8e05f136 in _dispatch_mgr_thread ()
       
      Thread 2 (process 43506):
      #0  0x00007fff96ebce6a in __workq_kernreturn ()
      #1  0x00007fff91ef0f08 in _pthread_wqthread ()
      #2  0x00007fff91ef3fb9 in start_wqthread ()
       
      Thread 1 (process 43506):
      #0  0x00007fff96ebce38 in wait4 ()
      #1  0x00007fff8ebab090 in system ()
      #2  0x0000000104b3d0b9 in TUnixSystem::Exec (this=0x7fac2a421d40, shellcmd=0x7fac2cb01980 "/opt/build/root_builds/v6-02-00-patch.debug/etc/gdb-backtrace.sh /opt/build/root_builds/v6-02-00-patch.debug/bin/root.exe 43506 1>&2") at /Users/pcanal/root_working/code/v6-02-00-patches/core/unix/src/TUnixSystem.cxx:2069
      #3  0x0000000104b3dd6e in TUnixSystem::StackTrace (this=0x7fac2a421d40) at /Users/pcanal/root_working/code/v6-02-00-patches/core/unix/src/TUnixSystem.cxx:2297
      #4  0x0000000104b43d5c in TUnixSystem::DispatchSignals (this=0x7fac2a421d40, sig=kSigSegmentationViolation) at /Users/pcanal/root_working/code/v6-02-00-patches/core/unix/src/TUnixSystem.cxx:3533
      #5  0x0000000104b375a4 in SigHandler (sig=kSigSegmentationViolation) at /Users/pcanal/root_working/code/v6-02-00-patches/core/unix/src/TUnixSystem.cxx:395
      #6  0x0000000104b43f27 in sighandler (sig=11) at /Users/pcanal/root_working/code/v6-02-00-patches/core/unix/src/TUnixSystem.cxx:3510
      #7  0x0000000104bed086 in textinput::TerminalConfigUnix::HandleSignal (this=0x104cdaad8, signum=11) at /Users/pcanal/root_working/code/v6-02-00-patches/core/textinput/src/textinput/TerminalConfigUnix.cpp:96
      #8  0x0000000104bece7b in (anonymous namespace)::TerminalConfigUnix__handleSignal (signum=11) at /Users/pcanal/root_working/code/v6-02-00-patches/core/textinput/src/textinput/TerminalConfigUnix.cpp:36
      #9  <signal handler called>
      #10 0x000000010686a42b in llvm::PointerType::get ()
      #11 0x00000001057d0331 in clang::CodeGen::CodeGenFunction::EmitUnsupportedLValue ()
      #12 0x00000001057cad8a in clang::CodeGen::CodeGenFunction::EmitLValue ()
      #13 0x00000001057cabd6 in clang::CodeGen::CodeGenFunction::EmitIgnoredExpr ()
      #14 0x00000001058526f5 in clang::CodeGen::CodeGenFunction::EmitStmt ()
      #15 0x000000010585958b in clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope ()
      #16 0x0000000105865384 in clang::CodeGen::CodeGenFunction::GenerateCode ()
      #17 0x00000001058715f4 in clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition ()
      #18 0x000000010586ec7c in clang::CodeGen::CodeGenModule::EmitGlobalDefinition ()
      #19 0x00000001058708aa in clang::CodeGen::CodeGenModule::EmitGlobal ()
      #20 0x00000001058729f8 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl ()
      #21 0x00000001058bb6df in clang::CodeGeneratorImpl::HandleTopLevelDecl ()
      #22 0x000000010548b6f5 in cling::IncrementalParser::codeGenTransaction (this=0x7fac2a512910, T=0x7fac2c651000) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:479
      #23 0x000000010548b476 in cling::IncrementalParser::commitTransaction (this=0x7fac2a512910, T=0x7fac2c651000) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:417
      #24 0x000000010548c53e in cling::IncrementalParser::Compile (this=0x7fac2a512910, input={static npos = <optimized out>, Data = 0x7fac2ca92a70 "void __cling_Un1Qu30(void* vpClingValue) {\n #line 1 \"ROOT_prompt_0\"\nq.q\n;\n}", Length = 75}, Opts=
      0x7fff5b366f00) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:690
      #25 0x00000001054a100b in cling::Interpreter::EvaluateInternal (this=0x7fac2a511b80, input=
      0x7fff5b366f78, CO=
      0x7fff5b366f00, V=0x7fff5b367600, T=0x0) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:976
      #26 0x000000010549fcca in cling::Interpreter::process (this=0x7fac2a511b80, input=
      0x7fff5b366f78, V=0x7fff5b367600, T=0x0) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:499
      #27 0x000000010554a0c7 in cling::MetaProcessor::process (this=0x7fac2c948390, input_text=0x7fac2ca93350 "#line 1 \"ROOT_prompt_0\"\nq.q", compRes=
      0x7fff5b3675fc, result=0x7fff5b367600) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:162
      #28 0x00000001050d99fb in TCling::ProcessLine (this=0x7fac2a511600, line=0x7fac2ca8ec30 "#line 1 \"ROOT_prompt_0\"\nq.q", error=0x7fff5b3681f4) at /Users/pcanal/root_working/code/v6-02-00-patches/core/meta/src/TCling.cxx:1887
      #29 0x00000001049ac8fc in TApplication::ProcessLine (this=0x7fac2a50db50, line=0x7fac2ca8ec30 "#line 1 \"ROOT_prompt_0\"\nq.q", sync=false, err=0x7fff5b3681f4) at /Users/pcanal/root_working/code/v6-02-00-patches/core/base/src/TApplication.cxx:982
      #30 0x000000010502064d in TRint::ProcessLineNr (this=0x7fac2a50db50, filestem=0x105040c28 "ROOT_prompt_", line=0x7fff5b368301 "q.q", error=0x7fff5b3681f4) at /Users/pcanal/root_working/code/v6-02-00-patches/core/rint/src/TRint.cxx:723
      #31 0x00000001050226b5 in TRint::HandleTermInput (this=0x7fac2a50db50) at /Users/pcanal/root_working/code/v6-02-00-patches/core/rint/src/TRint.cxx:596
      #32 0x000000010501e06a in TTermInputHandler::Notify (this=0x7fac2ca811f0) at /Users/pcanal/root_working/code/v6-02-00-patches/core/rint/src/TRint.cxx:124
      #33 0x0000000105023e49 in TTermInputHandler::ReadNotify (this=0x7fac2ca811f0) at /Users/pcanal/root_working/code/v6-02-00-patches/core/rint/src/TRint.cxx:116
      #34 0x0000000104b39a3e in TUnixSystem::CheckDescriptors (this=0x7fac2a421d40) at /Users/pcanal/root_working/code/v6-02-00-patches/core/unix/src/TUnixSystem.cxx:1297
      #35 0x0000000104b4a62c in TMacOSXSystem::DispatchOneEvent (this=0x7fac2a421d40, pendingOnly=false) at /Users/pcanal/root_working/code/v6-02-00-patches/core/macosx/src/TMacOSXSystem.mm:361
      #36 0x0000000104a435f3 in TSystem::InnerLoop (this=0x7fac2a421d40) at /Users/pcanal/root_working/code/v6-02-00-patches/core/base/src/TSystem.cxx:409
      #37 0x0000000104a43423 in TSystem::Run (this=0x7fac2a421d40) at /Users/pcanal/root_working/code/v6-02-00-patches/core/base/src/TSystem.cxx:359
      #38 0x00000001049ae594 in TApplication::Run (this=0x7fac2a50db50, retrn=false) at /Users/pcanal/root_working/code/v6-02-00-patches/core/base/src/TApplication.cxx:1130
      #39 0x00000001050204f9 in TRint::Run (this=0x7fac2a50db50, retrn=false) at /Users/pcanal/root_working/code/v6-02-00-patches/core/rint/src/TRint.cxx:450
      #40 0x0000000104895b07 in main (argc=1, argv=0x7fff5b36a8a0) at /Users/pcanal/root_working/code/v6-02-00-patches/main/src/rmain.cxx:29
      ===========================================================
       
       
      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.
      ===========================================================
      #10 0x000000010686a42b in llvm::PointerType::get ()
      #11 0x00000001057d0331 in clang::CodeGen::CodeGenFunction::EmitUnsupportedLValue ()
      #12 0x00000001057cad8a in clang::CodeGen::CodeGenFunction::EmitLValue ()
      #13 0x00000001057cabd6 in clang::CodeGen::CodeGenFunction::EmitIgnoredExpr ()
      #14 0x00000001058526f5 in clang::CodeGen::CodeGenFunction::EmitStmt ()
      #15 0x000000010585958b in clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope ()
      #16 0x0000000105865384 in clang::CodeGen::CodeGenFunction::GenerateCode ()
      #17 0x00000001058715f4 in clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition ()
      #18 0x000000010586ec7c in clang::CodeGen::CodeGenModule::EmitGlobalDefinition ()
      #19 0x00000001058708aa in clang::CodeGen::CodeGenModule::EmitGlobal ()
      #20 0x00000001058729f8 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl ()
      #21 0x00000001058bb6df in clang::CodeGeneratorImpl::HandleTopLevelDecl ()
      #22 0x000000010548b6f5 in cling::IncrementalParser::codeGenTransaction (this=0x7fac2a512910, T=0x7fac2c651000) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:479
      #23 0x000000010548b476 in cling::IncrementalParser::commitTransaction (this=0x7fac2a512910, T=0x7fac2c651000) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:417
      #24 0x000000010548c53e in cling::IncrementalParser::Compile (this=0x7fac2a512910, input={static npos = <optimized out>, Data = 0x7fac2ca92a70 "void __cling_Un1Qu30(void* vpClingValue) {n #line 1 "ROOT_prompt_0"nq.qn;n}", Length = 75}, Opts=
      0x7fff5b366f00) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:690
      #25 0x00000001054a100b in cling::Interpreter::EvaluateInternal (this=0x7fac2a511b80, input=
      0x7fff5b366f78, CO=
      0x7fff5b366f00, V=0x7fff5b367600, T=0x0) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:976
      #26 0x000000010549fcca in cling::Interpreter::process (this=0x7fac2a511b80, input=
      0x7fff5b366f78, V=0x7fff5b367600, T=0x0) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/Interpreter/Interpreter.cpp:499
      #27 0x000000010554a0c7 in cling::MetaProcessor::process (this=0x7fac2c948390, input_text=0x7fac2ca93350 "#line 1 "ROOT_prompt_0"nq.q", compRes=
      0x7fff5b3675fc, result=0x7fff5b367600) at /Users/pcanal/root_working/code/v6-02-00-patches/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:162
      ===========================================================

        Attachments

          Activity

            People

            • Assignee:
              axel Axel Naumann
              Reporter:
              pcanal Philippe Canal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: