2024-06-06 13:51:55 -05:00
|
|
|
// Passing invalid files to -Z ls (which lists the symbols
|
|
|
|
// defined by a library crate) used to cause a segmentation fault.
|
|
|
|
// As this was fixed in #11262, this test checks that no segfault
|
|
|
|
// occurs when passing the invalid file `bar` to -Z ls.
|
|
|
|
// See https://github.com/rust-lang/rust/issues/11259
|
|
|
|
|
|
|
|
//@ ignore-cross-compile
|
|
|
|
|
2024-06-06 14:20:42 -05:00
|
|
|
use run_make_support::{rfs, rustc};
|
2024-06-06 13:51:55 -05:00
|
|
|
|
|
|
|
fn main() {
|
2024-06-06 14:20:42 -05:00
|
|
|
rustc().input("foo.rs").run();
|
|
|
|
rustc().arg("-Zls=root").input("foo").run();
|
2024-07-17 07:42:06 -05:00
|
|
|
rfs::create_file("bar");
|
2024-06-06 14:20:42 -05:00
|
|
|
rustc().arg("-Zls=root").input("bar").run();
|
2024-06-06 13:51:55 -05:00
|
|
|
}
|