[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #59870] Segmentation Fault on GNU
From: |
Dmitry Goncharov |
Subject: |
[bug #59870] Segmentation Fault on GNU |
Date: |
Thu, 14 Jan 2021 21:20:06 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
Follow-up Comment #1, bug #59870 (project make):
Here is a patch.
i am not adding a test, because there is a commented out test 19 in
targetvars, which expects different behavior.
Thank you for your report and the test case.
diff --git a/src/read.c b/src/read.c
index 545514c..11ef748 100644
--- a/src/read.c
+++ b/src/read.c
@@ -1802,10 +1802,11 @@ record_target_var (struct nameseq *filenames, char
*defn,
/* Get a reference for this pattern-specific variable struct. */
p = create_pattern_var (name, percent);
p->variable.fileinfo = *flocp;
- /* I don't think this can fail since we already determined it was
a
- variable definition. */
+ /* Could be a variable definition or %:define or %:undefine.
+ sv 59870. */
v = assign_variable_definition (&p->variable, defn);
- assert (v != 0);
+ if (!v)
+ O (fatal, flocp, _("Malformed pattern-specific variable
definition"));
v->origin = origin;
if (v->flavor == f_simple)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59870>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/