From: Nickolay S. <sk...@bs...> - 2003-10-30 13:55:43
|
Hello, Fred ! > Sorry for the delayed response. I've been very busy lately. > I added my own simple global new and delete operators to Brad's > fb_test.cpp program. I build CS from the HEAD tree (anon CVS) -- I > verified that your "hack" was included in alloc.h and alloc.cpp. I > linked in libfbembed.so. > Indeed, the program no longer segfaults. My global new and delete > operators were called by the FB client library, but no segfaults: > five calls to "new" and four calls to "delete". The test program > successfully created the FB database. So, this one case seems to > work. Could you publish backtraces of this calls ? They should originate from initialization of STL library. If this is not the case this may cause serious problems. > If requested, I'll post the source for the modified test program, > should someone want to test other builds to see if they segfault > with or without the hack patch. Mail it to me, please. > So, you're saying MSVC allows multiple/different global delete > operators in one program? Sigh... So much for MSVC conforming to the > standard C++ "one definition rule" (ODR): > >... >> Every program shall contain exactly one definition of every >> non-inline function or object that is used in that program; no >> diagnostic required. The definition can appear explicitly in the >> program, it can be found in the standard or a user-defined library, >> or (when appropriate) it is implicitly defined (see class.ctor, >> class.dtor and class.copy). ... Microsoft violates this rule in DLL's. And I think that was one of a few wise Microsoft decisions. > If someone with a MSVC compiler wants to try the test program to > confirm there is no problem in that build, let me know and I'll send > the source code--its small. I'll probably make a look at MSVC build before backporting my changes to FB1.5. > Regards, > ---Fred P. -- Nickolay Samofatov mailto:sk...@bs... |