Date: Tue, 24 Sep 2002 10:52:10 -0500 (CDT) From: Mike Silbersack <silby@silby.com> To: ak03@gte.com Cc: mbr@FreeBSD.ORG, <current@FreeBSD.ORG> Subject: Re: -mcpu=pentiumpro still evil? Message-ID: <20020924104812.D32979-100000@patrocles.silby.com> In-Reply-To: <20020922230225.0f3333ef.kabaev@bellatlantic.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 22 Sep 2002, Alexander Kabaev wrote: > On Sun, 22 Sep 2002 18:51:14 -0500 (CDT) > Mike Silbersack <silby@silby.com> 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 <URL:http://www.gnu.org/software/gcc/bugs.html> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020924104812.D32979-100000>