Issue 95 in teyjus: SIGSEGV when using disjunction

1 view
Skip to first unread message

tey...@googlecode.com

unread,
Feb 4, 2015, 6:20:28 PM2/4/15
to teyjus...@googlegroups.com
Status: New
Owner: ----

New issue 95 by alf42...@gmail.com: SIGSEGV when using disjunction
https://code.google.com/p/teyjus/issues/detail?id=95

What steps will reproduce the problem?
1. tjcc, tjlink, tjsim the attached program (bug.mod, bug.sig)
2. execute the following query:
test_list S, walk S.

What is the expected output? What do you see instead?
The expected output is:
,,,
The answer substitution:
S = my_cons (t_abs (W1\ t_abs (W2\ W1))) (W1\ my_cons (t_abs (W2\ t_abs
(W3\ W2))) (W2\ my_cons (t_abs (W3\ t_abs (W4\ W3))) (W3\ my_cons (t_abs
(W4\ t_abs (W5 \ W5))) (W4\ my_nil))))

That's what you get instead:
Program received signal SIGSEGV, Segmentation fault.
0x00000000004a5e92 in DF_termTag (tmPtr=0x0) at dataformats.c:388
388 return tmPtr -> tag.categoryTag;
(gdb) bt
#0 0x00000000004a5e92 in DF_termTag (tmPtr=0x0) at dataformats.c:388
#1 0x00000000004c8703 in HOPU_matchHeads (hPtr1=0x0, hPtr2=0x7fffe5318b00,
nabs=0) at hopu.c:1431
#2 0x00000000004c92e8 in HOPU_patternUnifyPair (tPtr1=0x7608e0,
tPtr2=0x7608d0) at hopu.c:1623
#3 0x00000000004c0815 in SINSTR_pattern_unify_t () at siminstr.c:1338
#4 0x00000000004a859e in SIM_simulate () at simulator.c:44
#5 0x00000000004a103a in QUERY_solveQuery () at query_c.c:73
#6 0x000000000049f9e0 in c_solveQuery (v=1) at ccode_stubs.c:108
#7 0x00000000004d8524 in caml_c_call ()
#8 0x00007fffffffdee0 in ?? ()
#9 0x00000000004436a9 in camlQuery__solveQuery_1042 ()
#10 0x00007ffff74ea000 in ?? ()
#11 0x0000000000442987 in camlSimulatorfront__solveQueryInteract_1048 ()
#12 0x00007ffff74ea050 in ?? ()
#13 0x0000000000442a50 in camlSimulatorfront__solveQuery_1050 ()
#14 0x0000000000000001 in ?? ()
#15 0x0000000000442aed in camlSimulatorfront__interactSolveQuery_1052 ()
#16 0x00007ffff7519e90 in ?? ()
#17 0x00000000004433a6 in camlSimulatorfront__entry ()
#18 0x00007fffffffdf20 in ?? ()
#19 0x000000000044325d in camlSimulatorfront__entry ()
#20 0x0000000000000001 in ?? ()
#21 0x00007ffff74f86d0 in ?? ()
#22 0x00007ffff74f9ab0 in ?? ()
#23 0x00000000004108b9 in caml_program ()
#24 0x000000000020b023 in ?? ()
#25 0x00000000004d857a in caml_start_program ()
#26 0x0000000000000000 in ?? ()


What version of the product are you using? On what operating system?

svn log -l 1
r1153 | fafo...@gmail.com | 2014-09-04 13:00:58 +0200 (Thu, 04 Sep 2014)

tjsim --version
Teyjus version 2.0-b2

uname -a
Linux alfreds-box 3.2.0-76-lowlatency #78-Ubuntu SMP PREEMPT Mon Jan 19
11:33:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Please provide any additional information below.

Adding one redundant equation (i.e. Name="x") yields a different output:
Error: solve: Ill-formed goal: uninstantiated variable as head.

Removing one level of abstraction in the test term yields a correct result,
i.e. the test term is kind of minimal.

Programming with lambda prolog is great despite the bugs.

Attachments:
bug.mod 850 bytes
bug.sig 343 bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

tey...@googlecode.com

unread,
Feb 5, 2015, 8:55:50 AM2/5/15
to teyjus...@googlegroups.com
Updates:
Status: Accepted
Owner: fafo...@gmail.com
Labels: Priority-Critical

Comment #1 on issue 95 by fafo...@gmail.com: SIGSEGV when using disjunction
https://code.google.com/p/teyjus/issues/detail?id=95

(No comment was entered for this change.)

tey...@googlecode.com

unread,
Feb 5, 2015, 6:10:28 PM2/5/15
to teyjus...@googlegroups.com

Comment #2 on issue 95 by fafo...@gmail.com: SIGSEGV when using disjunction
https://code.google.com/p/teyjus/issues/detail?id=95

Thanks for the report.

Notice that Name="x" is just considered as a variable according to Teyjus.
If you add Name = "X", the behavior remains the same (still segfaults.)

tey...@googlecode.com

unread,
Feb 6, 2015, 12:54:06 PM2/6/15
to teyjus...@googlegroups.com
Updates:
Owner: gopalan....@gmail.com

Comment #3 on issue 95 by fafo...@gmail.com: SIGSEGV when using disjunction
https://code.google.com/p/teyjus/issues/detail?id=95

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages