On Mon, 4 Jan 2010, Németh Márton wrote:
> Hi,
>
> I'm running the following SmPL using spatch 0.1.10 against Linux
> kernel 2.6.32-rc2, and it seems that the process stucks at a certain
> file. My command line was the following:
>
> localhost:/usr/src/linux$ spatch -sp_file const_field2.spatch -all_includes
> drivers/video/sis/initextlfb.c
>
> The spatch which causes the infinite loop is:
>
> // <smpl>
> @r@
> identifier I1, I2, x;
> @@
> struct I1 {
> ...
> const struct I2 *x;
> ...
> };
> @s@
> identifier r.I1, y;
> identifier r.x, E;
> @@
> struct I1 y = {
> .x = E,
> };
> @c@
> identifier r.I2;
> identifier s.E;
> @@
> const struct I2 E[] = ... ;
> @depends on !c@
> identifier r.I2;
> identifier s.E;
> @@
> + const
> struct I2 E[] = ...;
> // </smpl>
>
> Should I enable some debug messages to find out more?
You could try the options -debug and -show_trying.
>From your semantic patch, I don't see what should cause an infinite loop.
But it may be hitting a file that is very hard to parse, and so it is
getting stuck there. There are some firmware files, I think, that pose
problems for parsing. It should be printing out HANDLING messages that
let you know what file is posing problems. You may also want to unlimit
your stack size.
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)