Since I am not in the mailing list, reply to me pls. > On Mar 16, 2021, at 2:22 PM, Wengang Wang <wen.gang.wang@xxxxxxxxxx> wrote: > > From a UEK5 vmcore, I see that > > crash> p &__start___trace_bprintk_fmt > $1 = (const char *(*)[]) 0xffffffffa163f1d0 > crash> p &__stop___trace_bprintk_fmt > $2 = (const char *(*)[]) 0xffffffffa163f1f0 > > so (0xffffffffa163f1f0 - 0xffffffffa163f1d0)/8 = 4. > > there are two zero addresses at index 2 and 3. > crash> rd __start___trace_bprintk_fmt 4 > ffffffffa163f1d0: ffffffffa11ccdca ffffffffa11ccdca ................ > ffffffffa163f1e0: 0000000000000000 0000000000000000 ................ > > current implementation will fail (no output for trace show command) > on seeing the zero addresses. > > fix: ignore zero addresses in add_print_address. > > tested to be good (compared the ftrace log from vmcore and that from live system). > > Signed-off-by: Wengang Wang <wen.gang.wang@xxxxxxxxxx> > --- > extensions/trace.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/extensions/trace.c b/extensions/trace.c > index c26b6c7..491e4eb 100644 > --- a/extensions/trace.c > +++ b/extensions/trace.c > @@ -2226,6 +2226,8 @@ static int add_print_address(long address) > size_t len; > int i; > > + if (!address) > + return 0; > len = read_string(address, string, sizeof(string)); > if (!len) > return -1; > -- > 1.8.3.1 > -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility