[Crash-utility] [PATCH] Fix segmentation fault

Dave Anderson anderson at redhat.com
Thu Jan 15 14:44:33 UTC 2009


----- "Bernhard Walle" <bwalle at suse.de> wrote:

> * Sachin P. Sant [2009-01-15 11:02]:
> >
> > Dave Anderson wrote:
> > > ----- "Bernhard Walle" <bwalle at suse.de> wrote:
> > >
> > >   
> > >> * Executing crash without any parameter results in a segmentation fault.
> > >> * Add a NULL check for pc->orig_namelist to avoid the segmentation fault.
> > >>     
> > >
> > > Huh?
> > >
> > > The crash utility's program_context structure doesn't even
> > > have an "orig_namelist" member.
> > >
> > > Is this perhaps a bug in the SUSE crash utility derivative?
> > >
> > >   
> > Yup not a problem with upstream crash. 
> 
> Yes, my fault. I was too fast in sending not upstreamed patches upstream. :-|
> 
> Explanation: I have some patch to read gzip'd kernels (mainly for
> ia64 /boot/vmlinuz and for x86 /boot/vmlinux.gz). That patch added the
> orig_namelist member. Because I extract the /boot/vmlinux.gz to a
> temporary file but need the orig_namelist to print out nice error
> messages.
> 
> I always wanted to 'polish' that patch for upstream inclusion. Any
> interest in that feature? Then I would have some motivation to finally
> do. :-)

Not a bad idea -- just post the patch without the segmentation violation. ;-)
 
> I've chosen that temporary uncompression in favor to replace all reads
> and writes with zlib equivalents because it's just extremely less
> intrusive. 

I agree.  In fact during runtime the reads from the vmlinux file are
primarily done by the gdb module code, so it would have to be hacked
at both levels (crash and gdb).

Years ago I did tinker with using the zlib equivalents for accessing
the dumpfile compressed.  But the gzseek()'s were so painfully slow
that it was pretty much unusable.

Dave




More information about the Crash-utility mailing list