From owner-freebsd-gnome@FreeBSD.ORG Tue Apr 9 07:00:03 2013 Return-Path: Delivered-To: gnome@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5149A3D8 for ; Tue, 9 Apr 2013 07:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 43F3D613 for ; Tue, 9 Apr 2013 07:00:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r39701hC089357 for ; Tue, 9 Apr 2013 07:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r39701bL089356; Tue, 9 Apr 2013 07:00:01 GMT (envelope-from gnats) Date: Tue, 9 Apr 2013 07:00:01 GMT Message-Id: <201304090700.r39701bL089356@freefall.freebsd.org> To: gnome@FreeBSD.org From: Golyashov Sergey Subject: Re: ports/177462: graphics/dia: dia-0.97.2,1 fails to start X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Golyashov Sergey List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 07:00:03 -0000 The following reply was made to PR ports/177462; it has been noted by GNATS. From: Golyashov Sergey To: bug-followup@freebsd.org, andy@neu.net Cc: Subject: Re: ports/177462: graphics/dia: dia-0.97.2,1 fails to start Date: Tue, 09 Apr 2013 17:55:45 +1100 Backtrace from [work dia]/objects/custom/shape_typeinfo.c:shape_typeinfo_load -> g_fopen -> fopen /usr/src/lib/libc/stdio/fopen.c: <<<=== (gdb) n 99 } (gdb) l 94 * fseek and ftell.) 95 */ 96 if (oflags & O_APPEND) 97 (void)_sseek(fp, (fpos_t)0, SEEK_END); 98 return (fp); 99 } (gdb) print fp $17 = (FILE *) 0x807eb0740 (gdb) n shape_typeinfo_load (info=0x80a3ead00) at shape_typeinfo.c:200 200 if (!f) (gdb) print f $18 = (FILE *) 0x7eb0740 ===>>> fopen return (FILE *) 0x807eb0740 but g_fopen return (FILE *) 0x7eb0740 So after call fread: Program received signal SIGSEGV, Segmentation fault. __fread (buf=0x7fffffffce20, size=512, count=1, fp=0x7eb0740) at /usr/src/lib/libc/stdio/fread.c:95 95 ORIENT(fp, -1); This patch solves problem for me: --- objects/custom/shape_typeinfo.c.orig 2013-04-09 01:48:15.838095782 +1100 +++ objects/custom/shape_typeinfo.c 2013-04-09 16:21:37.840874850 +1100 @@ -196,7 +195,7 @@ saxHandler.warning = _warning; once = TRUE; } - f = g_fopen (info->filename, "rb"); + f = fopen (info->filename, "rb"); if (!f) return FALSE; while ((n = fread (buffer, 1, BLOCKSIZE, f)) > 0) {