From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#72255: 30.0.60; Crash on macOS with malformed XPM image file Date: Tue, 23 Jul 2024 20:51:06 -0700 Message-ID: References: <871q3jxxra.fsf@yahoo.com> 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="17060"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72255-done@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 24 05:53:07 2024 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 1sWT3r-0004LD-8Z for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jul 2024 05:53:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWT3l-0007mY-2O; Tue, 23 Jul 2024 23:53:01 -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 1sWT3j-0007m5-7S for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 23:52:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWT3h-0001Mq-D5 for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 23:52:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWT3m-0000ty-LX for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 23:53:02 -0400 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jul 2024 03:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 72255 X-GNU-PR-Package: emacs Mail-Followup-To: 72255@debbugs.gnu.org, stefankangas@gmail.com, stefankangas@gmail.com Original-Received: via spool by 72255-done@debbugs.gnu.org id=D72255.17217931413416 (code D ref 72255); Wed, 24 Jul 2024 03:53:02 +0000 Original-Received: (at 72255-done) by debbugs.gnu.org; 24 Jul 2024 03:52:21 +0000 Original-Received: from localhost ([127.0.0.1]:32955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWT36-0000t2-VC for submit@debbugs.gnu.org; Tue, 23 Jul 2024 23:52:21 -0400 Original-Received: from mail-ej1-f47.google.com ([209.85.218.47]:43354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWT34-0000sj-Ey for 72255-done@debbugs.gnu.org; Tue, 23 Jul 2024 23:52:19 -0400 Original-Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a7a94478a4eso80141666b.1 for <72255-done@debbugs.gnu.org>; Tue, 23 Jul 2024 20:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721793067; x=1722397867; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=zSWAbR4Kt9nvKQQJXq4jw0syc2FKXyXs/z261BUXq0I=; b=j1BSwCa1KkQ07ZI9UDl1ZrbiRhBqcc5Ve1iXH4GmfErVc3ulCjYrQX/+ZScCKEMmrC YhmzrHKY4gfiGHp8uelI4jnrPH0NTlmgXunIKlneDaqf+kZpgr8bTqAAt8jewx1ySzps TZ+tuW1fTj1hxxEYJmiegmGVjqvQxYm3po+6ahIEzeMLhjL4ZdEAn/p7yrFBZdKDTbEN ucFhUnHTF2ydCt/+KInZQu4Q2YM10xBSKrZSqRALWc/HHv6OTyw+E/QBkZ3VxgDMduxq i4A9W+qb2FJNFIPFcp7uYNoVWhJ6mkwlCKhG17MDieaiHGZddPy2nHqdTkM+BiGSrHWK a5Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721793067; x=1722397867; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zSWAbR4Kt9nvKQQJXq4jw0syc2FKXyXs/z261BUXq0I=; b=eCfqCiiygduDtidh15hS386zfGJ8pwuYKrGfB+3jWrTK2n1YSUSC4MlShpyLJplk3S RUJmABIkQl0yw4nTQWzEV1kQOr1rsruGAqCfIgAJv7GUZIe5T2qPTtuWVzewqAYLVe6c ZYN/WKfpuay3WMR2gVuSgEwNv95yUsWmknJjDZ0f7mj4gNqFET6C8SL/X40J61HW7h0h p3UfAKtG/yjjnwZwhCLo5wd7FPOcHDVBAYBcLviHx14hi873ilqpZzWsWWOgMAbmnCOn tvua+GpJHL8c/7Noz/0XDXjBMYQA7gGa/G7meC72MlJaB07mKLDtR+E9nz+AIDouwC/7 XxpQ== X-Gm-Message-State: AOJu0YyL0+CbE/kjUwq5ccTlmJKWUy9HlJD5caGGGrC5/G0knQ67i2+m mcwgxfkD/q+a17g/Yr9fZYqDhk11tvW7XvI+5XVk9pYUQ70/OLXtazeqZlp/t12LeMzKSG8K+L5 VfsB1Vi0L5gqJyoGoAW+lAoVNVxc= X-Google-Smtp-Source: AGHT+IFLaUkvPOESxNmDvqOuweRkW1oSozabJOsoBOvj/29gI/6qWkKLm8JS2a3LSNB+qxbDrCrtGJLT+zcEHgifBUM= X-Received: by 2002:a17:907:5c7:b0:a77:cdae:6a59 with SMTP id a640c23a62f3a-a7ab2febf78mr38639966b.21.1721793066907; Tue, 23 Jul 2024 20:51:06 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 23 Jul 2024 20:51:06 -0700 In-Reply-To: <871q3jxxra.fsf@yahoo.com> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289202 Archived-At: Version: 30.1 Po Lu writes: > Stefan Kangas writes: > >> Severity: normal >> >> Emacs crashes on macOS when opening a malformed XPM image file. >> >> I'm attaching an example image with the file extension ".xpm.txt" below; >> to reproduce, simply rename the file to ".xpm" and open it in Emacs. >> (This bad file is an edited version of back-arrow.xpm in emacs.git.) >> >> I've included an lldb backtrace below. Note that I reproduced this on >> master, but the code has not changed from emacs-30. >> >> The crash happens in nsterm.m:601:5, but I can't figure out why we're >> trying to access some other address than the pointer that was passed to >> that function. Maybe this is trivial to someone that knows Objective-C. > > Please test the emacs-30 branch. It was a double free on NS affecting > not only XPM, but all image loading functions in varying measures. That seems to have fixed the crash. Closing the bug, thanks!