Skip to content

Commit 527ad2a

Browse files
author
bors-servo
authored
Auto merge of #224 - servo:morestack, r=SimonSapin
procedural-masquerade: Give more stack to procedural-masquerade macros. This is a prospective fix for servo/servo#21038. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/224) <!-- Reviewable:end -->
2 parents ad39746 + fd5cf92 commit 527ad2a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cssparser"
3-
version = "0.23.9"
3+
version = "0.23.10"
44
authors = [ "Simon Sapin <simon.sapin@exyr.org>" ]
55

66
description = "Rust implementation of CSS Syntax Level 3"

procedural-masquerade/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,15 @@ macro_rules! define_proc_macros {
177177
fn wrapped($input: &str) -> String {
178178
$body
179179
}
180+
181+
// syn uses a huge amount of stack in debug mode.
180182
let derive_input_string = derive_input.to_string();
181-
wrapped($crate::_extract_input(&derive_input_string)).parse().unwrap()
183+
let handle =
184+
::std::thread::Builder::new().stack_size(128 * 1024 * 1024).spawn(move || {
185+
wrapped($crate::_extract_input(&derive_input_string))
186+
}).unwrap();
187+
188+
handle.join().unwrap().parse().unwrap()
182189
}
183190
)+
184191
}

0 commit comments

Comments
 (0)