Search Issue Tracker

Fixed

Fixed in 2020.3.48f1, 2021.3.23f1, 2022.2.14f1, 2023.1.0b9, 2023.2.0a6

Votes

0

Found in

2020.3.42f1

2021.3.14f1

2022.1.23f1

2022.2.0b15

2023.1.0a19

2023.2.0a1

Issue ID

UUM-20790

Regression

No

IL2CPP returns a pointer to the stack value which points to invalid memory when generating code

--

-

How to reproduce:
1. Open the attached project
2. Build and Run (File>Build And Run)
3. Observe the outputted “Assembly-CSharp.cpp“ file, in the “il2cppOutput” folder of the Build

Expected result: IL2CPP passes the pointer through without marshalling (or dynamically allocates the returned value)
Actual result: IL2CPP allocates a stack value of BadPInvokedStruct, un-marshals the return value from the native call, and returns a pointer to the stack value

Reproducible with: 2020.3.42f1, 2021.3.14f1, 2022.1.23f1, 2022.2.0b15, 2023.1.0a19 

Reproduced on: macOS 12.5 (Intel)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.