Hard-to-reproduce GC bug

Sean Kelly sean at invisibleduck.org
Mon Dec 8 12:51:38 PST 2008

== Quote from Walter Bright (newshound1 at digitalmars.com)'s article
> Leandro Lucarella wrote:
> > Walter Bright, el  7 de diciembre a las 16:04 me escribiste:
> >> Walter Bright wrote:
> >>> Steven Schveighoffer wrote:
> >>>> I'd say most likely that the GC doesn't see anything declared as __thread, so when you use that
pointer as the only reference to GC allocated data, it
> >>>> doesn't see that it's still in use, and will collect.
> >>> Looks like I need to do some research to see how the gc can discover the extent of tls data.
> >> I've got this working now for Windows and Linux for the main program (not for dll's or shared
> >
> > I saw the change[1] and I wonder why there are mentions to the DMD
> > implementation. Shouldn't that be implementation agnostic, being in the
> > "common" part of the runtime? I guess _tlsstart and _tlsend should be
> > added to the runtime specification[2] too, right?
> I was more concerned about getting it to work right. <g>

Since there isn't yet a solution for shared libraries I may just wait on formalizing
how this works.  I've simply moved _tlsstart and _tlsend into the compiler runtime
for now, and placed the related stuff in thread inside a version(DigitalMars) block.


More information about the Digitalmars-d mailing list