> While understanding how refs work inside nupas, i decided to try to implement > the same function nupas has to find mailbox references in acid langauge, so i > did: > > defn findmboxrefs(mb,fids) { > local f, refs; > f=fids; > while f!=0 do { > print("f=", f\X,"\n"); > if f->mb==mb then > refs++; > print("f->mb=", f->mb\X," =? mb=",mb\X,"\n"); > f=f->next; > } > print("refs ==", refs,"\n"); > }
first, i want to complement you on a fine use of acid. very nice. > > using a Broken nupas (broked by an assert call), i got this: > > acid: findmboxrefs(*checkmboxrefs:mb,fids); > f=0x0003a090 > f->mb=0x00000000 =? mb=0x0004a468 > f=0x0004bf68 > f->mb=0x8d1c2444 =? mb=0x0004a468 > f=0x89ffffe4 > <stdin>:75: (error) indir: can't read address 0x89ffffe4: bad arg in system > call your assmption that each fid has a mailbox is wrong. see rattach() and sanefid(). they encode the rules. - erik