Xcode 1.5 and zerolink resulting in EXC_BAD_ACCESS

  • Hi there,

    I have a program using Objective C and C++ with multiple pthreads. I'm
    often getting an EXC_BAD_ACCESS when launching via the debugger. My
    session tells me that I've got a number of threads started and that
    their traces go something like this:

    Thread 1:
    #0    0x8fe26b08 in __dyld_syscall_thread_switch
    #1    0x8fe16004 in __dyld_yield
    #2    0x8fe15d60 in __dyld_set_lock
    #3    0x8fe0a39c in __dyld_check_and_report_undefineds
    #4    0x8fe11690 in __dyld_link_in_need_modules
    #5    0x8fe1124c in __dyld_bind_lazy_symbol_reference
    #6    0x8fe01340 in __dyld_stub_binding_helper_interface

    Thread 4:
    #0    0x8fe26b08 in __dyld_syscall_thread_switch
    #1    0x8fe16004 in __dyld_yield
    #2    0x8fe15d60 in __dyld_set_lock
    #3    0x8fe13278 in __dyld__dyld_link_module
    #4    0x9003f4a8 in NSLinkModule
    #5    0x7fdf0c00 in findSymbolInSet
    #6    0x7fdf0c84 in undefinedHandler
    #7    0x8fe0a398 in __dyld_check_and_report_undefineds
    #8    0x8fe11690 in __dyld_link_in_need_modules
    #9    0x8fe1124c in __dyld_bind_lazy_symbol_reference
    #10    0x8fe01340 in __dyld_stub_binding_helper_interface

    Thread 5:
    #0    0x8fe0cc10 in __dyld_link_library_module
    #1    0x8fe0c6ac in __dyld_resolve_undefineds
    #2    0x8fe115b8 in __dyld_link_in_need_modules
    #3    0x8fe1124c in __dyld_bind_lazy_symbol_reference
    #4    0x8fe01340 in __dyld_stub_binding_helper_interface

    If I turn the zerolink option off then I don't get the EXC_BAD_ACCESS.
    If I simply run the application (i.e. without the debugger) all appears
    well, but I suspect that this could just be a race condition style
    situation.

    The above stack traces are not the same every time... and sometimes I
    even get a SIGABRT instead...

    Any ideas on why I'm getting a EXC_BAD_ACCESS when debugging with
    multiple threads running and zerolink? Is zerolink something to be
    avoided with multiple threads?

    Cheers,
    -C

    _______________________________________________
    MacOSX-dev mailing list
    <MacOSX-dev...>
    http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • On 25 Aug 2004, at 02:15, Christopher Hunt wrote:

    > Any ideas on why I'm getting a EXC_BAD_ACCESS when debugging with
    > multiple threads running and zerolink? Is zerolink something to be
    > avoided with multiple threads?

    I've done all my thread coding with CodeWarrior and normal linking, but
    my first guess is that you have a threading error. All ZeroLink may do
    is change the timing of things and expose the bug faster.

    David Dunham        Macintosh Game Developer        GameHouse Studios
    <david...>    206 442 5881 x22    http://www.gamehouse.com

    _______________________________________________
    MacOSX-dev mailing list
    <MacOSX-dev...>
    http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • On 26/08/2004, at 5:36 PM, <macosx-dev-request...> wrote:

    > Any ideas on why I'm getting a EXC_BAD_ACCESS when debugging with
    >> multiple threads running and zerolink? Is zerolink something to be
    >> avoided with multiple threads?
    >
    > I've done all my thread coding with CodeWarrior and normal linking, but
    > my first guess is that you have a threading error. All ZeroLink may do
    > is change the timing of things and expose the bug faster.
    Actually having visited the Xcode users forum, I noticed that libstdc++
    isn't compatible with zerolink. Apparently there are many things
    declared as _private_extern_ which is something zerolink doesn't
    tolerate.

    So, the rule seems to be, if you're using C++ don't use zerolink.

    Cheers,
    -C

    _______________________________________________
    MacOSX-dev mailing list
    <MacOSX-dev...>
    http://www.omnigroup.com/mailman/listinfo/macosx-dev
previous month august 2004 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today
MindNode
MindNode offered a free license !