Fix pahole segfault with --show_reorg_steps option
PATCH v2 1/1 Fix pahole segfault with --show_reorg_steps option
This function call seems to mistakenly use conf directly rather than cconf which protects against conf being null
This makes pahole segfault seemingly whenever --show_reorg_steps is used, for example: ./pahole -R -S -C task_struct
Signed-off-by Peter Frost <[email protected]>
--- dwarves_fprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dwarves_fprintf.c +1 -1
@@ -2007,7 +2007,7 @@ next_member: printed +=fprintf (fp," */\n" ); } - cacheline = (cconf.base_offset + type->size) %conf_fprintf__cacheline_size (conf); + cacheline = (cconf.base_offset + type->size) %conf_fprintf__cacheline_size (&cconf);if (cacheline !=0 ) printed += fprintf(fp, "%.*s/* last cacheline: %u bytes */\n", cconf.indent, tabs,
Signature · 1 line
2.39.5
Alan Maguire
AppliedQuoted 7 lines · On 20/05/2025 11:13, [email protected] wrote:
This function call seems to mistakenly use conf directly rather than cconf which protects against conf being null
This makes pahole segfault seemingly whenever --show_reorg_steps is used, for example: ./pahole -R -S -C
task_structSigned-off-by Peter Frost <[email protected]>
Applied to the next branch of
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/
Thank you!
Quoted 19 lines
---
dwarves_fprintf.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)dwarves_fprintf.c +1
-1@@ -2007,7 +2007,7 @@ next_member: printed += fprintf(fp, " */\n"); } - cacheline = (cconf.base_offset + type->size) %conf_fprintf__cacheline_size (conf); + cacheline = (cconf.base_offset + type->size) %conf_fprintf__cacheline_size (&cconf); if (cacheline != 0)printed += fprintf(fp, "%.*s/* last cacheline: %u bytes */\n", cconf.indent, tabs,