On 03/08/12 10:49, Richard W.M. Jones wrote:
On Fri, Aug 03, 2012 at 09:59:21AM +0200, Julia Lawall wrote:
Could you try with the following patch?  Be sure that menhir runs.
parsing_cocci/parser_cocci_menhir.ml should go down to 37212 lines.

Original number of lines:

49670 parsing_cocci/parser_cocci_menhir.ml

After rerunning make, menhir 20120123:

37080 parsing_cocci/parser_cocci_menhir.ml

Unfortunately that doesn't seem to help:

$ COCCINELLE_HOME=. ./spatch.opt -sp_file demos/simple.cocci demos/simple.c
init_defs_builtins: ./standard.h
Fatal error: out of memory.

If it would be of any help, here is a buildlog of the native spatch with ocaml 4.00.0 in some configuration that uses the bundled pycaml:

http://hydra.bordeaux.inria.fr/build/61585/nixlog/9/raw

But I expect that the problem lies elsewhere. It crashes in the lexer while it is concatenating many single-character ocaml strings while lexing a C string-constant. The other problem is related to array indexing in the size of the file.

Now, we compile the native spatch with the "-unsafe" flag to ocamlc, which turns off string/array bounds checking for faster code. You could try and remove the flag from Makefile.config{.in}, and do a clean build to see if that gives some runtime error... (then again, if this was an issue, then the bytecode version should have crashed too.)

Possibly problems can also be caused by gcc (in this case: 4.6.3). Then again, if there would really be a problem due to gcc, then other ocaml projects would exhibit similar problems, which is not the case.

Arie
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to