In one aspect, a data race condition is detected based on an address of a variable shared by at least first and second threads for executing the program code, the shared variable address being stored in a hardware table. Detection of the data race condition in the program code is reported. In another aspect, at least first and second threads for executing the program code are synchronized based on an address of a variable shared by the threads and stored in a hardware table.