[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Large Message Number Causes Many Nmh Commands To Abort
From: |
norm |
Subject: |
Re: [Nmh-workers] Large Message Number Causes Many Nmh Commands To Abort |
Date: |
Tue, 07 Jan 2014 07:58:27 -0800 |
Ken Hornstein <address@hidden> writes:
>>A message number, 2147483647 which is 2^31 -1, causes many nmh commands,
>>including scan, folder and inc, to abort with
>>
>> Malloc failed
>
>Do you have a message number "1" (or something else low in that folder)?
Yes, I do. The large message number was generated by a bug in my program.
>
>If so ... yeah, okay, that's going to happen (at least it doesn't crash).
>The folder structure has some fields which are allocated based on the number
>of possible entries, which start from the lowest numbered message and range
>to the highest numbered message. All of those commands don't have hardwired
>limits anymore, they allocate as much memory as they need ... until they
>can't anymore, as you've discovered. I'm not sure there's a great solution
>to that; redoing the folder structure to handle a sparse folder layout is
>more work than I personally want to do right now. Also, we probably have
>some overflow problems when you get message numbers that high.
>workers
Any fix, is if little import to me. I was just being a good citizen in
reporting it.You could turn the bug into a non-bug, with a man page entry
somewhere, putting an upper limit on the range of message numbers, or
perhaps just a maximum message number.
Norman Shapiro