bugThe nmh Mail Handling System - Bugs: bug #22060, seg faults on 64-bit architecture

 
 

bug #22060: seg faults on 64-bit architecture

Submitter:  None
Submitted:  Sat 19 Jan 2008 08:43:17 PM UTC
   
 
Category:  compatibility Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 05 Apr 2008 06:52:13 PM UTC, comment #4: 

I believe that this has been fixed in CVS for some time now (by having the function be named mh_strcasecmp and calling it by that name directly). Certainly the test build I just did on an x86-64 system works fine. [I'm therefore closing this bug.]

>I have tried renaming strcasecmp to another name and
>using nmh.h #DEFINE to point to the new name


I suspect that this didn't work because you did it before the <string.h> include rather than afterwards. <string.h> on x86-64 Linux includes __nonnull annotations saying "arguments guaranteed not to be NULL". If you try your #define before the #include then the attributes are declared on the new name, and it all still doesn't work.

Really your best bet is to stop using 1.2 and use head of CVS instead.

Peter Maydell <pm215>
Group administrator
Fri 29 Feb 2008 05:25:18 AM UTC, comment #3: 

I have applied all the solutions posted here to this problem,
and repl stubbornly continues to seg fault.

I have tried renaming strcasecmp to another name and
using nmh.h #DEFINE to point to the new name,
I have tried this on nmh 1.0.4, 1.1 and 1.2,
I put in ref to libmh.a in the Makefile, all to no avail.

My details:
uname -a
Linux xxx.xxx.xxx  2.6.18-53.1.13.el5 #1 SMP Tue Feb 12 13:01:45 EST 2008 i686 athlon i386 GNU/Linux
running Centos5
 gcc --version
gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)

Any ideas?

  Sandy

sandy <sandyji>
Tue 29 Jan 2008 08:02:37 PM UTC, comment #2: 

This is a known problem.

Add -fno-builtin-strcasecmp to your CFLAGS when building nmh as a temporary workaround.

Josh Bressers <bress>
Group Member
Mon 28 Jan 2008 01:12:43 PM UTC, comment #1: 

The problem here has been located.  nmh comes with a version of strcasecmp() that is null-tolerant.  For reasons that will have to be diagnosed by someone who understands linking better than I, the native, null-intolerant, version of strcasecmp was being linked.  I added another mention of libmh.a to the link list, and the problem went away.

Anonymous
Sat 19 Jan 2008 08:43:17 PM UTC, original submission:  

The code for nmh-1.2 produces ali, form and repl that segfault on 64-bit architecture.

$ uname -a
  Linux as220.org 2.6.22-gentoo-r6 #1 SMP Tue Sep 4 14:39:27 EDT 2007 x86_64 Intel(R) Xeon(R) CPU 5110 @ 1.60GHz GenuineIntel GNU/Linux

  $ ali -alias Mail/address -user -email is unavailable-
  Segmentation fault (core dumped)

I compiled with the -m32 gcc option, and the problem went away, but I had to make -m32 versions of liblockfile and libgdbm as well.

Feel free to contact me at the above address for any more details.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pm215 (Posted a comment)
  • -email is unavailable- added by sandyji (Posted a comment)
  • -email is unavailable- added by bress (Posted a comment)
  •  

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-04-05 pm215 Open/ClosedOpen Closed
    2008-04-05 pm215 StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code