Ticket #11 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

hand-rolled :darwin64-thread-state64 struct isn't mis-aligned, but should be.

Reported by: gb Owned by: gb
Priority: major Milestone:
Component: Foreign Function Interface Version: 1.1
Keywords: Cc:

Description

Apple has decided that renaming some structures dealing with thread contexts and the fields in those structures would help to ensure compatibility with some C standard or other; the names of these fields therefore depend on what header files one looks at (and what -preserve-broken-legacy-behavior options are in effect.)

Lisp code occasionally needs to poke around in these structures, and therefore defines its own set of record types with its own field names "manually".

The manual definition of :darwin-ppc-thread-state64 in ccl/level-1/ppc-trap-support.lisp has been wrong; the structure is defined with #pragma pack(4) in effect, so some 64-bit fields that should be misaligned are actually (and incorrectly) naturally aligned.

One consequence of this is that backtrace doesn't work on darwinppc64 in some contexts, e.g., after a keyboard interrupt. There may be other consequences, as well.

Change History

comment:1 Changed 8 years ago by gb

  • Status changed from new to assigned
  • Summary changed from hand-rolled :darwin64-thread-state struct isn't mis-aligned, but should be. to hand-rolled :darwin64-thread-state64 struct isn't mis-aligned, but should be.

comment:2 Changed 8 years ago by gb

  • Status changed from assigned to closed
  • Resolution set to fixed

This was fixed in 070512.

Note: See TracTickets for help on using tickets.