NetBSD Problem Report #34027

From rockear@iocaine.hive-mind.net  Tue Jul 18 03:44:40 2006
Return-Path: <rockear@iocaine.hive-mind.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id C97E063B8C3
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 18 Jul 2006 03:44:40 +0000 (UTC)
Message-Id: <20060716235547.9C45AF@iocaine.hive-mind.net>
Date: Sun, 16 Jul 2006 16:55:47 -0700 (PDT)
From: rockear@hive-mind.net
Reply-To: rockear@hive-mind.net
To: gnats-bugs@NetBSD.org
Subject: CURRENT -- gcc4 -O2 causes nmh to segfault
X-Send-Pr-Version: 3.95

>Number:         34027
>Category:       pkg
>Synopsis:       nmh segfaults in strcasecmp() when built with gcc4 -O2.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    dsainty
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 18 03:45:00 +0000 2006
>Closed-Date:    Sun Oct 01 07:52:51 +0000 2006
>Last-Modified:  Sun Oct 01 07:52:51 +0000 2006
>Originator:     Casey Carter
>Release:        NetBSD 3.99.22
>Organization:

>Environment:


System: NetBSD iocaine.hive-mind.net 3.99.22 NetBSD 3.99.22 (GENERIC.MPACPI) #0: Sun Jul 16 16:21:32 PDT 2006 rockear@iocaine.hive-mind.net:/usr/obj/sys/arch/i386/compile/GENERIC.MPACPI i386
Architecture: i386
Machine: i386
>Description:

Something in nmh doesn't optimize properly with current's gcc. Running show,
if it was built with gcc4 and optimized with -O2 (the default), segfaults and
dumps core. This happens with any other nmh program that uses its custom
strcasecmp().
>How-To-Repeat:

Install and boot into current. I've seen this happen on 3.99.21 and 3.99.22.
Build and install mail/nmh.
Have some MH-format messages in $HOME/Mail/
show
>Fix:

Add 
CFLAGS+=-O1
to /etc/mk.conf. Rebuild nmh.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->kim
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Tue, 18 Jul 2006 06:30:04 +0000
Responsible-Changed-Why:
Over to maintainer.


Responsible-Changed-From-To: kim->pkg-manager
Responsible-Changed-By: kim@netbsd.org
Responsible-Changed-When: Wed, 19 Jul 2006 14:18:21 +0000
Responsible-Changed-Why:
Sorry, I don't have gcc4 so I cannot work on this ticket.



Responsible-Changed-From-To: pkg-manager->dsainty
Responsible-Changed-By: dsainty@netbsd.org
Responsible-Changed-When: Sun, 01 Oct 2006 07:52:51 +0000
Responsible-Changed-Why:
Applied fix as nmh-1.0.4nb7


State-Changed-From-To: open->closed
State-Changed-By: dsainty@netbsd.org
State-Changed-When: Sun, 01 Oct 2006 07:52:51 +0000
State-Changed-Why:
Applied fix as nmh-1.0.4nb7


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.