(- (random 3) 2) --> seg fault

From: Jen Mankoff <jmankoff_at_cs.oberlin.edu>
Date: Thu, 10 Nov 1994 18:22:52 -0500

I just compiled STk-2.1.4 on the Dec stations (running Ultrix 4.3A)
here and I ran the turtle demo to test the drawing routines. It
seg-faulted in the middle of the demo. I think I've traced the problem
to the following:

(- (random x) y)

when x > y and (random x) returns a value greater than y.

When I called (- (random 3) 2) this using the gdb debugger, I found
that the error occured in mpz_set at the C level. The bottom part of
the stack at the moment of the seg-fault looks like this:

(gdb) where
#0 0x436ee8 in mpz_set (w=0x101b4340, u=0x101b4320) at mpz_set.c:44
#1 0x4214d8 in clone () at number.c:274
#2 0x425a40 in difference () at number.c:827
#3 0x4189ac in leval () at eval.c:147
Received on Fri Nov 11 1994 - 03:25:15 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST