-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Trying to use proc-macro (vulkano_shaders::shader!) overflows 'main' thread's stack #11669
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
Comments
Can't reproduce, can you test using a pre-release version from here? Or does |
I tried it in pre release v0.3.969 and it is still the same, it gives error as
tried running
|
@BoredSathvik are you on Windows? Maybe we simply use too much stack. |
Could you run |
yes |
can i use windbg? |
Yes. I am not a windows user though, so I don't know what command to use to get a backtrace. |
will this work? |
It looks like that is after the stack has unwound. I have no clue how to get a backtrace before unwinding the stack though. |
oh, do i just copy stuff right after it panics? |
I can't find a way to add pdb file to make it readable😔 |
56 stack frames shouldn't be anywhere near enough to cause a stack overflow. Weird. |
maybe there were more but got poped after the overflow bc i breaked this like few seconds after the overflow |
I'm having the same problem, but with https://github.com/Tamschi/asteracea-website/tree/39a655cc469c8af505855ba696a6ced60667a611. The GUI component macros create large nested expressions with a number of closures. |
Sorry, I should provide a bit more information. In my case it's not crashing in the console, just in Code (Windows). Configuration{
cargoRunner: null,
runnableEnv: null,
inlayHints: {
enable: true,
renderColons: true,
maxLength: 25,
parameterHints: true,
typeHints: true,
chainingHints: true,
closureReturnTypeHints: false,
reborrowHints: false,
lifetimeElisionHints: { enable: 'never', useParameterNames: false },
hideNamedConstructorHints: false
},
server: { path: null, extraEnv: null },
trace: { server: 'off', extension: false },
debug: {
engine: 'auto',
sourceFileMap: {
'/rustc/<id>': '${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust'
},
openDebugPane: false,
engineSettings: {}
},
assist: {
exprFillDefault: 'todo',
importGranularity: 'crate',
importEnforceGranularity: false,
importPrefix: 'plain',
importGroup: true,
allowMergingIntoGlobImports: true
},
cache: { warmup: true },
callInfo: { full: true },
cargo: {
autoreload: true,
allFeatures: true,
unsetTest: [ 'core' ],
features: [],
runBuildScripts: true,
useRustcWrapperForBuildScripts: true,
noDefaultFeatures: false,
target: null,
noSysroot: false,
loadOutDirsFromCheck: true
},
checkOnSave: {
enable: true,
allFeatures: null,
allTargets: true,
command: 'clippy',
noDefaultFeatures: null,
target: null,
extraArgs: [ '--locked' ],
features: null,
overrideCommand: null
},
completion: {
addCallArgumentSnippets: true,
addCallParenthesis: true,
snippets: {
'Arc::new': {
postfix: 'arc',
body: 'Arc::new(${receiver})',
requires: 'std::sync::Arc',
description: 'Put the expression into an `Arc`',
scope: 'expr'
},
'Rc::new': {
postfix: 'rc',
body: 'Rc::new(${receiver})',
requires: 'std::rc::Rc',
description: 'Put the expression into an `Rc`',
scope: 'expr'
},
'Box::pin': {
postfix: 'pinbox',
body: 'Box::pin(${receiver})',
requires: 'std::boxed::Box',
description: 'Put the expression into a pinned `Box`',
scope: 'expr'
},
Ok: {
postfix: 'ok',
body: 'Ok(${receiver})',
description: 'Wrap the expression in a `Result::Ok`',
scope: 'expr'
},
Err: {
postfix: 'err',
body: 'Err(${receiver})',
description: 'Wrap the expression in a `Result::Err`',
scope: 'expr'
},
Some: {
postfix: 'some',
body: 'Some(${receiver})',
description: 'Wrap the expression in an `Option::Some`',
scope: 'expr'
}
},
postfix: { enable: true },
autoimport: { enable: true },
autoself: { enable: true },
privateEditable: { enable: false }
},
diagnostics: {
enable: true,
enableExperimental: true,
disabled: [],
remapPrefix: {},
warningsAsHint: [],
warningsAsInfo: []
},
experimental: { procAttrMacros: true },
files: { watcher: 'client', excludeDirs: [] },
highlightRelated: {
references: true,
exitPoints: true,
breakPoints: true,
yieldPoints: true
},
highlighting: { strings: true },
hover: { documentation: true, linksInHover: true },
hoverActions: {
debug: true,
enable: true,
gotoTypeDef: true,
implementations: true,
references: false,
run: true
},
joinLines: {
joinElseIf: true,
removeTrailingComma: true,
unwrapTrivialBlock: true,
joinAssignments: true
},
lens: {
debug: true,
enable: true,
implementations: true,
run: true,
methodReferences: false,
references: false,
enumVariantReferences: false,
forceCustomCommands: true
},
linkedProjects: [],
lruCapacity: null,
notifications: { cargoTomlNotFound: true },
primeCaches: { numThreads: 0 },
procMacro: { enable: true, server: null, ignored: {}, enabled: true },
runnables: { overrideCargo: null, cargoExtraArgs: [] },
rustcSource: null,
rustfmt: {
extraArgs: [],
overrideCommand: null,
enableRangeFormatting: false
},
workspace: { symbol: { search: { scope: 'workspace', kind: 'only_types' } } },
'cargo-watch': { command: 'clippy' },
rainbowHighlightingOn: true,
updates: { channel: 'nightly' }
} |
#12058 increases the stack size on Windows to match the default on Linux (for both the LSP server and the proc-macro process). It would be great if you could test this once that is included in a release. |
I'm getting this issue again. Using the latest rust, r-a, and compiling |
Steps to reproduce:
it should now give output
thread 'main' has overflowed its stack
rust-analyzer version: 5fae65d 2022-03-07 stable,
rustc version: rustc 1.59.0 (9d1b2106e 2022-02-23)
The text was updated successfully, but these errors were encountered: