Ignore memory free faults if running on apple.

There's a case in MoltenVK initialization where overloading operator new
and operator delete works for std::string destruction, but not
construction.
This commit is contained in:
Bartosz Taudul 2019-06-13 14:15:17 +02:00
parent ab4e99229d
commit 31a4a45b14
2 changed files with 3 additions and 1 deletions

View File

@ -1831,6 +1831,7 @@ void Worker::Exec()
m_onDemand = welcome.onDemand;
m_captureProgram = welcome.programName;
m_captureTime = welcome.epoch;
m_ignoreMemFreeFaults = welcome.onDemand || welcome.isApple;
char dtmp[64];
time_t date = welcome.epoch;
@ -3513,7 +3514,7 @@ bool Worker::ProcessMemFree( const QueueMemFree& ev )
auto it = m_data.memory.active.find( ev.ptr );
if( it == m_data.memory.active.end() )
{
if( !m_onDemand )
if( !m_ignoreMemFreeFaults )
{
MemFreeFailure( ev.thread );
}

View File

@ -498,6 +498,7 @@ private:
char* m_buffer;
int m_bufferOffset;
bool m_onDemand;
bool m_ignoreMemFreeFaults;
GpuCtxData* m_gpuCtxMap[256];
flat_hash_map<uint64_t, StringLocation, nohash<uint64_t>> m_pendingCustomStrings;