From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS make-thread Date: Fri, 21 Jun 2024 17:33:40 +0200 Message-ID: References: <87v823xvq1.fsf@localhost> <86cyobmmhc.fsf@gnu.org> <87r0crxung.fsf@localhost> <87le2zxsqx.fsf@localhost> <8634p6n7jd.fsf@gnu.org> <87tthm3gq2.fsf@gmail.com> <87sex6ags5.fsf@localhost> <87msne3flr.fsf@gmail.com> <87frt63dvt.fsf@gmail.com> <86o77ulgk8.fsf@gnu.org> <87zfre1p3r.fsf@gmail.com> <87zfreo5u6.fsf@localhost> <87plsa1n8k.fsf@gmail.com> <87wmmio3vq.fsf@localhost> <87jzii1hbs.fsf_-_@gmail.com> 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="32278"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ihor Radchenko , Eli Zaretskii , emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 21 17:34:32 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sKgHY-0008Hw-CJ for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Jun 2024 17:34:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKgGq-0006SK-KM; Fri, 21 Jun 2024 11:33:48 -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 1sKgGo-0006R2-Hh for emacs-devel@gnu.org; Fri, 21 Jun 2024 11:33:46 -0400 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKgGm-0002NJ-Tp; Fri, 21 Jun 2024 11:33:46 -0400 Original-Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-57d07f07a27so2402528a12.3; Fri, 21 Jun 2024 08:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718984022; x=1719588822; darn=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=nagD8ibMJH3IytdgT4+re8RLwX9FOfhdrT0KbFWsCgw=; b=bf+dqfZ+HaTAt6NkVHv780VAo6JWWUiNKVUErJRBX+0quZNa4oJ18//NfHI+ZHCboM zrqCZNMyHBGV7ecMdYSt8gLLPVyX8HsM8s1R/+CYU/17epeYPqdmHK3MPtRWLG9CEAbm V8AeugOmv9lQij7itaewToOhTFOPGBMF+ceqTC7lOnSilBnpgBXQaPaluAQ1FeOu2nfW F6fWcj1wGZf0wFQ5IB/e1mT6pCAmtMvyh9ash/UEMqKAkongV/H2UFiz1IoDCLhnLwrU mOLwSNG9v5n5ODxzeC8GeOJW2QgST4BSLq76yn0AYhF0GQyZm3mTX5IS/ZEGW+I0lh2i IfAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718984022; x=1719588822; 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=nagD8ibMJH3IytdgT4+re8RLwX9FOfhdrT0KbFWsCgw=; b=QpHdnX5X8AJRkEQq8njks8i0PqjwtR4EeNwz9UVcXLxSoHh10Ot6rcbQ4TBV7SjSc2 LjT/FjKvBNb9irNl57W2O0Gxdrp0nnVChV715LKerQR3Mg6ui4PCicBvTkCCOiaMTgwq SM3/uCnKe8vMnVPGPFyGI42cnsag55ctWB02w8F6s91AzAaKu6C6zU4gzM1azGof8N2F LX+HmkSVA1h5C78SxQnSOIDnKYyZGq7bBYp66/0s1Bs2jt9zJMAew2K6lBR7HBRdxr9j qAWCrMeLMZJqpZPVRXkamr9hTMc2NmPuJvguG1fdyJuwinld/6vcIKBVhhJBPwpNWbbJ /gSg== X-Forwarded-Encrypted: i=1; AJvYcCVfHtb0+00vk2NSvAc5jLKn+S2laZ+9zNCxs5hpQZwL8liVtop0UHs/43iGG6MCnRY279Y8m/x4yNAXQSLCyEKLiz0VmN1iCqPAo4yLMg/qD1U= X-Gm-Message-State: AOJu0YyrX/ERSLiq42QIX3wPLWygN5OaSc7m+SOFmkUaUJHfKQlYStqJ MbXU7CYHcVuiJSb41xXTtNoEE7+dAXOXEbbUOngGO84lYNsmuHZlQBQLpg== X-Google-Smtp-Source: AGHT+IGaGY1IsDzjKDJChEV0yP9x0wEoUKX9bzMnqU8htUT+CAd2LiQxEoGL+Z1n0LE6/k5jyvbOwQ== X-Received: by 2002:a50:c05d:0:b0:57d:72e:5b3a with SMTP id 4fb4d7f45d1cf-57d07eabfcdmr5540802a12.33.1718984021484; Fri, 21 Jun 2024 08:33:41 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a72a.dip0.t-ipconnect.de. [79.227.167.42]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d3006d36bsm1090617a12.0.2024.06.21.08.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jun 2024 08:33:41 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Fri, 21 Jun 2024 17:20:36 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320413 Archived-At: Gerd M=C3=B6llmann writes: > Helmut Eller writes: > >>> Just make-thread. >>> (I am not sure if it is related; if not, I'd better try to prepare a >>> reproducer later and start a new email thread) >> >> This crashes for me: >> >> emacs -Q -batch -eval \ >> '(thread-join (make-thread (lambda () (igc--collect))))' > > On macOS, and in my fork, it says > > emacs(38573,0x17071f000) malloc: *** error for object 0x1040c8008: pointe= r being freed was not allocated > emacs(38573,0x17071f000) malloc: *** set a breakpoint in malloc_error_bre= ak to debug It's the xfree in run_thread here: struct handler *c, *c_next; for (c =3D handlerlist_sentinel; c; c =3D c_next) { c_next =3D c->nextfree; xfree (c); } c is an MPS objects. I can fix that later after verifying that all handlers are now in MPS. Unless someone(tm) is quicker, of course.