From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Newsgroups: gmane.emacs.bugs Subject: bug#41755: feature/native-comp (master?): temacs crash in GC during mark phase Date: Mon, 8 Jun 2020 15:51:14 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="87838"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert , 41755@debbugs.gnu.org, Andrea Corallo To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 08 20:52:37 2020 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 1jiMsv-000Mlz-Hp for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Jun 2020 20:52:37 +0200 Original-Received: from localhost ([::1]:47136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiMsu-0003UP-HV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Jun 2020 14:52:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiMsM-0003TK-CS for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2020 14:52:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiMsM-0004E8-2E for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2020 14:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jiMsM-00022x-0t for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2020 14:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jun 2020 18:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41755 X-GNU-PR-Package: emacs Original-Received: via spool by 41755-submit@debbugs.gnu.org id=B41755.15916422937828 (code B ref 41755); Mon, 08 Jun 2020 18:52:01 +0000 Original-Received: (at 41755) by debbugs.gnu.org; 8 Jun 2020 18:51:33 +0000 Original-Received: from localhost ([127.0.0.1]:57905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiMrt-00022B-1W for submit@debbugs.gnu.org; Mon, 08 Jun 2020 14:51:33 -0400 Original-Received: from mail-oi1-f180.google.com ([209.85.167.180]:35145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiMrs-00021z-Aq for 41755@debbugs.gnu.org; Mon, 08 Jun 2020 14:51:32 -0400 Original-Received: by mail-oi1-f180.google.com with SMTP id k4so14739158oik.2 for <41755@debbugs.gnu.org>; Mon, 08 Jun 2020 11:51:32 -0700 (PDT) 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=3+qWGOGFYblQOPeKaH9YFIOxZngvhyc4/e3gK9Kef1w=; b=RhKEUKN8JXtvmQxoKZfnsCt4Vja+PUUzQ01Dw0QDmIXbk20LmN2yzmdP3VYZomnL8C 1EE7pPxXGat8WKkSvBOeL41fu8RncrWUr90p3ReJlaiSEoaByGhzOwFJaxpu6LuWuS7b pxC44DAYQkuFGbRkjvYUpapKhhbhspFo+VOqnF1GFnX334k55nFV02Rp5B9i3cxJJuNU h62ypND8UHZTvzWVS3hE0a62CJCINjTfPpnrfQe5Osl7Uq4EiUEPEYVaUQSsKX6qBGzb vwtfM5IXAh+T1jQ80X9dPwqjg8aOtrx9z5FfHdAGXj3P/hbwhKaxzixfQi5kTGI0kD8S dL9g== 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=3+qWGOGFYblQOPeKaH9YFIOxZngvhyc4/e3gK9Kef1w=; b=Rf1MHewD+cwl5eXrmwp1ZW+LK/RncUpJeezIHDeo2T8efDTco0wBMx4fOYUVQ44sxp IhD68EvCZuZED8ef8K0z2ExgQzADPRAA2ylhIjJZH6+hISbCHq9UXool6V9ox5vZU7JY IyxcWLa2JT4BdgbFQ9qD6fdKkeMw/g4WnxBfXFOZ60gDROjIrLWuxyROboROSmCxzSOz qEJug4GaCnEwHjYZiiN65OjWe4mWf14rsX2dDrfM/XQIfrt+0T4xwdpmCrUmkm2ZpdKp irUPPIacf1aqsPo8mQspa85TmPB+hpSmBwdC2b2VAnhdnkI7gK9KPWb8HjDRWo90G+S6 QJ8w== X-Gm-Message-State: AOAM530KNM5oFixYJtXvRl74QaF4GjYe/mhmYdDYTvOde7xGjjF+1v5Q 731XdXZEjPYbYULC0MF17wpfqDRZ6ru5ROmwm5o= X-Google-Smtp-Source: ABdhPJz89Jn3pD4LyR8y8BFQVc5aSkjhDAhIFzDiqNdjfn5zTB7RwJzsPKIPtKmJpSkzroe7k6RTxBVsuCjhagX6I9E= X-Received: by 2002:aca:58c5:: with SMTP id m188mr578689oib.175.1591642286502; Mon, 08 Jun 2020 11:51:26 -0700 (PDT) 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:181745 Archived-At: > I'm wondering what we could do to make such bugs easier to find... We could add a canary to stack based strings and conses. Then while marking if we come across a stack based string or cons we check that the canary is intact. If it is not, then we can be sure that the memory has been written over. Something like this: struct Stack_String { struct Lisp_String string; uint64_t canary = 0x12341234; }; > Would GC_CHECK_MARKED_OBJECTS have caught this? As far as I can see, during a GC we can't know if a stack-based string is still alive.