From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: james@jojojames.com Newsgroups: gmane.emacs.bugs Subject: bug#57267: 28.1; emacs crashes when loading too many images Date: Sat, 20 Aug 2022 12:29:34 -0400 Message-ID: <60F7E2A3-D597-4ABD-9BCF-717B1BE0ECF9@jojojames.com> References: <83v8qqawsh.fsf@gnu.org> <83a681fk6i.fsf@gnu.org> <837d34g4l7.fsf@gnu.org> <4B3965F5-E6E3-489A-BCA8-A292387A5AF9@jojojames.com> <99A661F2-C12C-4F15-BB17-D23E28783548@jojojames.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_C8F75A14-2E30-49D8-84DD-0D76B2676F64" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36617"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57267@debbugs.gnu.org, Eli Zaretskii To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 20 18:30:37 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 1oPRMp-0009K4-N5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Aug 2022 18:30:36 +0200 Original-Received: from localhost ([::1]:47306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPRMo-0002mk-5d for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Aug 2022 12:30:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPRMJ-0002mb-JL for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 12:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPRMJ-0003xc-92 for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 12:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oPRMJ-0004R2-3r for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 12:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: james@jojojames.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Aug 2022 16:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57267 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57267-submit@debbugs.gnu.org id=B57267.166101298516996 (code B ref 57267); Sat, 20 Aug 2022 16:30:03 +0000 Original-Received: (at 57267) by debbugs.gnu.org; 20 Aug 2022 16:29:45 +0000 Original-Received: from localhost ([127.0.0.1]:33433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPRLz-0004Q2-Mn for submit@debbugs.gnu.org; Sat, 20 Aug 2022 12:29:45 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:44637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPRLw-0004Pn-4r for 57267@debbugs.gnu.org; Sat, 20 Aug 2022 12:29:41 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 14B175C0080; Sat, 20 Aug 2022 12:29:35 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 20 Aug 2022 12:29:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jojojames.com; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1661012975; x=1661099375; bh=rm A0eyo5Gi1VMklLQLI36dAmkLvIoWLJcrA9VoE+yeY=; b=bd8UqWfB+dR8sTx8xJ mzGzswMctL+/APROwIKYZl882WJP/xN8nDmpb8udtcYyDb6gdhxG91A5zXW+J2rq wN5tsNA12+6io37EIdsPEGlth/x+jbJo++K5Oda1cAIGkCmfYXdn4ETt4dYbPf/5 wxsHZfmRJ9CVx0soqSTCc3RI6uelRkmhn30p8N2gM1hnkMzbIVEUAKxcOl75axkF 3eUmfYm7uzlgPDygFQfc2nPOwxhAdid6mF/lhiymJE/wioGuInwCWKPgs4gOAnXl D/Gfh7Wsp98vWcfw4oPXv/RtvQQp13m2CsAHR167nv7yMJi9Jkjx/VGCty/QfYa2 zVRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1661012975; x=1661099375; bh=rmA0eyo5Gi1VMklLQLI36dAmkLvI oWLJcrA9VoE+yeY=; b=3aInIookqpqakz4uXoMgrpXnLaw5yvka0NGHS7bnJOJ/ RQMt2FN8sZuIUNAtarTpcrqGJUXToVHVr0bMi6Y07u41iZoXR3UiYuSWhJVeoAFm ktH3rr9GVCcH6D3vczYmpnRFRRx3A7v1h/ppcYSADk99N1yuOP/6tWOl1c5FSHA2 gZrkIxpsLyzbcU+TJoI4WThxyJgRHLueLPakTL7+gExMlP/9YwL2PVH6MD6LlCBO cDRR2NZad+IC36+G7he6vdk7cmyUPOXkNSFIa28JFX3AmGNcG4mZwV2pUI5L/Iui fRG2Zx8wuKV1VX6diOoNoACpP0gxqd/lSk7PSRnU0A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeifedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhkfgtggfuffgjvefvfhfosegrtdhmrehhtdejnecuhfhrohhmpehjrghm vghssehjohhjohhjrghmvghsrdgtohhmnecuggftrfgrthhtvghrnhephfejtdeffeekte ffhfekteeitedvleeuueejiedthffggeetleegfeejgfeludfhnecuffhomhgrihhnpegv mhgrtghsrdgrphhpnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepjhgrmhgvshesjhhojhhojhgrmhgvshdrtghomh X-ME-Proxy: Feedback-ID: i4b00421f:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 20 Aug 2022 12:29:34 -0400 (EDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) 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:240259 Archived-At: --Apple-Mail=_C8F75A14-2E30-49D8-84DD-0D76B2676F64 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > I don't quite understand. I've seen to open errors in your log. Are you saying that these happen because you started Emacs from src this time? FWIW, I don't see differences when starting one or the other. They were separate issues. 1. 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed = for data file: errno =3D 2 (No such file or directory) (hmnn?) ^ Just recently saw that in the logs after applying your suggestions. 2. Before (your suggestions), I did this to run emacs: >> gdb/lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs After, it crashed on startup every time, so I did instead: >> gdb/llb emacs This is what I get with the Emacs.app binary: (upon startup) src/ $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs=20 Emacs debugging support has been installed. (lldb) target create "../nextstep/Emacs.app/Contents/MacOS/Emacs" Current executable set to = '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' = (x86_64). (lldb) r Process 5114 launched: = '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' = (x86_64) Warning: Lisp directory 'Contents/Resources/lisp': No such file or = directory =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D5114=3D=3DERROR: AddressSanitizer: dynamic-stack-buffer-overflow = on address 0x7ffeefbfe76e at pc 0x000102ee74d3 bp 0x7ffeefbfd9b0 sp = 0x7ffeefbfd178 WRITE of size 25 at 0x7ffeefbfe76e thread T0 #0 0x102ee74d2 in __asan_memcpy+0x262 = (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) #1 0x1008b3733 in doprnt doprnt.c:456 #2 0x1008b5351 in esprintf doprnt.c:551 #3 0x1007d2a43 in dir_warning lread.c:5385 #4 0x1007d1b53 in load_path_check lread.c:5145 #5 0x1007d1631 in init_lread lread.c:5338 #6 0x1004911cd in main emacs.c:2151 #7 0x7fff204bff3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c) Address 0x7ffeefbfe76e is located in stack of thread T0 at offset 718 in = frame #0 0x1008b512f in esprintf doprnt.c:547 This frame has 1 object(s): [32, 56) 'ap' (line 549) <=3D=3D Memory access at offset 718 = overflows this variable HINT: this may be a false positive if your program uses some custom = stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow = (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) in = __asan_memcpy+0x262 Shadow bytes around the buggy address: 0x1fffddf7fc90: 00 00 00 00 f1 f1 f1 f1 00 00 00 f3 f3 f3 f3 f3 0x1fffddf7fca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fffddf7fcb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fffddf7fcc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fffddf7fcd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =3D>0x1fffddf7fce0: ca ca ca ca 00 00 00 00 00 00 00 00 00[06]cb cb 0x1fffddf7fcf0: cb cb cb cb f1 f1 f1 f1 00 00 00 00 f2 f2 f2 f2 0x1fffddf7fd00: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 0x1fffddf7fd10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fffddf7fd20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1fffddf7fd30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07=20 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc 2022-08-20 12:28:55.164360-0400 Emacs[5114:17882118] = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 2022-08-20 12:28:55.164418-0400 Emacs[5114:17882118] =3D=3D5114=3D=3DERROR= : AddressSanitizer: dynamic-stack-buffer-overflow on address = 0x7ffeefbfe76e at pc 0x000102ee74d3 bp 0x7ffeefbfd9b0 sp 0x7ffeefbfd178 2022-08-20 12:28:55.164429-0400 Emacs[5114:17882118] WRITE of size 25 at = 0x7ffeefbfe76e thread T0 2022-08-20 12:28:55.164440-0400 Emacs[5114:17882118] #0 0x102ee74d2 = in __asan_memcpy+0x262 = (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) 2022-08-20 12:28:55.164450-0400 Emacs[5114:17882118] #1 0x1008b3733 = in doprnt doprnt.c:456 2022-08-20 12:28:55.164461-0400 Emacs[5114:17882118] #2 0x1008b5351 = in esprintf doprnt.c:551 2022-08-20 12:28:55.164483-0400 Emacs[5114:17882118] #3 0x1007d2a43 = in dir_warning lread.c:5385 2022-08-20 12:28:55.164507-0400 Emacs[5114:17882118] #4 0x1007d1b53 = in load_path_check lread.c:5145 2022-08-20 12:28:55.164519-0400 Emacs[5114:17882118] #5 0x1007d1631 = in init_lread lread.c:5338 2022-08-20 12:28:55.164529-0400 Emacs[5114:17882118] #6 0x1004911cd = in main emacs.c:2151 2022-08-20 12:28:55.164538-0400 Emacs[5114:17882118] #7 = 0x7fff204bff3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c) 2022-08-20 12:28:55.164549-0400 Emacs[5114:17882118]=20 2022-08-20 12:28:55.164556-0400 Emacs[5114:17882118] Address = 0x7ffeefbfe76e is located in stack of thread T0 at offset 718 in frame 2022-08-20 12:28:55.164565-0400 Emacs[5114:17882118] #0 0x1008b512f = in esprintf doprnt.c:547 2022-08-20 12:28:55.164576-0400 Emacs[5114:17882118]=20 2022-08-20 12:28:55.164583-0400 Emacs[5114:17882118] This frame has 1 = object(s): 2022-08-20 12:28:55.164593-0400 Emacs[5114:17882118] [32, 56) 'ap' = (line 549) <=3D=3D Memory access at offset 718 overflows this variable 2022-08-20 12:28:55.164603-0400 Emacs[5114:17882118] HINT: this may be a = false positive if your program uses some custom stack unwind mechanism, = swapcontext or vfork 2022-08-20 12:28:55.164614-0400 Emacs[5114:17882118] (longjmp and = C++ exceptions *are* supported) 2022-08-20 12:28:55.164624-0400 Emacs[5114:17882118] SUMMARY: = AddressSanitizer: dynamic-stack-buffer-overflow = (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) in = __asan_memcpy+0x262 2022-08-20 12:28:55.164635-0400 Emacs[5114:17882118] Shadow bytes around = the buggy address: 2022-08-20 12:28:55.164644-0400 Emacs[5114:17882118] 0x1fffddf7fc90: = 00 00 00 00 f1 f1 f1 f1 00 00 00 f3 f3 f3 f3 f3 2022-08-20 12:28:55.164654-0400 Emacs[5114:17882118] 0x1fffddf7fca0: = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2022-08-20 12:28:55.164664-0400 Emacs[5114:17882118] 0x1fffddf7fcb0: = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2022-08-20 12:28:55.164673-0400 Emacs[5114:17882118] 0x1fffddf7fcc0: = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2022-08-20 12:28:55.164682-0400 Emacs[5114:17882118] 0x1fffddf7fcd0: = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2022-08-20 12:28:55.164693-0400 Emacs[5114:17882118] =3D>0x1fffddf7fce0: = ca ca ca ca 00 00 00 00 00 00 00 00 00[06]cb cb 2022-08-20 12:28:55.164702-0400 Emacs[5114:17882118] 0x1fffddf7fcf0: = cb cb cb cb f1 f1 f1 f1 00 00 00 00 f2 f2 f2 f2 2022-08-20 12:28:55.164721-0400 Emacs[5114:17882118] 0x1fffddf7fd00: = 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 2022-08-20 12:28:55.164731-0400 Emacs[5114:17882118] 0x1fffddf7fd10: = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2022-08-20 12:28:55.164740-0400 Emacs[5114:17882118] 0x1fffddf7fd20: = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2022-08-20 12:28:55.164750-0400 Emacs[5114:17882118] 0x1fffddf7fd30: = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2022-08-20 12:28:55.164759-0400 Emacs[5114:17882118] Shadow byte legend = (one shadow byte represents 8 application bytes): 2022-08-20 12:28:55.164768-0400 Emacs[5114:17882118] Addressable: = 00 2022-08-20 12:28:55.164779-0400 Emacs[5114:17882118] Partially = addressable: 01 02 03 04 05 06 07 2022-08-20 12:28:55.164799-0400 Emacs[5114:17882118] Heap left = redzone: fa 2022-08-20 12:28:55.164818-0400 Emacs[5114:17882118] Freed heap = region: fd 2022-08-20 12:28:55.164839-0400 Emacs[5114:17882118] Stack left = redzone: f1 2022-08-20 12:28:55.164848-0400 Emacs[5114:17882118] Stack mid = redzone: f2 2022-08-20 12:28:55.164856-0400 Emacs[5114:17882118] Stack right = redzone: f3 2022-08-20 12:28:55.164864-0400 Emacs[5114:17882118] Stack after = return: f5 2022-08-20 12:28:55.164871-0400 Emacs[5114:17882118] Stack use after = scope: f8 2022-08-20 12:28:55.164878-0400 Emacs[5114:17882118] Global redzone: = f9 2022-08-20 12:28:55.164885-0400 Emacs[5114:17882118] Global init = order: f6 2022-08-20 12:28:55.164892-0400 Emacs[5114:17882118] Poisoned by user: = f7 2022-08-20 12:28:55.164900-0400 Emacs[5114:17882118] Container = overflow: fc 2022-08-20 12:28:55.164904-0400 Emacs[5114:17882118] Array cookie: = ac 2022-08-20 12:28:55.164909-0400 Emacs[5114:17882118] Intra object = redzone: bb 2022-08-20 12:28:55.164932-0400 Emacs[5114:17882118] ASan internal: = fe 2022-08-20 12:28:55.165373-0400 Emacs[5114:17882118] Left alloca = redzone: ca 2022-08-20 12:28:55.165387-0400 Emacs[5114:17882118] Right alloca = redzone: cb 2022-08-20 12:28:55.165397-0400 Emacs[5114:17882118] Shadow gap: = cc =3D=3D5114=3D=3DABORTING (lldb) AddressSanitizer report breakpoint hit. Use 'thread info -s' to = get extended information about the report. Process 5114 stopped * thread #1, queue =3D 'com.apple.main-thread', stop reason =3D = AddressSanitizer detected: dynamic-stack-buffer-overflow frame #0: 0x0000000102ef1dc0 = libclang_rt.asan_osx_dynamic.dylib`__asan::AsanDie() libclang_rt.asan_osx_dynamic.dylib`__asan::AsanDie: -> 0x102ef1dc0 <+0>: pushq %rbp 0x102ef1dc1 <+1>: movq %rsp, %rbp 0x102ef1dc4 <+4>: pushq %rbx 0x102ef1dc5 <+5>: pushq %rax Target 0: (Emacs) stopped. (lldb) =20 > On Aug 20, 2022, at 12:23 PM, james@jojojames.com wrote: >=20 > > Could it be that one or more jpegs of yours is invalid in some way? > Maybe you could check this with the 'jpeginfo' utitlity. I've never > used it myself, because I don't have a use for it, but from what I = read, > it might be able to detect at least some error cases. Maybe it's = worth > trying. >=20 > Do you think that would lead to a crash every time? My crashes are = very inconsistent. >=20 > > Another idea might be to try and install an external jpeg library > (libjpeg I presume), and configure Emacs to use it. Alas, this = doesn't > seem to work on my M1 Mac, but maybe it does on your x86_64 system. >=20 > Can you point me to some documentation for that? >=20 >>=20 >> = --------------------------------------------------------------------------= ----- >>=20 >> 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed = for data file: errno =3D 2 (No such file or directory) (hmnn?) >>=20 >> This time I had to use: >>=20 >> /Users/james/Code/emacs/src/emacs >>=20 >> instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs (which = crashed on startup) >>=20 >=20 > I don't quite understand. I've seen to open errors in your log. Are > you saying that these happen because you started Emacs from src this > time? FWIW, I don't see differences when starting one or the other. >=20 >> On Aug 20, 2022, at 2:34 AM, Gerd M=C3=B6llmann = > wrote: >>=20 >> Could it be that one or more jpegs of yours is invalid in some way? >> Maybe you could check this with the 'jpeginfo' utitlity. I've never >> used it myself, because I don't have a use for it, but from what I = read, >> it might be able to detect at least some error cases. Maybe it's = worth >> trying. >>=20 >> Another idea might be to try and install an external jpeg library >> (libjpeg I presume), and configure Emacs to use it. Alas, this = doesn't >> seem to work on my M1 Mac, but maybe it does on your x86_64 system. >>=20 >> In any case, this doesn't look like a problem to me that is caused by >> Emacs. >>=20 >>>=20 >>> = --------------------------------------------------------------------------= ----- >>>=20 >>> 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed = for data file: errno =3D 2 (No such file or directory) (hmnn?) >>>=20 >>> This time I had to use: >>>=20 >>> /Users/james/Code/emacs/src/emacs >>>=20 >>> instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs (which = crashed on startup) >>>=20 >>=20 >> I don't quite understand. I've seen to open errors in your log. Are >> you saying that these happen because you started Emacs from src this >> time? FWIW, I don't see differences when starting one or the other. >=20 --Apple-Mail=_C8F75A14-2E30-49D8-84DD-0D76B2676F64 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 > I don't quite understand.  I've seen to open = errors in your log.  Are
you saying that these happen = because you started Emacs from src this
time?  FWIW, = I don't see differences when starting one or the other.
They were separate issues.

