[ofw] running ibnetdisc with the debugger attached
Tzachi Dar
tzachid at mellanox.co.il
Thu Aug 26 14:37:49 PDT 2010
Although running without debugger seems to be ok, we have found the following issues while running with the debugger:
Both issues in the file wm_provider.cpp
m_OverlapWrite.hEvent is being closed twice.
CWMProvider::~CWMProvider()
{
if (m_OverlapRead.hEvent != NULL) {
CloseHandle(m_OverlapWrite.hEvent);
}
if (m_OverlapWrite.hEvent != NULL) {
CloseHandle(m_OverlapWrite.hEvent);
}
Writefile is not being used according to the docs. Should be something like:
m_OverlapWrite.Offset = 0;
m_OverlapWrite.OffsetHigh = 0;
EnterCriticalSection(&m_CritSecWrite);
ret = WriteFile(m_hFile, pMad, bytes, &bytes, &m_OverlapWrite);
if (ret==0) {
if(GetLastError() == ERROR_IO_PENDING) {
hr = GetOverlappedResult(&m_OverlapWrite, &bytes, TRUE);
} else {
Print()
hr = ???
}
The same is probably true for ReadFile.
What do you think?
Tzachi & Irena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100827/bf6223d8/attachment.html>
More information about the ofw
mailing list