c# - Could there be an unexpected collision of MS VC runtimes? -


i have learned hard way, it's not share heap pointers between 2 dlls each depends on different ms vc runtime. fair enough. based on experience , current weird behavior of program chain being debugged ask a

question:

could lib1.dll using 1 runtime (eg. msvcrt.dll) possibly damage heap of lib2.dll using different runtime (eg. vcruntime140d.dll)? no pointers shared, pairs of malloc/free on same runtime.

background: (for ask it)

  • i have standard zeranoe ffmpeg libraries dependent on msvcrt.dll.
  • i created small c dll covering required functionality based on ffmpeg libs, let's call libvideo.dll. it's dependent on vs2015 runtime.
  • i created libvideosharp.dll managed c# wrapper library (also vs2015) libvideo.dll (marshalling).
  • i created c# test app using libvideosharp.dll (also vs2015).
  • debugging c# test app (and associated libraries in chain) experience following:
    1. libvideo.dll mallocs , inits data structure.
    2. libvideo.dll calls ffmpeg init routines (av_register_all, avformat_network_init) might malloc on own runtime.
    3. libvideo.dll's data structure corrupted (not passed ffmpeg libs in way, independent malloced block).


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -