From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58850: 29.0.50; sqlite crashes on error Date: Sun, 30 Oct 2022 08:35:03 +0200 Message-ID: <835yg1hl9k.fsf@gnu.org> References: <6698F81B-6E83-403D-8D7C-DCAC4F9D07D0@gmail.com> <83ilk3hycm.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1175"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58850@debbugs.gnu.org To: Andrew Hyatt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 30 07:36:32 2022 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 1op1vr-0000CC-KP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Oct 2022 07:36:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1op1vR-0000WZ-KD; Sun, 30 Oct 2022 02:36:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1op1vP-0000W7-8g for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 02:36:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1op1vP-0002zE-1L for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 02:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1op1vO-0007x0-Sr for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 02:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Oct 2022 06:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58850 X-GNU-PR-Package: emacs Original-Received: via spool by 58850-submit@debbugs.gnu.org id=B58850.166711173030512 (code B ref 58850); Sun, 30 Oct 2022 06:36:02 +0000 Original-Received: (at 58850) by debbugs.gnu.org; 30 Oct 2022 06:35:30 +0000 Original-Received: from localhost ([127.0.0.1]:37176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1op1us-0007w4-D7 for submit@debbugs.gnu.org; Sun, 30 Oct 2022 02:35:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1op1up-0007vp-Gq for 58850@debbugs.gnu.org; Sun, 30 Oct 2022 02:35:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1op1uj-0002SB-V8; Sun, 30 Oct 2022 02:35:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=turamkg8/R+cMSoyKxVNmRl243CNj/8Nr83UwBbhWT4=; b=qU2em4Hrybkn 1iYI259pAxj8008o88JUor8qOBrmbdUTlGfK3KIggaph+aCYrOJ0rVVN0u4zYcOf7HMDPzxomnCTy 6rCXKD6tG20Z51qlrTTxHWQO7C07bO0vEdEN+RSAsqRdEK79Vf0JbRTesGFZmGVfUysuItN2JUGx/ 0GepWnHKHBE76N5Hn8qJuG47Ld2DYSIjmWzkukxNbULPAFewZ0egeYjcVweGfRsWo85bMH9QO1BT3 YKWh+uWcIAapvC1lYtWY2gxmm0Odumem80iCynYq8lEXVH5InUxF7jDtc2rRhYMxgGXTTSrk+XQFr Sty4ayfZ5RsprJSmnqiTpw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1op1uj-0004Bb-8P; Sun, 30 Oct 2022 02:35:21 -0400 In-Reply-To: (message from Andrew Hyatt on Sat, 29 Oct 2022 19:44:17 -0400) 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246587 Archived-At: > From: Andrew Hyatt > Date: Sat, 29 Oct 2022 19:44:17 -0400 > Cc: 58850@debbugs.gnu.org > > > Some combination of sqlite and getting errors that result in backtraces > > seems to result in a problem. > > > > Relevant information from the crash report: > > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > > 0 libsystem_kernel.dylib 0x1aab6ed98 __pthread_kill + 8 > > 1 libsystem_pthread.dylib 0x1aaba3ee0 pthread_kill + 288 > > 2 libsystem_c.dylib 0x1aaade3cc __abort + 128 > > 3 libsystem_c.dylib 0x1aaacfd48 __stack_chk_fail + 96 > > 4 Emacs 0x102dcdbd8 print_object + 5920 > > 5 Emacs 0x102dc9d50 Fprin1 + 112 (print.c:775) > > Please try the latest master branch. Jonas installed changes there > that are related to sqlite error handling, and with today's master I > get a Lisp error with your recipe, not a crash: > > Debugger entered--Lisp error: (sqlite-error ("SQL logic error" "no such table: bar" 1 1)) > > I've synced, rebuilt, verified Jonas's change is there, however the crash still occurs. Then please walk through the code with a debugger and tell us what kind of object is being created as result of the error that Emacs cannot print via prin1 because print_object barfs. I cannot do it here because the problem doesn't happen on my system in the first place. The way to fix this is one of the following, whichever seems cleaner: . repair the object before it gets to the printing routines, preferably where it is created; or . add some protection to routines in print.c to stop short of trying to look too closely at invalid Lisp objects Only debugging can tell which way is the best one here, but all things being equal, I'd prefer the former.