[OpenAFS-devel] Re: Aliasing bugs

Garrett Wollman wollman@csail.mit.edu
Tue, 12 Jul 2011 18:56:06 -0400


<<On Tue, 12 Jul 2011 17:36:41 -0500, Andrew Deason <adeason@sinenomine.net> said:

> Are you seeing them outside of src/ptserver or src/tests? The ptserver
> ones are known and really annoying to fix, but both should indeed be
> getting -fno-strict-aliasing.

Absolutely.  It appears that the XDR compiler generates a whole mess
of them.  The ones that *aren't* in machine-generated code are:

./../dir/buffer.c:43: warning: type-punning to incomplete type might break strict-aliasing rules
./../ptserver/ptuser.c:641: warning: dereferencing type-punned pointer will break strict-aliasing rules
./../ptserver/ptuser.c:669: warning: dereferencing type-punned pointer will break strict-aliasing rules
./../ptserver/ptuser.c:975: warning: dereferencing type-punned pointer will break strict-aliasing rules
./../rx/rx.c:7410: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/afs/UKERNEL/afs_usrops.c:416: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/afs/UKERNEL/afs_usrops.c:420: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/afs/afs_server.c:588: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/afs/afs_server.c:606: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/afs/afs_server.c:607: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/ptserver/ptuser.c:641: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/ptserver/ptuser.c:669: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/ptserver/ptuser.c:975: warning: dereferencing type-punned pointer will break strict-aliasing rules
admin_tools.c:410: warning: dereferencing type-punned pointer will break strict-aliasing rules
admin_tools.c:412: warning: dereferencing type-punned pointer will break strict-aliasing rules
admin_tools.c:414: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsmonitor.c:1914: warning: dereferencing type-punned pointer will break strict-aliasing rules
bos.c:556: warning: dereferencing type-punned pointer will break strict-aliasing rules
bos.c:562: warning: dereferencing type-punned pointer will break strict-aliasing rules
bos.c:619: warning: dereferencing type-punned pointer will break strict-aliasing rules
buffer.c:43: warning: type-punning to incomplete type might break strict-aliasing rules
dsstub.c:130: warning: dereferencing type-punned pointer will break strict-aliasing rules
fs.c:3180: warning: dereferencing type-punned pointer will break strict-aliasing rules
fs.c:3190: warning: dereferencing type-punned pointer will break strict-aliasing rules
fsprobe.c:94: warning: dereferencing type-punned pointer will break strict-aliasing rules
pts.c:946: warning: dereferencing type-punned pointer will break strict-aliasing rules
ptuser.c:641: warning: dereferencing type-punned pointer will break strict-aliasing rules
ptuser.c:669: warning: dereferencing type-punned pointer will break strict-aliasing rules
ptuser.c:975: warning: dereferencing type-punned pointer will break strict-aliasing rules
rx.c:7410: warning: dereferencing type-punned pointer will break strict-aliasing rules
udebug.c:132: warning: dereferencing type-punned pointer will break strict-aliasing rules
udebug.c:267: warning: dereferencing type-punned pointer will break strict-aliasing rules
xstat_fs.c:796: warning: dereferencing type-punned pointer will break strict-aliasing rules

Here are the XDR ones:

