[RTEMS Project] #4892: MacOS tools build failures on Ventura and M series processors

RTEMS trac trac at rtems.org
Tue Apr 4 23:16:43 UTC 2023

#4892: MacOS tools build failures on Ventura and M series processors
 Reporter:  Chris Johns  |       Owner:  Chris Johns
     Type:  defect       |      Status:  assigned
 Priority:  normal       |   Milestone:  6.1
Component:  tool/rsb     |     Version:  6
 Severity:  normal       |  Resolution:
 Keywords:               |  Blocked By:
 Blocking:               |

Comment (by Chris Johns):

 I have found a suitable work around for MacOS `arm64` that stops the
 crashes. I tracked issue to GMP and the assembler accelerators it has for
 `aarch64`. That code seems to access memory outside the area allocated and
 MacOS 13.2/13.3 detects this on `arm64`. The crash depends on where the
 `alloc` call allocates memory in relation to the stack guard.

 I ised the simple patch attached to `toplev.cc` to stop GCC catching the
 seg fault signal. This lets MacOS capture the fault and generate a useful
 crash report.

 After a crash I changed directory to the GCC build of MPFR and ran `make
 check`. The results failed as shown in comment:10.

 Testing of builds of MPFR showed the issue in GMP and inspecting GMP
 `configure --help` showed `--disable-assemble`. Using this option results
 in the MPFR tests passing. I updated the GMP build to add this option on
 MacOS `arm64`.

 This exposed a second issue. GCC was building GMP internally as the source
 was linked into the top level of GCC's sources. GMP is now built as a
 package because GDB also requires GMP. There is no point building it
 twice. Removing the GMP sources from the GCC build let GCC pick up the GMP
 package built and staged earlier in the build set with the work around
 configure option.

 No bug report has been raised with the GMP or MPFR projects. If someone
 feels like doing that please do.

Ticket URL: <http://devel.rtems.org/ticket/4892#comment:11>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list