9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 5c bug
@ 2019-07-25 11:19 Steve Simon
  2019-07-25 11:59 ` Charles Forsyth
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Simon @ 2019-07-25 11:19 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-25 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 11:19 [9fans] 5c bug Steve Simon
2019-07-25 11:59 ` Charles Forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).