LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Guard the memory allocated by DSNewHandle()

I recently found a bug in a DLL called by LabVIEW. This DLL allocates a memory block with DSNewHandle() and accidently overflows it. As a result LabVIEW crashes randomly and sometimes reports an error in MemoryManager.cpp. The error message is confusing and hard to locate the root cause.

 

If LabVIEW could add some guard around the allocated memory block and reports "Memory Overflow Detected!" when the guard is corrupt, I believe that can save developers like me a lot of time.

 

0 Kudos
Message 1 of 2
(2,387 Views)

Hi Clark,

 

how should LabVIEW even know of this memory allocation when it is only handled by your DLL?

The DLL is responsible for its own memory allocations and has to avoid any memory leaks / overflows / corruption…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,372 Views)