From 69edd9a53bbd3d65d20db0abf9711a0ec976cc80 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Thu, 30 May 2013 11:38:07 +0800 Subject: [PATCH] GBE: Fixed a hang issue on 64bit system. As the npos is a (size_t)-1, we have to change the start and end to size_t type. Otherwise, the comparison will always be true, and it will hang there forever. Signed-off-by: Zhigang Gong Tested-by: Boqun Feng --- backend/src/backend/program.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index c95fb4a..9e37bdb 100644 --- a/backend/src/backend/program.cpp +++ b/backend/src/backend/program.cpp @@ -127,7 +127,7 @@ namespace gbe { bool bOpt = true; vector useless; //hold substrings to avoid c_str free - uint32_t start = 0, end = 0; + size_t start = 0, end = 0; /* clang unsupport options: -cl-denorms-are-zero, -cl-strict-aliasing -cl-no-signed-zeros, -cl-fp32-correctly-rounded-divide-sqrt -- 2.7.4