bug-ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DDD hangs and causes linux to stop responding


From: Mark Waller
Subject: DDD hangs and causes linux to stop responding
Date: Thu, 23 Dec 2004 09:16:57 +0000

Hi,

I have only just subscribed to this mail list because I have found and fixed a bug in DDD and I am looking for some guidance on proper procedure for reporting bugs and submitting fixes. I have described it here but if this is not the place then can someone please point me in the right direction.

I found a bug that causes DDD to hang when displaying the contents of a structure in C++ it also had the effect of causing Linux (not just the X server) to stop responding. It has been present in DDD for many years, I previously just avoided using the data display for fear of locking up my system and finally decided to investigate it myself (which I admit I should have done years ago).

Thanks,

Mark.

The cause was the fact the first field in the structure was called "object" and that caused the following code in value_read.C to look for an "end" token that didn't exist, which results in a flat spin.

The offending code is:

            if (gdb && gdb->program_language() != LANGUAGE_JAVA)
            {
                string name(value + start, pos - start);
                if (name == "record")
                    read_up_to(value, pos, "end");
                else if (name == "object")
                    read_up_to(value, pos, "end");
                else if (name == "RECORD")
                    read_up_to(value, pos, "END");
                else if (name == "OBJECT")
                    read_up_to(value, pos, "END");
            }


There is already a test here to exclude this token matching when debugging Java. I think this needs extending to include C and C++, and possibly others too, but I am not familiar with the debugging output for other languages. i.e.


            if (gdb && gdb->program_language() != LANGUAGE_JAVA &&
                    gdb->program_language() != LANGUAGE_C)
            {
                ...







reply via email to

[Prev in Thread] Current Thread [Next in Thread]