Re: [Cocci] [PATCH v4] coccinelle: misc: add array_size_dup script to detect missed overflow checks

2020-06-24 Thread Julia Lawall
On Tue, 23 Jun 2020, Denis Efremov wrote: > Detect an opencoded expression that is used before or after > array_size()/array3_size()/struct_size() to compute the same size. > > Signed-off-by: Denis Efremov Applied, thanks. julia > --- > Changes in v2: > - python rules moved next to SmPL

Re: [Cocci] [PATCH v4] coccinelle: misc: add array_size_dup script to detect missed overflow checks

2020-06-23 Thread Julia Lawall
I don't agree with any of these comments. julia On Tue, 23 Jun 2020, Markus Elfring wrote: > > Changes in v2: > … > > - assignment operator used > > I prefer the distinction for the application of corresponding metavariables. > > > > Changes in v3: > … > > - \(\|\) changed to &\(E1\|E2\) > >

[Cocci] [PATCH v4] coccinelle: misc: add array_size_dup script to detect missed overflow checks

2020-06-22 Thread Denis Efremov
Detect an opencoded expression that is used before or after array_size()/array3_size()/struct_size() to compute the same size. Signed-off-by: Denis Efremov --- Changes in v2: - python rules moved next to SmPL patterns - assignment operator used - struct_size patterns fixed to check only E3,