Skip to contentSkip to conversation

linux-user: don't print core dump message by default

PATCH Applied Andreas Schwab 3 participants 3 messages Oct 5 – Oct 14

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: don't print core dump message by default

When the target binary is killed by a signal with core dump print a message to the guest_errors log instead of stderr. This avoids breaking various testsuites due to the extra output produced by the emulation.

---
 linux-user/signal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/signal.c +2 -2
index f0a22577e5..cabcc2bb28 100644
@@ -839,8 +839,8 @@ void dump_core_and_abort(CPUArchState *env, int target_sig)
         getrlimit(RLIMIT_CORE, &nodump);
         nodump.rlim_cur=0;
         setrlimit(RLIMIT_CORE, &nodump);
-        (void) fprintf(stderr, "qemu: uncaught target signal %d (%s) - %s\n",
-            target_sig, strsignal(host_sig), "core dumped" );
+        qemu_log_mask(LOG_GUEST_ERROR, "qemu: uncaught target signal %d (%s) - %s\n",
+                      target_sig, strsignal(host_sig), "core dumped" );
     }
 
     preexit_cleanup(env, 128 + target_sig);
Signature · 7 lines
2.56.0


-- 
Andreas Schwab, SUSE Labs, [email protected]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Andreas Schwab

When the target binary is killed by a signal with core dump print a message to the guest_errors log instead of stderr. This avoids breaking various testsuites due to the extra output produced by the emulation.

---
  linux-user/signal.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/signal.c +0 -0
index f0a22577e5..cabcc2bb28 100644

linux-user/signal.c void dump_core_and_abort(CPUArchState *env, int target_sig) · line 846

Quoted 10 lines
linux-user/signal.c +2 -2
@@ -839,8 +839,8 @@ void dump_core_and_abort(CPUArchState *env, int target_sig)
          getrlimit(RLIMIT_CORE, &nodump);
          nodump.rlim_cur=0;
          setrlimit(RLIMIT_CORE, &nodump);
-        (void) fprintf(stderr, "qemu: uncaught target signal %d (%s) - %s\n",
-            target_sig, strsignal(host_sig), "core dumped" );
+        qemu_log_mask(LOG_GUEST_ERROR, "qemu: uncaught target signal %d (%s) - %s\n",
+                      target_sig, strsignal(host_sig), "core dumped" );
      }
 
      preexit_cleanup(env, 128 + target_sig);

r~

Applied
#2 lore raw
Quoted 9 lines · Richard Henderson
Quoted 8 lines · Andreas Schwab

When the target binary is killed by a signal with core dump print a message to the guest_errors log instead of stderr.  This avoids breaking various testsuites due to the extra output produced by the emulation.

---
  linux-user/signal.c | 4 ++--

  1 file changed, 2 insertions(+), 2 deletions(-)

queued up in linux-user-next.

Thanks!
Helge