Problems with multi-threaded code on a dual processor, 8 core multi-processor.
I am working with multi-threaded code which is designed to be a single process spawning as many threads as there are cores on the computer. This software is written in C with Visual Studio 2005 under XP Pro SP2. It sucessfully works on a dual processor Dell 380 Precision workstation. Recently I moved these codes to a Dell 690 dual processor, quad core Xeon system (8 cores.) These codes work when the number of CPUs is restricted to 1,2,3, or 4 cores. But when I try to use 5 or more cores, the codes don't work, displaying symptoms similar to lack of thread synchronization, trashing of pointer arrays to NULL values, etc.
Has anyone with this problem found a fix? Does anyone have any suggestions how to debug this situation? Is there a known limitation with XP with this software topography, or is it more likely my software?
Thank you for your time.

