QSharedMemoryPrivate::create(int size) on $QTDIR/src/corelib/kernel/qsharedmemory_win.cpp (Qt4.8.3)
handles wrong return value if sharedmem already exists:
This code does not work right because QLatin1String("QSharedMemory::create") and creating a Qstring when passing
argument to setErrorString calls malloc() which resets GetLastError(), so setErrorString() does not set
error to the GetLastError() of CreateFileMapping() but of malloc. This used to work in 4.7.3 as there the
code did not make the QLatin1String inplace but at the top of the function. The caller
thinks the shared memory was created by him, even if it already exists and reinits the memory.
make a second parameter to setErrorString() as DWORD LastError and every call is made as