committed by
Trent Nelson
parent
f9fccdee85
commit
d269975784
@ -1448,9 +1448,15 @@ fn report_target_features() {
|
|||||||
not(target_os = "macos")
|
not(target_os = "macos")
|
||||||
))]
|
))]
|
||||||
{
|
{
|
||||||
|
unsafe { check_avx() };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validator binaries built on a machine with AVX support will generate invalid opcodes
|
// Validator binaries built on a machine with AVX support will generate invalid opcodes
|
||||||
// when run on machines without AVX causing a non-obvious process abort. Instead detect
|
// when run on machines without AVX causing a non-obvious process abort. Instead detect
|
||||||
// the mismatch and error cleanly.
|
// the mismatch and error cleanly.
|
||||||
|
#[target_feature(enable = "avx")]
|
||||||
|
unsafe fn check_avx() {
|
||||||
if is_x86_feature_detected!("avx") {
|
if is_x86_feature_detected!("avx") {
|
||||||
info!("AVX detected");
|
info!("AVX detected");
|
||||||
} else {
|
} else {
|
||||||
@ -1460,7 +1466,6 @@ fn report_target_features() {
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Get the activated stake percentage (based on the provided bank) that is visible in gossip
|
// Get the activated stake percentage (based on the provided bank) that is visible in gossip
|
||||||
fn get_stake_percent_in_gossip(bank: &Bank, cluster_info: &ClusterInfo, log: bool) -> u64 {
|
fn get_stake_percent_in_gossip(bank: &Bank, cluster_info: &ClusterInfo, log: bool) -> u64 {
|
||||||
|
Reference in New Issue
Block a user