[vlc-devel] commit: Fixed major crash on Snow Leopard pointed by Pierre ( Felix Paul Kühne )

Pierre d'Herbemont pdherbemont at gmail.com
Fri Sep 4 14:54:36 CEST 2009


On Sep 4, 2009, at 2:30 PM, Rafaël Carré wrote:

> On Fri, 4 Sep 2009 14:18:19 +0200
> Pierre d'Herbemont <pdherbemont at gmail.com> wrote:
>
>>
>> On Sep 4, 2009, at 1:59 PM, Rafaël Carré wrote:
>>
>>> On Fri, 4 Sep 2009 12:48:39 +0200
>>> Pierre d'Herbemont <pdherbemont at gmail.com> wrote:
>>>
>>>>
>>>> On Sep 4, 2009, at 12:32 PM, git version control wrote:
>>>>
>>>>> vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> |
>>>>> Fri Sep  4 12:32:20 2009 +0200|
>>>>> [d63c187cd8daa82e388ef54195ddc72b74795558] | committer: Felix Paul
>>>>> Kühne
>>>>>
>>>>> Fixed major crash on Snow Leopard pointed by Pierre
>>>>>
>>>>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d63c187cd8daa82e388ef54195ddc72b74795558
>>>>> ---
>>>>>
>>>>> bin/vlc.c |    3 ---
>>>>> 1 files changed, 0 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/bin/vlc.c b/bin/vlc.c
>>>>> index 94465e6..b175439 100644
>>>>> --- a/bin/vlc.c
>>>>> +++ b/bin/vlc.c
>>>>> @@ -79,9 +79,6 @@ int main( int i_argc, const char *ppsz_argv[] )
>>>>> #   ifndef NDEBUG
>>>>>   /* Activate malloc checking routines to detect heap
>>>>> corruptions. */
>>>>>   putenv( (char*)"MALLOC_CHECK_=2" );
>>>>> -#       ifdef __APPLE__
>>>>> -    putenv( (char*)"MallocErrorAbort=crash_my_baby_crash" );
>>>>> -#       endif
>>>>
>>>> For the record,
>>>>
>>>>
>>>> MallocErrorAbort=y ./VLC.app/Contents/MacOS/VLC does not crash
>>>> though.
>>>
>>> Then it should be used ?
>>
>> Well, I didn't test much, but basically if you set that flag using
>> putenv in main, the app will crash at some point, because of non
>> aligned pointer.
>
> Isn't that a bug in vlc ?

I don't think so, it arise in system library, and we can't reproduce  
it with "MallocErrorAbort=y ./VLC.app/Contents/MacOS/VLC".
>
>> I am guessing that there is some kind of initialization in malloc64
>> that needs to be done for that flag in the .init section or  
>> something.
>
> I don't understand what you say here

I am just trying to infer why we can crash malloc64 on Mac OS X with  
this flag set in main() but not if we do "MallocErrorAbort=y ./VLC.app/ 
Contents/MacOS/VLC".

That is a regression in their code. Or at the very minimum something  
that was working before that is not anymore.

>
>> So we can't use it automatically, unless we hack even more.
>
> Just thinking it was a helpful debugging tool (and only in debug  
> builds
> anyway)

It is :) It appears that can't use it on x86_64 Mac OS X that way :(

Relaunching the process with that env should work though.

Pierre.




More information about the vlc-devel mailing list