[parsec-users] freqmine runtime error in due to bug & bug fix found

Natalia Hering hering.natalia at gmail.com
Mon Oct 14 11:47:16 EDT 2013


Hi all,

while moving the freqmine application to Visual Studio I got an error due
to a pointer that was not initialized.
One of the elements of the MapFileNode class is the MapFileNode *next.
However, this pointer is not initialized in NULL when we first allocate a
node of type MapFileNode and it remains bad ptr.
When VS in runtime  the comparisson of bad ptr with !null will succeed and
it will try to access the elements of the current node(pad prt), even if
that does not exist in the reality.

For instance in fp_tree.cpp > database_tiling > last parallel loop >
current_mapfilenode = current_mapfilenode -> next would move the
current_mapfilenode to the pad ptr and then in the VS execution it would
still continue in the while loop. If we had null instead, it would not
continue in the while loop.

Bug fix: in data.cpp > MapFileNode::init > add one line
next = NULL;

Hope it helps anybody who may have similar issue.

BR,
Natalia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20131014/10e86c47/attachment.html>


More information about the parsec-users mailing list