xlc - static constructed/destructed twice

G

goran.pusic

Hi,

I have this code where, when built with xlc for aix on ppc, I see a static initialized twice (I checked through a debugger, I am hitting ctor/dtor twice with the same value of "this").

Code in question is in an *.o, linked in several *.so and into my exe. I expect to see either multiple initialization on different addresses, either only one.

Same code, built with gcc on linux, seems to work ok (didn't see a problem, so didn't debug, will do so tomorrow).

Eh?

Am I blind/dumb/..., or what am i missing?

Any idea?

TIA,

Goran.
 
V

Victor Bazarov

I have this code where, when built with xlc for aix on ppc, I see a static initialized twice (I checked through a debugger, I am hitting ctor/dtor twice with the same value of "this").

Code in question is in an *.o, linked in several *.so and into my exe. I expect to see either multiple initialization on different addresses, either only one.

Same code, built with gcc on linux, seems to work ok (didn't see a problem, so didn't debug, will do so tomorrow).

Eh?

Am I blind/dumb/..., or what am i missing?

Any idea?

By your own description it seems specific to tools/environment. You
would find more help in a newsgroup where your toolset or your
environment (OS, runtime) is discussed.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top