Date: Fri, 6 Oct 2006 11:14:02 +0100 (BST) From: Neil Darlow <neil@darlow.co.uk> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/104047: lang/php5-5.1.6_1 patching fails with suhosin enabled Message-ID: <20061006101402.1C8FD102F65@router.darlow.co.uk> Resent-Message-ID: <200610061020.k96AKF21088907@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 104047 >Category: ports >Synopsis: lang/php5-5.1.6_1 patching fails with suhosin enabled >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 06 10:20:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Neil Darlow >Release: FreeBSD 6.1-RELEASE-p10 i386 >Organization: >Environment: System: FreeBSD router.darlow.co.uk 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #0: Sun Oct 1 16:54:02 BST 2006 root@router.darlow.co.uk:/usr/obj/usr/src/sys/ROUTER i386 >Description: If the suhosin patch is enabled for a build of php5-5.1.6_1 then patch-Zend_zend_alloc.c fails to apply. >How-To-Repeat: Just enable suhosin in the make config dialog and build. My php5 config - # This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for php5-5.1.6_1 _OPTIONS_READ=php5-5.1.6_1 WITH_CLI=true WITHOUT_CGI=true WITH_APACHE=true WITHOUT_DEBUG=true WITH_SUHOSIN=true WITHOUT_MULTIBYTE=true WITH_IPV6=true WITHOUT_REDIRECT=true WITHOUT_DISCARD=true WITHOUT_FASTCGI=true WITHOUT_PATHINFO=true The build error message - ===> Extracting for php5-5.1.6_1 => MD5 Checksum OK for php-5.1.6.tar.bz2. => SHA256 Checksum OK for php-5.1.6.tar.bz2. => MD5 Checksum OK for suhosin-patch-5.1.6-0.9.5.patch.gz. => SHA256 Checksum OK for suhosin-patch-5.1.6-0.9.5.patch.gz. ===> Patching for php5-5.1.6_1 ===> Applying distribution patches for php5-5.1.6_1 ===> Applying FreeBSD patches for php5-5.1.6_1 1 out of 1 hunks failed--saving rejects to Zend/zend_alloc.c.rej => Patch patch-Zend_zend_alloc.c failed to apply cleanly. => Patch(es) patch-TSRM_threads.m4 patch-Zend::zend.h applied cleanly. *** Error code 1 File zend_alloc.c.rej - *************** *** 328,342 **** ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { void *p; - int final_size = size*nmemb; - HANDLE_BLOCK_INTERRUPTIONS(); - p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); if (!p) { HANDLE_UNBLOCK_INTERRUPTIONS(); return (void *) p; } - memset(p, 0, final_size); HANDLE_UNBLOCK_INTERRUPTIONS(); return p; } --- 328,341 ---- ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { void *p; + HANDLE_BLOCK_INTERRUPTIONS(); + p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); if (!p) { HANDLE_UNBLOCK_INTERRUPTIONS(); return (void *) p; } + memset(p, 0, size * nmemb); HANDLE_UNBLOCK_INTERRUPTIONS(); return p; } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061006101402.1C8FD102F65>