Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- linearize.c | 3 +++ validation/crash-ep-active.c | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 validation/crash-ep-active.c diff --git a/linearize.c b/linearize.c index c1ad0c2a4..b76e980dc 100644 --- a/linearize.c +++ b/linearize.c @@ -827,6 +827,9 @@ pseudo_t alloc_phi(struct basic_block *source, pseudo_t pseudo, int size) pseudo_t phi = __alloc_pseudo(0); static int nr = 0; + if (!source) + return VOID; + phi->type = PSEUDO_PHI; phi->nr = ++nr; phi->def = insn; diff --git a/validation/crash-ep-active.c b/validation/crash-ep-active.c new file mode 100644 index 000000000..61e17a188 --- /dev/null +++ b/validation/crash-ep-active.c @@ -0,0 +1,17 @@ +void a(void) +{ + 0 (0 + && + ({ + goto b; + }); + ); +} + +/* + * check-name: crash ep->active + * check-command: test-linearize $file + * + * check-error-ignore + * check-output-ignore + */ -- 2.13.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html