[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7087] parsetexi avoid segfault in test
From: |
Gavin D. Smith |
Subject: |
[7087] parsetexi avoid segfault in test |
Date: |
Thu, 31 Mar 2016 18:02:53 +0000 |
Revision: 7087
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7087
Author: gavin
Date: 2016-03-31 18:02:53 +0000 (Thu, 31 Mar 2016)
Log Message:
-----------
parsetexi avoid segfault in test
Modified Paths:
--------------
trunk/tp/parsetexi/README
trunk/tp/parsetexi/end_line.c
Modified: trunk/tp/parsetexi/README
===================================================================
--- trunk/tp/parsetexi/README 2016-03-31 16:51:59 UTC (rev 7086)
+++ trunk/tp/parsetexi/README 2016-03-31 18:02:53 UTC (rev 7087)
@@ -3,6 +3,11 @@
=====================================================================
Notes -
+
+should be able to debug with gdb. Add
+
+./configure PERL_EXT_CFLAGS='-g -O0'
+
How to debug with valgrind -
export PERL5LIB to the value in the makeinfo script
Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c 2016-03-31 16:51:59 UTC (rev 7086)
+++ trunk/tp/parsetexi/end_line.c 2016-03-31 18:02:53 UTC (rev 7087)
@@ -1616,7 +1616,7 @@
}
}
- /* End of a definition line, like @deffn */ // 2933
+ /* End of a definition line, like @deffn */ // 2778
else if (current->parent && current->parent->type == ET_def_line)
{
enum command_id def_command, original_def_command;
@@ -1628,9 +1628,12 @@
k = lookup_extra_key (current->parent, "def_command");
if (k)
- ; // TODO
+ original_def_command = lookup_command ((char *) k->value);
+ else
+ original_def_command = current->parent->parent->cmd;
+ // TODO: What if k is not defined?
- original_def_command = def_command = current->parent->parent->cmd;
+ def_command = original_def_command;
/* Strip an trailing x from the command, e.g. @deffnx -> @deffn */
if (command_data(def_command).flags & CF_misc)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7087] parsetexi avoid segfault in test,
Gavin D. Smith <=