jrprice / Oclgrind

An OpenCL device simulator and debugger
Other
346 stars 61 forks source link

global pointer with non-global pointer comparison crashes #143

Closed daniel-starke closed 6 years ago

daniel-starke commented 7 years ago

Using 16.10 I workaround the missing NULL define with the following macro: #define NULL ((void *)0) Comparing a global pointer with this resulted in a crash. Comparing the global pointer with just 0 worked.

jrprice commented 7 years ago

Thanks for the report - I can reproduce this with 16.10, and also with the latest Oclgrind sources using LLVM 3.9 or 4.0.0. This seems to be the result of a bug in LLVM, which is fixed in 4.0.1 and 5.0.

jrprice commented 6 years ago

Oclgrind 18.3 has been released and binaries are built with LLVM 6.0, so this bug should be fixed: https://github.com/jrprice/Oclgrind/releases