1. 2022-08-19 = 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: = errno =3D 2 (No such file or directory) (hmnn?)

^ Just recently saw that in the logs = after applying your suggestions.

2. Before (your suggestions), I did = this to run emacs:

gdb/lldb = ../nextstep/Emacs.app/Contents/MacOS/Emacs

After, it crashed on startup every = time, so I did instead:

gdb/llb = emacs




This is what I get with = the Emacs.app binary: (upon startup)

src/ $ lldb = ../nextstep/Emacs.app/Contents/MacOS/Emacs 
Emacs = debugging support has been installed.
(lldb) target create = "../nextstep/Emacs.app/Contents/MacOS/Emacs"
Current = executable set to = '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' = (x86_64).
(lldb) r
Process 5114 launched: = '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' = (x86_64)
Warning: Lisp directory 'Contents/Resources/lisp': No such = file or directory
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D5114=3D=3DERROR: AddressSanitizer: = dynamic-stack-buffer-overflow on address 0x7ffeefbfe76e at pc = 0x000102ee74d3 bp 0x7ffeefbfd9b0 sp 0x7ffeefbfd178
WRITE of size 25 at 0x7ffeefbfe76e thread = T0
    #0 0x102ee74d2 in __asan_memcpy+0x262 = (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2)
  =   #1 0x1008b3733 in doprnt doprnt.c:456
  =   #2 0x1008b5351 in esprintf doprnt.c:551
  =   #3 0x1007d2a43 in dir_warning lread.c:5385
  =   #4 0x1007d1b53 in load_path_check lread.c:5145
  =   #5 0x1007d1631 in init_lread lread.c:5338
  =   #6 0x1004911cd in main emacs.c:2151
  =   #7 0x7fff204bff3c in start+0x0 = (libdyld.dylib:x86_64+0x15f3c)

