[Issue 3453] Linking order affects proper execution

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 1 07:00:18 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3453



--- Comment #1 from Michel Fortin <michel.fortin at michelf.com> 2010-01-01 10:00:16 EST ---
Created an attachment (id=540)
Simplified test case checking for uncalled static this.

Saw the same problem on Mac OS X 10.6.2. It looks like it's a static
initializer problem: when the module with the main function is linked first
static initializers are called, otherwise they aren't. The standard output
stream isn't initialized correctly, causing an enforcement error to be thrown,
but for some reason (perhaps the same reason) when this happens nothing is
thrown and the program continues normally after 'throw' until it dereferences a
null pointer.

Attached is a new simplified test case, which doesn't use std.stdio and isolate
better the uncalled static initializer problem.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list