Re: [Cocci] isomorphism for &(structure)->field vs struct.field

2017-08-18 Thread Julia Lawall
On Fri, 18 Aug 2017, Kees Cook wrote: > I'd like to have a rule that would match both: > > function(ptr); > ptr->field = 7; > > and > > function(); > obj.field = 7; > > to produce: > > new_function(ptr, 7); > > and > > new_function(, 7); > > respectively. The internal isomorphisms don't seem to

[Cocci] isomorphism for &(structure)->field vs struct.field

2017-08-18 Thread Kees Cook
I'd like to have a rule that would match both: function(ptr); ptr->field = 7; and function(); obj.field = 7; to produce: new_function(ptr, 7); and new_function(, 7); respectively. The internal isomorphisms don't seem to cover this? Or I'm maybe doing something wrong? Thanks! -Kees --

Re: [Cocci] isomorphism for &(structure)->field vs struct.field

2017-08-18 Thread Kees Cook
On Fri, Aug 18, 2017 at 10:08 AM, Julia Lawall wrote: > > > On Fri, 18 Aug 2017, Kees Cook wrote: > >> I'd like to have a rule that would match both: >> >> function(ptr); >> ptr->field = 7; >> >> and >> >> function(); >> obj.field = 7; >> >> to produce: >> >>

Re: [Cocci] Improving size determinations with SmPL

2017-08-18 Thread SF Markus Elfring
> The suggested script variant seems to work finally. I have tried it out once more with the following command. elfring@Sonne:~/Projekte/Linux/next-patched> spatch.opt --timeout 67 -j 4 --in-place ~/Projekte/Coccinelle/janitor/safer_size_determination2.cocci fs/jfs … EXN: Common.TimeoutNote: