Opened 10 hours ago
#683 new defect
Dangling references in lgf_reader_writer_test.cc
Reported by: | Peter Madarasi | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.4 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
Using g++ 9.4.0, make check
fails with the error below.
The following tests FAILED: 24 - lgf_reader_writer_test (Child aborted) Errors while running CTest make[3]: *** [CMakeFiles/check.dir/build.make:57: CMakeFiles/check] Error 8 make[2]: *** [CMakeFiles/Makefile2:321: CMakeFiles/check.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:328: CMakeFiles/check.dir/rule] Error 2 make: *** [Makefile:210: check] Error 2 terminate called after throwing an instance of 'lemon::FormatError' what(): lemon:FormatError: Item not found Aborted (core dumped)
The reason seems to be dangling references in the test. The error was caused by passing a temporary arc returned by graph.direct(e1, false)
as a reference. I also fixed the handling of temporarily created functors ReaderConverter
and WriterConverter
.
The attached patch fixes the issue.
Note: See
TracTickets for help on using
tickets.