From nobody@FreeBSD.org  Wed Oct 13 21:13:37 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 96103106567A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Oct 2010 21:13:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 84B2D8FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Oct 2010 21:13:37 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o9DLDbGq016736
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Oct 2010 21:13:37 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o9DLDbN4016735;
	Wed, 13 Oct 2010 21:13:37 GMT
	(envelope-from nobody)
Message-Id: <201010132113.o9DLDbN4016735@www.freebsd.org>
Date: Wed, 13 Oct 2010 21:13:37 GMT
From: Dmitry Pryanishnikov <lynx.ripe@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Fix www/kannel on amd64
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151436
>Category:       ports
>Synopsis:       [patch] Fix www/kannel on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sunpoet
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 13 21:20:08 UTC 2010
>Closed-Date:    Sat Oct 16 09:17:31 UTC 2010
>Last-Modified:  Sat Oct 16 09:20:07 UTC 2010
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->sunpoet 
Responsible-Changed-By: sunpoet 
Responsible-Changed-When: Fri Oct 15 13:25:33 UTC 2010 
Responsible-Changed-Why:  
I will take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151436 
State-Changed-From-To: open->closed 
State-Changed-By: sunpoet 
State-Changed-When: Sat Oct 16 09:17:30 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151436 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/151436: commit references a PR
Date: Sat, 16 Oct 2010 09:17:25 +0000 (UTC)

 sunpoet     2010-10-16 09:17:20 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/kannel           Makefile 
     www/kannel/files     patch-af 
   Log:
   - Eliminate coredump on amd64
   - Bump PORTREVISION
   
   PR:             ports/151436
   Submitted by:   Dmitry Pryanishnikov <lynx.ripe@gmail.com>
   Approved by:    pgollucci (mentor, implicit)
   
   Revision  Changes    Path
   1.34      +1 -1      ports/www/kannel/Makefile
   1.4       +1 -1      ports/www/kannel/files/patch-af
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
