From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Checking data structure modification with SmPL
Date: Tue, 18 Aug 2015 13:34:32 +0200 [thread overview]
Message-ID: <55D31848.1060900@users.sourceforge.net> (raw)
Hello,
I have tried another small SmPL script out.
@show_modification_before_memory_release@
expression value;
identifier element, var;
@@
<+...
*var->element = value;
...+>
free(var);
This approach is working to some degree.
Now I would like to support more possibilities for the determination
of affected members from the shown variable.
@show_modification_before_memory_release@
expression element, value;
identifier var;
@@
<+...
*var->element = value;
...+>
free(var);
elfring at Sonne:~/Projekte/Miller/lokal> spatch.opt -sp-file ~/Projekte/Coccinelle/janitor/show_modification_before_memory_release1.cocci c/containers/hss.c
init_defs_builtins: /usr/local/lib/coccinelle/standard.h
101 108
Fatal error: exception Failure("minus: parse error: \n = File \"/home/elfring/Projekte/Coccinelle/janitor/show_modification_before_memory_release1.cocci\", line 6, column 6, charpos = 101\n around = 'element', whole content = *var->element = value;\n")
How can this source code analysis be improved?
Regards,
Markus
next reply other threads:[~2015-08-18 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 11:34 SF Markus Elfring [this message]
2015-08-22 14:17 ` [Cocci] Checking data structure modification with SmPL Julia Lawall
2015-08-22 15:58 ` SF Markus Elfring
2015-08-22 16:05 ` Julia Lawall
2015-08-22 16:50 ` SF Markus Elfring
2015-08-22 19:07 ` Julia Lawall
2015-08-22 20:01 ` SF Markus Elfring
[not found] ` <alpine.DEB.2.10.1508221303590.2446@hadrien>
2015-08-22 20:50 ` SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55D31848.1060900@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=cocci@systeme.lip6.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox