Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread 'main' has overflowed its stack when built from source #141

Closed
SafeteeWoW opened this issue May 2, 2021 · 2 comments
Closed

thread 'main' has overflowed its stack when built from source #141

SafeteeWoW opened this issue May 2, 2021 · 2 comments
Labels
external This issue relies on an external factor

Comments

@SafeteeWoW
Copy link

Stylua raises error message of
thread 'main' has overflowed its stack
when formatting file https://raw.githubusercontent.com/SafeteeWoW/LibDeflate/4fd8e298c7315d47ee3cd2a9bc71e49f77f2afb0/tests/Test.lua

The commit id is e545cf0, same to the commit of 0a7b6fd, the commit of v0.8.1

My OS is Windows10, and I use Powershell as the terminal.
I build StyLua by git clone the repository and then cargo build.
Then I run .\stylua.exe inside target/debug folder.

Output of cargo --version
cargo 1.51.0 (43b129a20 2021-03-16)

However, there is no problem if I run stylua which comes from cargo install stylua --version 0.8.1

I am new to rust. Not sure why my local build behaviors differently with the package

@SafeteeWoW
Copy link
Author

Seems the problem only occurs on Windows.
No problem when built on Ubuntu 20.04 LTS with cargo version 1.46.0 in Windows Subsystem for Linux.
Still have problem after downgrading Windows toolchain from 1.51.0 to 1.46.0

@JohnnyMorganz
Copy link
Owner

JohnnyMorganz commented May 2, 2021

This is actually an issue with an upstream crate: Kampfkarren/full-moon#140
By default, building from source will build a debug version. If you are building from source, make sure to include the --release flag, which produces a more optimised binary, and the issue should not occur.

Note, you can also use cargo install --git https://github.com/JohnnyMorganz/StyLua.git, which can install from the git repository immediately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external This issue relies on an external factor
Projects
None yet
Development

No branches or pull requests

2 participants