Hello, Andy Wingo <[email protected]> writes:
> On Mon 28 Mar 2011 21:22, [email protected] (Ludovic Courtès) writes: > >> The problem is that libgc ends up being initialized behind our back upon >> the first libgc-redirected ‘pthread_create’ call. > > Indeed. > >> Hans Boehm suggested [0] two solutions: >> >> 1. Disable pthread redirects and instead register threads explicitly >> (in ‘scm_with_guile’). >> >> 2. Initialize libgc in a constructor. >> >> I was leaning towards (2), because this way we’d be in control, and in >> particular we’d have GC_all_interior_pointers = 0. It would only work >> on GCC/ELF platforms, and only if libgc wasn’t already initialized (for >> instance if Guile is used in an application that already uses libgc on >> its own)—but that really covers 90% of our use cases. >> >> I understand you’re in favor of (1). This would give the same behavior >> as in 1.8[*] while being less hackish than (2). However, it’s only >> applicable to 2.1. > > Why is this only applicable to 2.1 ? I was thinking it’d break the ABI, but maybe not? Ludo’.
