From keramida@ceid.upatras.gr  Sun Jan 15 03:23:55 2006
Return-Path: <keramida@ceid.upatras.gr>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C897216A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Jan 2006 03:23:55 +0000 (GMT)
	(envelope-from keramida@ceid.upatras.gr)
Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E62A443D45
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Jan 2006 03:23:54 +0000 (GMT)
	(envelope-from keramida@ceid.upatras.gr)
Received: (qmail 5352 invoked by uid 207); 15 Jan 2006 03:23:53 -0000
Received: from keramida@ceid.upatras.gr by nic by uid 201 with qmail-scanner-1.21 
 (sophie: 3.04/2.30/3.97.  Clear:RC:1(81.186.70.3):. 
 Processed in 0.14909 secs); 15 Jan 2006 03:23:53 -0000
Received: from dialup3.ach.sch.gr (HELO flame.pc) ([81.186.70.3])
          (envelope-sender <keramida@ceid.upatras.gr>)
          by nic.sch.gr (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 15 Jan 2006 03:23:52 -0000
Received: by flame.pc (Postfix, from userid 1001)
	id D284D1152E; Sun, 15 Jan 2006 05:22:14 +0200 (EET)
Message-Id: <20060115032214.D284D1152E@flame.pc>
Date: Sun, 15 Jan 2006 05:22:14 +0200 (EET)
From: Giorgos Keramidas <keramida@freebsd.org>
Reply-To: Giorgos Keramidas <keramida@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] irssi crashes on amd64 with new malloc
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         91812
>Category:       ports
>Synopsis:       [patch] irssi crashes on amd64 with new malloc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 15 03:30:03 GMT 2006
>Closed-Date:    Sun Jan 15 09:01:17 GMT 2006
>Last-Modified:  Tue Jan 17 04:50:04 GMT 2006
>Originator:     Giorgos Keramidas
>Release:        FreeBSD 7.0-CURRENT amd64
>Organization:
>Environment:

System: FreeBSD flame.pc 7.0-CURRENT FreeBSD 7.0-CURRENT #0: \
Sun Jan 15 03:04:36 EET 2006 \
build@flame.pc:/home/build/obj/home/build/src/sys/FLAME amd64

>Description:

    The new malloc implementation of CURRENT exposes a bug in irssi's
    source.

>How-To-Repeat:

    Build irc/irssi on a relatively recent CURRENT snapshot
    and type "/nick ".  The space character shouldn't appear
    at all and irssi will dump core.

>Fix:

    Add the following patch to our local irssi patches
    collection.

    The missing prototype causes the function to default to a return
    type of `int', which is not large enough to hold pointer values on
    amd64.  This results in crashes when irssi tries to access addresses
    whose high bit has been trimmed (i.e. 0x803095c3 becomes 0x3095c3).

%%%
--- src/fe-text/gui-entry.h.orig	Sun Jan 15 05:08:57 2006
+++ src/fe-text/gui-entry.h	Sun Jan 15 05:09:04 2006
@@ -34,6 +34,7 @@
 
 void gui_entry_set_text(GUI_ENTRY_REC *entry, const char *str);
 char *gui_entry_get_text(GUI_ENTRY_REC *entry);
+char *gui_entry_get_text_and_pos(GUI_ENTRY_REC *entry, int *pos);
 
 void gui_entry_insert_text(GUI_ENTRY_REC *entry, const char *str);
 void gui_entry_insert_char(GUI_ENTRY_REC *entry, unichar chr);
%%%

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Sun Jan 15 09:01:02 UTC 2006 
State-Changed-Why:  
Committed, thanks! Please make sure to submit the patch to irssi developers, too! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91812 

From: Giorgos Keramidas <keramida@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/91812: [patch] irssi crashes on amd64 with new malloc
Date: Tue, 17 Jan 2006 06:43:18 +0200

 Adding to the audit trail, for anyone doing future imports of
 irssi releases:
 
 A bug has been filed with the same patch in irssi's bug
 tracking system.  The bug report can be accessed at:
 
     http://bugs.irssi.org/index.php?do=details&id=367
>Unformatted:
