From owner-freebsd-current Tue Sep 24 9:19: 3 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DFB237B401; Tue, 24 Sep 2002 09:19:01 -0700 (PDT) Received: from out5.mx.nwbl.wi.voyager.net (out5.mx.nwbl.wi.voyager.net [169.207.3.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2226343E65; Tue, 24 Sep 2002 09:19:01 -0700 (PDT) (envelope-from silby@silby.com) Received: from pop4.nwbl.wi.voyager.net (pop4.nwbl.wi.voyager.net [169.207.2.83]) by out5.mx.nwbl.wi.voyager.net (Postfix) with ESMTP id 4C898C6A38; Tue, 24 Sep 2002 10:48:11 -0500 (CDT) Received: from [10.1.1.6] (d88.as14.nwbl0.wi.voyager.net [169.207.134.88]) by pop4.nwbl.wi.voyager.net (8.10.2/8.10.2) with ESMTP id g8OFm9o08875; Tue, 24 Sep 2002 10:48:09 -0500 (CDT) Date: Tue, 24 Sep 2002 10:52:10 -0500 (CDT) From: Mike Silbersack To: ak03@gte.com Cc: mbr@FreeBSD.ORG, Subject: Re: -mcpu=pentiumpro still evil? In-Reply-To: <20020922230225.0f3333ef.kabaev@bellatlantic.net> Message-ID: <20020924104812.D32979-100000@patrocles.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 22 Sep 2002, Alexander Kabaev wrote: > On Sun, 22 Sep 2002 18:51:14 -0500 (CDT) > Mike Silbersack wrote: > > > I'm seeing the segfault in the kernel make depend step, just as > > someone else reported. > > OK, could you please try the patch at > http://people.freebsd.org/~kan/gcc-cpp.diff and let me know the results. > > > -- > Alexander Kabaev This version of the gcc-cpp.diff patch: Index: cppmacro.c =================================================================== RCS file: /usr/ncvs/src/contrib/gcc/cppmacro.c,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 cppmacro.c --- cppmacro.c 1 Sep 2002 20:37:29 -0000 1.1.1.4 +++ cppmacro.c 23 Sep 2002 17:44:32 -0000 @@ -349,6 +349,8 @@ /* Commit the memory, including NUL, and return the token. */ len = dest - BUFF_FRONT (pfile->u_buff); + if ((size_t) (BUFF_LIMIT (pfile->u_buff) - dest) < 1) + _cpp_extend_buff (pfile, &pfile->u_buff, 1); BUFF_FRONT (pfile->u_buff) = dest + 1; return new_string_token (pfile, dest - len, len); } Does _not_ fix the problem for me. Here's the backtrace of the crash with the patch applied: #0 0x08058cb6 in cpp_ideq () #1 0x080592e6 in _cpp_lex_direct () #2 0x08058f6d in _cpp_lex_token () #3 0x08056465 in cpp_macro_definition () #4 0x080564ed in cpp_macro_definition () #5 0x0805672b in _cpp_handle_directive () #6 0x08058f9c in _cpp_lex_token () #7 0x08055832 in cpp_get_token () #8 0x0805595d in cpp_scan_nooutput () #9 0x08048409 in do_preprocessing () #10 0x08048241 in main () #11 0x08048145 in _start () And of course, it's this part of a buildkernel where it happens: make -V CFILES -V SYSTEM_CFILES -V GEN_CFILES -V GEN_M_CFILES | MKDEP_CPP="cc -E" CC="cc" xargs mkdep -a -f .newdep -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -g -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/dev -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/ipfilter -D_KERNEL -include opt_global.h -fno-common -mpreferred-stack-boundary=2 -ffreestanding cc: Internal error: Segmentation fault (program cpp0) Please submit a full bug report. See for instructions. Do you want me to try your first patch? I never got a chance to test it. (And no longer have a copy of it, either.) Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message