Address 0x7ffeefbfe76e is located in stack of thread T0 at = offset 718 in frame
    #0 0x1008b512f in esprintf = doprnt.c:547

  = This frame has 1 object(s):
    [32, 56) 'ap' (line 549) <=3D=3D Memory access at offset 718 overflows this = variable
HINT: this may be a false positive if your program uses some = custom stack unwind mechanism, swapcontext or vfork
  =     (longjmp and C++ exceptions *are* = supported)
SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow = (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) in = __asan_memcpy+0x262
Shadow bytes around the buggy address:
  = 0x1fffddf7fc90: 00 00 00 00 f1 f1 = f1 = f1 00 00 = 00 f3 = f3 = f3 = f3 = f3
  = 0x1fffddf7fca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 = 00
  0x1fffddf7fcb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 = 00 00 00
  0x1fffddf7fcc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 = 00 00 00
  0x1fffddf7fcd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 = 00 00 00
=3D>0x1fffddf7fce0: ca = ca = ca = ca 00 00 = 00 00 00 00 00 00 00[06]cb cb
  0x1fffddf7fcf0: cb = cb = cb = cb = f1 = f1 = f1 = f1 00 00 = 00 00 f2 = f2 = f2 = f2
  = 0x1fffddf7fd00: 00 f3 f3 = f3 00 00 = 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fd10: 00 00 00 00 00 00 = 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fd20: 00 00 00 00 00 00 = 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fd30: 00 00 00 00 00 00 = 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte = represents 8 application bytes):
  Addressable:       =     00
  Partially addressable: 01 02 03 04 05 06 = 07 
  Heap left redzone:       fa
  Freed heap region:     =   fd
  Stack left redzone:      f1
  Stack mid redzone:     =   f2
  Stack right redzone:     f3
  Stack after return:    =   f5
  Stack use after scope:   f8
  Global redzone:    =       f9
  Global init order:       f6
  Poisoned by user:    =     f7
  Container overflow:      fc
  Array cookie:      =       ac
  Intra object redzone:    bb
  ASan internal:     =       fe
  Left alloca redzone:     ca
  Right alloca redzone:  =   cb
  Shadow gap:            =   cc
