Skip to content

Conversation

@Koios
Copy link

@Koios Koios commented Mar 27, 2013

Windows support has been broken due to introduction of some additional POSIX headers, multithreading and block file support. Only some small changes have been necessary to restore it.

  • number of processors fetched for WIN32 using pthread_num_processors_np() (pthreads-w32 extension?)
  • moved block file support to non-WIN32 conditional inclusion section
  • conditional includes for some POSIX headers

Robert Schneider added 3 commits March 27, 2013 16:30
- number of processors fetched using `pthread_num_processors_np()` (pthreads-w32 extension?)
- moved block file support to non-WIN32 conditional inclusion section
- conditional includes for some POSIX headers
The actual stack overflow observed occurred in debug mode, with a test file
that consists of a repeated pattern.

The binary tree dtor used in verificationhashtable.h recursively deletes nodes.
Each node deletes its left and right child (fine) and the next node with same
crc & hash.
But the `same` nodes are not stored in a tree (with log(n) depth) but in a
linked list. Therefore, deleting them recursively can lead to a stack overflow
(if there are many of them).

The fix replaces the recurrence of deletion of `same` nodes by a loop.
Left and right child nodes are still deleted using recurrence.

This is rather a quick-and-dirty fix, as I don't really know how the tree
itself is used from the outside (what's the owner concept? not clear).
The property sheet allows quick adjustment of the pthreads path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant