id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12235,boost/endian causes reads from unaligned address.,amotsok@…,Beman Dawes,"Example: {{{ #include int main() { char __attribute__ ((aligned (4))) buf[20]; boost::endian::native_int32_t * ptr = (boost::endian::native_int32_t *)&buf[1]; return ptr->value(); } }}} when stepping inside ''boost::endian::native_int32_t::value()'' I see the code which is doing actual work: {{{ return *reinterpret_cast(bytes); }}} where ''bytes'' is argument which corresponds to class member of ''endian_buffer'' which declared as: {{{ char m_value[n_bits/8]; }}} In this particular example ''m_value'' gets address ''buf + 1'' and it is not dividable by four: {{{ (int)ptr->m_value & 3 == 1 }}} Not all platforms support reading from unaligned address. This behavior is dangerous and possibly can cause crashes on those platforms. ",Bugs,closed,To Be Determined,endian,Boost 1.61.0,Problem,invalid,,