GBE: Fixed a hang issue on 64bit system.
authorZhigang Gong <zhigang.gong@linux.intel.com>
Thu, 30 May 2013 03:38:07 +0000 (11:38 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Thu, 30 May 2013 03:38:07 +0000 (11:38 +0800)
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 <zhigang.gong@linux.intel.com>
Tested-by: Boqun Feng <boqun.feng@intel.com>
backend/src/backend/program.cpp

index c95fb4a..9e37bdb 100644 (file)
@@ -127,7 +127,7 @@ namespace gbe {
     bool bOpt = true;
 
     vector<std::string> 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