43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From f30c5075de1b2600240d3613f78f0ab5c495a7f2 Mon Sep 17 00:00:00 2001
|
|
From: Lianbo Jiang <lijiang@redhat.com>
|
|
Date: Wed, 17 Mar 2021 21:32:59 +0800
|
|
Subject: [PATCH 02/11] Do not pass through the 'sy' command to GDB
|
|
|
|
The GDB 'symbol-file' command is prohibited in the crash utility, but
|
|
an abbreviation of it, the 'sy' is not prohibited. This can discard
|
|
symbol table from the current symbol file, and eventually caused the
|
|
failure of crash utility after executing the 'sys' command as below:
|
|
|
|
crash> sy
|
|
Discard symbol table from `/usr/lib/debug/usr/lib/modules/5.11.0-2.el9.x86_64/vmlinux'? (y or n) Please answer y or n.
|
|
Discard symbol table from `/usr/lib/debug/usr/lib/modules/5.11.0-2.el9.x86_64/vmlinux'? (y or n) No symbol file now.
|
|
crash> sys
|
|
double free or corruption (!prev)
|
|
Aborted (core dumped)
|
|
|
|
To prevent the abort, add the 'sy' command to the prohibited list so
|
|
that the crash utility does not pass it directly to GDB.
|
|
|
|
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
|
|
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
|
|
---
|
|
gdb_interface.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/gdb_interface.c b/gdb_interface.c
|
|
index f4f4dd3993db..1f10006a2d63 100644
|
|
--- a/gdb_interface.c
|
|
+++ b/gdb_interface.c
|
|
@@ -702,7 +702,7 @@ static char *prohibited_list[] = {
|
|
"clear", "disable", "enable", "condition", "ignore", "frame",
|
|
"select-frame", "f", "up", "down", "catch", "tcatch", "return",
|
|
"file", "exec-file", "core-file", "symbol-file", "load", "si", "ni",
|
|
- "shell",
|
|
+ "shell", "sy",
|
|
NULL /* must be last */
|
|
};
|
|
|
|
--
|
|
2.29.2
|
|
|