2022-08-20 12:28:55.164360-0400 Emacs[5114:17882118] = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
2022-08-20 12:28:55.164418-0400 Emacs[5114:17882118] = =3D=3D5114=3D=3DERROR: AddressSanitizer: dynamic-stack-buffer-overflow = on address 0x7ffeefbfe76e at pc 0x000102ee74d3 bp 0x7ffeefbfd9b0 sp = 0x7ffeefbfd178
2022-08-20 12:28:55.164429-0400 Emacs[5114:17882118] WRITE of = size 25 at 0x7ffeefbfe76e thread T0
2022-08-20 12:28:55.164440-0400 = Emacs[5114:17882118]     #0 0x102ee74d2 in __asan_memcpy+0x262 = (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2)
2022-08-20 12:28:55.164450-0400 Emacs[5114:17882118]   =   #1 0x1008b3733 in doprnt doprnt.c:456
2022-08-20 12:28:55.164461-0400 Emacs[5114:17882118]   =   #2 0x1008b5351 in esprintf doprnt.c:551
2022-08-20 12:28:55.164483-0400 Emacs[5114:17882118]   =   #3 0x1007d2a43 in dir_warning lread.c:5385
2022-08-20 12:28:55.164507-0400 Emacs[5114:17882118]   =   #4 0x1007d1b53 in load_path_check lread.c:5145
2022-08-20 12:28:55.164519-0400 Emacs[5114:17882118]   =   #5 0x1007d1631 in init_lread lread.c:5338
2022-08-20 12:28:55.164529-0400 Emacs[5114:17882118]   =   #6 0x1004911cd in main emacs.c:2151
2022-08-20 12:28:55.164538-0400 Emacs[5114:17882118]   =   #7 0x7fff204bff3c in start+0x0 = (libdyld.dylib:x86_64+0x15f3c)
2022-08-20 12:28:55.164549-0400 = Emacs[5114:17882118] 
2022-08-20 12:28:55.164556-0400 = Emacs[5114:17882118] Address 0x7ffeefbfe76e is located in stack of = thread T0 at offset 718 in frame
2022-08-20 12:28:55.164565-0400 = Emacs[5114:17882118]     #0 0x1008b512f in esprintf = doprnt.c:547
2022-08-20 12:28:55.164576-0400 = Emacs[5114:17882118] 
2022-08-20 12:28:55.164583-0400 = Emacs[5114:17882118]   This frame has 1 object(s):
2022-08-20 12:28:55.164593-0400 Emacs[5114:17882118]   =   [32, 56) 'ap' (line 549) <=3D=3D Memory access at offset 718 = overflows this variable
2022-08-20 12:28:55.164603-0400 = Emacs[5114:17882118] HINT: this may be a false positive if your program = uses some custom stack unwind mechanism, swapcontext or = vfork
2022-08-20 12:28:55.164614-0400 Emacs[5114:17882118]   =     (longjmp and C++ exceptions *are* = supported)
2022-08-20 12:28:55.164624-0400 Emacs[5114:17882118] SUMMARY: = AddressSanitizer: dynamic-stack-buffer-overflow = (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) in = __asan_memcpy+0x262
2022-08-20 12:28:55.164635-0400 Emacs[5114:17882118] Shadow = bytes around the buggy address:
2022-08-20 12:28:55.164644-0400 = Emacs[5114:17882118]   0x1fffddf7fc90: 00 00 00 00 f1 f1 f1 f1 00 = 00 00 f3 f3 f3 f3 f3
2022-08-20 12:28:55.164654-0400 = Emacs[5114:17882118]   0x1fffddf7fca0: 00 00 00 00 00 00 00 00 00 = 00 00 00 00 00 00 00
2022-08-20 12:28:55.164664-0400 = Emacs[5114:17882118]   0x1fffddf7fcb0: 00 00 00 00 00 00 00 00 00 = 00 00 00 00 00 00 00
2022-08-20 12:28:55.164673-0400 = Emacs[5114:17882118]   0x1fffddf7fcc0: 00 00 00 00 00 00 00 00 00 = 00 00 00 00 00 00 00
2022-08-20 12:28:55.164682-0400 = Emacs[5114:17882118]   0x1fffddf7fcd0: 00 00 00 00 00 00 00 00 00 = 00 00 00 00 00 00 00
2022-08-20 12:28:55.164693-0400 = Emacs[5114:17882118] =3D>0x1fffddf7fce0: ca ca ca ca 00 00 00 00 00 = 00 00 00 00[06]cb cb
2022-08-20 12:28:55.164702-0400 = Emacs[5114:17882118]   0x1fffddf7fcf0: cb cb cb cb f1 f1 f1 f1 00 = 00 00 00 f2 f2 f2 f2
2022-08-20 12:28:55.164721-0400 = Emacs[5114:17882118]   0x1fffddf7fd00: 00 f3 f3 f3 00 00 00 00 00 = 00 00 00 00 00 00 00
2022-08-20 12:28:55.164731-0400 = Emacs[5114:17882118]   0x1fffddf7fd10: 00 00 00 00 00 00 00 00 00 = 00 00 00 00 00 00 00
2022-08-20 12:28:55.164740-0400 = Emacs[5114:17882118]   0x1fffddf7fd20: 00 00 00 00 00 00 00 00 00 = 00 00 00 00 00 00 00
2022-08-20 12:28:55.164750-0400 = Emacs[5114:17882118]   0x1fffddf7fd30: 00 00 00 00 00 00 00 00 00 = 00 00 00 00 00 00 00
2022-08-20 12:28:55.164759-0400 = Emacs[5114:17882118] Shadow byte legend (one shadow byte represents 8 = application bytes):
2022-08-20 12:28:55.164768-0400 Emacs[5114:17882118]   = Addressable:           00
2022-08-20 12:28:55.164779-0400 Emacs[5114:17882118]   = Partially addressable: 01 02 03 04 05 06 07
2022-08-20 12:28:55.164799-0400 Emacs[5114:17882118]   = Heap left redzone:       fa
2022-08-20 12:28:55.164818-0400 Emacs[5114:17882118]   = Freed heap region:       fd
2022-08-20 12:28:55.164839-0400 Emacs[5114:17882118]   = Stack left redzone:      f1
2022-08-20 12:28:55.164848-0400 Emacs[5114:17882118]   = Stack mid redzone:       f2
2022-08-20 12:28:55.164856-0400 Emacs[5114:17882118]   = Stack right redzone:     f3
2022-08-20 12:28:55.164864-0400 = Emacs[5114:17882118]   Stack after return:      = f5
2022-08-20 12:28:55.164871-0400 Emacs[5114:17882118]   = Stack use after scope:   f8
2022-08-20 12:28:55.164878-0400 = Emacs[5114:17882118]   Global redzone:        =   f9
2022-08-20 12:28:55.164885-0400 Emacs[5114:17882118]   = Global init order:       f6
2022-08-20 12:28:55.164892-0400 Emacs[5114:17882118]   = Poisoned by user:        f7
2022-08-20 12:28:55.164900-0400 Emacs[5114:17882118]   = Container overflow:      fc
2022-08-20 12:28:55.164904-0400 Emacs[5114:17882118]   = Array cookie:            = ac
2022-08-20 12:28:55.164909-0400 Emacs[5114:17882118]   = Intra object redzone:    bb
2022-08-20 12:28:55.164932-0400 = Emacs[5114:17882118]   ASan internal:         =   fe
2022-08-20 12:28:55.165373-0400 Emacs[5114:17882118]   = Left alloca redzone:     ca
2022-08-20 12:28:55.165387-0400 = Emacs[5114:17882118]   Right alloca redzone:    = cb
2022-08-20 12:28:55.165397-0400 Emacs[5114:17882118]   = Shadow gap:              = cc
=3D=3D5114=3D=3DABORTING
(lldb) AddressSanitizer report breakpoint hit. Use 'thread info -s' = to get extended information about the report.
Process = 5114 stopped
* thread #1, queue =3D = 'com.apple.main-thread', stop reason =3D AddressSanitizer detected: = dynamic-stack-buffer-overflow
    frame #0: 0x0000000102ef1dc0 = libclang_rt.asan_osx_dynamic.dylib`__asan::AsanDie()
