All of lore.kernel.org
 help / color / mirror / Atom feed
From: der.herr@hofr.at (Nicholas Mc Guire)
To: cocci@systeme.lip6.fr
Subject: [Cocci] problem with Hashtbl in badzero.cocci
Date: Sun, 28 Sep 2014 19:09:32 +0200	[thread overview]
Message-ID: <20140928170932.GA17746@opentech.at> (raw)
In-Reply-To: <alpine.DEB.2.10.1409281835210.2394@hadrien>

On Sun, 28 Sep 2014, Julia Lawall wrote:

> On Sun, 28 Sep 2014, Nicholas Mc Guire wrote:
>
> >
> > HI !
> >
> >  make coccicheck in 3.16++
> >  is failing on Debian 7.6 with
> >
> > make coccicheck MODE=report -C /usr/src/linux-stable/ M=/usr/src/read_msr
> > make[1]: Entering directory `/usr/src/linux-stable'
> >
> > Please check for false positives in the output before submitting a
> > patch.
> > When using "patch" mode, carefully review the patch before submitting
> > it.
> >
> > 644 647
> > Fatal error: exception Failure("scriptmeta: parse error:
> >  = File "./scripts/coccinelle/null/badzero.cocci", line 22, column 0,
> > charpos =
> >  644
> >     around = 'let', whole content = let negtable = Hashtbl.create 101
> > ")
> > make[1]: Leaving directory `/usr/src/linux-stable'
> >
> > built spatch from source:
> >   $ git clone https://github.com/coccinelle/coccinelle
> >   $ git tag -> git checkout -b build coccinelle-1.0.0-rc21
> >   $ apt-get install python2.6-dev libpycaml-ocaml-dev \
> >           libmenhir-ocaml-dev menhir ocaml-native-compilers \
> >           ocamlduce camlp4-extra ocaml-findlib pkg-config \
> >           texlive-fonts-extra
> >   $ ./configure --with-python --with-menhir
> >   $ make all
> >   $ make install
> >
> >   $ spatch --version
> >     spatch version 1.0.0-rc21 with Python support and with Str regexp support
> >
> > is this a ocaml version issue ? or did I screw up something in the
> > config/build ?
>
> Could you try removing the @@ before let negtable, just to see if it
> works?
>

root at debian:/usr/src/linux/scripts/coccinelle/null# git diff badzero.cocci
diff --git a/scripts/coccinelle/null/badzero.cocci b/scripts/coccinelle/null/bad
index 5551da2..d6d1196 100644
--- a/scripts/coccinelle/null/badzero.cocci
+++ b/scripts/coccinelle/null/badzero.cocci
@@ -19,7 +19,6 @@ virtual org
 virtual report
 
 @initialize:ocaml@
-@@
 let negtable = Hashtbl.create 101
 
 @depends on patch@


but this now really blows up :)


make coccicheck MODE=report -C /usr/src/linux M=/usr/src/mce
make[1]: Entering directory `/usr/src/linux'

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

Usage: spatch --sp-file <SP> <infile> [-o <outfile>] [--iso-file <iso>] [options]
Options are:
  --sp-file                    <file> the semantic patch file
  -o                           <file> the output file
...
  --help
692 695
Fatal error: exception Failure("scriptmeta: parse error:
 = File "./scripts/coccinelle/null/badzero.cocci", line 22, column 0,  charpos = 692
    around = 'let', whole content = let negtable = Hashtbl.create 101
")
make[1]: Leaving directory `/usr/src/linux'



> Could it be that make coccicheck is finding some older version of
> Coccinelle?
>
nop - this is a clean install from scratch - no other coccinelle on this box.

ocaml is 3.12.1
menhir, version 20120123
Python 2.7.3
pycaml 0.82-14



thx!
hofrat

  reply	other threads:[~2014-09-28 17:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-28 16:16 [Cocci] problem with Hashtbl in badzero.cocci Nicholas Mc Guire
2014-09-28 16:36 ` Julia Lawall
2014-09-28 17:09   ` Nicholas Mc Guire [this message]
2014-09-28 18:54     ` Julia Lawall
2014-09-29  6:27       ` Nicholas Mc Guire

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=20140928170932.GA17746@opentech.at \
    --to=der.herr@hofr.at \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.