Re: [PATCH v4 06/16] dyndbg: fix a BUG_ON in ddebug_describe_flags

From: jim . cromie
Date: Thu Dec 12 2019 - 20:35:31 EST


On Tue, Dec 10, 2019 at 12:58 PM Jason Baron <jbaron@xxxxxxxxxx> wrote:
> >
> > +struct flagsbuf { char buf[12]; }; /* big enough to hold all the flags */
>
>
> ARRAY_SIZE(opt_array) + 1
>
> max number of flags + string termination.
>


Ok 12 is generous.
v2 had xyz flags, for a total of 9+1 flag chars.
figured a multiple of 4 was sensible, almost went to 16
then didnt think about it anymore.