From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <27721ec6eb1f2bf4019349b1013e6d26@quintile.net> From: "Steve Simon" Date: Thu, 25 Jul 2019 12:19:49 +0100 To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] 5c bug Topicbox-Message-UUID: 02c88040-eada-11e9-9d60-3106f5b1d025 Hi, I traced a long standing cifs issue to 5c the compiler. The code in lib9p to validate wstat calls uses a neat bit of casting which fails when using 5c. /sys/src/lib9p/srv.c:658-669 These following lines missfire reporting type or qid change when trying to rename files over cifs. if((ushort)~r->d.type){ ... if((uchar)~r->d.qid.type || .. ){ but rewriting them like this makes the code work as expected: if(r->d.type != (ushort)~0){ ... if(r->d.qid.type != (uchar)~0 || ... ) Personally I am happy to hack lib9p but the worry is that this bug might be affecting other things. I have no knowledge of the internals of the compilers so I am afraid I have made no attempt to dig deeper. -Steve