[vlc-devel] [PATCH] Fix for crashes in several modules when running VLC on osx 10.6
funman at videolan.org
Mon Oct 28 08:21:28 CET 2013
Le 28/10/2013 07:56, David Fuhrmann a écrit :
> Am 28.10.2013 um 06:40 schrieb Rafaël Carré <funman at videolan.org>:
>> Le 27/10/2013 18:51, David Fuhrmann a écrit :
>>> Am 27.10.2013 um 18:33 schrieb Rémi Denis-Courmont
>>> <remi at remlab.net>:
>>>> Le dimanche 27 octobre 2013 18:02:19 David Fuhrmann a écrit
>>>>> Since VLC 2.1, we noticed several crashes in different
>>>>> modules running on osx 10.6, if we compile the binary on
>>>>> osx 10.7 or later.
>>>> I don't know how the MacOS toolchain is designed.
>>>> But in general, the toolchain must be configured with the
>>>> *oldest* supported OS version to provide binary compatiblity.
>>>> At least, that is how it works on Windows (through
>>>> _WIN32_WINNT) and on all ELF-based platforms (through custom
>>>> build roots).
>>> Mac OS officially supports building on newer versions with
>>> newer osx SDKs, by giving a minimal version for osx which is
>>> supported at runtime.
>>>>> As we have several features only working on 10.7 onwards,
>>>>> we need to compile the release binary on these newer
>>>>> versions. For 10.6, these features are deactivated.
>>>> Well, hmm, your "problems" very strongly suggest that you
>>>> failed to deactivate those "features". I think you answered
>>>> your own question.
>>> These features are lion fullscreen and better window resizing,
>>> concerning the interface module. Additionally, there is an
>>> AVFoundation module only running on 10.7 onwards.
>>> All of these features have absolutely _nothing_ to do with the
>>> crashes we are experiencing. (Especially, the interface runs
>>> fine on all platforms. Crashes are only happening in
>>> completely unrelated and osx unspecific modules.)
>> Can you share backtraces of these crashes?
> The backtraces are not really helpful. For example, from various
> tickets see:
> It somehow looks like the integration of only the used functions
> from compat either does not work at all on osx, or it somehow
> interfers with the functions implemented in the standard libraries.
> For me it looks like they are not copied into the modules, and on
> osx 10.7 or later the system implementation is used.
> j-b wrote that the concering functions are probably getdelim,
> strndup and strnlen.
If you build on 10.7 it will detect these functions as available and
not build replacements.
I am not sure why reverting this commit would fix the crashes though.
To let configure think those are not available you can use:
But then you will have double prototypes when building: one in OSX
headers and another one in vlc/include/vlc_fixups.h because vlc thinks
the prototype is not available in OSX.
If you are lucky the prototypes will match, but they could very well
be declared differently or #defined to something else like #define
strnlen(foo) strnlen_secure(foo, bar)
Well give it a try and see how it goes
23 0 ??? 000000000000000000 0 + 0
24 1 libsubsdec_plugin.dylib 0x0000000102cf1672 HtmlPut + 34
This backtrace indeeds seems to be 'strnlen' missing.
24 0 ??? 000000000000000000 0 + 0
25 1 libmp4_plugin.dylib 0x000000011696b3d7
MP4_BoxGet_Internal + 167
Could be strndup
23 0 libSystem.B.dylib 0x00007fff871ab2ea
__getdirentries64 + 10
24 1 libSystem.B.dylib 0x00007fff871ab278
_readdir_unlocked$INODE64 + 79
No idea here :D
More information about the vlc-devel