[MacPorts] #63062: cdrtools @3.01_1: build error Apple Silicon

MacPorts noreply at macports.org
Tue Jan 11 17:04:26 UTC 2022


#63062: cdrtools @3.01_1: build error Apple Silicon
-----------------------+--------------------------
  Reporter:  pinodim   |      Owner:  markmentovai
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:  fixed     |   Keywords:  arm64
      Port:  cdrtools  |
-----------------------+--------------------------
Changes (by markmentovai):

 * owner:  (none) => markmentovai
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"656932616eebe60f4e8cfd96d8268801dad8224d/macports-ports"
 656932616eebe60f4e8cfd96d8268801dad8224d/macports-ports] (master):
 {{{
 #!ConfigurableCommitTicketReference repository="macports-ports"
 revision="656932616eebe60f4e8cfd96d8268801dad8224d"
 cdrtools: fix arm64 build by explicitly disabling stack scanning

 avoffset, a helper program run during the cdrtools build, was crashing
 on arm64 when built with optimization, with EXC_BREAKPOINT (SIGTRAP),
 triggered by a brk instruction inserted by the compiler in a code path
 that was provably attempting to dereference a null pointer. Under the
 same conditions on x86_64, the compiler inserted a ud2 instruction
 resulting in EXC_BAD_INSTRUCTION (SIGILL). On either architecture, when
 not under optimization, the null pointer dereference resulted in
 EXC_BAD_ACCESS (SIGSEGV). avoffset has signal handlers for both SIGILL
 and SIGSEGV, and recovered "gracefully" by configuring the build to
 disable stack scanning and exiting cleanly. Without a SIGTRAP handler,
 the avoffset crash results in a failed build on arm64 under
 optimization.

 It would be easy to add a SIGTRAP handler, but a more direct approach is
 to explicitly disable stack scanning by defining NO_SCANSTACK during the
 build. The stack scanning concept and implementation are both
 ill-advised, and none of it was working on any architecture or any build
 configuration on macOS anyway. Even with avoffset "working" (not
 crashing), all it did on macOS was detect the failure and disable stack
 scanning for the rest of the build.

 Closes: https://trac.macports.org/ticket/63062
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/63062#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list