Bug #1886
Opening recursive call stack after crash (recursion limit) leads to IDE not response problem
| Status: | Approved | Start date: | 06/27/2018 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Miroslav Fidler | % Done: | 0% | |
| Category: | IDE | Spent time: | - | |
| Target version: | Release 2019.1 - NTH |
Description
Tested with GDB.
History
#1 Updated by Zbigniew Rebacz over 7 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 over 7 years ago
- Status changed from Patch ready to Ready for QA
#3 Updated by Zbigniew Rebacz over 7 years ago
Please review following code: https://github.com/ultimatepp/mirror/commit/49b14b2cf56e8b29811b9ec768521f84117531af
#4 Updated by Miroslav Fidler about 7 years ago
- Status changed from Ready for QA to Approved