Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deep recursion in references can cause a crash #4513

Closed
davidnich opened this issue May 7, 2022 · 0 comments
Closed

deep recursion in references can cause a crash #4513

davidnich opened this issue May 7, 2022 · 0 comments

Comments

@davidnich
Copy link
Contributor

davidnich commented May 7, 2022

==221447== Memcheck, a memory error detector
==221447== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==221447== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==221447== Command: /usr/bin/qore -b /home/david/src/Qorus/git/qorus/doxygen/doxygen-api-filter.q --rest=/home/david/src/Qorus/git/qorus/build --outdir=/home/david/src/Qorus/git/qorus/build/doxygen /home/david/src/Qorus/git/qorus/Classes/QorusRestApiHandler.qc /home/david/src/Qorus/git/qorus/Classes/QorusRestApiHandlerV2.qc /home/david/src/Qorus/git/qorus/Classes/QorusRestApiHandlerV3.qc /home/david/src/Qorus/git/qorus/Classes/QorusRestApiHandlerV4.qc /home/david/src/Qorus/git/qorus/Classes/QorusRestApiHandlerV5.qc /home/david/src/Qorus/git/qorus/Classes/QorusRestApiHandlerV6.qc /home/david/src/Qorus/git/qorus/Classes/QorusRestApiHandlerV7.qc /home/david/src/Qorus/git/qorus/Classes/QorusRestApiHandlerPublic.qc /home/david/src/Qorus/git/qorus/Classes/QorusCreatorRestApiHandler.qc /home/david/src/Qorus/git/qorus/Classes/RemoteDevelopment/API/DeployRestClass.qc /home/david/src/Qorus/git/qorus/Classes/RemoteDevelopment/API/DeleteRestClass.qc /home/david/src/Qorus/git/qorus/Classes/RemoteDevelopment/API/ReleaseRestClass.qc /home/david/src/Qorus/git/qorus/Classes/RemoteDevelopment/API/TestRestClass.qc /home/david/src/Qorus/git/qorus/Classes/RemoteDevelopment/API/RemoteDevelopmentRestClass.qc /home/david/src/Qorus/git/qorus/Classes/Metrics/API/MetricsRestClass.qc
==221447== 
==221447== Stack overflow in thread #1: can't grow stack to 0x1ffe801000
==221447== 
==221447== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==221447==  Access not within mapped region at address 0x1FFE801FF8
==221447== Stack overflow in thread #1: can't grow stack to 0x1ffe801000
==221447==    at 0x50151C2: std::_Rb_tree<lvalue_ref const*, lvalue_ref const*, std::_Identity<lvalue_ref const*>, std::less<lvalue_ref const*>, std::allocator<lvalue_ref const*> >::_M_get_insert_unique_pos(lvalue_ref const* const&) (stl_tree.h:2111)
==221447==  If you believe this happened as a result of a stack
==221447==  overflow in your program's main thread (unlikely but
==221447==  possible), you can try to increase the size of the
==221447==  main thread stack using the --main-stacksize= flag.
==221447==  The main thread stack size used in this run was 8388608.
#15 0x00007f92b77ef099 in ClosureVarValue::getLValue (this=0x36c4f70, lvh=..., for_remove=true) at /home/david/src/qore/git/qore/lib/Variable.cpp:1943
#16 0x00007f92b77c9e8c in VarRefNode::getLValue (this=0x3647560, lvh=..., for_remove=true) at /home/david/src/qore/git/qore/lib/VarRefNode.cpp:249
#17 0x00007f92b77e8758 in LValueHelper::doLValue (this=0x7ffc426cb4f0, n=..., for_remove=true) at /home/david/src/qore/git/qore/lib/Variable.cpp:592
#18 0x00007f92b77e8695 in LValueHelper::doLValue (this=0x7ffc426cb4f0, ref=0x30f9f20, for_remove=true)
    at /home/david/src/qore/git/qore/lib/Variable.cpp:578
#19 0x00007f92b77ef0d3 in ClosureVarValue::getLValue (this=0x36af6e0, lvh=..., for_remove=true) at /home/david/src/qore/git/qore/lib/Variable.cpp:1944
--Type <RET> for more, q to quit, c to continue without paging--
#20 0x00007f92b77c9e8c in VarRefNode::getLValue (this=0x31fee60, lvh=..., for_remove=true) at /home/david/src/qore/git/qore/lib/VarRefNode.cpp:249
#21 0x00007f92b77e8758 in LValueHelper::doLValue (this=0x7ffc426cb4f0, n=..., for_remove=true) at /home/david/src/qore/git/qore/lib/Variable.cpp:592
#22 0x00007f92b77e8695 in LValueHelper::doLValue (this=0x7ffc426cb4f0, ref=0x369c640, for_remove=true)
    at /home/david/src/qore/git/qore/lib/Variable.cpp:578
...
@davidnich davidnich added this to the 1.7.3 milestone May 7, 2022
@davidnich davidnich self-assigned this May 7, 2022
@davidnich davidnich added this to To do in Qore Development via automation May 7, 2022
@davidnich davidnich changed the title a circular reference can cause a crash deep recursion in references can cause a crash May 7, 2022
davidnich added a commit that referenced this issue May 7, 2022
davidnich added a commit that referenced this issue May 7, 2022
@davidnich davidnich added the fixed label May 8, 2022
Qore Development automation moved this from To do to Done May 8, 2022
davidnich added a commit that referenced this issue May 8, 2022
…e causing redirect failures in cases where the redirect URI path had encoded elements

refs #4513 fixed a crash related to stack exhaustion resolving deeply-nested references (#4514)
other cosmetic code fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant