From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.devel Subject: Re: GC + Java finalization Date: Fri, 19 Nov 2021 13:48:35 +0000 Message-ID: <497caf03e995dd3cad9df748a2e5e7e5e8a245eb.camel@telenet.be> References: <9ce77d5e08d50456eddc575179b68ac17afc9bf6.camel@hahnjo.de> <1cc3648e5196bf23023ec7a0ab95a9ad46f8554c.camel@telenet.be> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30226"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.38.3-1 To: Jonas Hahnfeld , guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Nov 19 14:49:27 2021 Return-path: Envelope-to: guile-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 1mo4Gd-0007aH-5u for guile-devel@m.gmane-mx.org; Fri, 19 Nov 2021 14:49:27 +0100 Original-Received: from localhost ([::1]:54806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo4Gc-00061V-6v for guile-devel@m.gmane-mx.org; Fri, 19 Nov 2021 08:49:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo4Fs-0004gt-5f for guile-devel@gnu.org; Fri, 19 Nov 2021 08:48:41 -0500 Original-Received: from [2a02:1800:120:4::f00:14] (port=46528 helo=xavier.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo4Fp-0000DF-VN for guile-devel@gnu.org; Fri, 19 Nov 2021 08:48:39 -0500 Original-Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id LDob260054UW6Th01DobK1; Fri, 19 Nov 2021 14:48:35 +0100 In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1637329715; bh=gXt/Acm/pm6bIencFhkVPhGyY3iBkukSMlRVFo+b30w=; h=Subject:From:To:Date:In-Reply-To:References; b=d/MS0DS3T77yiE9mJ3SolKHyr3i4eH462zPhkzrh1uX66x5CImk9VB6RXFAfjBRa6 2VyUNvSHKBZoMmhbBbuQQNcphy5bZzAfX/0NROcvpACKesHBcs40nXYLUObMtZa0nS CU2qb++4LrhR6hl+STx4OYkeSIVEbIq/yUBPzL8gHOKq0emeB2g9cqIHwBG4sk63ph 98PZNq57wbReqmp6cLU0ewqh5fAZUjeVa8veV95P0oJ91KpKV5V8p7HVoTk4vP5Mem WLRG/dE+VmVSDuawlXF2yMe4z3xiHoPlFhTxnXufTmzbOYU8umNNKbYiPdX6K8ANKp hAJHEj9uWEOBQ== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:14 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:14; envelope-from=maximedevos@telenet.be; helo=xavier.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20965 Archived-At: Jonas Hahnfeld schreef op vr 19-11-2021 om 14:32 [+0100]: > > > -  rx = scm_gc_malloc_pointerless (sizeof (regex_t), "regex"); > > > +  rx = scm_malloc (sizeof (regex_t)); > > > > If the regex why scm_gc_malloc_pointerless -> scm_malloc? > > Is rx not pointerless? > > Not sure I understand the question. We don't know what contents libc > will write into regex_t. It could be pointers which would be bad for > the garbage collector. OK, if that's the case, seems like a bug in the original code, not related to Java-style finalisation, so I would do that in a separate patch. Though libc probably allocates stuff with malloc and frees it with free, and we call regfree to tell libc, so I think we should be fine? Greetings, Maxime