From owner-freebsd-toolchain@FreeBSD.ORG Fri Sep 12 18:40:51 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BC9371B for ; Fri, 12 Sep 2014 18:40:51 +0000 (UTC) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2D308BD for ; Fri, 12 Sep 2014 18:40:50 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id w7so1423837lbi.3 for ; Fri, 12 Sep 2014 11:40:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=1RVFiCNprlT30ACd2TDswrChklj+0DM/ttCQoDVTRBo=; b=L9qp9UtduvQCGKDNhLnNUgANO+udLhw+h9KlF9IWyIkxrewhbVTraHgb7jdCH4K134 Eiz7unZD9o9Z6IkkZOs4QTQDVt/MizQB0Yh/Vsl3tykmGQDf3aHgX9+KjMyLSTF8cGzz LQxXvJWqdFCo2qf9M5R9NmwmSl6mEEn4149H5oxBC8A8YxfgSshFvj4YEw3PdHl56bEL ervT+viecpGQXTkW/vlyVd7dsOFOZtXhOYoLbInK9l6N0N1ltVSW8/5E1CxWMnt9Qskn HfeJCC40fEUNUnYoOeO2CwSPWIBtXdWsds2XNraM419Txwrwt/SW5jhIwQqU2TSxtwXL jP3Q== X-Gm-Message-State: ALoCoQnX4+zQhpqnjXmLWJhrrNv5lAeq9LS0IS/tqSn7KBWDuEOeI/w4UTT1wGTNm8TpbMeh4wxO X-Received: by 10.152.22.200 with SMTP id g8mr10991381laf.1.1410547242774; Fri, 12 Sep 2014 11:40:42 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id n7sm1496295lag.47.2014.09.12.11.40.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Sep 2014 11:40:41 -0700 (PDT) Message-ID: <54133E1E.9030105@freebsd.org> Date: Fri, 12 Sep 2014 22:40:30 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: clang makes segfaulting code with -march=core2 on i386 References: <54130AD0.8090103@freebsd.org> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="40jNqBdE2JKbNOhIGpS39NI54HQlnEOrX" Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 18:40:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --40jNqBdE2JKbNOhIGpS39NI54HQlnEOrX Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 12.09.2014 21:20, Dimitry Andric wrote: > On 12 Sep 2014, at 17:01, Andrey Chernov wrote: >> >> Please look at this thread. At the end the bug trigger found, since >> removing -march=3Dcore2 fix the thing. tijl@ suspects that clang produ= ce >> 64bit instruction on i386 in that case. >> >> https://lists.freebsd.org/pipermail/freebsd-ports/2014-September/09546= 6.html >=20 > I just built lang/gcc successfully on 11.0-CURRENT and i386, using > -march=3Dcore2, but saw no crashes at all. Is this limited specificall= y > to stable/10? Do you also have a coredump of the crashed process? >=20 > -Dimitry >=20 For all cases check in 'make config' that BOOTSTRAP is off, because it no= t fail when gcc bootstraps itself. To see correct error place set env MAKE_JOBS_UNSAFE=3Dyes because gcc try= to build some things in parallel and segfault can come in the middle of = other unrelated compilation. Not only lang/gcc segfaulting, but also lang/gcc48 and lang/gcc49 (last o= ne fails in stdc++ too but for different (first) file). xgcc does not dump core by default. I use -dH switch to force core dump r= unning the faulting command manually. Core was generated by `cc1plus'. Program terminated with signal 6, Aborted. (gdb) bt #0 0x28f4c307 in kill () from /lib/libc.so.7 #1 0x28f4c297 in raise () from /lib/libc.so.7 #2 0x28f4a8d6 in abort () from /lib/libc.so.7 #3 0x0892f138 in real_abort () #4 0x0892e7ac in diagnostic_action_after_output () #5 0x0892e4ca in diagnostic_report_diagnostic () #6 0x0892f106 in internal_error () #7 0x0853b17e in crash_signal () #8 0xbfbff004 in ?? () #9 0x0000000b in ?? () #10 0x00000001 in ?? () #11 0xbfbfab40 in ?? () #12 0x08d208d8 in ?? () #13 0x0853b140 in alloc_for_identifier_to_locale () #14 0x081f2a8c in gt_pch_nx_lang_tree_node () #15 0x081f1bd6 in gt_pch_nx_lang_tree_node () #16 0x081f26c1 in gt_pch_nx_lang_tree_node () #17 0x081f22ab in gt_pch_nx_lang_tree_node () #18 0x081f2260 in gt_pch_nx_lang_tree_node () #19 0x081f1e62 in gt_pch_nx_lang_tree_node () #20 0x081f271b in gt_pch_nx_lang_tree_node () #21 0x081f231d in gt_pch_nx_lang_tree_node () #22 0x081f4304 in gt_pch_nx_lang_type () #23 0x081f270c in gt_pch_nx_lang_tree_node () #24 0x081f1ba9 in gt_pch_nx_lang_tree_node () #25 0x081f226f in gt_pch_nx_lang_tree_node () #26 0x081f1ba9 in gt_pch_nx_lang_tree_node () #27 0x081f2a8c in gt_pch_nx_lang_tree_node () #28 0x081f42f5 in gt_pch_nx_lang_type () #29 0x081f270c in gt_pch_nx_lang_tree_node () #30 0x081f26fd in gt_pch_nx_lang_tree_node () #31 0x081f26ee in gt_pch_nx_lang_tree_node () #32 0x081f26d0 in gt_pch_nx_lang_tree_node () #33 0x081f26df in gt_pch_nx_lang_tree_node () #34 0x081f1ba9 in gt_pch_nx_lang_tree_node () #35 0x081f26c1 in gt_pch_nx_lang_tree_node () #36 0x081f2260 in gt_pch_nx_lang_tree_node () #37 0x081f2a8c in gt_pch_nx_lang_tree_node () #38 0x081f271b in gt_pch_nx_lang_tree_node () #39 0x081f1ff9 in gt_pch_nx_lang_tree_node () [rest stripped...] As you see, last meaningful info say something about "locale". If system = locale assumed here, I use ru_RU.KOI8-R. I try to check this thing with L= ANG=3DC later. I don't have -current & i386 combination, but I can try -current & x64 la= ter (with different -march). Instruction set may depends on CPU, I have "Core2 Duo E8400" which should= match -march=3Dcore2 in theory. For lang/gcc the bug starts on second stdc++ file compiling, related log = from the entering stdc++ directory: gmake[5]: Entering directory `/usr/ports/lang/gcc/work/build/i386-portbld= -freebsd10.1/libstdc++-v3' Making all in include gmake[6]: Entering directory `/usr/ports/lang/gcc/work/build/i386-portbld= -freebsd10.1/libstdc++-v3/include' mkdir -p ./i386-portbld-freebsd10.1/bits/stdc++.h.gch /usr/ports/lang/gcc/work/build/./gcc/xgcc -shared-libgcc -B/usr/ports/lan= g/gcc/work/build/./gcc -nostdinc++ -L/usr/ports/lang/gcc/work/build/i386-= portbld-freebsd10.1/libstdc++-v3/src -L/usr/ports/lang/gcc/work/build/i38= 6-portbld-freebsd10.1/libstdc++-v3/src/.libs -B/usr/local/i386-portbld-fr= eebsd10.1/bin/ -B/usr/local/i386-portbld-freebsd10.1/lib/ -isystem /usr/l= ocal/i386-portbld-freebsd10.1/include -isystem /usr/local/i386-portbld-fr= eebsd10.1/sys-include -x c++-header -nostdinc++ -g -O2 -pipe -march=3D= core2 -DLIBICONV_PLUG -fno-strict-aliasing -DLIBICONV_PLUG -I/usr/ports/= lang/gcc/work/build/i386-portbld-freebsd10.1/libstdc++-v3/include/i386-po= rtbld-freebsd10.1 -I/usr/ports/lang/gcc/work/build/i386-portbld-freebsd10= =2E1/libstdc++-v3/include -I/usr/ports/lang/gcc/work/gcc-4.8.3/libstdc++-= v3/libsupc++ -O2 -g -std=3Dgnu++0x /usr/ports/lang/gcc/work/gcc-4.8.3/lib= stdc++-v3/include/precompiled/stdc++.h \ -o i386-portbld-freebsd10.1/bits/stdc++.h.gch/O2ggnu++0x.gch mkdir -p ./i386-portbld-freebsd10.1/bits/stdc++.h.gch /usr/ports/lang/gcc/work/build/./gcc/xgcc -shared-libgcc -B/usr/ports/lan= g/gcc/work/build/./gcc -nostdinc++ -L/usr/ports/lang/gcc/work/build/i386-= portbld-freebsd10.1/libstdc++-v3/src -L/usr/ports/lang/gcc/work/build/i38= 6-portbld-freebsd10.1/libstdc++-v3/src/.libs -B/usr/local/i386-portbld-fr= eebsd10.1/bin/ -B/usr/local/i386-portbld-freebsd10.1/lib/ -isystem /usr/l= ocal/i386-portbld-freebsd10.1/include -isystem /usr/local/i386-portbld-fr= eebsd10.1/sys-include -x c++-header -nostdinc++ -g -O2 -pipe -march=3D= core2 -DLIBICONV_PLUG -fno-strict-aliasing -DLIBICONV_PLUG -I/usr/ports/= lang/gcc/work/build/i386-portbld-freebsd10.1/libstdc++-v3/include/i386-po= rtbld-freebsd10.1 -I/usr/ports/lang/gcc/work/build/i386-portbld-freebsd10= =2E1/libstdc++-v3/include -I/usr/ports/lang/gcc/work/gcc-4.8.3/libstdc++-= v3/libsupc++ -O2 -g /usr/ports/lang/gcc/work/gcc-4.8.3/libstdc++-v3/inclu= de/precompiled/stdc++.h -o i386-portbld-freebsd10.1/bits/stdc++.h.gch/O2g= =2Egch In file included from /usr/ports/lang/gcc/work/gcc-4.8.3/libstdc++-v3/inc= lude/precompiled/stdc++.h:94:0: /usr/ports/lang/gcc/work/build/i386-portbld-freebsd10.1/libstdc++-v3/incl= ude/valarray:1233:1: internal compiler error: Segmentation fault } // namespace ^ no stack trace because unwind library not available Please submit a full bug report, with preprocessed source if appropriate. See for instructions. gmake[6]: *** [i386-portbld-freebsd10.1/bits/stdc++.h.gch/O2g.gch] Error = 1 --=20 http://ache.vniz.net/ --40jNqBdE2JKbNOhIGpS39NI54HQlnEOrX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJUEz4pAAoJEKUckv0MjfbK+gcH/jNpPVPZEuHJHZLlu6EdFcEI LAzsRN5r8R/1+AKyn1rtlOQn92n1mZCKFEN1XTGx/rM80daqnzFYNRpYWbbHoO/p VFMXrlXOmqGnZ08AzIqI7zBkbhZ+eAS8YZ6MQQZ3v9ad6oYJnigs0Gsj447+oDIM kR3skmenBSxBLCoRrRqz8nZ6j3AT3O62G8VoBbMd5N2d9b4kFF64fPGSAnIB20nv zycSFvsZo1W0FYftEMN/9vsvf40yDx+DixmZUWdbgvurNmvohyi/464CUJd62Tg1 /7ar5Ny18SqQ/SmywCPyY2GUceI5AeXDHyjq++hjjUC1kwvEnwr/Op8k3r7wHLM= =CMkN -----END PGP SIGNATURE----- --40jNqBdE2JKbNOhIGpS39NI54HQlnEOrX--