[Beignet] [PATCH] Fix options parse infinite loop bug.
Yang Rong
rong.r.yang at intel.com
Sun Jun 30 19:06:17 PDT 2013
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
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 e41e5b6..2a4feb9 100644
--- a/backend/src/backend/program.cpp
+++ b/backend/src/backend/program.cpp
@@ -141,12 +141,12 @@ namespace gbe {
while (end != std::string::npos) {
end = options.find(' ', start);
std::string str = options.substr(start, end - start);
+ start = end + 1;
if(str.size() == 0)
continue;
if(str == "-cl-opt-disable") bOpt = false;
useless.push_back(str);
args.push_back(str.c_str());
- start = end + 1;
}
args.push_back("-emit-llvm");
--
1.7.10.4
More information about the Beignet
mailing list