From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#74224: [PATCH][scratch/igc] pgtk: fix crashing bug in atimer used for checking scaling Date: Wed, 06 Nov 2024 11:49:02 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="827"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74224@debbugs.gnu.org To: Jeff Walsh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 06 11:51:15 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 1t8dd4-000AaA-UC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Nov 2024 11:51:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8dcu-0008GD-2i; Wed, 06 Nov 2024 05:51:04 -0500 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 1t8dcs-0008G3-Af for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 05:51:02 -0500 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 1t8dcs-0007Wt-22 for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 05:51:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=T3cRkMmWpEQ5m8lcvCq60clc1p4hpmpVntAp5FKbESM=; b=QjLzouOgw9On0QWZo4ew1Z1fbyVh5qX+Md3Tb6/YkwLxIpQk8Fw5Z4p2Kgcs0VyZMnKxgIiLpdRgiwUM/u/URlZ38U1hquq8URF5NWb1hBp5Dd4vXwqnLmEdErj/SvJiz6qLoJz3IcNz2U8IYPG1EnqBixzE732PNv2PIYPL1332WKby9iFuEp0tb7qS9t9RqsKklhWAK+HoHmTRtyX8QF/nOokycR6oyJUWVpTzOhC5hJUmohZyJuN0vg+1c3Tp2qHgdtI0hzbOP6s5PbiZeI5FFWDmQNoIh0hYWbCYFKrsHOErWe9dcBLcS9ZS70h2kJHc6TaeMonxQvNou2r4Yw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8dcr-0000nM-TI for bug-gnu-emacs@gnu.org; Wed, 06 Nov 2024 05:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Nov 2024 10:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74224 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74224-submit@debbugs.gnu.org id=B74224.17308902082765 (code B ref 74224); Wed, 06 Nov 2024 10:51:01 +0000 Original-Received: (at 74224) by debbugs.gnu.org; 6 Nov 2024 10:50:08 +0000 Original-Received: from localhost ([127.0.0.1]:39784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8dbz-0000iD-IN for submit@debbugs.gnu.org; Wed, 06 Nov 2024 05:50:07 -0500 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:60778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8dbw-0000gn-V1 for 74224@debbugs.gnu.org; Wed, 06 Nov 2024 05:50:05 -0500 Original-Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-431ac30d379so53214165e9.1 for <74224@debbugs.gnu.org>; Wed, 06 Nov 2024 02:50:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730890144; x=1731494944; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T3cRkMmWpEQ5m8lcvCq60clc1p4hpmpVntAp5FKbESM=; b=K8Nf0RvYVMiRS1kFCMrYbxvZztBhelj34Jf4bdQSp4JOVBs8OgT9vT2chlOC9RqAEx +Sxo/oQ8N5Q5TbhCLAdiPVZfD2ykiXIifdPYxcQ971PVAAN7KOEXmCmGG1J2rzNG6uDp hkP7tLdE/+S1rIMQ7VXRydef+p6SMTTWEAUa5/jNAX9jCYhcFOvP3K75aEQZxecr8T/5 vR3cLRqaYY8ELqG/Rd8+OLGLBDmGr7AIN/zOxCwZ/pddIInjbhEEVje80/9HRQrFAT1A DuUSfABeecjFTBxBrlJ+IqnqaGUOPIuomIRUissY8hXE+9HCJlFMtFwVw9JLXXrjpnht 6Kcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730890144; x=1731494944; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=T3cRkMmWpEQ5m8lcvCq60clc1p4hpmpVntAp5FKbESM=; b=AgndGHC9m0SZuODVaMFSKJm/dOMBAtGXnz3YDnF/zx3ZcKBYH+asuj987Urf3MkLRb mjLExMxMLSCLPOMa9WdzN43ftNqDz0GBVP+dyc9c9ZuKYHT2kbAf/nJjqdBoSa4Q+cHi p9YlgSA2pPZYe5va9YSsCC+oCiJbra7n3JPpTE9wik1p6jsAkhJARZhG93EOXsaRmuFi LWeUEibvaYXKR/19r1gKroPGh6p00uc0llX9bWMb9RI8U9FHZauPKm5rpFwtxwNr9ZWC E4MbjfJ2rBJqqJBRWLyU7sSV43DWx9tc2adX8a6SGzN6DHbun+32vWY42yV+k4ZCP1TG 7oSQ== X-Gm-Message-State: AOJu0YxAh42H3QGbWBRk6lzepmSNhQx4zn+S2zQhPmaOUla38tRRmhyb DLZy+VSz3nPIe939aLA4O840UFv616etF2xDoGUJzvZsu3I7CIsZUwzo9w== X-Google-Smtp-Source: AGHT+IH512EbdUlRy/Uz3w6KjsGXlQs42/Ff8y6MasSEIGii9SQjWEIGqFK39NId6ixs1Wnrx8qdfw== X-Received: by 2002:a05:600c:1c03:b0:42c:af2a:dcf4 with SMTP id 5b1f17b1804b1-4319ad141admr321216625e9.27.1730890143701; Wed, 06 Nov 2024 02:49:03 -0800 (PST) Original-Received: from pro2 (pd9e36633.dip0.t-ipconnect.de. [217.227.102.51]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432aa6c0414sm17661375e9.23.2024.11.06.02.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 02:49:03 -0800 (PST) In-Reply-To: (Jeff Walsh's message of "Wed, 6 Nov 2024 21:44:57 +1100") 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:294947 Archived-At: Jeff Walsh writes: >> LGTM. Can you commit that yourself to the branch? > > I don't have a savannah account for emacs, but I have just registered and= will chase up approvals. > > timers are cleaned up by cancel_atimer(), then they get put on a free lis= t (`free_atimers` on line 132 in the snippet). > It appears that we rely on the OS to cleanup at emacs shutdown. Very good, thanks! I'll commit that for you, then, and close this bug when done. > > On Wed, Nov 6, 2024 at 9:36=E2=80=AFPM Gerd M=C3=B6llmann wrote: > > Jeff Walsh writes: > > > #ifdef WINDOWSNT > > #define raise(s) w32_raise(s) > > @@ -132,7 +133,13 @@ start_atimer (enum atimer_type type, struct times= pec timestamp, > > free_atimers =3D t->next; > > } > > else > > - t =3D xmalloc (sizeof *t); > > + { > > +#ifdef HAVE_MPS > > + t =3D igc_xzalloc_ambig (sizeof *t); > > +#else > > + t =3D xmalloc (sizeof *t); > > +#endif > > + } > >=20=20 > > /* Fill the atimer structure. */ > > memset (t, 0, sizeof *t); > > On second thought, and I don't know if it's relevant, do we need to > igc_xfree that?