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

 
 

bug #22060: seg faults on 64-bit architecture

Submitted by:  None
Submitted on:  Sat 19 Jan 2008 08:43:17 PM UTC  
 
Category: compatibilitySeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: NoneOpen/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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 -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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 05 Apr 2008 10:15:21 PM UTCpm215Open/ClosedOpen=>Closed
    Sat 05 Apr 2008 06:52:13 PM UTCpm215StatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1