[Top][All Lists]

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

Re: Assertion in sort.c

From: John Darrington
Subject: Re: Assertion in sort.c
Date: Thu, 6 Jan 2005 15:01:37 +0800
User-agent: Mutt/1.3.28i

On Wed, Jan 05, 2005 at 09:30:12PM -0800, Ben Pfaff wrote:
     John Darrington <address@hidden> writes:
     > I'm getting some very large input files asserting at sort.c:757
     > This line seems somewhat strange:
     > assert(max_order == 1 || 
     >           (xsrt->run_cnt + dummy_run_cnt) % (max_order - 1) == 1);
     This is from Knuth vol. 3 2nd ed. pp. 361.  After adding the
     dummy runs, we should have S == 1 (modulo P - 1).  Oops: 0 == 1
     (modulo 1), so the first part of the test should actually be
     max_order == 2.
     I've checked in the fix (it just changes that one character).
     Let me know if there's another problem.

Hmm.  Unfortunately there is.

Now I'm getting casefile.c:605

Here's the backtrace in case that helps you.

#0  0x4038c6b1 in kill () from /lib/
#1  0x4038c435 in raise () from /lib/
#2  0x4038d978 in abort () from /lib/
#3  0x0808e0c5 in request_bug_report_and_abort (
    msg=0xbffff760 "Assertion failed: casefile.c:605; (reader != ((void *)0))") 
at error.c:560
#4  0x0808e10f in err_assert_fail (expr=0x80d9f47 "reader != ((void *)0)", 
    file=0x80d9d41 "casefile.c", line=605) at error.c:568
#5  0x0807a4e5 in casereader_read_xfer (reader=0x0, c=0xbffff8c4) at 
#6  0x080c5725 in merge_once (mrg=0xbffff970, input_runs=0x80fbe7c, run_cnt=1) 
at sort.c:859
#7  0x080c54b2 in merge (xsrt=0x80f8c18) at sort.c:775
#8  0x080c4954 in do_external_sort (reader=0x80fadb8, criteria=0x80fb3b0) at 
#9  0x080c4684 in sort_execute (reader=0x80fadb8, criteria=0x80fb3b0) at 
#10 0x080c4341 in sort_active_file_in_place (criteria=0x80fb3b0) at sort.c:129
#11 0x08071b9c in cmd_aggregate () at aggregate.c:269
#12 0x0807b6c0 in cmd_parse () at command.c:207
#13 0x080a7594 in execute_command () at main.c:124
#14 0x080a7525 in parse_script () at main.c:94
#15 0x080a7509 in main (argc=2, argv=0xbffffb14) at main.c:81

PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: pgpJYinOOpC2T.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]