Data race detection method and device for parallel programs and multi-core processing system

The invention provides a data race detection method and device for parallel programs and a multi-core processing system. The method includes calling one CPU core of a multi-core CPU to execute commands for parallel programs; recording latch access information, namely recording latch access information of a current command of the CPU core; recording memory access information, namely recording memory access information of the current command of the CPU core; judging a data race, namely judging whether two conflicting commands engage in the data race or not according to the latch access information recorded in the latch access information recording step and the memory access information recorded in the memory access information recording step. The data race detection method and device for parallel grams and the multi-core processing system have the advantages that the potential data race of the parallel programs can be detected quickly, accurately and effectively, accuracy of the parallel programs is guaranteed, and breakthroughs are made for better debugging and testing.