How to reproduce:
1. Build the user’s attached “ExportXcode.zip” project
2. In the Xcode project go to Product > Schemes > Edit Scheme
3. Open the “Diagnostics” tab and enable the “Address Sanitizer” setting
4. Build the project and observe the result
Expected result: No errors
Actual result: “Thread 1: Deallocation of non-allocated memory” or “Mono tid_103 (1): Deallocation of non-allocated memory” error appears
Reproducible with: 2020.3.44f1, 2021.3.17f1, 2022.2.4f1, 2023.1.0b1
Reproduced on: macOS 12.4 (Intel)
Notes:
- Not reproducible if not enabling “Address Sanitizer”
- Reproducible with Mono and IL2CPP Scripting Backend
- Reproducible with all compiler configurations (debug, release, master)