[omniORB] NT shared libraries and omni::empty_string in omniORB3 snapshot dated 1-Feb-2000

Terry A. Lee terryl@wt.net
Tue, 1 Feb 2000 19:31:19 -0600


The current setup of the static pointer initialised with ""
in omni:: does not work correctly with NT shared libraries.

The actual address placed in char *empty_string is a
location in the DLL jump table, not the actual address
that points to "" (which is inside the DLL). Not surprisingly
using it as a pointer to char causes an Access Violation:

166:    inline _CORBA_String_member()
00403AE0   push        ebp
00403AE1   mov         ebp,esp
00403AE3   push        ecx
00403AE4   mov         dword ptr [ebp-4],ecx
00403AE7   mov         eax,dword ptr [this]
00403AEA   mov         ecx,dword ptr [omni::empty_string(0x0042cc7a)]
00403AF0   mov         dword ptr [eax],ecx
...
0042CC7A   jmp dword ptr [__imp_?empty_string@omni@@2QBDB] 

Terry Lee
Paradigm Geophysical