From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6mwoEQyeqGlqiRQAWB0awg (envelope-from ) for ; Wed, 04 Mar 2026 16:03:08 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Y2mQ716o; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 272CE1E0DD; Wed, 04 Mar 2026 16:03:08 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 593D01E089 for ; Wed, 04 Mar 2026 16:03:07 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id A4F9E4BA23C9 for ; Wed, 4 Mar 2026 21:03:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4F9E4BA23C9 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Y2mQ716o Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id 57FF64BA2E0B for ; Wed, 4 Mar 2026 21:02:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 57FF64BA2E0B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 57FF64BA2E0B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772658159; cv=none; b=BXie6ZBTuX0/kojYR+iSu7YRvAudh9NcQt2nksr+4ZhVKOv/iNMEVThDJp/jWQSKrap1scWzFeShuFOg7MkVzXI1BnttQR5WbLE7hzcnCSGhnZu4L5q0zut964ZmO1H2fONCteO7/ZXTgik/Gd/fdJ2S9frzFG6ubkJOBsn2HX0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772658159; c=relaxed/simple; bh=jce/BL+7QSEjhxOGhZVsvUIutvkVNTjy/ChRVY1w948=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=t3kuiNV2+t8dRjCnsjIJ0D1z5Bt7gOFu5lv6k1syrmkS0/aJKS8GgWTilnC4Mlo7TuYbV9sPdKCirozLfDdzg7fuXK1p8BoxeKykfnp6wi/nBK7NKvSLLwff5QxMlLXssI6moo6HKGwP600wimX2ABiB32R9ui4mfmLUOadSKiY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57FF64BA2E0B Received: from eig-obgw-6004b.ext.cloudfilter.net ([10.0.30.210]) by cmsmtp with ESMTPS id xj1UvzQnTKXDJxtMcvVTf2; Wed, 04 Mar 2026 21:02:39 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xtMAvjvSyK8vzxtMBvvW4X; Wed, 04 Mar 2026 21:02:11 +0000 X-Authority-Analysis: v=2.4 cv=cJDgskeN c=1 sm=1 tr=0 ts=69a89dee a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Yq5XynenixoA:10 a=ItBw4LHWJt0A:10 a=yJMIp3N6Nhl3QbP2xN0A:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ap/dgEWMi/UAWLXeduc1AwtarN695/gp9fx8ZfQyGYA=; b=Y2mQ716oItsHCCSyWu7aRM533a PdbNYapNZtvuEH1jTp61Z+kaIow9uqWeK2kXCtxxB+qZEfgWQX2ZWsgQ+qwXNLfEb7wLDDzobbxMV aj7SBHXd+VXyFHVOHdmKB5OEo; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:55198 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vxtMA-00000003XMG-2Kf8; Wed, 04 Mar 2026 14:02:10 -0700 From: Tom Tromey To: Matthieu Longo Cc: gdb-patches@sourceware.org Subject: Re: [RFC 0/4] Better Python safety In-Reply-To: <687d60e9-3a8c-411e-aa04-3d1aae896232@arm.com> (Matthieu Longo's message of "Wed, 4 Mar 2026 17:39:35 +0000") References: <20260222200759.1587070-1-tom@tromey.com> <687d60e9-3a8c-411e-aa04-3d1aae896232@arm.com> X-Attribution: Tom Date: Wed, 04 Mar 2026 14:02:09 -0700 Message-ID: <87y0k7mhpq.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1vxtMA-00000003XMG-2Kf8 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:55198 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfIXMXx5h6WQZwJiUfQzVhPbCwjY/MLY8bq+EFOZMc7sOQOb/0zaf2NTxuvR9z8tPzQliDjgbdJImdyXwQyiDhdvq1Ho2MTAV2jSNe+5hcp4x8unBo1hP 1I61tNa5Lo7FYvlU2kVpcjgt4L7D3a0cDy8b7UU1nG9j7vnCmcI7uX0Un5AwdGZoLCA0HLlNm8Ud9PVnrEP6IPogCxYOa98kt7I= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >> with some type-safety elsewhere as well). Essentially I think we >> could end up making new instances with just 'new'. >> I didn't want to really touch this until the stable ABI work >> related >> to type-instantiation is done. > Yes please :) I'm not totally sure if the 'new' plan is possible. Or maybe you were responding to me waiting until your type-instantiation work is done. FAOD I am still planning to wait on that. > So after the migration, all the extension types have the > Py_TPFLAGS_HAVE_GC flag, are allocated via PyObject_GC_New(), and > every PyType_Slot sets Py_tp_traverse, Py_tp_clear, and Py_tp_dealloc. > Some of the types had circular dependencies due to a type referencing > the other one similarly to what happens between two nodes of a doubly > linked list. In those cases, the circular dependency have to be > broken. Also, some types already should have required garbage > collection management even with static types. > Are your findings converging with mine ? Yes I think so. There's a bug in bugzilla about how gdb doesn't implement the 'traverse' idea but should. You can probably cause memory leaks right now by making self-references via __dict__. Tom