Segfault in debugger

Issue #32 resolved
Albert Graef
created an issue

As reported by Max Wolf on the mailing list:

I have nailed it down. It's surprisingly simple. strcat and the debugger don't seem to like each other. it crashes when i step into the stringp case reduction. calling stringp without strcat doesn't trigger the crash.

 __ \  |   |  __| _ \    Pure 0.64 (x86_64-unknown-linux-gnu)
 |   | |   | |    __/    Copyright (c) 2008-2014 by Albert Graef
 .__/ \__,_|_|  \___|    (Type 'help' for help, 'help copying'
_|                       for license information.)

Loaded prelude from /usr/local/lib/pure/prelude.pure.

> run -g
> x = strcat ["mm","ll"];
> break x
> x;
** [1] x: x = strcat ["mm","ll"];
(Type 'h' for help.)
: s
** [2] strcat: strcat xs = s if stringp s when s = __C::string_concat_list xs end;
     xs = ["mm","ll"]
: s
** [3] __C::string_concat_list: extern expr* string_concat_list(expr*) = __C::string_concat_list;
     x1 = ["mm","ll"]
: s
++ [3] __C::string_concat_list: extern expr* string_concat_list(expr*) = __C::string_concat_list;
     x1 = ["mm","ll"]
     --> "mmll"
** [3] #<when>: s = s if stringp s;
     s = "mmll"
: s
** [4] stringp: stringp x = case x of _::string = 1; _ = 0 end;
     x = "mmll"
: s
** [5] #<case>: _::string = 1;
: s
++ [5] #<case>: _::string = 1;
     --> 1
++ [4] stringp: stringp x = case x of _::string = 1; _ = 0 end;
     x = "mmll"
     --> 1
++ [3] #<when>: s = s if stringp s;
     s = "mmll"
     --> "mmll"
++ [2] strcat: strcat xs = s if stringp s when s = __C::string_concat_list xs end;
Segmentation fault (core dumped)

Comments (1)

  1. Log in to comment