bugThe nmh Mail Handling System - Bugs: bug #35242, nmh-1.4: send/post failure

 
 

bug #35242: nmh-1.4: send/post failure

Submitter:  Harvey Eneman <heneman>
Submitted:  Thu 05 Jan 2012 12:49:15 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 06 Feb 2012 04:33:11 PM UTC, comment #4: 

Okay, I worked this problem with Mark and I realized the difference was that he had multiple entries in the servers line in mts.conf and I did not.

When I added a second entry to my mts.conf I was able to reproduce the problem, and Harvey's original patch is correct.  The patch has been applied to nmh and will be in the next release.

Ken Hornstein <kenh>
Group administrator
Mon 06 Feb 2012 03:36:29 PM UTC, comment #3: 

I have tried both the patches

file #24994:  client.c.patch added by kenh (888B - application/octet-stream)
file #24742:  client.c.patch added by heneman (1kB - application/octet-stream)

Harvey's 24742 patch works for me, but Ken's 24994 patch does not.

I posted a macports bug (#33143), I have replied to kenh at that forum with a
typescript showing the problem in the debugger.

Mark D. Baushke <mdb>
Mon 06 Feb 2012 03:05:50 PM UTC, comment #2: 

Ah-ha.  I see it now.  I borked up the original client_freelist(); I incremented the list variable after the test, but before calling free!  So it would free the second item in the list, never the first, and end up calling free() on NULL every time.  Could you please try the revised patch I included below?

(file #24994)

Ken Hornstein <kenh>
Group administrator
Mon 06 Feb 2012 02:52:37 PM UTC, comment #1: 

Hi.  Thank you for your bug report.  It's also a little weird since I use nmh on MacOS X every day and somehow I don't run into this problem.

I agree completely that the client_freelist should be called on arguments versus ap; that's my bad.  But I don't think I agree with the change to client_freelist(); my reading of your change is that it only will free the first entry in the list.  Are you sure you need that part of the patch?

Ken Hornstein <kenh>
Group administrator
Thu 05 Jan 2012 12:49:15 AM UTC, original submission:  

post(92684) malloc: * error for object 0x100102a3a: pointer being freed was not allocated
* set a breakpoint in malloc_error_break to debug
send: message not delivered to anyone

The attempt to clean up the memory leak in client.c was not implemented appropriately.

The patch attached resolves the issue.

Harvey Eneman <heneman>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24994:  client.c.patch added by kenh (888B - application/octet-stream)
file #24742:  client.c.patch added by heneman (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mdb (Posted a comment)
  • -email is unavailable- added by kenh (Posted a comment)
  • -email is unavailable- added by heneman (Submitted the item)
  •  

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-06 kenh StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2012-02-06 kenh Attached File- Added client.c.patch, #24994
        StatusIn Progress Ready For Test
    2012-02-06 kenh StatusNone In Progress
    2012-01-05 heneman Attached File- Added client.c.patch, #24742

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code