From 91a7a5f2e233793c428b74b7c4bd7958a08c4461 Mon Sep 17 00:00:00 2001 From: tqchen Date: Fri, 10 Apr 2015 10:55:42 -0700 Subject: [PATCH] add small boundary checking --- src/tree/updater_colmaker-inl.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tree/updater_colmaker-inl.hpp b/src/tree/updater_colmaker-inl.hpp index 98139b5f7..63cdf80ba 100644 --- a/src/tree/updater_colmaker-inl.hpp +++ b/src/tree/updater_colmaker-inl.hpp @@ -498,6 +498,9 @@ class ColMaker: public IUpdater { #pragma omp parallel for schedule(static) for (bst_omp_uint i = 0; i < ndata; ++i) { const bst_uint ridx = rowset[i]; + if (ridx >= position.size()) { + utils::Printf("ridx exceed bound\n"); + } const int nid = this->DecodePosition(ridx); if (tree[nid].is_leaf()) { // mark finish when it is not a fresh leaf