Port-mac68k archive

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

Re: diff dumping core on netbsd-5



In article <Pine.NEB.4.64.0901262346290.24552%andromeda.ziaspace.com@localhost>,
John Klos  <john%ziaspace.com@localhost> wrote:
>Any ideas? This is a NetBSD 5 system from sources from three days ago or 
>so.
>
>boobookitty: {5} gdb `which diff` diff.core
>GNU gdb 6.5
>Copyright (C) 2006 Free Software Foundation, Inc.
>GDB is free software, covered by the GNU General Public License, and you are
>welcome to change it and/or distribute copies of it under certain conditions.
>Type "show copying" to see the conditions.
>There is absolutely no warranty for GDB.  Type "show warranty" for details.
>This GDB was configured as "m68k--netbsdelf"...(no debugging symbols found)
>
>Reading symbols from /usr/lib/libc.so.12...(no debugging symbols found)...done.
>Loaded symbols for /usr/lib/libc.so.12
>Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols
>found)...done.
>Loaded symbols for /usr/libexec/ld.elf_so
>
>Core was generated by `diff'.
>Program terminated with signal 11, Segmentation fault.
>#0  0x040f0d9c in memcpy () from /usr/lib/libc.so.12
>(gdb) bt
>#0  0x040f0d9c in memcpy () from /usr/lib/libc.so.12
>#1  0x040b12dc in realloc () from /usr/lib/libc.so.12
>#2  0x00012336 in xrealloc ()
>#3  0x00008bb4 in slurp ()
>#4  0x00008cee in read_files ()
>#5  0x0000419e in diff_2_files ()
>#6  0x0000661a in compare_files ()
>#7  0x000076bc in main ()

should not die this way because when realloc does the memcpy, it has
already checked for a NULL pointer, and the pointer given should be
of the right size. What gives? Can you compile a debugging libc
(MKDEBUG=yes), and link diff against it (-lc_g)

christos




Home | Main Index | Thread Index | Old Index