COIN-OR::LEMON - Graph Library

Opened 13 years ago

Closed 13 years ago

#392 closed defect (fixed)

Dfs::start(source, dest) always returns false

Reported by: Gabor Retvari Owned by: Peter Kovacs
Priority: major Milestone: LEMON 1.3 release
Component: core Version: hg main
Keywords: Cc:
Revision id:

Description

I expected the attached trivial code to return OK/OK, yet it returns "not OK/not OK". I believe this is a bug in dfs.h (in particular, start(Node t) seems to be culprit). The bug is present in LEMON 1.2.1 and current hg tip.

Regards, Gabor

Attachments (2)

bug.cpp (591 bytes) - added by Gabor Retvari 13 years ago.
392-dfs-bugfix.patch (895 bytes) - added by Peter Kovacs 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by Gabor Retvari

Attachment: bug.cpp added

Changed 13 years ago by Peter Kovacs

Attachment: 392-dfs-bugfix.patch added

comment:1 Changed 13 years ago by Peter Kovacs

Owner: changed from Alpar Juttner to Peter Kovacs
Status: newassigned

Thank you for the report. Yes, this is a bug indeed.

I attached a patch [0f1b10ef79b7] that fixes the bug. It should be merged into all branches.

comment:2 in reply to:  1 Changed 13 years ago by Alpar Juttner

Resolution: fixed
Status: assignedclosed

Replying to kpeter:

Thank you for the report. Yes, this is a bug indeed.

I attached a patch [0f1b10ef79b7] that fixes the bug. It should be merged into all branches.

Thanks. A modified version has been merged info all branches, see [e24922c56bc2].

The rational behind my modification: Although we do not officially follow the principle of test driven development, I would propagate this workflow. I.e. first we amend the tests so that make check will catch the bug (or missing feature), then patch the code until make check passes again. In theory, this two phases could even go into separate changesets, but it would contradict to the principle that each changeset should at least compile.

Note: See TracTickets for help on using tickets.