October 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #20 from Martin Nowak <code@dawg.eu> 2013-10-25 09:14:31 PDT ---
(In reply to comment #19)
> Question, how is the runtime initialized now? I mean, is it initialized in a shared module constructor?

At least on linux it is done from .ctor/.dtor functions that call
_d_dso_registry.
This is the similar to __attribute__((constructor))/__attribute__((destructor))
functions.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #21 from Jacob Carlborg <doob@me.com> 2013-10-25 09:18:34 PDT ---
(In reply to comment #20)
> At least on linux it is done from .ctor/.dtor functions that call
> _d_dso_registry.
> This is the similar to __attribute__((constructor))/__attribute__((destructor))
> functions.

How does the compiler make sure that the .ctor that initializes the runtime is run before any user shared module constructors?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #22 from Walter Bright <bugzilla@digitalmars.com> 2013-10-26 13:41:20 PDT ---
I'd like to get 2.064 release finalized. That means this regression needs to be fixed, or deferred. What do you guys think?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #23 from Jacob Carlborg <doob@me.com> 2013-10-26 15:11:03 PDT ---
Another idea that could work is to not use .ctor for the shared module constructors, as before. Then have a single .ctor that initializes the runtime. The shared module constructors would be run from C main/rt_init as before.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #24 from Martin Nowak <code@dawg.eu> 2013-10-29 13:05:16 PDT ---
(In reply to comment #22)
> I'd like to get 2.064 release finalized. That means this regression needs to be fixed, or deferred. What do you guys think?

We can't defer it, because it has too much impact IMO. For example vibe.d uses
Runtime.args to process command line arguments. There are probably more tools
taking this approach all of which would break.
I filed the underlying issue as bug 11378 and currently work on a fix.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 29, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #25 from Walter Bright <bugzilla@digitalmars.com> 2013-10-29 13:19:10 PDT ---
(In reply to comment #24)
> I filed the underlying issue as bug 11378 and currently work on a fix.

Thank you!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #26 from github-bugzilla@puremagic.com 2013-10-30 00:13:25 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/d3c89cf1894aefa884303344a18436841eae0744 fix Issue 11149 - Runtime.args no longer available in static constructor

- This got fixed by reverting the order of initialization. - Add unittest

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11149


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2 3
Next ›   Last »