pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/25742: freetype2 gets segmentation violation in FT_Get_Name_Index on alpha



>Number:         25742
>Category:       pkg
>Synopsis:       freetype2 gets segmentation violation in FT_Get_Name_Index on 
>alpha
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 29 07:54:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Joachim Kuebart
>Release:        NetBSD 2.0B from around April 2, 2004.
>Organization:
>Environment:
        
        
System: NetBSD jaja 2.0B NetBSD 2.0B (ALPHA-$Revision: 1.191 $) #10: Thu Apr 22 
17:37:18 CEST 2004 joki@jaja:/home/joki/NetBSD/compile/JAJA alpha
freetype2-2.1.8
Architecture: alpha
Machine: alpha
>Description:
The default compiler flags on the alpha port "-O2 -mieee" cause the c++
compiler to generate buggy code. This causes a crash of libfreetype when
used from, e.g., xpdf: After opening a file, xpdf gets a SIGSEGV and the
core dump indicates a crash in libfreetype, specifically the procedure
FT_Get_Name_Index. Reducing the optimisation level solves the problem.
        
>How-To-Repeat:
Compile and install xpdf from pkgsrc with default compiler flags
"-O2 -mieee". Run xpdf and open any PDF file. You get a SIGSEGV in
FT_Get_Name_Index in libfreetype.
        
>Fix:
Compile the freetype2 package with compiler flags "-O -mieee" and relink
xpdf. The problem disappears.

The following patch will make the alpha port use at most optimisation "-O"
for freetype2. Also note that the patches/patch-aa file needs to be removed
as it is both missing from distinfo and no longer needed (this is unrelated
to this PR).

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/freetype2/Makefile,v
retrieving revision 1.32
diff -u -r1.32 Makefile
--- Makefile    15 May 2004 11:17:14 -0000      1.32
+++ Makefile    29 May 2004 07:47:45 -0000
@@ -35,6 +35,16 @@
 .endif
 BUILD_DEFS+= MKTTINTERP
 
+# reduce optimization level on alpha to avoid compiler bugs
+.if ${OPSYS} == "NetBSD"
+.  if ${MACHINE_ARCH} == "alpha"
+CPPFLAGS:=      ${CPPFLAGS:C/-O[0-9]*/-O/g}
+CFLAGS:=        ${CFLAGS:C/-O[0-9]*/-O/g}
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
+CONFIGURE_ENV+= CFLAGS="${CFLAGS}"
+.  endif
+.endif
+
 post-configure:
        cd ${WRKSRC} && ${LN} -s builds/unix/unix.mk config.mk
 .if ${OPSYS} == "IRIX"
>Release-Note:
>Audit-Trail:
>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index