Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mixing different versions of CRT lib in one process

0 views
Skip to first unread message

Xiaoguo Ge

unread,
Sep 30, 2009, 3:06:22 AM9/30/09
to
My component as a DLL is sharing a process with many other dll components.
All these components are built with VC6 and linked to VC6 crt dynamically.
Because of performance reasons, the vendor of some of the dlls I am
referencing requested to build their dlls with VS2008. I agreed, thinking
that those vender dlls are only referenced by me and Ie do not share any CRT
objects with them(I do pass heap buffers to the dlls, but they will make
their own copies and will not free my memory). But after the newly built dlls
are integrated, crt calls(free()) are failing all over the place with access
violation . The failures occur mostly in other components I am not
responsible for and do not have source code of. This seems to be a heap
corruption problem.
I know there are a lot of documents warn against mixing crt versions. But
this is still strange to me. The two CRTs should be totally isolated to each
other. Can anybody give a hint on why this happens?

David Lowndes

unread,
Sep 30, 2009, 3:34:04 AM9/30/09
to
>But after the newly built dlls
>are integrated, crt calls(free()) are failing all over the place with access
>violation .

What's the usage of that pointer been - has it been passed to other
components? i.e. are you 100% sure that the other DLLs aren't
allocating or reallocating the memory using their heap manager?

What happens if you rebuild your component with VC6 using statically
linked run-time libraries. Does that exhibit similar issues as the
VC2008 built one?

Dave

0 new messages