Skip to content

Conversation

@timtuxworth
Copy link
Contributor

@timtuxworth timtuxworth commented Dec 17, 2025

adding -ftrapping-math causes SITL to crash on startup on my M1 Mac running Tahoe 26.1. Reverting #31346

The crash is an Abort Trap: 6 SIGABRT throwing EXC_BAD_ACCESS at

for (uint16_t i=0; i<_num_types;i++) {
due to _num_types not being initialized.

which is called from here

const struct LogStructure *s = _front.structure_for_msg_type(type);

where _front is null at the time it is called.

This is the dump of what happens when it runs

+ /Users/tim/ardupilot/master/build/sitl/bin/arduplane --speedup 1 --instance 1 --home -35.36274643,149.16513199,585,353.8 --model plane --serial0 mcast: --defaults /Users/tim/ardupilot/master/Tools/autotest/models/plane.parm
Setting SIM_SPEEDUP=1.000000
Home: -35.362746 149.165132 alt=585.000000m hdg=353.799988
Starting sketch 'ArduPlane'
Starting SITL input
Using Irlock at port : 9015
UDP multicast connection 239.255.145.50:14550
Loaded defaults from /Users/tim/ardupilot/master/Tools/autotest/models/plane.parm
bind port 5772 for SERIAL1
SERIAL1 on TCP port 5772
bind port 5773 for SERIAL2
SERIAL2 on TCP port 5773
Smoothing reset at 0.001
validate_structures:538: Validating structures
ERROR: segmentation fault - aborting
Running: sh dumpstack.sh 41356 >dumpstack.sh_nknown.41356.out 2>&1
Failed
Running: sh dumpcore.sh 41356 >dumpcore.sh_nknown.41356.out 2>&1
Failed
/Users/tim/.local/bin/dual_plane1.sh: line 40: 41356 Abort trap: 6           $PLANE --speedup 1 --instance 1 --home $LOC1 --model plane --serial0 $SERIAL0 --defaults $PLANE_DEFAULTS
[2025-12-16-22:15 /Users/tim/ardupilot/master (scripted-oa)]$

This is what it looks like in VSCode

Screenshot 2025-12-16 at 10 19 07 PM

Copy link
Contributor

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should bring this in given that it looks like we didn't test the original PR on mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants