Up to top level
compiler bugs   dustin's bugs   fixed   incoming   nonproblems   tests   website bugs  

Logged in as guest

Viewing incoming/41
Full headers

From: jpolakow@cs.cmu.edu
Subject: strange heap overflow error
Compose reply
Download message
Move To:
1 replies: 1
0 followups:

Private message: yes  no

Notes:

Notification:


Date: Wed, 24 Jan 2001 09:43:26 -0600 (CST)
From: jpolakow@cs.cmu.edu
To: teyjus@cs.umn.edu
Subject: strange heap overflow error
Full_Name: jeff polakow
Version: 1.0-b30
OS: red hat linux 2.0.36  on i686
Submission from: (NULL) (128.2.194.90)


Here is the code and a script of what happened.


-Jeff


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

sig backTest.

kind frm type.

type <- frm -> frm -> frm.  infixl <- 10.
type <-< frm -> frm -> frm.  infixl <-< 10.
type ->> frm -> frm -> frm.  infixr ->> 20.
type <<- frm -> frm -> frm.  infixl <<- 10.

type `  o -> frm. prefix ` 40.


type prog  frm -> o. 


type merge  list int -> list int -> list int -> frm.
type mergeSort  list int -> list int -> frm.
type msort  list int -> frm.
type srt  list int -> frm.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

module backTest.


prog(
merge (H1 :: T1) (H2 :: T2) (H2 :: T3)
        <-  `(H1 > H2)
        <-  merge (H1 :: T1) T2 T3
).

prog(
merge (H1 :: T1) (H2 :: T2) (H1 :: T3)
        <-  `(H1 =< H2)
        <-  merge T1 (H2 :: T2) T3
).

prog( merge L nil L ).

prog( merge nil L L ).

prog( 
mergeSort (H :: T) L
        <<- ( srt (H :: nil) ->>  mergeSort T L)
).

prog( mergeSort nil L <<-  msort L ).

prog( 
msort L
        <<-  srt L1
        <<-  srt L2 
        <-   merge L1 L2 L12
        <-< ( srt L12 ->>  msort L)
).

prog( msort L <<-  srt L ).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Copyright (C) 1999 Gopalan Nadathur
Teyjus comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions.  Please view the accompanying file
"COPYING" for more information.
[backTest] ?- prog G.

The answer substitution:
G = merge (_T1 :: _T2) (_T3 :: _T4) (_T3 :: _T5) <- ` _T1 > _T3 <-
merge (_T1
::
 _T2) _T4 _T5

More solutions (y/n)? y

The answer substitution:
G = merge (_T1 :: _T2) (_T3 :: _T4) (_T1 :: _T5) <- ` _T1 =< _T3 <-
merge _T2
(_
T3 :: _T4) _T5

More solutions (y/n)? y

The answer substitution:
G = merge _T1 nil _T1

More solutions (y/n)? y

The answer substitution:
G = merge nil _T1 _T1

More solutions (y/n)? y

The answer substitution:
G = mergeSort (_T1 :: _T2) _T3 <<- srt (_T1 :: nil) ->> mergeSort
_T2 _T3

More solutions (y/n)? y

The answer substitution:
G = mergeSort nil _T1 <<- msort _T1

More solutions (y/n)? y

The answer substitution:
G = msort _T1 <<- srt _T2 <<- srt _T3 <- merge _T2 _T3 _T4
<-< Simulator heap
ex
hausted.


Reply 1

Resend
From: Gopalan Nadathur <teyjus@cs.umn.edu>
To: jpolakow@cs.cmu.edu
Subject: Re: strange heap overflow error (PR#41)
Date: Wed Sep 19 23:09:45 2001
CC: teyjus@cs.umn.edu
I ran your code on both a PC/Linux combination and a Sun UltraSparc architecture

but was not able to reproduce the bug you seemed to be pointing out under either
configuration. Is there some reason why too little heap space may be allocated
on your machine?

-Gopalan

Up to top level
compiler bugs   dustin's bugs   fixed   incoming   nonproblems   tests   website bugs  

Logged in as guest


[ Home | Overview | Download | Language Documentation | Bug Tracking | Implementation Documentation | Links ]