Fix Launcher for M1, fix frida_libpng harness compilation, fix CI (#987)
* Fix harness compilation for frida_libpng * M1: Always use fast cores * always ignore result * seeing if manualy installing libunistring fixes wget * seeing if manualy installing wget fixes it, instead * un-remove comment
This commit is contained in:
parent
266677bb88
commit
159e6ea480
2
.github/workflows/build_and_test.yml
vendored
2
.github/workflows/build_and_test.yml
vendored
@ -182,7 +182,7 @@ jobs:
|
|||||||
# todo: remove afl++-clang when nyx support samcov_pcguard
|
# todo: remove afl++-clang when nyx support samcov_pcguard
|
||||||
linux: llvm llvm-dev clang nasm ninja-build gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libgtk-3-dev afl++-clang pax-utils
|
linux: llvm llvm-dev clang nasm ninja-build gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libgtk-3-dev afl++-clang pax-utils
|
||||||
# update bash for macos to support `declare -A` command`
|
# update bash for macos to support `declare -A` command`
|
||||||
macos: llvm libpng nasm coreutils z3 bash
|
macos: llvm libpng nasm coreutils z3 bash wget
|
||||||
- name: pip install
|
- name: pip install
|
||||||
run: python3 -m pip install msgpack jinja2
|
run: python3 -m pip install msgpack jinja2
|
||||||
# Note that nproc needs to have coreutils installed on macOS, so the order of CI commands matters.
|
# Note that nproc needs to have coreutils installed on macOS, so the order of CI commands matters.
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
#include "png.h"
|
#include "libpng-1.6.37/png.h"
|
||||||
|
|
||||||
#define PNG_CLEANUP \
|
#define PNG_CLEANUP \
|
||||||
if (png_handler.png_ptr) { \
|
if (png_handler.png_ptr) { \
|
||||||
|
@ -538,10 +538,7 @@ mod apple {
|
|||||||
THREAD_AFFINITY_POLICY_COUNT,
|
THREAD_AFFINITY_POLICY_COUNT,
|
||||||
};
|
};
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
use libc::{
|
use libc::{pthread_set_qos_class_self_np, qos_class_t::QOS_CLASS_USER_INITIATED};
|
||||||
pthread_set_qos_class_self_np, qos_class_t::QOS_CLASS_BACKGROUND,
|
|
||||||
qos_class_t::QOS_CLASS_USER_INITIATED,
|
|
||||||
};
|
|
||||||
|
|
||||||
use super::CoreId;
|
use super::CoreId;
|
||||||
use crate::Error;
|
use crate::Error;
|
||||||
@ -596,26 +593,18 @@ mod apple {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
pub fn set_for_current(core_id: CoreId) -> Result<(), Error> {
|
pub fn set_for_current(_core_id: CoreId) -> Result<(), Error> {
|
||||||
unsafe {
|
// This is the best we can do, unlike on intel architecture
|
||||||
// This is the best we can do, unlike on intel architecture
|
// the system does not allow to pin a process/thread to specific cpu.
|
||||||
// the system does not allow to pin a process/thread to specific cpu
|
// We just tell the system that we want performance.
|
||||||
// but instead choosing at best between the two available groups
|
//
|
||||||
// energy consumption's efficient one and the other focusing more on performance.
|
// Furthermore, this seems to fail on background threads, so we ignore errors (result != 0).
|
||||||
let mut qos_class = QOS_CLASS_USER_INITIATED;
|
|
||||||
if core_id.id % 2 != 0 {
|
|
||||||
qos_class = QOS_CLASS_BACKGROUND;
|
|
||||||
}
|
|
||||||
let result = pthread_set_qos_class_self_np(qos_class, 0);
|
|
||||||
|
|
||||||
if result == 0 {
|
unsafe {
|
||||||
Ok(())
|
let _result = pthread_set_qos_class_self_np(QOS_CLASS_USER_INITIATED, 0);
|
||||||
} else {
|
|
||||||
Err(Error::unknown(format!(
|
|
||||||
"Failed to set_for_current {result:?}"
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user