Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Oct 2010 21:13:37 GMT
From:      Dmitry Pryanishnikov <lynx.ripe@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/151436: [patch] Fix www/kannel on amd64
Message-ID:  <201010132113.o9DLDbN4016735@www.freebsd.org>
Resent-Message-ID: <201010132120.o9DLK823040952@freefall.freebsd.org>

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

>Number:         151436
>Category:       ports
>Synopsis:       [patch] Fix www/kannel on amd64
>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:   Wed Oct 13 21:20:08 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Pryanishnikov
>Release:        8.1-STABLE
>Organization:
Home
>Environment:
FreeBSD lynx.homenet 8.1-STABLE FreeBSD 8.1-STABLE #0: Mon Aug 23 17:10:24 EEST 2010     dmitry@lynx.homenet:/databig/obj/databig/ftp/RELENG_8/src.100823/sys/lynx  amd64

>Description:
Binaries produced by the www/kannel port (e.g. bearerbox) coredump during the initialization (Segmentation fault) on amd64 under 8-STABLE. I've tracked the problem down to the files/patch-af file (which patches the gwlib/gwthread-pthread.c file). This patch contains an obvious variable type error:

+    int stack_size;

+    pthread_attr_getstacksize(&thread_attr, &stack_size);

However, 2nd argument of the pthread_attr_getstacksize() must have type size_t *, not int *. On amd64 those types have different sizes (as distinct from i386 where the problem doesn't manifest itself).
>How-To-Repeat:
Install www/kannel on amd64 and try to run e.g. bearerbox.

>Fix:
--- files/patch-af.orig	2004-12-20 11:25:39.000000000 +0200
+++ files/patch-af	2010-10-12 20:19:42.000000000 +0300
@@ -16,7 +16,7 @@
  {
      int ret;
      int i;
-+    int stack_size;
++    size_t stack_size;
  
      pthread_mutex_init(&threadtable_lock, NULL);


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



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