| 1 |
// Regression test for https://github.com/servo/html5ever/issues/393 |
| 2 |
// |
| 3 |
// Create a dynamic atom − causing initialization of the global hash map − |
| 4 |
// in a thread that has a small stack. |
| 5 |
// |
| 6 |
// This is a separate test program rather than a `#[test] fn` among others |
| 7 |
// to make sure that nothing else has already initialized the map in this process. |
| 8 |
fn main() { |
| 9 |
std::thread::Builder::new() |
| 10 |
.stack_size(50_000) |
| 11 |
.spawn(|| { |
| 12 |
let _atom = string_cache::DefaultAtom::from("12345678"); |
| 13 |
}) |
| 14 |
.unwrap() |
| 15 |
.join() |
| 16 |
.unwrap() |
| 17 |
} |