View mode: basic / threaded / horizontal-split · Log in · Help
December 08, 2008
Re: Hard-to-reproduce GC bug
== Quote from Leandro Lucarella (llucax@gmail.com)'s article
> 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 libraries).
> 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?

That or runtime functions for the equivalent.  Either way, the compiler runtime will have to
define something.

> BTW, the change broke the indentation style of druntime :S

I'll take care of it :p


Sean
December 08, 2008
Re: Hard-to-reproduce GC bug
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 libraries).
> 
> 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>
December 08, 2008
Re: Hard-to-reproduce GC bug
== Quote from Walter Bright (newshound1@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
libraries).
> >
> > 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.


Sean
December 08, 2008
Re: Hard-to-reproduce GC bug
Walter Bright, el  8 de diciembre a las 11:39 me escribiste:
> 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 libraries).
> >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>

Sure, I mentioned it to understand where this is going to =)

Anyway, maybe there should be a ticket or something on this so this issue
don't get lost. Where one should put this kind of things? DMD's bugzilla?
Druntime bugtracker?

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
De tan fina la condesa, por no cagarse, reza.
	-- Ricardo Vaporeso
Next ›   Last »
1 2 3
Top | Discussion index | About this forum | D home