added dwarf 2 debug flag
Fixed some memory races and opencl calling from one thread