From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joseph Mingrone Newsgroups: gmane.emacs.devel Subject: Re: recent master core dumps building on FreeBSD i386 Date: Thu, 18 Oct 2018 22:15:08 -0300 Message-ID: <86o9bqag9v.fsf@phe.ftfl.ca> References: <86va6151mf.fsf@phe.ftfl.ca> <86o9bt746r.fsf@phe.ftfl.ca> <837eigsgel.fsf@gnu.org> <86sh13fell.fsf@phe.ftfl.ca> <83in1zqm39.fsf@gnu.org> <333a616c-95be-0273-a37b-484e9f274ecf@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1539912845 30685 195.159.176.226 (19 Oct 2018 01:34:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2018 01:34:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (berkeley-unix) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 19 03:34:01 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDJft-0007s9-Gh for ged-emacs-devel@m.gmane.org; Fri, 19 Oct 2018 03:34:01 +0200 Original-Received: from localhost ([::1]:46046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDJhz-0005kM-VC for ged-emacs-devel@m.gmane.org; Thu, 18 Oct 2018 21:36:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDJNx-0004dB-Cw for emacs-devel@gnu.org; Thu, 18 Oct 2018 21:15:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDJNi-0006yt-E5 for emacs-devel@gnu.org; Thu, 18 Oct 2018 21:15:22 -0400 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:42452) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDJNi-0006wr-1F for emacs-devel@gnu.org; Thu, 18 Oct 2018 21:15:14 -0400 Original-Received: by mail-ed1-x530.google.com with SMTP id b7-v6so29940516edd.9 for ; Thu, 18 Oct 2018 18:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ftfl.ca; s=google; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KxKc9byMHgabM+nMgGpFw7yhwrJA929i+gBrVOHJEuM=; b=YU2Yjs/vzUo4e1cdNi/QW0n6rU2nS4NP765LJ2q2EbZ1GwQPgfP2B78Fx9qL/gfZUJ tMDfJAcAo7zIx92ekH5bC/2qdJLWiJgiG7tiI/tJPMJdZnym7HrCHi7WO7hkdwJ9VJjM bRDhQ5vRL6AShaQ4C1IkOrmegUI7s5I+1M8uw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KxKc9byMHgabM+nMgGpFw7yhwrJA929i+gBrVOHJEuM=; b=eigz5F/GJN+iqpZT3WTGNhhwFMzHPPEn4g0ruBmydhFh/WaB7y/qwr9Dh/r2c8l4FY dK6ynHVBxSPKGEgh/0iMhDXUU9ppdIirrrwiB4E5c/a11bPQ0nbmsDi7yKeoxcw2HgEI kSQeN3YoqcmlJhd9jaGV2sx6JpctuQjbK0lDfyHwfVsXjOvvO2Lnw29eQsy8SSIgniUQ zXSoYCEEQj4LRC5C7tP9C5nhXvPW0NS0ThIKtxbEvh4Jtlk3dfHURtnNL3jXlC0Op+qK 8745z9Mfcqqcmq0XSoW4agpGJUn9f6QOWjzINafWwRltT2A+3q78wtrNFrlulIGPBIDC 0dcw== X-Gm-Message-State: ABuFfohm1U8Oqej1rc3XC/OrElH2s4bbNVw8vClVBdeL6mN0YRRP81JI W4FaQXur0x59wLmX3NFOwNzreB7g0m4= X-Google-Smtp-Source: ACcGV63H2qTubK4WYFyMr+ciEZKuww+rwUMQZgdriry5dcHQI3//mKEKwb2/HgL2ozXhwGrff0tUWA== X-Received: by 2002:aa7:c581:: with SMTP id g1-v6mr4437911edq.79.1539911712355; Thu, 18 Oct 2018 18:15:12 -0700 (PDT) Original-Received: from phe.ftfl.ca.ftfl.ca (hlfxns017vw-142-68-132-248.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.132.248]) by smtp.gmail.com with ESMTPSA id j15-v6sm9219422eda.74.2018.10.18.18.15.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 18:15:11 -0700 (PDT) In-Reply-To: <333a616c-95be-0273-a37b-484e9f274ecf@cs.ucla.edu> (Paul Eggert's message of "Thu, 18 Oct 2018 10:53:20 -0700") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::530 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230491 Archived-At: --=-=-= Content-Type: text/plain Paul Eggert writes: > On 10/18/18 9:02 AM, Eli Zaretskii wrote: >> Can you please repeat this experiment, and then, when it crashes, do >> this: >> (gdb) source ./.gdbinit >> (gdb) frame 2 >> (gdb) p/x a >> (gdb) xtype >> and show us the results? > Also, please try these GDB commands when debugging ./temacs: > b syms_of_threads > r -Q > p &main_thread > disas syms_of_threads > p &Vmain_thread > I'm attaching the output of these commands on Fedora 28 x86-64 compiled with 'gcc -m32 -march=native -g3 -O2' (AMD Phenom II X4 910e). Evidently your compiler (clang?) is not inlining make_lisp_ptr, but > it's still useful to know what it's up to. I see that GCC optimizes away not only the call to make_lisp_ptr, but also the runtime check 'TAGGEDP (a, type) && XUNTAG (a, type, char) == ptr', I guess because > GCC knows that main_thread is properly aligned so TAGGEDP must succeed here. clang isn't smart enough to do this sort of optimization (at least on Fedora) so if you're using clang that might partly explain > the problem. > Also, please investigate what the macro GCALIGNED_STRUCT expands to. You can use 'gcc -E' to do that. Is it still helpful for me to investigate what GCALIGNED_STRUCT expands to? If so, could elaborate on how I can get this? Paul Eggert writes: > main_thread is not properly aligned; its address is a multiple of 4, but it should be a multiple of 8. That's the problem. Somehow GCALIGNED_STRUCT is not working on your platform. Is there anything else helpful for me to investigate or do you recommend that I report this problem elsewhere? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEVbCTpybDiFVxIrrVNqQMg7DW754FAlvJMBxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDU1 QjA5M0E3MjZDMzg4NTU3MTIyQkFENTM2QTQwQzgzQjBENkVGOUUACgkQNqQMg7DW 755INg//YCp2BKY6sWBWWD11qS4KWrDvjxDzfexzD0AeugG6fE6Rr2dBxULqBDFW afc9agMe/ErhttTxAVKhzmjw56F6jMAybjqWdq+ALxL92RoRnqcYkSvlBjwbZZsq NJ3GXc9W0W+fol7PkAeyIbgikYHrN6HiQJt3oyKec5XdN28HdHC09DGDKttnUI08 qlQytj801wovy4HCAZBSNFtByFDHWRVL4tGCnthVvN/T2qSfZHi9ZOrQJgc6YvtX 7PrvtH9n2+Z15mSn9G6vv+64/GX2UfMISsqy9iMWtsg6h1RZpx8rWjL5GbtRmhwf 6dGLzKssHFu/6L3Cy0irGbbYAim3PMWWLd0NKf5dJ8Tgt+gsTcI5phryiK5/svye 5q/ckT8MnFs6YYgLhNojlp0NN5L/0NUYNmUPdVatrwvsYDjyQZRUirmWtzB9lrZf ilMp8SDOFnC7vrwXR+R0yDnst6Uqr2FZWdq/gKnkidsC/lZ964bhoB1M65Z9r/wy RWAqVf5dgAY96B+mxNCqjI8GhQIZC5gw91Ynn2wtldS1GRyI93kccx3LQWgDoaQy jaeAXwvYm1FbrOYyZhpdRshMxyTv4T8rXFX40lZOCiSmVaSVTFhWFFVs/K7RI2UK H0XtxcU2/betxRPvaNAzENQ1b7eOyAtEW/hd3OPJJNaTgbH5ovI= =9ybh -----END PGP SIGNATURE----- --=-=-=--