PLC-lang / rusty

Structured Text Parser and LLVM Frontend
GNU Lesser General Public License v3.0
223 stars 53 forks source link

Stack overflow when declaring a struct with a member being a pointer to itself #1289

Closed mhasel closed 1 month ago

mhasel commented 2 months ago

When trying to compile the following

TYPE Node : STRUCT
    id      : DINT;
    child   : REF_TO Node;
    parent  : REF_TO Node;
END_STRUCT END_TYPE

the compiler will crash with a stack overflow.

A quick git bisect has shown this bug slipped in with commit 28b6b41

mhasel commented 1 month ago

I can no longer reproduce this.