Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jan 2006 05:22:14 +0200 (EET)
From:      Giorgos Keramidas <keramida@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/91812: [patch] irssi crashes on amd64 with new malloc
Message-ID:  <20060115032214.D284D1152E@flame.pc>
Resent-Message-ID: <200601150330.k0F3U3sb056828@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         91812
>Category:       ports
>Synopsis:       [patch] irssi crashes on amd64 with new malloc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 15 03:30:03 GMT 2006
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060115032214.D284D1152E>