Opened 6 years ago
Closed 6 years ago
#619 closed defect (invalid)
Segmentation fault when calling findArc
Reported by: | didif | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.4 release |
Component: | core | Version: | hg main |
Keywords: | findArc | Cc: | |
Revision id: |
Description
Found in version: 1.3.1
The call to findArc in the bellow program yields segmentation fault on Ubuntu 16.04:
int main() {
ListGraph? g; ListGraph::Node n = g.addNode(); ListGraph::Arc a = findArc(g, INVALID, n); return 0;
}
I expect to get INVALID back from findArc in this case.
Note: See
TracTickets for help on using
tickets.
It is not a bug. It makes no sense to find arcs between
INVALID
and a node. The second and third parameters must be valid nodes.This kind of assumption is there basically everywhere in LEMON. For example,
g.source(INVALID)
will also cause troubles.