debugging misaligned_stack_error_

Discussion in 'Mac Programming' started by Madd the Sane, Dec 9, 2011.

  1. macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #1
    I am having an issue with PCSX-R, mainly that the 32-bit build crashes with a call to misaligned_stack_error_ when fseek is called. Is there a way to fix it so that I don't have to use -mstackrealign? I can't debug using gdb when I use it.
     
  2. thread starter macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #2
    Wirelessly posted (Mozilla/5.0 (iPod; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3)

    Okay, I figured out what was causing the issue: Apparently the i386 dynarec core that PCSX-R uses is 4-byte alligned, but Mac OS X code needs to be 16-byte alligned under i386. If it isn't, it crashes when it gets to a libSystem call.
     

Share This Page