Fix QAsan (#677)

* fix

* more
This commit is contained in:
Dongjia Zhang 2022-06-24 00:54:50 +09:00 committed by GitHub
parent 397507f5b1
commit 5fd63c0076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 13 deletions

View File

@ -254,23 +254,27 @@ pub fn build() {
} */
drop(
Command::new("make")
assert!(Command::new("make")
.current_dir(&out_dir_path)
.env("CC", &cross_cc)
.env("OUT_DIR", &target_dir)
.arg("-C")
.arg(&qasan_dir)
.arg("clean")
.status(),
.status()
.expect("make failed")
.success())
);
drop(
Command::new("make")
assert!(Command::new("make")
.current_dir(&out_dir_path)
.env("CC", &cross_cc)
.env("OUT_DIR", &target_dir)
.arg("-C")
.arg(&qasan_dir)
.status(),
.status()
.expect("make failed")
.success())
);
cc::Build::new()

View File

@ -43,17 +43,16 @@ void __libqasan_print_maps(void) {
int i;
char *line = NULL;
for (i = 0; i < len; i++) {
if (!line) line = { &buf[i];
if (!line) line = &buf[i];
if (buf[i] == '\n') {
buf[i] = 0;
QASAN_LOG("%s\n", line);
line = NULL;
}
}
if (buf[i] == '\n') {
buf[i] = 0;
QASAN_LOG("%s\n", line);
line = NULL;
}
}
if (line) { QASAN_LOG("%s\n", line); }
QASAN_LOG("\n");
if (line) { QASAN_LOG("%s\n", line); }
QASAN_LOG("\n");
}
int __libqasan_is_initialized = 0;