Skip to content

Add patch for arm64 Ubuntu 22.04 in `UnwindContext`

Maxwell Pirtle requested to merge maxwellpirtle/simgrid:arm-patch into master

The mcontext_t struct on Ubuntu 22.04 running on arm64 does not contain the fregs field. This causes a compilation failure on arm64 Linux in src/mc/inspect/mc_unw.cpp since the code assumes the field exists. This commit adds a new CMake variable SIMGRID_PROCESSOR_arm64 to account for the additional architecture more explicitly and removes the attempt to clear the fregs field for arm64 Linux. A sample of the relevant header on arm64 Linux containing mcontext_t can be found through the link provided.

I am unfamiliar with this portion of SimGrid, so there may be broader implications and/or additional changes that would need to be made to fully support ARM64. This is the only portion that causes a compilation failure, but that is not necessarily equivalent to the desired behavior at runtime. In particular, the unsigned char __reserved[4096] __attribute__ ((__aligned__ (16))) field of mcontext_t appears to contain roughly the information stored in fpregs, and may be a starting point for verifying the change.

Merge request reports