On Sun, Jan 04, 2015 at 11:30:25AM -0500, Karl Dahlke wrote: > This horrible long url > > https://maps.google.com/maps?hl=en&gbv=1&ie=UTF-8&fb=1&gl=us&ftid=0x8824960112ae4ca1:0xe09071020c10f93d&q=2660+Dixie+Hwy,+Waterford+Township,+MI+48328&ei=vGGpVOrBBoqsyQSt0oGoAw&ved=0CBQQ8gEoADAA&output=classic&dg=brw > > Produces a realloc null pointer fatal error on my system. > I ran it with db5, even db7, but still not clrear what is going on. > > I check for this null pointer and exit gracefully, but maybe I shouldn't. > Maybe I should check and print the error, then deliberately set *s = 55, > to get the null pointer dereference and the stack trace. No you shouldn't, unless you only ever do it for debugging purposes and never submit it. I've never come across a situation where forcing a segfault is good, particularly as stack traces don't always result in any cace, it depends on the environment. For example, sometimes it'll just say there's been a segmentation fault, sometimes it'll do a core dump, sometimes it'll print a stack trace and in some cases you get the stack trace and memory map. It really depends on libraries used, environment variable settings and resource limits. Tbh I'd never do this, I'd use gdb and a build with debug symbols. Cheers, Adam.