9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: gdiaz@9grid.es
To: quanstro@coraid.com, 9fans@9fans.net
Subject: Re: [9fans] naive acid debugging
Date: Wed, 15 Jul 2009 17:37:51 +0200	[thread overview]
Message-ID: <f2601ee4829146eff54943ad919920a5@9grid.es> (raw)

hello

thank you very much  Erik, I'll look at that code today night, i hope to see the light soon ☺

gabi

> 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





             reply	other threads:[~2009-07-15 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 15:37 gdiaz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-15 15:26 gdiaz
2009-07-15 16:41 ` erik quanstrom
2009-07-15 18:30   ` Russ Cox
2009-07-15 17:52     ` gdiaz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2601ee4829146eff54943ad919920a5@9grid.es \
    --to=gdiaz@9grid.es \
    --cc=9fans@9fans.net \
    --cc=quanstro@coraid.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).