[Converted from Gnats 1596] When using gdb with ddd to debug a C++ program built with TAO (The ACE ORB) v1.3a p4 (available at http://downloads.ociweb.com/TAO-1.3a/ACE+TAO-1.3a_with_latest_patches.tar.gz) gdb gets a segmentation fault due to an infinite recursion. Release: GNU gdb 6.0 Environment: Linux Redhat 7.3 with gcc 3.2.1 How-To-Repeat: This may be difficult to repeat as I do not have a simple test case, but here are the steps: 1) Download TAO 1.3a p4 at the location given in the description. 2) Build TAO. 3) Build the attached source 4) Run badrtcorba2 (and it will core dump) 5) Load the core using ddd as the debugger interface 6) Go up 3 frames and hold the mouse over the this pointer I'm sorry I don't have a simple test case.
Fix: The attached patch file for valops.c detects the infinite recursion and exits the function with a value of zero. I have tested it and it works great with the patch.
Believe it or not, the TAO/ACE tarball is still available, and it does indeed build on Fedora 11. Unfortunately, when I run the sample application, it does not crash/produce a core file. However, I played with the resultant executable, stepping into it for quite some time and printing lots of variables (and info func), and I was unable to get GDB 6.8 to misbehave. Looking at the proposed patch, it seems to me that the reported problem could very well have been a compiler error (not saying it is, just that it could be). I used the Fedora 11 GCC (4.4.1 vintage) during my testing. I can only assume that whatever was wrong, it was fixed a long time ago.