diff options
| author | Ting-Han Hou <ue081723@gmail.com> | 2026-10-11 10:30:44 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-13 15:55:51 -0700 |
| commit | 50e8827cb4e29d9982aa325c0593c5ba2fda8d42 (patch) | |
| tree | f1feac0dedef1f7984026669e84801cf9cfd252c /scripts | |
| parent | e37e620a1e405c6a2cb32196fee7c101518cf07b (diff) | |
| download | linux-next-50e8827cb4e29d9982aa325c0593c5ba2fda8d42.tar.gz linux-next-50e8827cb4e29d9982aa325c0593c5ba2fda8d42.zip | |
scripts/gdb: fix stack depot out-of-bounds diagnostic
The pool_index field was renamed to pool_index_plus_1, but the
out-of-bounds diagnostic in stack_depot_fetch() still accesses the old
field. Looking up a handle whose pool index is outside stack_pools
therefore raises "There is no member named pool_index" instead of printing
the diagnostic and returning an empty result.
Use the already decoded pool_index variable in the diagnostic.
Link: https://lore.kernel.org/20261011023044.1722-3-ue081723@gmail.com
Fixes: 9d938f40b228 ("scripts/gdb: rename pool_index to pool_index_plus_1")
Signed-off-by: Ting-Han Hou <ue081723@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Assisted-by: LLM
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: Kuan-Ying Lee <kuan-ying.lee@canonical.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/gdb/linux/stackdepot.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gdb/linux/stackdepot.py b/scripts/gdb/linux/stackdepot.py index 37313a5a51a0..aaa18af25cd1 100644 --- a/scripts/gdb/linux/stackdepot.py +++ b/scripts/gdb/linux/stackdepot.py @@ -39,7 +39,7 @@ def stack_depot_fetch(handle): pool_index = parts['pool_index_plus_1'] - 1 if pool_index >= pools_num: - gdb.write("pool index %d out of bounds (%d) for stack id 0x%08x\n" % (parts['pool_index'], pools_num, handle)) + gdb.write("pool index %d out of bounds (%d) for stack id 0x%08x\n" % (pool_index, pools_num, handle)) return gdb.Value(0), 0 stack_pools = gdb.parse_and_eval('stack_pools') |
