From owner-freebsd-ports@FreeBSD.ORG Sat Sep 5 11:15:51 2009 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 086D11065670 for ; Sat, 5 Sep 2009 11:15:51 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 982A98FC0A for ; Sat, 5 Sep 2009 11:15:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n85BFn1M066252 for ; Sat, 5 Sep 2009 15:15:49 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Sat, 5 Sep 2009 15:15:49 +0400 (MSD) From: Dmitry Morozovsky To: freebsd-ports@FreeBSD.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=KOI8-R Content-Transfer-Encoding: 8BIT X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Sat, 05 Sep 2009 15:15:49 +0400 (MSD) Cc: Subject: strange patch bug @ stable/8 ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 11:15:51 -0000 Dear colleagues, on fresh RELENG_8/amd64 (lang/php5 distfile required): Script started on Sat Sep 5 15:09:18 2009 marck@hamster:~/ports/patch-bug> tar xjf /usr/ports/distfiles/php-5.2.10.tar.bz2 marck@hamster:~/ports/patch-bug> fetch 'http://php-fpm.org/downloads/php-5.2.10-fpm-0.5.13.diff.gz' php-5.2.10-fpm-0.5.13.diff.gz 0% of 197 kB 0 Bps php-5.2.10-fpm-0.5.13.diff.gz 22% of 197 kB 52 kBps php-5.2.10-fpm-0.5.13.diff.gz 100% of 197 kB 143 kBps marck@hamster:~/ports/patch-bug> gunzip php-5.2.10-fpm-0.5.13.diff.gz marck@hamster:~/ports/patch-bug> patch --suffix .bak.orig -d php-5.2.10 --forward -E -p1 --suffix .orig gdb /usr/bin/patch php-5.2.10/patch.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Core was generated by `patch'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x00000008007184e0 in strlcpy () from /lib/libc.so.7 (gdb) bt #0 0x00000008007184e0 in strlcpy () from /lib/libc.so.7 #1 0x0000000000404e9d in pgets (do_indent=-1 'ÿ') at /usr/src/gnu/usr.bin/patch/pch.c:1155 #2 0x0000000000405136 in intuit_diff_type () at /usr/src/gnu/usr.bin/patch/pch.c:251 #3 0x000000000040581f in there_is_another_patch () at /usr/src/gnu/usr.bin/patch/pch.c:161 #4 0x0000000000404354 in main (argc=1, argv=0x7fffffffe600) at /usr/src/gnu/usr.bin/patch/patch.c:224 (gdb) up #1 0x0000000000404e9d in pgets (do_indent=-1 'ÿ') at /usr/src/gnu/usr.bin/patch/pch.c:1155 1155 Strlcpy(buf, line, len + 1 - skipped); (gdb) l 1150 indent += 8 - (indent %7); 1151 else 1152 indent++; 1153 } 1154 } 1155 Strlcpy(buf, line, len + 1 - skipped); 1156 } 1157 return len; 1158 } 1159 (gdb) p buf $1 = 0x800902000 "diff -Nru php-5.2.10-vanilla/configure.in php-5.2.10/configure.in\n" (gdb) p line $2 = 0x80091938a "diff -Nru php-5.2.10-vanilla/configure.in php-5.2.10/configure.in\n--- php-5.2.10-vanilla/configure.in\t2009-06-17 05:22:41.000000000 -0700\n+++ php-5.2.10/configure.in\t2009-07-05 23:22:46.375955783 -070"... (gdb) p len $3 = 66 (gdb) p skipped Variable "skipped" is not available. (gdb) marck@hamster:~/ports/patch-bug> ^D Use "exit" to leave tcsh. marck@hamster:~/ports/patch-bug> x exit Script done on Sat Sep 5 15:11:25 2009 Simple patch without all agrs finishes well, so I'm puzzled. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------