qorelanguage / module-linenoise

Qore linenoise module
GNU Lesser General Public License v2.1
0 stars 0 forks source link

crash in callback's eval() #1

Open pvanek opened 9 years ago

pvanek commented 9 years ago
gdb --args qr /srv/qorus/bin/qdb oracle:pvanek_omq/omq@xbox
...
Starting program: /usr/local/bin/qr /srv/qorus/bin/qdb oracle:pvanek_omq/omq@xbox
Got object file from memory but can't read symbols: File truncated.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff5410700 (LWP 4272)]
Current limit: 100
Current verbosity: 0
Current output method: console. Available list: ("console", "xml", "yaml", "json")
SQL tran:n oracle:pvanek_omq@xbox%> t<press TAB>
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7992d58 in qore_method_private::eval (m=..., self=0x103ed90, 
    args=0x7fffffffb460, xsink=0x7ffff5c3d620 <main_arena>)
    at ../include/qore/intern/QoreClassIntern.h:3305
3305          return m.priv->eval(self, args, xsink);
(gdb) bt
#0  0x00007ffff7992d58 in qore_method_private::eval (m=..., self=0x103ed90, 
    args=0x7fffffffb460, xsink=0x7ffff5c3d620 <main_arena>)
    at ../include/qore/intern/QoreClassIntern.h:3305
#1  0x00007ffff78cf29e in RunTimeResolvedMethodReferenceNode::execValue (
    this=0x10325a0, args=0x7fffffffb460, xsink=0x7ffff5c3d620 <main_arena>)
    at CallReferenceNode.cpp:366
#2  0x00007ffff4a0cac8 in qore_lineoise_completion_cb(char const*, linenoiseCompletions*) () from /usr/local/lib64/qore-modules/linenoise-api-0.19.qmod
#3  0x00007ffff4a0b050 in linenoise ()
   from /usr/local/lib64/qore-modules/linenoise-api-0.19.qmod
#4  0x00007ffff4a0cc71 in f_line_Vs(QoreListNode const*, ExceptionSink*) ()
   from /usr/local/lib64/qore-modules/linenoise-api-0.19.qmod
#5  0x00007ffff797bb4e in BuiltinFunctionVariant::evalFunction (this=0x8c4760, 
    name=0x8c5608 "line", ceh=..., xsink=0x7fffffffdae0)
    at ../include/qore/intern/BuiltinFunction.h:121
#6  0x00007ffff78346da in QoreFunction::evalFunction (this=0x8c6980, 
    variant=0x8c4760, args=0xff9c40, pgm=0x0, xsink=0x7fffffffdae0)
    at Function.cpp:1156
#7  0x00007ffff782da98 in FunctionCallNode::evalValueImpl (this=0xff96f0, 
    needs_deref=@0x7fffffffc938: true, xsink=0x7fffffffdae0)
    at FunctionCallNode.cpp:339
#8  0x00007ffff7976969 in ParseNode::evalValue (this=0xff96f0, 
    needs_deref=@0x7fffffffc938: true, xsink=0x7fffffffdae0)
    at ../include/qore/intern/ParseNode.h:128
#9  0x00007ffff78f29b8 in ValueEvalRefHolder::ValueEvalRefHolder (
    this=0x7fffffffc920, exp=0xff96f0, xs=0x7fffffffdae0) at QoreValue.cpp:361
#10 0x00007ffff78e8b7e in QoreAssignmentOperatorNode::evalValueImpl (this=0xff9ec0, 
    needs_deref=@0x7fffffffcab8: true, xsink=0x7fffffffdae0)
    at QoreAssignmentOperatorNode.cpp:80
#11 0x00007ffff7976969 in ParseNode::evalValue (this=0xff9ec0, 
    needs_deref=@0x7fffffffcab8: true, xsink=0x7fffffffdae0)
    at ../include/qore/intern/ParseNode.h:128
#12 0x00007ffff78f29b8 in ValueEvalRefHolder::ValueEvalRefHolder (
    this=0x7fffffffcaa0, exp=0xff9ec0, xs=0x7fffffffdae0) at QoreValue.cpp:361
