Bug #1886

Opening recursive call stack after crash (recursion limit) leads to IDE not response problem

Added by Zbigniew Rebacz almost 6 years ago. Updated over 5 years ago.

Status:ApprovedStart date:06/27/2018
Priority:NormalDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:IDESpent time:-
Target version:Release 2019.1 - NTH

Description

Tested with GDB.

History

#1 Updated by Zbigniew Rebacz almost 6 years ago

  • Status changed from New to Patch ready

The following fix should solve the problem (ide/Debuggers/Gdb.cpp):

void Gdb::DropFrames()
{
    const int max_stack_trace_size = 200;

    int i = 0;
    int q = ~frame;
    frame.Clear();
    while(i < max_stack_trace_size) {
        String s = FormatFrame(FastCmd(Sprintf("frame %d", i)));
        if(IsNull(s)) {
            break;
        }
        frame.Add(i++, s);
    }
    frame <<= q;
}

Test case:

#include <Core/Core.h>

using namespace Upp;

void fun(int i) {
    fun(--i);
}

CONSOLE_APP_MAIN
{
    fun(1);
}

#2 Updated by Zbigniew Rebacz almost 6 years ago

  • Status changed from Patch ready to Ready for QA

#4 Updated by Miroslav Fidler over 5 years ago

  • Status changed from Ready for QA to Approved

Also available in: Atom PDF