GslCore icon indicating copy to clipboard operation
GslCore copied to clipboard

BUG: variable self reference causes stack overflow

Open daz10000 opened this issue 7 years ago • 1 comments

This (admittedly buggy) GSL causes a stack overflow on our production compiler. Please verify of course but pretty sure it's a bug in GslCore


let x = oGAL1

let y = &y ; &x

daz10000 avatar Aug 09 '18 20:08 daz10000

There is a primitive check to handle the simple case

let x = &x

here: https://github.com/Amyris/GslCore/blob/c9ae9242ebc0b7cad10555370da846e4bbf727b7/src/GslCore/AstTypes.fs#L474

Expanding this active pattern could be a fine place to start to handle this case. It is tricky, though.

chrismacklin avatar Aug 09 '18 20:08 chrismacklin