diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-04-11 11:19:31 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-05-21 17:27:45 +0200 |
| commit | 557aba56c4bc4c4b4c38b97a2d545c31e0706b31 (patch) | |
| tree | 433d6aaa322595d9434b57fabfb5462edc67c568 /linearize.c | |
| parent | 633a390c169082646e7172c753f319568ef22695 (diff) | |
| download | sparse-dev-557aba56c4bc4c4b4c38b97a2d545c31e0706b31.tar.gz | |
bad-goto: do not linearize if the IR will be invalid
In some error cases, it's not possible to produce a valid &
correct IR for the concerned function. For exemple, if the
AST contains invalid gotos, the CFG will either be invalid
or won't correspond to the erroneous source code.
So, refuse to linearize such functions.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'linearize.c')
| -rw-r--r-- | linearize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linearize.c b/linearize.c index b040d345..49274681 100644 --- a/linearize.c +++ b/linearize.c @@ -2480,7 +2480,7 @@ static struct entrypoint *linearize_fn(struct symbol *sym, struct symbol *base_t pseudo_t result; int i; - if (!stmt) + if (!stmt || sym->bogus_linear) return NULL; ep = alloc_entrypoint(); |
