@@ -820,10 +820,15 @@ static pseudo_t argument_pseudo(struct entrypoint *ep, int nr)
pseudo_t alloc_phi(struct basic_block *source, pseudo_t pseudo, int size)
{
- struct instruction *insn = alloc_instruction(OP_PHISOURCE, size);
- pseudo_t phi = __alloc_pseudo(0);
+ struct instruction *insn;
+ pseudo_t phi;
static int nr = 0;
+ if (!source)
+ return VOID;
+
+ insn = alloc_instruction(OP_PHISOURCE, size);
+ phi = __alloc_pseudo(0);
phi->type = PSEUDO_PHI;
phi->nr = ++nr;
phi->def = insn;
new file mode 100644
@@ -0,0 +1,12 @@
+int a(int b)
+{
+ return 0( && 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 | 9 +++++++-- validation/crash-ep-active.c | 12 ++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 validation/crash-ep-active.c