libafl_qemu: Continue build with outdated LLVM, ignore TUI race conditions (#2461)
* libafl_qemu: Continue build with outdated LLVM * Ignore race condition * ignore more race conditions, remove useless clones * fix fixes
This commit is contained in:
parent
c319fe2033
commit
8fb80c3f3a
@ -10,6 +10,7 @@ edition = "2021"
|
||||
[features]
|
||||
default = ["std", "injections"]
|
||||
std = []
|
||||
clippy = [] # Only for clippy, don't use.
|
||||
|
||||
## Build with a simple event manager instead of Launcher - don't fork, and crash after the first bug.
|
||||
simplemgr = []
|
||||
|
2
fuzzers/qemu/qemu_launcher/injection_test/.gitignore
vendored
Normal file
2
fuzzers/qemu/qemu_launcher/injection_test/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
sqltest
|
||||
static
|
@ -148,8 +148,7 @@ impl TuiUi {
|
||||
.constraints([Constraint::Length(3), Constraint::Min(0)].as_ref())
|
||||
.split(left_top_layout[0]);
|
||||
|
||||
let mut status_bar: String = self.title.clone();
|
||||
status_bar = status_bar + " (" + self.version.as_str() + ")";
|
||||
let status_bar: String = format!("{} ({})", self.title, self.version.as_str());
|
||||
|
||||
let text = vec![Line::from(Span::styled(
|
||||
&status_bar,
|
||||
@ -425,18 +424,22 @@ impl TuiUi {
|
||||
area: Rect,
|
||||
is_overall: bool,
|
||||
) {
|
||||
let item_geometry: ItemGeometry = if is_overall {
|
||||
app.read().unwrap().total_item_geometry.clone()
|
||||
let tui_context = app.read().unwrap();
|
||||
let empty_geometry: ItemGeometry = ItemGeometry::new();
|
||||
let item_geometry: &ItemGeometry = if is_overall {
|
||||
&tui_context.total_item_geometry
|
||||
} else if self.clients < 2 {
|
||||
ItemGeometry::new()
|
||||
&empty_geometry
|
||||
} else {
|
||||
app.read()
|
||||
.unwrap()
|
||||
.clients
|
||||
.get(&self.clients_idx)
|
||||
.unwrap()
|
||||
.item_geometry
|
||||
.clone()
|
||||
let clients = &tui_context.clients;
|
||||
let client = clients.get(&self.clients_idx);
|
||||
let client = client.as_ref();
|
||||
if let Some(client) = client {
|
||||
&client.item_geometry
|
||||
} else {
|
||||
log::warn!("Client {} was `None`. Race condition?", &self.clients_idx);
|
||||
&empty_geometry
|
||||
}
|
||||
};
|
||||
|
||||
let items = vec![
|
||||
@ -458,7 +461,7 @@ impl TuiUi {
|
||||
]),
|
||||
Row::new(vec![
|
||||
Cell::from(Span::raw("stability")),
|
||||
Cell::from(Span::raw(item_geometry.stability)),
|
||||
Cell::from(Span::raw(&item_geometry.stability)),
|
||||
]),
|
||||
];
|
||||
|
||||
@ -495,26 +498,25 @@ impl TuiUi {
|
||||
area: Rect,
|
||||
is_overall: bool,
|
||||
) {
|
||||
let tup: (Duration, ProcessTiming) = if is_overall {
|
||||
let tui_context = app.read().unwrap();
|
||||
(
|
||||
tui_context.start_time,
|
||||
tui_context.total_process_timing.clone(),
|
||||
)
|
||||
let tui_context = app.read().unwrap();
|
||||
let empty_timing: ProcessTiming = ProcessTiming::new();
|
||||
let tup: (Duration, &ProcessTiming) = if is_overall {
|
||||
(tui_context.start_time, &tui_context.total_process_timing)
|
||||
} else if self.clients < 2 {
|
||||
(current_time(), ProcessTiming::new())
|
||||
(current_time(), &empty_timing)
|
||||
} else {
|
||||
let client = app
|
||||
.read()
|
||||
.unwrap()
|
||||
.clients
|
||||
.get(&self.clients_idx)
|
||||
.unwrap()
|
||||
.clone();
|
||||
(
|
||||
client.process_timing.client_start_time,
|
||||
client.process_timing,
|
||||
)
|
||||
let clients = &tui_context.clients;
|
||||
let client = clients.get(&self.clients_idx);
|
||||
let client = client.as_ref();
|
||||
if let Some(client) = client {
|
||||
(
|
||||
client.process_timing.client_start_time,
|
||||
&client.process_timing,
|
||||
)
|
||||
} else {
|
||||
log::warn!("Client {} was `None`. Race condition?", &self.clients_idx);
|
||||
(current_time(), &empty_timing)
|
||||
}
|
||||
};
|
||||
let items = vec![
|
||||
Row::new(vec![
|
||||
@ -523,7 +525,7 @@ impl TuiUi {
|
||||
]),
|
||||
Row::new(vec![
|
||||
Cell::from(Span::raw("exec speed")),
|
||||
Cell::from(Span::raw(tup.1.exec_speed)),
|
||||
Cell::from(Span::raw(&tup.1.exec_speed)),
|
||||
]),
|
||||
Row::new(vec![
|
||||
Cell::from(Span::raw("last new entry")),
|
||||
|
@ -108,11 +108,10 @@ fn find_llvm_config() -> Result<String, String> {
|
||||
|
||||
if which("llvm-config").is_ok() {
|
||||
if let Some(ver) = find_llvm_version("llvm-config".to_owned()) {
|
||||
if ver >= rustc_llvm_ver {
|
||||
return Ok("llvm-config".to_owned());
|
||||
if ver < rustc_llvm_ver {
|
||||
println!("cargo:warning=Version of llvm-config is {ver} but needs to be at least rustc's version ({rustc_llvm_ver})! We will (try to) continue to build. Continue at your own risk, or rebuild with a set LLVM_CONFIG_PATH env variable, pointing to a newer version.");
|
||||
}
|
||||
|
||||
return Err(format!("Version of llvm-config is {ver} but needs to be at least rustc's version({rustc_llvm_ver})"));
|
||||
return Ok("llvm-config".to_owned());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user