[cfe-users] (lib)clang on Solaris (SPARC)

Dmitri Gribenko gribozavr at gmail.com
Tue Feb 4 12:52:26 PST 2014


On Tue, Feb 4, 2014 at 8:41 PM, elmo <elmopl at gmail.com> wrote:
> Now, my tracking lead me to places with awful code like this:
>
>  Stmt **getStmts() { return reinterpret_cast<Stmt **> (this + 1); }
>
> Apparently that is standard "solution" in clang sources, yet it seems to be
> one of the reasons that clang/libclang.so crashes.
> There are other places where "this" has requirement to be aligned only to 4
> bytes and data after has alignment of 8. Which not surprisingly causes
> SIGBUS issue.

If this is the case, these are the bugs we would like to fix (and
appreciate patches for!)

Unfortunately, as far as I know, we have no buildbots where unaligned
access is trapping, so these issues are dormant.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-users mailing list