• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Crash in code linked with ld64 but not if linked with ld_classic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crash in code linked with ld64 but not if linked with ld_classic


  • Subject: Crash in code linked with ld64 but not if linked with ld_classic
  • From: Andrew Kimpton <email@hidden>
  • Date: Tue, 6 Nov 2007 22:29:08 -0500

The opensource handbrake project (http://handbrake.m0k.org) project crashes if the app is linked on Leopard/Xcode 3 with the ld64 linker :

Thread 16:
0 libSystem.B.dylib 0xffff0832 __memcpy + 146
1 org.m0k.handbrake 0x00024b12 hb_libmpeg2_decode + 577
2 org.m0k.handbrake 0x00024eab decmpeg2Work + 105
3 org.m0k.handbrake 0x00033d51 work_loop + 97 (work.c: 740)
4 org.m0k.handbrake 0x0002fc0b hb_thread_func + 80 (ports.c:288)
5 libSystem.B.dylib 0x90a22075 _pthread_start + 321
6 libSystem.B.dylib 0x90a21f32 thread_start + 34


Thread 17 Crashed:
0 org.m0k.handbrake 0x0035ad9b x264_pixel_satd_8x8_sse2 + 682


Thread 18:
0 libSystem.B.dylib 0x909f1a06 mach_wait_until + 10
1 libSystem.B.dylib 0x90a68abf nanosleep + 314
2 libSystem.B.dylib 0x90a6897f usleep + 61
3 org.m0k.handbrake 0x00033d3c work_loop + 76 (work.c: 731)
4 org.m0k.handbrake 0x0002fc0b hb_thread_func + 80 (ports.c:288)
5 libSystem.B.dylib 0x90a22075 _pthread_start + 321
6 libSystem.B.dylib 0x90a21f32 thread_start + 34


Thread 17 crashed with X86 Thread State (32-bit):
  eax: 0xb091c050  ebx: 0x00000020  ecx: 0x179d45a0  edx: 0x00000010
  edi: 0x00000008  esi: 0x179d2000  ebp: 0xb091bf50  esp: 0xb091be58
   ss: 0x0000001f  efl: 0x00010286  eip: 0x0035ad9b   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x0000001f   gs: 0x00000037
  cr2: 0xffe17ba4

(I've cut the log down considerably - Handbrake creates a lot of threads !)

The code in question originates with the VLC X264 project (libx264) and is crafted assembly code - the code is working fine if the app is built/linked with either Xcode 2.4 or Xcode 2.5

The actual link line used is :

/Developer/usr/bin/g++-4.0 -o /Development/hdhr/HandBrake/macosx/build/ HandBrake.build/UB/HandBrakeCLI.build/Objects-normal/i386/HandBrakeCLI -L.. -F.. -filelist /Development/hdhr/HandBrake/macosx/build/ HandBrake.build/UB/HandBrakeCLI.build/Objects-normal/i386/ HandBrakeCLI.LinkFileList -arch i386 -mmacosx-version-min=10.3 ../ libhb/libhb.a ../contrib/lib/libmp4v2.a ../contrib/lib/liba52.a ../ contrib/lib/libavformat.a ../contrib/lib/libavcodec.a ../contrib/lib/ libavutil.a ../contrib/lib/libdvdread.a ../contrib/lib/libdvdcss.a ../ contrib/lib/libfaac.a ../contrib/lib/libmp3lame.a ../contrib/lib/ libmpeg2.a ../contrib/lib/libvorbis.a ../contrib/lib/libvorbisenc.a ../ contrib/lib/libogg.a ../contrib/lib/libsamplerate.a ../contrib/lib/ libx264.a ../contrib/lib/libxvidcore.a -lz ../contrib/lib/libdca.a ../ contrib/lib/libmkv.a ../contrib/lib/libswscale.a -isysroot /Developer/ SDKs/MacOSX10.4u.sdk

Which doesn't seem to have anything odd at all.

As I noted the same code built with Xcode 2.5 on leopard works fine. *OR* if I change the symlinks in /Developer/usr/bin so that ld -> ld_classic and use Xcode 3 the binary works fine.

Any ideas what could be going wrong here ? The crash log is pretty unhelpful for clues, I suspect something about the way the linker sets up for calling standards ?

Thanks

Andrew 8-)



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Crash in code linked with ld64 but not if linked with ld_classic
      • From: Andrew Kimpton <email@hidden>
    • Re: Crash in code linked with ld64 but not if linked with ld_classic
      • From: Jonas Maebe <email@hidden>
  • Prev by Date: Re: Unable to install Xcode 2.5 due to missing Foundation.pm (perl module)
  • Next by Date: Re: getting NSUnknownKeyException after editing NIB with IB 3.0
  • Previous by thread: Re: (no subject)
  • Next by thread: Re: Crash in code linked with ld64 but not if linked with ld_classic
  • Index(es):
    • Date
    • Thread