Search Issue Tracker
Fixed
Fixed in 2024.1.0a1
Votes
0
Found in
2023.1.4f1
2023.1.5f1
2023.1.6f1
2023.2.0b1
2023.2.0b2
2023.3.0a3
Issue ID
UUM-44691
Regression
Yes
[IL2CPP][OSX] Incorrect IL2CPP codegen triggered by pointer magic
After an update of the macOS base Bokken image, we started seeing a [failing test in one of our CI jobs|https://unity-ci.cds.internal.unity3d.com/job/27067890/logs/execution].
Basically it is [a test|https://github.cds.internal.unity3d.com/unity/burst/blob/724b2bff34f114d306dbb87e166d4756c9639c52/src/Burst.Compiler.IL.Tests/Shared/090-Vectors-Maths.cs#L133] that compares the results of a method compiled with IL2CPP and Burst, respectively. The issue appears to be very similar to this BUR-1860, but this time it happens on macOS.
I have been able to repro the issue locally on my M1 Mac with the attached `Repro.cs` (extracted from the test):
Running it with mono, we get:
$ csc -unsafe Repro.cs
$ mono Repro.exe
Result = 19893.5
This is the expected output. However, with {{il2cpp}} we get:
$ ../il2cpp/il2exe/bin/Release/net7.0/il2exe --executable=Repro.exe
$ Repro_native/Repro
Result = 5
Oddly enough, when compiling with {{Debug}} configuration:
$ ../il2cpp/il2exe/bin/Release/net7.0/il2exe --executable=Repro.exe --configuration=Debug
we get this:
$ Repro_native/Repro
Result = 19855
which is a bit closer to the correct result, but still not correct.
The issue is also reproducible on Intel Macs (with different results).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- TextMeshPro package throws multiple Shader errors when importing TMP Essential Resources
- Package Manager search text field has no validation and leads to Editor freezes
- PlayerLoop.SetPlayerLoop() function is ignored when playing game in Player
- Lighting data is carried over from one Scene to another when changing Scenes in the Play Mode
- The <sprite> tag inserted image from a Sprite Asset into the UI Builder Button disappears when the Inlined Style Text Shadow Horizontal or Vertical Offset is set to be more than 0 px
Add comment