terralang / terra

Terra is a low-level system programming language that is embedded in and meta-programmed by the Lua programming language.
terralang.org
Other
2.72k stars 201 forks source link

Catch heap corruption on windows #461

Closed ErikMcClure closed 4 years ago

ErikMcClure commented 4 years ago

Windows ignores the unhandled exception filter for heap corruption, which results in terra.exe simply silently crashing if heap corruption is encountered. This adds a super special exception handler to actually catch the heap corruption and grab the stack trace (which unfortunately isn't very useful but we can at least tell the user what happened instead of silently crashing).

elliottslaughter commented 4 years ago

Looks like all tests pass except formatting (did you use a tab? trailing whitespace?).

Will merge when passing. Thanks.