Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2013 19:31:06 GMT
From:      Matthieu Volat <mazhe@alkumuna.eu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/183536: [patch] fontconfig on armv6
Message-ID:  <201310311931.r9VJV6O2047114@oldred.freebsd.org>
Resent-Message-ID: <201310311940.r9VJe5il065446@freefall.freebsd.org>

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

>Number:         183536
>Category:       ports
>Synopsis:       [patch] fontconfig on armv6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 31 19:40:05 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Matthieu Volat
>Release:        10-BETA1
>Organization:
>Environment:
>Description:
x11-fonts/fontconfig was reported to segfault a while ago when built with clang on the arm architecture.

at the time, the proposed workaround was to build it with gcc, but this is not working anymore on freebsd 10 : lang/gcc is not buildable yet on the arm platform.

I've investigated the real problem, this is a segfault when calling the random() function in the FcRandom() function, located in src/fccompat.c
>How-To-Repeat:
=> build fontconfig on arm target with freebsd 10
>Fix:
Here's another, not perfect but working, fix :

--- src/fccompat.c.orig	2013-10-31 19:16:42.000000000 +0000
+++ src/fccompat.c	2013-10-31 19:15:57.000000000 +0000
@@ -182,7 +182,7 @@
     }
 
     random_r(&fcrandbuf, &result);
-#elif HAVE_RANDOM
+#elif HAVE_RANDOM && !defined(__arm__)
     static char statebuf[256];
     char *state;
     static FcBool initialized = FcFalse;

When applied, USE_GCC can be removed and fontconfig segfault is not obversable anymore.

>Release-Note:
>Audit-Trail:
>Unformatted:



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