brainfuck icon indicating copy to clipboard operation
brainfuck copied to clipboard

thread 'main' has overflowed its stack

Open asss-whom opened this issue 3 years ago • 2 comments

Hay Author! When I run the command cargo run --release --bin brainfuck_jit ./res/mandelbrot.bf, I got the following error message: thread 'main' has overflowed its stack error: process didn't exit successfully: 'target\release\brainfuck_jit.exe ./res/mandelbrot.bf' (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) And I don't know how to fix it. I don't even know where it went wrong. I am new in Rust and wish you to tell me what I should do next. I am using nightly-x86_64-pc-windows-msvc toolchain.

asss-whom avatar Aug 24 '22 02:08 asss-whom

The assembly code for the JIT uses the System V AMD64 ABI, which means that this assembly cannot run on windows64.

https://en.wikipedia.org/wiki/X86_calling_conventions

I will make the code windows compatible

mohanson avatar Aug 24 '22 03:08 mohanson

Maybe you can use extern "win64" rather than extern "sysv64" on Windows.

https://doc.rust-lang.org/reference/items/external-blocks.html#abi

jmjoy avatar Jan 03 '24 08:01 jmjoy