On 5/3/2012 4:43 PM, John Morris wrote: > Hi Charles, > >> I haven't been able to get the record feature of gdb to do much of >> anything useful, because it keeps stopping on an unsupported instruction >> (0xc5). I don't know if this is related to the crashing or not. :-/ > > I spent a good 10 hours on this and have narrowed things down to > weirdness, as well. Using the technique I described, I traced the > segfault into malloc.c. I had to do a bunch of reading to understand > malloc's data structures before I could see the problem, and when I > finally did, no luck. > > Recycled memory chunks are split for a new malloc(), one part given to > the program, the remainder put back into a 'bin' in a circular > doubly-linked list for later use. I could step back and forth across > this instruction here: > > remainder->bk = bck;
I saw this, spent a bit trying to google glibc malloc structures without much luck, then went on to a different path. I figured the malloc crash is due to corrupted memory, so trying to debug malloc is likely going to be painful. If you run with electric fence, you'll get a segfault well before the malloc crash, where one of the debug writes to stderr is stepping on memory that it shouldn't (which is likely what is eventually causing malloc to barf). Looking at what might be corrupting the stderr structure is what lead me to point the finger at the rtapi_print_msg from rtapi_clock_set_period. -- Charles Steinkuehler char...@steinkuehler.net ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers