Date: Mon, 22 Sep 2008 14:56:13 +1000 (EST) From: Alan Garfield <alan@fromorbit.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: alan@auspc.com.au Subject: ports/127533: Updated port to include patch to fix 64bit segfault Message-ID: <20080922045613.AE7228FC65@onefish.auspcmarket.com.au> Resent-Message-ID: <200809220520.m8M5K1GW057993@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 127533 >Category: ports >Synopsis: Updated port to include patch to fix 64bit segfault >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Sep 22 05:20:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Alan Garfield >Release: FreeBSD 7.0-RELEASE-p1 amd64 >Organization: >Environment: System: FreeBSD onefish.auspcmarket.com.au 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #8: Mon Jun 2 14:41:17 EST 2008 root@onefish.auspcmarket.com.au:/usr/obj/usr/src/sys/ONEFISH amd64 >Description: pecl-ps crashes under 64bit freebsd, included is a patch to fix the culprit from an int to a long. I've submitted this patch to the original author of the library who seems to think this is a FreeBSD specific problem and therefore ignored my patch. Without the resources/time to fully examine this, I've submitted the patch to here so that portmanager and the like won't cause my system to start crashing again whenever they re-compile pecl-ps. :) The patch simply changes the type of 'imageid' from an incorrectly specified int to a long, so it shouldn't pose any problem to any system anyway. >How-To-Repeat: Compile pecl-ps on a 64 bit system and attempt to use an image based function (eg. ps_open_image_file) >Fix: --- pecl-ps-1.3.4.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # pecl-ps/ # pecl-ps/Makefile # pecl-ps/distinfo # pecl-ps/pkg-descr # pecl-ps/files # pecl-ps/files/patch-ps.c # echo c - pecl-ps/ mkdir -p pecl-ps/ > /dev/null 2>&1 echo x - pecl-ps/Makefile sed 's/^X//' >pecl-ps/Makefile << 'END-of-pecl-ps/Makefile' X# Ports collection makefile for: pear-ps X# Date created: 25 May 2007 X# Whom: Alan Garfield <alan@fromorbit.com> X# X# $FreeBSD: ports/print/pecl-ps/Makefile,v 1.4 2008/06/06 13:57:52 edwin Exp $ X# X XPORTNAME= ps XPORTVERSION= 1.3.4 XPORTREVISION= 3 XCATEGORIES= print pear XMASTER_SITES= http://pecl.php.net/get/ XPKGNAMEPREFIX= pecl- XDISTNAME= ps-${PORTVERSION} XEXTRACT_SUFX= .tgz XDIST_SUBDIR= PECL X XMAINTAINER= alan@fromorbit.com XCOMMENT= PHP extension for pslib to generate postscript X XLIB_DEPENDS= ps.4:${PORTSDIR}/print/pslib X XUSE_PHP= yes XUSE_PHPEXT= yes XDEFAULT_PHP_VER= 5 XPHP_MODNAME= ${PORTNAME} X Xpost-patch: X @${REINPLACE_CMD} -e 's|-ldl|-lintl|g' ${WRKSRC}/config.m4 X X.include <bsd.port.mk> END-of-pecl-ps/Makefile echo x - pecl-ps/distinfo sed 's/^X//' >pecl-ps/distinfo << 'END-of-pecl-ps/distinfo' XMD5 (PECL/ps-1.3.4.tgz) = 1fd7838a85c69617416d64ebe32f653a XSHA256 (PECL/ps-1.3.4.tgz) = af0a003bf3b1f26dab81b4f5f7184675ba5c7f86a48928d7f8bf4077d1e87602 XSIZE (PECL/ps-1.3.4.tgz) = 197802 END-of-pecl-ps/distinfo echo x - pecl-ps/pkg-descr sed 's/^X//' >pecl-ps/pkg-descr << 'END-of-pecl-ps/pkg-descr' XPHP extention to generate postscript by using pslib. X XWWW: http://pecl.php.net/package-info.php?package=ps END-of-pecl-ps/pkg-descr echo c - pecl-ps/files mkdir -p pecl-ps/files > /dev/null 2>&1 echo x - pecl-ps/files/patch-ps.c sed 's/^X//' >pecl-ps/files/patch-ps.c << 'END-of-pecl-ps/files/patch-ps.c' X--- ps.c 2006-05-31 23:09:47.000000000 +1000 X+++ ps.c 2008-09-22 13:50:07.000000000 +1000 X@@ -1285,7 +1285,8 @@ X zval *zps; X char *type, *filename, *image, *stringparam = NULL; X int type_len, filename_len, stringparam_len; X- int imageid, intparam = 0; X+ long imageid; X+ int intparam = 0; X PSDoc *ps; X X if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss|sl", &zps, &type, &type_len, &filename, &filename_len, &stringparam, &stringparam_len, &intparam)) { X@@ -1316,7 +1317,7 @@ X { X zval **arg1, **arg2; X int i, j, color, count; X- int imageid; X+ long imageid; X gdImagePtr im; X unsigned char *buffer, *ptr; X PSDoc *ps; X@@ -1382,7 +1383,7 @@ X PHP_FUNCTION(ps_close_image) X { X zval *zps; X- int imageid; X+ long imageid; X PSDoc *ps; X X if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zps, &imageid)) { X@@ -1400,7 +1401,7 @@ X PHP_FUNCTION(ps_place_image) X { X zval *zps; X- int imageid; X+ long imageid; X double x, y, scale; X PSDoc *ps; X X@@ -1761,7 +1762,7 @@ X zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; X PSDoc *ps; X char *image; X- int imageid; X+ long imageid; X X if (ZEND_NUM_ARGS() != 7 || zend_get_parameters_ex(7, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7) == FAILURE) { X WRONG_PARAM_COUNT; X@@ -1802,7 +1803,7 @@ X char *type, *params, *source, *data; X int type_len, params_len, source_len, data_len; X int length, width, height, components, bpc; X- int imageid; X+ long imageid; X char *image; X PSDoc *ps; X X@@ -2024,7 +2025,7 @@ X * Add an existing image as thumbnail for the current page. */ X PHP_FUNCTION(ps_add_thumbnail) { X zval *zps; X- int imageid; X+ long imageid; X PSDoc *ps; X X if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zps, &imageid)) { END-of-pecl-ps/files/patch-ps.c exit --- pecl-ps-1.3.4.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080922045613.AE7228FC65>