[Sumover-dev] Re: [Media Tools] #183: VIC H.264 crashing on startup
in avcodec.dll
Media Tools
SUMOVER-dev at cs.ucl.ac.uk
Sun Jan 25 23:52:05 GMT 2009
#183: VIC H.264 crashing on startup in avcodec.dll
---------------------+------------------------------------------------------
Reporter: piers | Owner: piers
Type: defect | Status: closed
Priority: major | Milestone:
Component: vic | Version: 2.8ucl-1.4.0
Resolution: fixed | Keywords:
---------------------+------------------------------------------------------
Old description:
> VIC was crashing on startup in __gcc_register_frame() - having been
> called by__do_global_ctors () and by DllMainCRTStartup at 12 () when the dll
> is loaded. Had to debug in gdb - after tracking the original crash in
> from Visual C++ but since VC++ can't read the debug info generated by
> mingw I ran it in mingw gdb. It seems that gdb can use the symbol
> information from VC++ (which setup in VC++ using the Microsoft symbol
> server: http://msdl.microsoft.com/download/symbols)
>
> It turns out the problem was the same as [http://www.nabble.com/Bad-DLL-
> relocation---reproducible-w--test-case-tt18292380.html#a18292380 this
> project] was having:
> "The problem is that DLLs generated by MingW GCC (with -shared) are not
> correctly relocatable, even though they contain relocation information.
> LoadLibrary() returns ERROR_NOACCESS if it is forced to relocate the DLL
> and a backtrace shows a blind jump into bad memory from
> __gcc_register_frame. "
>
> "* The crash is caused by the weak reference __register_frame_info being
> given an out-of-segment pointer (0x9dae0000) in the relocated DLL. I
> presume fixup has gone wrong?
>
> * This is not an issue with GCC 4.2.1-SJLJ, likely due to the SJLJ
> unwind model, which uses different code in __gcc_register_frame.
> However, I was unable to find the 4.2.1-DW2 package to confirm this. "
>
> This avcodec.dll library had been compiled with mingw gcc-4.3.0-alpha -
> It was fixed by compiling it with GCC 4.2.1-SJLJ.
New description:
VIC was crashing on startup in !__gcc_register_frame() - having been
called by !__do_global_ctors () and by DllMainCRTStartup at 12 () when the
dll is loaded. Had to debug in gdb - after tracking the original crash in
from Visual C++ but since VC++ can't read the debug info generated by
mingw I ran it in mingw gdb. It seems that gdb can use the symbol
information from VC++ (which setup in VC++ using the Microsoft symbol
server: http://msdl.microsoft.com/download/symbols)
It turns out the problem was the same as [http://www.nabble.com/Bad-DLL-
relocation---reproducible-w--test-case-tt18292380.html#a18292380 this
project] was having:
The problem is that DLLs generated by MingW GCC (with -shared) are not
correctly relocatable, even though they contain relocation information.
LoadLibrary() returns ERROR_NOACCESS if it is forced to relocate the DLL
and a backtrace shows a blind jump into bad memory from
!__gcc_register_frame.
* The crash is caused by the weak reference !__register_frame_info
being given an out-of-segment pointer (0x9dae0000) in the relocated DLL. I
presume fixup has gone wrong?
* This is not an issue with GCC 4.2.1-SJLJ, likely due to the SJLJ
unwind model, which uses different code in !__gcc_register_frame. However,
I was unable to find the 4.2.1-DW2 package to confirm this.
VIC's avcodec.dll library had been compiled with mingw gcc-4.3.0-alpha -
It was fixed by compiling it with GCC 4.2.1-SJLJ.
--
Ticket URL: <https://frostie.cs.ucl.ac.uk/nets/mmedia/ticket/183>
Media Tools <http://mediatools.cs.ucl.ac.uk/>
Media Tools
More information about the Sumover-dev
mailing list