[Beignet] [PATCH] fix crash when OCL_STRICT_CONFORMANCE is unset

Guo Yejun yejun.guo at intel.com
Mon Jun 23 13:14:21 PDT 2014


Signed-off-by: Guo Yejun <yejun.guo at intel.com>
---
 utests/utest_generator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utests/utest_generator.py b/utests/utest_generator.py
index 8d2f2a8..dbce45b 100644
--- a/utests/utest_generator.py
+++ b/utests/utest_generator.py
@@ -24,7 +24,7 @@ def udebug(ulpSize,returnType):
 
     const char* env_strict = getenv("OCL_STRICT_CONFORMANCE");
 
-    if ( strcmp(env_strict, "0") == 0)
+    if (env_strict != NULL && strcmp(env_strict, "0") == 0)
       ULPSIZE_FACTOR = 1000;
     else
       ULPSIZE_FACTOR = 1;
-- 
1.8.3.2



More information about the Beignet mailing list