Commit eb846654 by Kazu Hirata Committed by Kazu Hirata

sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP): Don't access PTR beyond its end.

	* sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP): Don't access PTR
	beyond its end.

From-SVN: r89475
parent 94ff898d
2004-10-22 Kazu Hirata <kazu@cs.umass.edu>
* sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP): Don't access PTR
beyond its end.
2004-10-22 Eric Christopher <echristo@redhat.com>
* config/rs6000/rs6000.c (setup_incoming_varargs): Align DFmode
......
......@@ -62,19 +62,26 @@ do { \
unsigned int bit_num_ = (MIN) % (unsigned int) SBITMAP_ELT_BITS; \
unsigned int size_ = (SBITMAP)->size; \
SBITMAP_ELT_TYPE *ptr_ = (SBITMAP)->elms; \
SBITMAP_ELT_TYPE word_ = ptr_[word_num_] >> bit_num_; \
SBITMAP_ELT_TYPE word_; \
\
for (; \
word_num_ < size_; \
word_num_++, bit_num_ = 0, word_ = ptr_[word_num_]) \
if (word_num_ < size_) \
{ \
for (; word_ != 0; word_ >>= 1, bit_num_++) \
word_ = ptr_[word_num_] >> bit_num_; \
\
while (1) \
{ \
if ((word_ & 1) != 0) \
for (; word_ != 0; word_ >>= 1, bit_num_++) \
{ \
(N) = word_num_ * SBITMAP_ELT_BITS + bit_num_; \
CODE; \
if ((word_ & 1) != 0) \
{ \
(N) = word_num_ * SBITMAP_ELT_BITS + bit_num_; \
CODE; \
} \
} \
word_num_++; \
if (word_num_ >= size_) \
break; \
bit_num_ = 0, word_ = ptr_[word_num_]; \
} \
} \
} while (0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment