Skip to content

pahole: Fix -C -T segfault

Aditya Dutt dwarves 1 version Applied

Status from this message: Thanks, applied, I'll now stop processing patches and release 1.32

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2pahole: Fix option name in the -m/-C error messagepahole.c+1 -10 replies
2/2pahole: Fix -C -T segfaultpahole.c+6 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH dwarves 0/2] pahole: Fix -C -T segfault

'formatter' is NULL when -T is given and the -C path calls it, which segfaults.
Patch 2 rejects that, like '-m -C' already does.
Patch 1 fixes the '-m -C' error, which names '--class' incorrectly.

-T has set 'formatter' to NULL since commit 286c7740fd98c4df but -C did not call formatter until f5857bd34b220a64 (used to call tag__fprintf before), so added Fixes tag referencing it.

I think support for the combinations '-T -C' and '-m -C' could be added in the future.

Problem with doing that right now is that the counting logic lives in the 'class_name == NULL' block that -C skips. And -C stops loading CUs once all classes are found.

Aditya Dutt (2):
pahole: Fix option name in the -m/-C error message
pahole: Fix -C -T segfault

 pahole.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1