Message ID | 20170706191950.81268-3-luc.vanoostenryck@gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
This patch fixes a reproducible crash and have been ignored since it has been posted two weeks ago. Is there any reasons why? -- Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jul 19, 2017 at 3:20 PM, Luc Van Oostenryck <luc.vanoostenryck@gmail.com> wrote: > This patch fixes a reproducible crash and have been ignored > since it has been posted two weeks ago. > Is there any reasons why? Because you are away? We are discussing the different approach of the first patch and all the sudden you stop response to email. Those small patch are trivial to review. Just a ping would be good enough. BTW, the check should happen before the allocation. Otherwise there is memory leak. Chris pseudo_t phi = __alloc_pseudo(0); static int nr = 0; + if (!source) + return VOID; + -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 + */
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- linearize.c | 3 +++ validation/crash-ep-active.c | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 validation/crash-ep-active.c