Closed Bug 541126 Opened 13 years ago Closed 13 years ago

IPDL: Check that protocol graph induced on (directed) manager relation is acyclic


(Core :: IPC, defect)

Not set





(Reporter: cjones, Unassigned)


(Whiteboard: [good first bug])


(1 file, 1 obsolete file)

I'm not really sure what would happen if it were cyclic, currently; probably send ipdlc into an infinite loop.  Pretty easy to check, but also not a high priority bug.
Cyclic manager/manages relations result in a stack overflow error in $srcdir/ipc/ipdl/ipdl/ (specifically, _FindFriends.walkDownTheProtocolTree)

Patch in the works.
Attached patch implements a naive cycle detection algorithm. Example error message output:

/home/tom/opensource/electrolysis.hg/ipc/ipdl/test/ipdl/ok/cyclecheck_Parent.ipdl:3: error: cycle(s) detected in manager/manages heirarchy: `cyclecheck_Parent -> cyclecheck_Child -> cyclecheck_Grandchild -> cyclecheck_Parent'
Hello Thomas, wanted to pass on a couple of practical notes.  First, when you're ready to have a patch reviewed for committing, click "Details" next to the patch, find the "review" row next to your diff, set the dropdown to "?" and set the requestee appropriately.  (For me, you can just enter ":cjones".)  Second, there's an informal "Mozilla patch style" that most reviewers expect; you can emit patches in this format by setting the following in your ~/.hgrc file

git = 1
showfunc = 1

diff = -p -U 8
qdiff = -p -U 8

and then generating your patch with

$ hg diff

(or |$hg qdiff| if you're using mercurial queues.)

Thanks for the patch!
Just updated my hgrc as per your recommendations. New patch should reflect it.

Shall push it through to you for review.

Thanks yet again!
Attachment #423469 - Attachment is obsolete: true
Attachment #423760 - Flags: review?(jones.chris.g)
Comment on attachment 423760 [details] [diff] [review]
Naive cycle detection patch, revision #2

Looks good.

Thanks again for the patch!
Attachment #423760 - Flags: review?(jones.chris.g) → review+
Whiteboard: [good first bug] → [good first bug] [land m-c]
Whiteboard: [good first bug] [land m-c] → [good first bug]
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.