I had enabled unaligned support both on boot asm code and in /proc/cpu/alignment, and i was still getting a SIGBUS, no idea why. But, this was under armhf, since there was no 64 bit kernel avalible at the time, i never actually tested it under AArch64. ARM64 makes any difference here?
Because i was getting a SIGBUS trying a game on a RPI, since ive been playing this game since i was a kid and it is open source i took it upon myself to find the cause and fix it, i did just that and i moved on.
But if you insist, this is one of the functions were the game was crashing.
C++:
bool mc_check_sldc(int offset)
{
if (offset > Mc_pm->sldc_size-5) //no way is this big enough
return false;
char *type_p = (char *)(Mc_pm->shield_collision_tree+offset);
// split and polygons
vec3d *minbox_p = (vec3d*)(Mc_pm->shield_collision_tree+offset+5);
vec3d *maxbox_p = (vec3d*)(Mc_pm->shield_collision_tree+offset+17);
// split
unsigned int *front_offset_p = (unsigned int*)(Mc_pm->shield_collision_tree+offset+29);
unsigned int *back_offset_p = (unsigned int*)(Mc_pm->shield_collision_tree+offset+33);
// polygons
unsigned int *num_polygons_p = (unsigned int*)(Mc_pm->shield_collision_tree+offset+29);
unsigned int *shld_polys = (unsigned int*)(Mc_pm->shield_collision_tree+offset+33);
// see if it fits inside our bbox
if (!mc_ray_boundingbox( minbox_p, maxbox_p, &Mc_p0, &Mc_direction, NULL )) {
return false;
}
if (*type_p == 0) // SPLIT
{
return mc_check_sldc(offset+*front_offset_p) || mc_check_sldc(offset+*back_offset_p);
}
else
{
// poly list
shield_tri * tri;
for (unsigned int i = 0; i < *num_polygons_p; i++)
{
tri = &Mc_pm->shield.tris[shld_polys[i]];
mc_shield_check_common(tri);
} // for (unsigned int i = 0; i < leaf->num_polygons; i++)
}
// shouldn't be reached
return false;
}
But not sure were you are trying to get to, i was not seeing illusions, that was happening.