llvm-project
dad86f59 - [ORC] MapperJITLinkMemoryManager should deinitialize on abandon, not deallocate.

Commit
273 days ago
[ORC] MapperJITLinkMemoryManager should deinitialize on abandon, not deallocate. The JITLinkMemoryManager::InFlightAlloc::abandon method should only abandon memory for the current allocation, not any other allocations. In MapperJITLinkMemoryManager this corresponds to the deinitialize operation, not the deallocate operation (which releases whole slabs of memory that may be shared by many allocations). No testcase: This was spotted by inspection. The failing program was linking concurrently when one linker instance raised an error. Through the call to abandon an entire underlying slab was deallocated, resulting in segfaults in other concurrent links that were sharing that slab.
Author
Lang Hames
Committer
Lang Hames
Parents
Loading