yavuzkoroglu / gwplus

Gwplus: GraphWalker Plus
MIT License
0 stars 1 forks source link

gwplus crashes when running example on README.md #2

Closed KristianKarl closed 7 months ago

KristianKarl commented 8 months ago

When running the Toy Graph example in the README.md, a crash occurs if gwplus is built with mode=RELEASE. However, using mode=DEBUG runs fine.

The output from the crash under gdb:

❯ gdb --args bin/gwplus prime examples/toygraph/wellformed.json testpath.json -v
GNU gdb (Ubuntu 15.0.50.20240219-0ubuntu1) 15.0.50.20240219-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/gwplus...
(gdb) run
Starting program: /home/krikar/dev/gwplus/bin/gwplus prime examples/toygraph/wellformed.json testpath.json -v
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[2024-03-05 10:45:57] - Verbose enabled.
[2024-03-05 10:45:57] - Coverage Criterion = Prime Path Coverage
[2024-03-05 10:45:57] - Loading examples/toygraph/wellformed.json...
[2024-03-05 10:45:57] - Starting Element is an EDGE
[2024-03-05 10:45:57] -          # Vertices = 2
[2024-03-05 10:45:57] -             # Edges = 3
[2024-03-05 10:45:57] -        # Edge Pairs = 5
[2024-03-05 10:45:57] - # Test Requirements = 6
[2024-03-05 10:45:57] -    # Direct Splices = 14

 7: 5 2
 s -> 7;
 s -> 1;
 s -> 0;
 7 -> 3;
 7 -> 0;
 4 -> 7;
 4 -> 1;
 3 -> 4;
 1 -> 3;
 1 -> 0;
 0 -> 7;
 0 -> 1;

 8: 7 0
 s -> 8;
 s -> 1;
 8 -> 3;
 8 -> 1;
 4 -> 8;
 4 -> 1;
 3 -> 4;
 1 -> 8;
 1 -> 3;

 9: 8 1
 s -> 9;
 9 -> 3;
 4 -> 9;
 3 -> 4;

 10: 3 4 9
 s -> 10;
[2024-03-05 10:45:57] -        # HyperPaths = 2

Program received signal SIGSEGV, Segmentation fault.
0x000055555557d520 in ?? ()
(gdb) bt
#0  0x000055555557d520 in ?? ()
#1  0x000055555556af62 in clone_vpath ()
#2  0x000055555556a587 in constructPathTrace_hpg ()
#3  0x000055555556a9b6 in constructTestPaths_hpg ()
#4  0x0000555555569186 in main ()
(gdb) 
yavuzkoroglu commented 8 months ago

This seems to be caused by a bad commit on my part. Currently, I failed to reproduce the issue on both Ubuntu and Mac OS, so I am not sure if this bug still exists or not.

Keeping this issue open for now...

yavuzkoroglu commented 7 months ago

I managed to reproduce the issue and corrected the Makefile.