From: Justin Viiret Date: Fri, 27 May 2016 01:11:04 +0000 (+1000) Subject: rose: always push CHECK_BOUNDS onto end of program X-Git-Tag: v4.2.0^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=614ca0accf3c825f0df0a8e532db892b68764442;p=thirdparty%2Fvectorscan.git rose: always push CHECK_BOUNDS onto end of program --- diff --git a/src/rose/rose_build_bytecode.cpp b/src/rose/rose_build_bytecode.cpp index 1b00b4b5..758dd442 100644 --- a/src/rose/rose_build_bytecode.cpp +++ b/src/rose/rose_build_bytecode.cpp @@ -3010,13 +3010,7 @@ void makeRoleCheckBounds(const RoseBuildImpl &build, RoseVertex v, ri.u.checkBounds.min_bound = min_bound; ri.u.checkBounds.max_bound = max_bound; - // This precondition instruction should go near the start of - // the program, after the ONLY_EOD check if it's present. - auto it = - find_if(begin(program), end(program), [](const RoseInstruction &ri) { - return ri.code() > ROSE_INSTR_CHECK_ONLY_EOD; - }); - program.insert(it, ri); + program.push_back(move(ri)); } static