AOTIR: Deleting the RAData inappropriately
Open
- Dominant language
- C++
- Stars
- 8k
- Forks
- 351
- Avg merge
- 12h 31m
- Merged PRs (30d)
- 102
Description
https://github.com/FEX-Emu/FEX/blob/42a632093545d0bf74bb1d87e285e58fa18d0aef/External/FEXCore/Source/Interface/IR/AOTIR.cpp#L353
This is allocated using using FEXCore::Allocator::malloc, then it tries to get freed with C++ delete.
https://github.com/FEX-Emu/FEX/blob/42a632093545d0bf74bb1d87e285e58fa18d0aef/External/FEXCore/Source/Interface/IR/Passes/RegisterAllocationPass.cpp#L156
This is why when allocating it we have it in a unique_ptr with a custom deleter, but the code is just wrong here.
`std::unique_ptr AllocData;`
This causes LLVM asan to just immediately barf.
Contributor guide
Assessment
This issue has not been assessed yet.