From: julia.lawall@lip6.fr (Julia Lawall)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Replacing one (specific!) type with another
Date: Tue, 11 Oct 2016 08:51:39 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.10.1610110848320.3322@hadrien> (raw)
In-Reply-To: <87h98jq06v.fsf@vostro.rath.org>
On Mon, 10 Oct 2016, Nikolaus Rath wrote:
> On Oct 10 2016, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >> Ok, we're getting there. I've removed the second 'symbol' line, and
> >> (permanently) updated to 1.0.6. However, now it seems to simply run
> >> forever:
> >>
> >> $ ../coccinelle-1.0.6/spatch.opt --sp-file
> >> ~/in-progress/libfuse/se-rename.cocci --in-place lib/ include/ test/
> >> example/ util/
> >> init_defs_builtins: /home/nikratio/tmp/coccinelle-1.0.6/standard.h
> >> warning: patch output can only be created when only one
> >> directory is specified or when the -patch flag is used
> >> HANDLING: lib/fuse.c
> >> (ONCE) Expected tokens fuse_session f
> >> Skipping:lib/fuse_opt.c
> >> HANDLING: lib/helper.c
> >> Skipping:lib/mount_bsd.c
> >> Skipping:lib/fuse_loop_mt.c
> >> Skipping:lib/fuse_loop.c
> >> HANDLING: lib/cuse_lowlevel.c
> >> diff =
> >> [...]
> >> HANDLING: lib/fuse_lowlevel.c
> >>
> >> At this point it has been hanging for about 15 minutes now, steady
> >> eating CPU time.
> >>
> >> Is it supposed to take that long? The fuse_lowlevel.c file is 74k with
> >> 2465 lines of code.
> >
> > You can use --show-trying to see what function it is getting stuck on. If
> > the function has a lot of ifs and loops, it may indeed take a long
> > time. ... follows possible paths in the execution graph and a sequence of
> > ifs makes the number of paths grow exponentially.
> >
> > A solution is to add a timeout, eg --timeout 120 (120 seconds). You will
> > need to check a file on which there is a timeout manually.
> >
> > Tracing paths around loops is not really relevant in your case, so you can
> > also safely use the option --no-loops, which will avoid taking the back
> > edges.
>
> I tried doing both, but it still gets stuck:
>
> init_defs_builtins: /home/nikratio/tmp/coccinelle-1.0.6/standard.h
> HANDLING: lib/fuse_lowlevel.c
> -----------------------------------------------------------------------
> rule starting on line 1 =
> -----------------------------------------------------------------------
> [...]
> -----------------------------------------------------------------------
> rule starting on line 13 =
> -----------------------------------------------------------------------
> [...]
> trying function: do_init: fuse_lowlevel.c:1812
>
>
> The do_init() function doesn't seem all that terrible to me though:
> https://github.com/libfuse/libfuse/blob/58273972f0b20/lib/fuse_lowlevel.c#L1812
Yes it does. Look at lines 1852-1877. There are 2^13 execution paths
there, and there is another such stack of ifs later in the function.
So you did add a timeout and it is still getting stuck? Try a very short
timeout just to see what happens.
julia
next prev parent reply other threads:[~2016-10-11 6:51 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-05 3:27 [Cocci] Replacing one (specific!) type with another Nikolaus Rath
2016-10-05 5:45 ` Julia Lawall
2016-10-05 16:09 ` Nikolaus Rath
2016-10-05 16:39 ` Michael Stefaniuc
2016-10-05 17:21 ` [Cocci] Replacing one variable name " SF Markus Elfring
2016-10-05 22:34 ` Nikolaus Rath
2016-10-06 5:42 ` SF Markus Elfring
2016-10-06 5:56 ` Julia Lawall
2016-10-05 20:02 ` [Cocci] Replacing one (specific!) type " Julia Lawall
2016-10-05 22:38 ` Nikolaus Rath
2016-10-06 5:55 ` Julia Lawall
2016-10-08 3:16 ` Nikolaus Rath
2016-10-08 5:50 ` Julia Lawall
2016-10-08 20:45 ` Nikolaus Rath
2016-10-08 21:23 ` Julia Lawall
2016-10-09 6:32 ` SF Markus Elfring
2016-10-08 6:48 ` [Cocci] Usage of "expressions" and "identifiers" with SmPL SF Markus Elfring
2016-10-08 6:57 ` Julia Lawall
[not found] ` <alpine.DEB.2.10.1610080850470.7750@hadrien>
2016-10-08 7:49 ` SF Markus Elfring
2016-10-08 7:56 ` Julia Lawall
2016-10-08 8:26 ` SF Markus Elfring
2016-10-08 8:38 ` Julia Lawall
2016-10-08 9:25 ` SF Markus Elfring
2016-10-08 20:28 ` Nikolaus Rath
2016-10-09 7:49 ` SF Markus Elfring
2016-10-09 20:38 ` Nikolaus Rath
2016-10-10 6:48 ` SF Markus Elfring
2016-10-10 6:50 ` Julia Lawall
2016-10-06 6:30 ` [Cocci] Replacing one (specific!) type with another SF Markus Elfring
2016-10-08 4:22 ` Nikolaus Rath
2016-10-08 5:31 ` Julia Lawall
2016-10-08 20:52 ` Nikolaus Rath
2016-10-08 21:21 ` Julia Lawall
2016-10-09 20:45 ` Nikolaus Rath
2016-10-10 4:49 ` Julia Lawall
2016-10-10 4:54 ` Julia Lawall
2016-10-10 15:56 ` Nikolaus Rath
2016-10-10 18:45 ` Nikolaus Rath
2016-10-10 19:45 ` Julia Lawall
2016-10-10 21:27 ` Nikolaus Rath
2016-10-10 21:33 ` Julia Lawall
2016-10-10 23:00 ` Nikolaus Rath
2016-10-11 6:51 ` Julia Lawall [this message]
2016-10-12 15:08 ` Nikolaus Rath
2016-10-12 20:37 ` Julia Lawall
2016-10-05 5:51 ` 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=alpine.DEB.2.10.1610110848320.3322@hadrien \
--to=julia.lawall@lip6.fr \
--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.