Am Freitag, dem 19.11.2021 um 13:48 +0000 schrieb Maxime Devos: > 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.
Again, as replied in July to the same comment, it *is* a separate patch for exactly this reason. > 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? If memory lives until we call regfree, yes. See my other reply on why this currently requires Java-style finalization to "work by accident". Jonas
signature.asc
Description: This is a digitally signed message part