The binary name is needed for reporting with log_path since PID is not
always enough to identify the process right.
Change-Id: Ibefe22bac9f4d2a89eaacb40e6d7dc860b08d5f9
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
"Deduplicate multiple reports for single source location in "
"halt_on_error=false mode (asan only).")
COMMON_FLAG(bool, print_cmdline, false, "Print command line on crash "
- "(asan only).")
+ "(asan and ubsan only).")
#include "sanitizer_common/sanitizer_stacktrace_printer.h"
#include "sanitizer_common/sanitizer_suppressions.h"
#include "sanitizer_common/sanitizer_symbolizer.h"
+#include "sanitizer_common/sanitizer_linux.h"
#include <stdio.h>
using namespace __ubsan;
Decorator Decor;
Printf(Decor.Bold());
+ if (common_flags()->print_cmdline) {
+ char exePath[path_max];
+ ReadBinaryName(exePath, path_max);
+ Printf("program: %s\n", exePath);
+ }
+
renderLocation(Loc);
switch (Level) {