Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.12.4, 5.13.0
-
QNX or any other POSIX shared memory
Description
Using QSharedMemory with precreated posix shared memory results in :
Attach failed 3 "QSharedMemory::handle: key is empty"
Possible reason is, that when setNativeKey is used:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qsharedmemory.cpp#n240
the key is cleared and then attach calls the handle:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qsharedmemory.cpp#n414
Which calls the makePlatformSafeKey and that returns an empty string:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qsharedmemory.cpp#n66
Which results in this error:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qsharedmemory_posix.cpp#n69