Skip to content
Snippets Groups Projects
Commit c5c28c25 authored by rtoy's avatar rtoy
Browse files

From Helmut Eller:

the following enters an infinite recursion if it gets compiled two
times:

(def-alien-type nil (struct foo
			    (f (* (function (values) (* (struct foo)))))))

During the second compile, the existing type is compared with the to
be defined type.  This enters a recursion because (struct foo) is
recursive and the comparison is done again.  The current code has a
"depth" counter and simply returns true if it exceeds 10.  But it only
works for pointers to records and loops forever for function pointers.

The patch below should fix this.  It keeps a hashtable of the already
compared types and returns true if a pair is already in the hashtable.
parent 0a73e5ab
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment