[gstreamer-bugs] [Bug 544776] [win32] binary registry may fail if glib is using a different c runtime

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Jul 28 11:24:26 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=544776

  GStreamer | gstreamer (core) | Ver: HEAD CVS

Ole André Vadla Ravnås changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ole.andre.ravnas at tandberg.co
                   |                            |m




------- Comment #5 from Ole André Vadla Ravnås  2008-07-28 18:24 UTC -------
David: Unfortunately Windows doesn't have file descriptors as first class
citizens, so they're implemented by the C run-time and thus considered private
to it. This also applies to memory allocated by malloc(), it should always be
free()d by a caller within the same executable module (DLL). A third example is
errno, it should never be accessed across module boundaries (across different
DLLs).

The general rule of thumb is that if a library allocates a resource, it should
also be responsible for freeing that resource, and if it's a handle it's only
meaningful to the library.

Compiling the whole stack with the same C-runtime is of course the optimum
choice (footprint and performance-wise), but relying on it is a workaround and
considered very bad practice.

Some popular toolchains and their C-runtimes:
MSVS 6:    msvcrt.dll
MSVS 2003: msvcr71.dll (and/or msvcr70.dll, don't remember which)
MSVS 2005: msvcr80.dll
MSVS 2008: msvcr90.dll
mingw: depends on which version of mingw (one of msvcrt.dll and msvcr71.dll if
memory serves)

Add to this that each version of the C-runtime has at least four incompatible
versions:
Multi-threaded Debug     (static)
Multi-threaded           (static)
Multi-threaded DLL Debug (dynamic)
Multi-threaded DLL       (dynamic)

(MSVS6 had two more, for single-threaded (legacy) applications.)


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=544776.




More information about the Gstreamer-bugs mailing list