../auth/token.xdr.c:86: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:1168: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:1512: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:1524: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:1552: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:258: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:270: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:282: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:294: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:438: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:450: warning: dereferencing type-punned pointer will break strict-aliasing rules
../fsint/afsint.xdr.c:462: warning: dereferencing type-punned pointer will break strict-aliasing rules
../ptserver/ptint.xdr.c:212: warning: dereferencing type-punned pointer will break strict-aliasing rules
../ptserver/ptint.xdr.c:224: warning: dereferencing type-punned pointer will break strict-aliasing rules
../ptserver/ptint.xdr.c:236: warning: dereferencing type-punned pointer will break strict-aliasing rules
../ptserver/ptint.xdr.c:248: warning: dereferencing type-punned pointer will break strict-aliasing rules
../ubik/ubik_int.xdr.c:359: warning: dereferencing type-punned pointer will break strict-aliasing rules
../vlserver/vldbint.xdr.c:359: warning: dereferencing type-punned pointer will break strict-aliasing rules
../vlserver/vldbint.xdr.c:371: warning: dereferencing type-punned pointer will break strict-aliasing rules
../vlserver/vldbint.xdr.c:383: warning: dereferencing type-punned pointer will break strict-aliasing rules
../vlserver/vldbint.xdr.c:395: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/auth/token.xdr.c:86: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:1167: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:1511: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:1523: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:1551: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:257: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:269: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:281: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:293: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:437: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:449: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/Kvice.xdr.c:461: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:1168: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:1512: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:1524: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:1552: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:258: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:270: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:282: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:294: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:438: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:450: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/fsint/afsint.xdr.c:462: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/ptserver/ptint.xdr.c:212: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/ptserver/ptint.xdr.c:224: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/ptserver/ptint.xdr.c:236: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/ptserver/ptint.xdr.c:248: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/rxstat/Krxstat.xdr.c:16: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/rxstat/rxstat.xdr.c:17: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/ubik/ubik_int.xdr.c:359: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/vlserver/Kvldbint.xdr.c:358: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/vlserver/Kvldbint.xdr.c:370: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/vlserver/Kvldbint.xdr.c:382: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/home/buildbot/openafs-master/pthread_set_name_np/src/vlserver/Kvldbint.xdr.c:394: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:1168: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:1512: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:1524: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:1552: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:258: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:270: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:282: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:294: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:438: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:450: warning: dereferencing type-punned pointer will break strict-aliasing rules
afsint.xdr.c:462: warning: dereferencing type-punned pointer will break strict-aliasing rules
budb.xdr.c:257: warning: dereferencing type-punned pointer will break strict-aliasing rules
budb.xdr.c:269: warning: dereferencing type-punned pointer will break strict-aliasing rules
budb.xdr.c:281: warning: dereferencing type-punned pointer will break strict-aliasing rules
budb.xdr.c:293: warning: dereferencing type-punned pointer will break strict-aliasing rules
butc.xdr.c:198: warning: dereferencing type-punned pointer will break strict-aliasing rules
butc.xdr.c:210: warning: dereferencing type-punned pointer will break strict-aliasing rules
ptint.xdr.c:212: warning: dereferencing type-punned pointer will break strict-aliasing rules
ptint.xdr.c:224: warning: dereferencing type-punned pointer will break strict-aliasing rules
ptint.xdr.c:236: warning: dereferencing type-punned pointer will break strict-aliasing rules
ptint.xdr.c:248: warning: dereferencing type-punned pointer will break strict-aliasing rules
rxstat.xdr.c:17: warning: dereferencing type-punned pointer will break strict-aliasing rules
token.xdr.c:86: warning: dereferencing type-punned pointer will break strict-aliasing rules
ubik_int.xdr.c:359: warning: dereferencing type-punned pointer will break strict-aliasing rules
vldbint.xdr.c:359: warning: dereferencing type-punned pointer will break strict-aliasing rules
vldbint.xdr.c:371: warning: dereferencing type-punned pointer will break strict-aliasing rules
vldbint.xdr.c:383: warning: dereferencing type-punned pointer will break strict-aliasing rules
vldbint.xdr.c:395: warning: dereferencing type-punned pointer will break strict-aliasing rules
volint.xdr.c:420: warning: dereferencing type-punned pointer will break strict-aliasing rules
volint.xdr.c:432: warning: dereferencing type-punned pointer will break strict-aliasing rules
volint.xdr.c:444: warning: dereferencing type-punned pointer will break strict-aliasing rules
volint.xdr.c:456: warning: dereferencing type-punned pointer will break strict-aliasing rules
volint.xdr.c:468: warning: dereferencing type-punned pointer will break strict-aliasing rules
volint.xdr.c:480: warning: dereferencing type-punned pointer will break strict-aliasing rules

-GAWollman