Skip to content

The compiler runs into Stack Overflow if compiled using CLANG on Windows or Visual Studio C++ and set to compile Analog Clock #5

@FlatAssembler

Description

@FlatAssembler

AECforWebAssembly v1.5 crashes if compiled with CLANG on Windows or Visual Studio C++ and is set to compile Analog Clock. It runs into Stack Overflow. Here is what the debugger in Visual Studio outputs:

image

So, the error appears to occur in Analog Clock program on line 358, when compiling the 60 token. convertToInteger64 calls compile, which in turns calls convertTo which again calls convertToInteger64. I do not think this loop is infinite, as the error disappears on CLANG if the program is compiled with -O3 (although I could be triggering some Undefined Behavior again leading to my program behaving unpredictably). But, obviously, the recursion runs deep enough to cause Stack Overflow in some cases under some compilers.

This problem appears not to exist (or at least obviously show up, if my C++ code is again triggering some undefined behavior as the parsing code once used to) under any version of GCC, be it under Windows, Linux or FreeDOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions