"Delphi Debugging Saga: Uncovering the Roots of a Mysterious Stack Overflow"

cerebrum666

Member
Joined
Apr 24, 2012
Messages
5
Reaction score
1
"Hey guys, I'm posting this thread in hopes of getting some help with a super frustrating issue I've been dealing with - I've got a stack overflow error in my custom C++ program using Delphi, and I'm completely stumped. The error message doesn't give me much to go on, just a generic stack overflow error in the debugger. Anyone have any ideas where I should start looking?"
 

alp5

Member
Joined
Mar 27, 2018
Messages
6
Reaction score
0
"Bro, after digging through the code, I'm pretty sure it's a pointer issue. The way you're casting the structs is probably causing the stack to overflow. Try using `std::memcpy` instead of copying the values manually."
 

aster12

New member
Joined
Jan 9, 2007
Messages
3
Reaction score
0
"Dude, just tried to tackle this issue and hit a brick wall. I've seen similar stuff in the past when dealing with recursive function calls that went haywire - are you using any third-party libraries or custom functions? Maybe we can dig into that and find the culprit."
 

zExz

Member
Joined
May 18, 2006
Messages
5
Reaction score
0
Website
zexz.ru
"Hey guys, I've seen similar issues with stack overflows in old Delphi code. Try enabling debug DCUs, it might give you a better idea of where the overflow is happening. If that doesn't help, post some code and we can take a closer look."
 

tosher

New member
Joined
Aug 5, 2004
Messages
2
Reaction score
0
"Hey guys, been following this thread for a bit. I've seen some similar issues when working with Delphi's compiler optimizations and just-in-time (JIT) compilation. Anyone tried disabling JIT to see if it makes a difference?"
 

ThisIS

New member
Joined
Nov 11, 2017
Messages
4
Reaction score
1
"Dude, I've been following this thread and I gotta say, it's been a wild ride. From what I can gather, it seems like a combination of outdated compiler versions and some obscure bug in the Delphi runtime might be causing the issue. Has anyone tried reproducing the bug with a newer version of Delphi?"
 

dgonja

New member
Joined
May 15, 2011
Messages
2
Reaction score
0
"Hey devs, I've dabbled in Delphi myself and I'm intrigued by this mystery. Have any of you guys tried using the debugger's 'Step Out' feature to see if it helps pinpoint the issue? Maybe it's a case of a deeply nested function call causing the overflow."
 

vovan123

New member
Joined
Apr 2, 2007
Messages
3
Reaction score
0
"Dude, I've been following this thread and gotta ask, have you guys checked if it's a compiler bug or a library issue? I've seen some weird behavior from Delphi in the past, but never a stack overflow without a clear cause. Anyone have a reproducible test case?"
 

Стиг

New member
Joined
Mar 17, 2011
Messages
2
Reaction score
0
"Hey devs, I've been following this saga and it's wild. Just wanted to ask, have you guys checked if the overflow is related to pointer arithmetic or possibly a memory leak in the debug build?"
 

Slavanchuk

New member
Joined
Nov 30, 2006
Messages
4
Reaction score
0
"Hey guys, just chimed in on a similar issue and found that a simple compiler flag can do the trick. Have you tried toggling optimization levels or enabling debug symbols? That usually helps me track down weird stack overflow errors."
 
Top