From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#46824: 28.0.50; nativecomp crash with cl-block/cl-defun Date: Sun, 28 Feb 2021 06:13:59 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21863"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46824@debbugs.gnu.org, Andrea Corallo To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 28 07:15:36 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGFMe-0005aE-JZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Feb 2021 07:15:36 +0100 Original-Received: from localhost ([::1]:46800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGFMd-0001v5-Ls for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Feb 2021 01:15:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGFM6-0001tx-N3 for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2021 01:15:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34197) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGFM6-0004eo-E5 for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2021 01:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGFM6-0005o5-7J for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2021 01:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Feb 2021 06:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46824 X-GNU-PR-Package: emacs Original-Received: via spool by 46824-submit@debbugs.gnu.org id=B46824.161449288422284 (code B ref 46824); Sun, 28 Feb 2021 06:15:02 +0000 Original-Received: (at 46824) by debbugs.gnu.org; 28 Feb 2021 06:14:44 +0000 Original-Received: from localhost ([127.0.0.1]:45743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGFLo-0005nM-5V for submit@debbugs.gnu.org; Sun, 28 Feb 2021 01:14:44 -0500 Original-Received: from mail-oi1-f174.google.com ([209.85.167.174]:36529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGFLl-0005n8-US for 46824@debbugs.gnu.org; Sun, 28 Feb 2021 01:14:42 -0500 Original-Received: by mail-oi1-f174.google.com with SMTP id j1so14636706oiw.3 for <46824@debbugs.gnu.org>; Sat, 27 Feb 2021 22:14:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BI7IDF5UcsaIdliPBbe8G7UFrPL/w9TJNyMgJPIvup4=; b=QJYxs8x4Dhnthv3At3+1p5BNmW9OYel+YklpKmSSqoBnanrqz0pr9TQCu86CMpTp5i aLDlyNTP+a6aL284PpYp9Db9Iv/IxbgjnbpIWExCj0KrJOZk6XxaMSSdzvfWvucf06a/ mjznOCGelvL0vTjWF61qxFzYuvOWoiVJVl23YTnqgDA2gT/Q9apIiJCg7ljJqB6sLyfU dDo0exvOo09kuF0KJA8JU+IMSa5kATy+5DedCPVWUtKLXLEdjlcamt2wmOFWcUD0FxlQ fUCPIaeze+LEM8ZQxe9ouhAyuPKpdv/ZD2RfoX/3QXXNE6+NX0EvA9nNssG23lB+yswy P77A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BI7IDF5UcsaIdliPBbe8G7UFrPL/w9TJNyMgJPIvup4=; b=ewmqoomhKkTszDUCv6SiWtZ7/lHSuqXdGBywtRXZNGEj90KFXhwLkGiZHBnkvEq/kb vA7qKhyGZKyvt0+oKsoH/ZJIcYqHibJHu6sjgmP7X/JNPmFM+LolZhxamDvzR49Oewye OAYoryg4bTgOZci4Ei2K1qiAUUOIbb4w9pqGM2ULq1tCNefnJVZaqJCuBG4y4aQ1Zja8 52zOPVfvjpSJT2yzv/vHko9AVPbf/E+NH+UiAoSXKJMXNavxF6W7x64RKkJUB1N5f3SQ Xn+jSHJ6Msli7d2+pRL/umRhPNGDYKjuuSAKXIYERnCh0z0OalOnFR+1XGHwVFQEgEjH dUSA== X-Gm-Message-State: AOAM5331NelBA/4PvKUiZN0ssbWW+MKGtbP1emtyb/PobusSPklBOeqM 3dDFarffazxZ78PZXSUEPI4e+GMXXSyXiwXTmK4= X-Google-Smtp-Source: ABdhPJxWHXfqcedk/Yew085QkVN+fVJkzbExvtvg1cFRYJpqZIi4SqIs1khVuLKytRLkz7XSBJZ6zOp+ulvtkRLbcAo= X-Received: by 2002:aca:6141:: with SMTP id v62mr7264346oib.30.1614492876243; Sat, 27 Feb 2021 22:14:36 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201008 Archived-At: On Sun, Feb 28, 2021 at 12:35 AM Aaron Jensen wrote: > This originally came from straight.el. It exhibited by attempting to > invoke something as a function that was not a function, causing an > error. In narrowing the repro down, it started to crash. It can probably > get more narrow than this, but pretty much everything I try to > change/tweak causes it to no longer crash. > First, I can reproduce it, so if further debug information is required, I can probably help. At first glance, it looks like we're calling _setjmp through a function pointer without telling gcc that it is a function that may return twice. This causes gcc to generate code which assumes the stack frame is unchanged between the two returns of _setjmp, when it actually isn't, leading to a segfault after the second return. It used to be the case that all (well, most ...) variables in a function that calls _setjmp had to be marked volatile to avoid this. The current way of avoiding the problem is to use gcc's __attribute__ to tell gcc a function may return twice. We're not doing either, so we run into the stack corruption problem. Andrea, is it possible to modify the code so _setjmp is called directly rather than through a function pointer? Pip