libclang_rt.asan_osx_dynamic.dylib`__asan::AsanDie:
->  0x102ef1dc0 <+0>: pushq  = %rbp
    = 0x102ef1dc1 <+1>: movq   %rsp, %rbp
    0x102ef1dc4 <+4>: pushq  = %rbx
    = 0x102ef1dc5 <+5>: pushq  %rax
Target 0: (Emacs) = stopped.
(lldb)  


On Aug 20, 2022, at 12:23 PM, james@jojojames.com = wrote:

> Could it be that = one or more jpegs of yours is invalid in some way?
Maybe = you could check this with the 'jpeginfo' utitlity.  I've never
used it myself, because I don't have a use for it, but from = what I read,
it might be able to detect at least some = error cases.  Maybe it's worth
trying.

Do you think that would = lead to a crash every time? My crashes are very inconsistent.

> Another idea might be to try and install = an external jpeg library
(libjpeg I presume), and = configure Emacs to use it.  Alas, this doesn't
seem = to work on my M1 Mac, but maybe it does on your x86_64 system.

Can you point me to some = documentation for that?


---------------------------------------------------------------= ----------------

2022-08-19 = 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: = errno =3D 2 (No such file or directory) (hmnn?)

This time I had to use:

/Users/james/Code/emacs/src/emacs

instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs = (which crashed on startup)


I don't quite understand.  I've seen to open errors in = your log.  Are
you saying that these happen because = you started Emacs from src this
time?  FWIW, I don't = see differences when starting one or the other.

On Aug 20, 2022, at 2:34 AM, Gerd M=C3=B6llmann <gerd.moellmann@gmail.com> wrote:

Could it be that one or more jpegs of yours is invalid in = some way?
Maybe you = could check this with the 'jpeginfo' utitlity.  I've = never
used it = myself, because I don't have a use for it, but from what I = read,
it might be = able to detect at least some error cases.  Maybe it's = worth
trying.

Another idea might be to try and install an external jpeg = library
(libjpeg I = presume), and configure Emacs to use it.  Alas, this = doesn't
seem to work = on my M1 Mac, but maybe it does on your x86_64 system.

In any case, this doesn't look = like a problem to me that is caused by
Emacs.


---------------------------------------------------------------= ----------------

2022-08-19 = 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: = errno =3D 2 (No such file or directory) (hmnn?)

This time I had to use:

/Users/james/Code/emacs/src/emacs

instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs = (which crashed on startup)


I don't quite understand. =  I've seen to open errors in your log.  Are
you saying that these happen = because you started Emacs from src this
time?  FWIW, I don't see differences when starting one = or the other.


= --Apple-Mail=_C8F75A14-2E30-49D8-84DD-0D76B2676F64--