I re-ran the test, just to ensure I had the line numbers right (I have some local edits in my SVN copy):
----- mca_base_var.c:681:18: runtime error: member access within misaligned address 0x2aaaab338409 for type 'mca_base_var_storage_t', which requires 8 byte alignment ----- This is referring to the bool conversion. According to opal_config.h, bool has an alignment of 1. The ...8409 address is definitely 1-byte aligned. :-) And this one: ----- mca_base_var.c:668:18: runtime error: member access within misaligned address 0x2aaaabc90ccc for type 'mca_base_var_storage_t', which requires 8 byte alignment ----- is referring to the int conversion. According to opal_config, ints are 4-byte aligned. The ...0ccc address is 4-byte aligned. Note that I also get similar warnings about OB1: ----- pml_ob1_hdr.h:462:17: runtime error: member access within misaligned address 0x2aaabb35f2cc for type 'mca_pml_ob1_hdr_t' (aka 'union mca_pml_ob1_hdr_t'), which requires 8 byte alignment ----- mca_pml_ob1_hdr_t is also a union. Is this a bug in the clang alignment sanitizer? On Sep 10, 2014, at 4:41 PM, George Bosilca <[email protected]> wrote: > It complains about 0x2aaaab1b1ed9 being misaligned which seems as a valid > complaint. What is the dst value when this trigger? What is var->mbv_storage? > > George. > > > On Thu, Sep 11, 2014 at 5:29 AM, Jeff Squyres (jsquyres) <[email protected]> > wrote: > On Sep 10, 2014, at 4:23 PM, Jeff Squyres (jsquyres) <[email protected]> > wrote: > > > Regardless, what do we do about this? > > To answer my own question, I guess we can replace: > > dst->intval = int_value > > with > > int *bogus = (int*) dst; > *bogus = int_value; > > and do a similar thing for the bool. > > Seems kludgey, and kinda defeats the point of having a union, though. > > -- > Jeff Squyres > [email protected] > For corporate legal information go to: > http://www.cisco.com/web/about/doing_business/legal/cri/ > > _______________________________________________ > devel mailing list > [email protected] > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2014/09/15799.php > > _______________________________________________ > devel mailing list > [email protected] > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2014/09/15800.php -- Jeff Squyres [email protected] For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