#13 0x00007ffff7976342 in ParseNode::bigIntEvalImpl (this=0xff9ec0, 
    xsink=0x7fffffffdae0) at ../include/qore/intern/ParseNode.h:55
#14 0x00007ffff781d0d4 in AbstractQoreNode::bigIntEval (this=0xff9ec0, 
    xsink=0x7fffffffdae0) at AbstractQoreNode.cpp:226
#15 0x00007ffff7839ec1 in ExpressionStatement::execImpl (this=0xff9f10, 
    return_value=0x7fffffffce88, xsink=0x7fffffffdae0) at ExpressionStatement.cpp:64
#16 0x00007ffff78399f4 in AbstractStatement::exec (this=0xff9f10, 
    return_value=0x7fffffffce88, xsink=0x7fffffffdae0) at AbstractStatement.cpp:54
#17 0x00007ffff783a82a in StatementBlock::execIntern (this=0xff9f60, 
    return_value=0x7fffffffce88, xsink=0x7fffffffdae0) at StatementBlock.cpp:221
#18 0x00007ffff783a6df in StatementBlock::execImpl (this=0xff9f60, 
    return_value=0x7fffffffce88, xsink=0x7fffffffdae0) at StatementBlock.cpp:203
#19 0x00007ffff783d285 in WhileStatement::execImpl (this=0xffb940, 
    return_value=0x7fffffffce88, xsink=0x7fffffffdae0) at WhileStatement.cpp:54
#20 0x00007ffff78399f4 in AbstractStatement::exec (this=0xffb940, 
    return_value=0x7fffffffce88, xsink=0x7fffffffdae0) at AbstractStatement.cpp:54
#21 0x00007ffff783a82a in StatementBlock::execIntern (this=0xff9a50, 
    return_value=0x7fffffffce88, xsink=0x7fffffffdae0) at StatementBlock.cpp:221
#22 0x00007ffff783a6df in StatementBlock::execImpl (this=0xff9a50, 
    return_value=0x7fffffffce88, xsink=0x7fffffffdae0) at StatementBlock.cpp:203
#23 0x00007ffff783a503 in StatementBlock::exec (this=0xff9a50, xsink=0x7fffffffdae0)
    at StatementBlock.cpp:168
#24 0x00007ffff7835713 in UserVariantBase::evalIntern (this=0xffc0d8, argv=..., 
    self=0x8bec70, xsink=0x7fffffffdae0) at Function.cpp:1328
#25 0x00007ffff7835a78 in UserVariantBase::eval (this=0xffc0d8, 
    name=0xffc218 "mainLoop", ceh=0x7fffffffd0e0, self=0x8bec70, 
    xsink=0x7fffffffdae0, qc=0xff52b0) at Function.cpp:1380
#26 0x00007ffff7987db8 in UserMethodVariant::evalMethod (this=0xffc0a0, 
    self=0x8bec70, ceh=..., xsink=0x7fffffffdae0)
    at ../include/qore/intern/QoreClassIntern.h:370
#27 0x00007ffff785d487 in QoreMethod::evalNormalVariant (this=0xffc320, 
    self=0x8bec70, ev=0xffc0a0, args=0x0, xsink=0x7fffffffdae0)
    at QoreClass.cpp:2351
#28 0x00007ffff782c4e5 in AbstractMethodCallNode::exec (this=0x102b310, o=0x8bec70, 
    c_str=0xff9230 "mainLoop", xsink=0x7fffffffdae0) at FunctionCallNode.cpp:53
#29 0x00007ffff782d426 in SelfFunctionCallNode::evalValueImpl (this=0x102b310, 
    needs_deref=@0x7fffffffd2b8: true, xsink=0x7fffffffdae0)
    at FunctionCallNode.cpp:251
---Type <return> to continue, or q <return> to quit---
#30 0x00007ffff7976969 in ParseNode::evalValue (this=0x102b310, 
    needs_deref=@0x7fffffffd2b8: true, xsink=0x7fffffffdae0)
    at ../include/qore/intern/ParseNode.h:128
