NetBSD-Users archive

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

/usr/bin/sort dumps (reproducable)

Hi David,

my sponsor (Joerg Sonnenberger) told me, you would be the best one to ask about the core dump I regular get while replacing packages (PKGSRC_DEVELOPER=yes):

Core was generated by `sort'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f7ffd4e3594 in memcpy () from /usr/lib/
(gdb) bt
#0  0x00007f7ffd4e3594 in memcpy () from /usr/lib/
#1  0x00007f7ffd4e3232 in __sfvwrite () from /usr/lib/
#2  0x00007f7ffd4e2f73 in fwrite () from /usr/lib/
#3 0x0000000000401d56 in putrec (rec=0x7f7ffcafffb4, fp=0x7f7ffd716cf8) at /usr/src/usr.bin/sort/files.c:230 #4 0x00000000004015a4 in append (keylist=0x7f7ffd100000, nelem=-38762808, fp=0x7f7ffd716cf8, put=0x401d11 <putrec>)
    at /usr/src/usr.bin/sort/append.c:92
#5 0x00000000004023cc in fsort (filelist=0x7f7fffffd370, nfiles=1, outfp=0x605418, ftbl=0x7f7ffdb01090) at /usr/src/usr.bin/sort/fsort.c:185 #6 0x0000000000403cde in main (argc=1, argv=<value optimized out>) at /usr/src/usr.bin/sort/sort.c:354

I've rebuild /usr/src/usr.bin/sort with CFLAGS="-O -g" to get the trace (and I've added some assert() approvals - see attached patch).

Maybe you can give me a hint where to look for the bug or can fix it.

Best regards,

Attachment: patch-sort
Description: Binary data

Home | Main Index | Thread Index | Old Index