src/hotspot/share/utilities/bitMap.inline.hpp
changeset 52485 e5534cc91a10
parent 52394 96bd0f70ef99
child 53244 9807daeb47c4
--- a/src/hotspot/share/utilities/bitMap.inline.hpp	Sat Nov 10 19:27:52 2018 +0100
+++ b/src/hotspot/share/utilities/bitMap.inline.hpp	Sat Nov 10 20:47:28 2018 +0100
@@ -237,10 +237,12 @@
 }
 
 inline void BitMap::set_large_range_of_words(idx_t beg, idx_t end) {
+  assert(beg <= end, "underflow");
   memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(bm_word_t));
 }
 
 inline void BitMap::clear_large_range_of_words(idx_t beg, idx_t end) {
+  assert(beg <= end, "underflow");
   memset(_map + beg, 0, (end - beg) * sizeof(bm_word_t));
 }