#31 0x00007ffff78f29b8 in ValueEvalRefHolder::ValueEvalRefHolder (
    this=0x7fffffffd2a0, exp=0x102b310, xs=0x7fffffffdae0) at QoreValue.cpp:361
#32 0x00007ffff7976342 in ParseNode::bigIntEvalImpl (this=0x102b310, 
    xsink=0x7fffffffdae0) at ../include/qore/intern/ParseNode.h:55
#33 0x00007ffff781d0d4 in AbstractQoreNode::bigIntEval (this=0x102b310, 
    xsink=0x7fffffffdae0) at AbstractQoreNode.cpp:226
#34 0x00007ffff7839ec1 in ExpressionStatement::execImpl (this=0xff92c0, 
    return_value=0x7fffffffd4b8, xsink=0x7fffffffdae0) at ExpressionStatement.cpp:64
#35 0x00007ffff78399f4 in AbstractStatement::exec (this=0xff92c0, 
    return_value=0x7fffffffd4b8, xsink=0x7fffffffdae0) at AbstractStatement.cpp:54
#36 0x00007ffff783a82a in StatementBlock::execIntern (this=0xff1220, 
    return_value=0x7fffffffd4b8, xsink=0x7fffffffdae0) at StatementBlock.cpp:221
#37 0x00007ffff783a6df in StatementBlock::execImpl (this=0xff1220, 
    return_value=0x7fffffffd4b8, xsink=0x7fffffffdae0) at StatementBlock.cpp:203
#38 0x00007ffff783a503 in StatementBlock::exec (this=0xff1220, xsink=0x7fffffffdae0)
    at StatementBlock.cpp:168
#39 0x00007ffff7835713 in UserVariantBase::evalIntern (this=0xff9368, argv=..., 
    self=0x8bec70, xsink=0x7fffffffdae0) at Function.cpp:1328
#40 0x00007ffff7988101 in UserConstructorVariant::evalConstructor (this=0xff9330, 
    thisclass=..., self=0x8bec70, ceh=..., bcl=0x0, bceal=0x0, xsink=0x7fffffffdae0)
    at ../include/qore/intern/QoreClassIntern.h:414
#41 0x00007ffff7866df8 in ConstructorMethodFunction::evalConstructor (
    this=0xff9500, variant=0xff9330, thisclass=..., self=0x8bec70, args=0x0, 
    bcl=0x0, bceal=0x0, xsink=0x7fffffffdae0) at QoreClass.cpp:4097
#42 0x00007ffff79921ac in qore_method_private::evalConstructor (this=0xff9610, 
    variant=0x0, self=0x8bec70, args=0x0, bceal=0x0, xsink=0x7fffffffdae0)
    at ../include/qore/intern/QoreClassIntern.h:3169
#43 0x00007ffff78570ae in qore_class_private::execConstructor (this=0xff52b0, 
    variant=0x0, args=0x0, xsink=0x7fffffffdae0) at QoreClass.cpp:957
#44 0x00007ffff785efaa in QoreClass::execConstructor (this=0xff5200, args=0x0, 
    xsink=0x7fffffffdae0) at QoreClass.cpp:2665
#45 0x00007ffff788145b in QoreProgram::runClass (this=0x7f7a80, 
    classname=0x8c2d28 "Main", xsink=0x7fffffffdae0) at QoreProgram.cpp:984
#46 0x00007ffff7880b3b in QoreProgram::run (this=0x7f7a80, xsink=0x7fffffffdae0)
    at QoreProgram.cpp:844
#47 0x0000000000407c95 in qore_main_intern (argc=3, argv=0x7fffffffdc78, 
    other_po=402653184) at command-line.cpp:970
#48 0x0000000000407e34 in main (argc=3, argv=0x7fffffffdc78) at qr-main.cpp:36
omusil24 commented 4 years ago

@davidnich found this old bug, but not sure if it's relevant anymore or not, so I assigned it to you. Probably it's something that has already been fixed.