From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jul 28 16:10:19 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6E0B16A41F for ; Thu, 28 Jul 2005 16:10:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A12D43D5F for ; Thu, 28 Jul 2005 16:10:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6SGAEcQ010406 for ; Thu, 28 Jul 2005 16:10:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6SGAE7N010405; Thu, 28 Jul 2005 16:10:14 GMT (envelope-from gnats) Resent-Date: Thu, 28 Jul 2005 16:10:14 GMT Resent-Message-Id: <200507281610.j6SGAE7N010405@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bram Moolenaar Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 513B716A41F for ; Thu, 28 Jul 2005 16:01:32 +0000 (GMT) (envelope-from Bram@moolenaar.net) Received: from post-23.mail.nl.demon.net (post-23.mail.nl.demon.net [194.159.73.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id D635243D46 for ; Thu, 28 Jul 2005 16:01:31 +0000 (GMT) (envelope-from Bram@moolenaar.net) Received: from zimbu.demon.nl ([82.161.100.193]:54052 helo=moolenaar.net) by post-23.mail.nl.demon.net with esmtp (Exim 4.51) id 1DyAp8-000PET-O6 for FreeBSD-gnats-submit@freebsd.org; Thu, 28 Jul 2005 16:01:30 +0000 Received: from masaka.moolenaar.net (localhost.moolenaar.net [127.0.0.1]) by moolenaar.net (8.13.1/8.13.1) with ESMTP id j6SFCOda003207 for ; Thu, 28 Jul 2005 17:12:24 +0200 (CEST) (envelope-from Bram@moolenaar.net) Received: (from mool@localhost) by masaka.moolenaar.net (8.13.1/8.13.1/Submit) id j6SFCODU003206; Thu, 28 Jul 2005 17:12:24 +0200 (CEST) (envelope-from mool) Message-Id: <200507281512.j6SFCODU003206@masaka.moolenaar.net> Date: Thu, 28 Jul 2005 17:12:24 +0200 (CEST) From: Bram Moolenaar To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/84231: ccmalloc port crashes X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bram Moolenaar List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2005 16:10:20 -0000 >Number: 84231 >Category: ports >Synopsis: ccmalloc port crashes >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: Thu Jul 28 16:10:14 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Bram Moolenaar >Release: FreeBSD 5.3-RELEASE i386 >Organization: Zimbu Labs >Environment: System: FreeBSD masaka.moolenaar.net 5.3-RELEASE FreeBSD 5.3-RELEASE #12: Wed Mar 2 20:26:40 CET 2005 mool@masaka.moolenaar.net:/usr/src/sys/i386/compile/MASAKA i386 ccmalloc version 0.3.9, portrevision 2 gcc (GCC) 3.4.2 [FreeBSD] 20040728 >Description: When using the ccmalloc library with an application a crash may occur. This is caused by the GCC function __builtin_return_address() not properly checking for the stack frame. >How-To-Repeat: Link your application with the ccmalloc library and run it. Crash detected with Vim 7, but probably happens with many applications. >Fix: Use __builtin_frame_address() to check for the stack frame before calling __builtin_return_address(). Apply this patch: --- src/callchain.c.orig Mon Feb 3 09:03:54 2003 +++ src/callchain.c Sun Jun 26 12:37:45 2005 @@ -1154,9 +1154,10 @@ * a bug in gcc 2.95.4 and 3.0.4; maybe fixed more recently. * * (Edward Welbourne). + * + * Fixed to use __builtin_frame_address() by Bram Moolenaar. */ -#define RA(a) case a: return (caddr_t) \ -__builtin_return_address(a) ? __builtin_return_address(a) : (caddr_t) 0; +#define RA(a) case a: return (caddr_t) (__builtin_frame_address(a) ? __builtin_return_address(a) : 0); static caddr_t return_address (unsigned i) >Release-Note: >Audit-Trail: >Unformatted: