texlive[59697] Build/source/texk/web2c: ptex: fix segmentation fault
commits+hironobu at tug.org
commits+hironobu at tug.org
Fri Jun 25 10:59:50 CEST 2021
Revision: 59697
http://tug.org/svn/texlive?view=revision&revision=59697
Author: hironobu
Date: 2021-06-25 10:59:50 +0200 (Fri, 25 Jun 2021)
Log Message:
-----------
ptex: fix segmentation fault for disp_node-only paragraphs in line_break
Modified Paths:
--------------
trunk/Build/source/texk/web2c/eptexdir/ChangeLog
trunk/Build/source/texk/web2c/eptexdir/etex.ch1
trunk/Build/source/texk/web2c/ptexdir/ChangeLog
trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
Modified: trunk/Build/source/texk/web2c/eptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/ChangeLog 2021-06-24 23:49:07 UTC (rev 59696)
+++ trunk/Build/source/texk/web2c/eptexdir/ChangeLog 2021-06-25 08:59:50 UTC (rev 59697)
@@ -1,3 +1,8 @@
+2021-06-25 Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
+
+ * etex.ch1: Adapt to ptex-base.ch for fix of
+ https://github.com/texjporg/tex-jp-build/issues/123
+
2021-03-23 Karl Berry <karl at tug.org>
* TL'21.
Modified: trunk/Build/source/texk/web2c/eptexdir/etex.ch1
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/etex.ch1 2021-06-24 23:49:07 UTC (rev 59696)
+++ trunk/Build/source/texk/web2c/eptexdir/etex.ch1 2021-06-25 08:59:50 UTC (rev 59697)
@@ -154,6 +154,16 @@
@z
@x [48.1145]
+ pop_nest; w:=-max_dimen;
+ end
+ { |disp_node|-only paragraphs are ignored }
+ at y
+ @<Prepare for display after an empty paragraph@>
+ end
+ { |disp_node|-only paragraphs are ignored }
+ at z
+
+ at x [48.1145]
else begin adjust_hlist(head,true); line_break(display_widow_penalty);@/
@y
else begin adjust_hlist(head,true); line_break(true);@/
Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2021-06-24 23:49:07 UTC (rev 59696)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2021-06-25 08:59:50 UTC (rev 59697)
@@ -1,3 +1,12 @@
+2021-06-25 Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
+ and Hironobu Yamashita <h.y.acetaminophen at gmail.com>
+
+ * ptex-base.ch (end_graf, @<Go into display math mode@>):
+ Ignore disp_node-only paragraphs.
+ * ptex-base.ch (line_break): consider when link(temp_head)=tail
+ and it is a disp_node.
+ https://github.com/texjporg/tex-jp-build/issues/123
+
2021-03-23 Karl Berry <karl at tug.org>
* TL'21.
Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2021-06-24 23:49:07 UTC (rev 59696)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2021-06-25 08:59:50 UTC (rev 59697)
@@ -4185,10 +4185,10 @@
delete_glue_ref(cur_kanji_skip); delete_glue_ref(cur_xkanji_skip);
cur_kanji_skip:=space_ptr(head); cur_xkanji_skip:=xspace_ptr(head);
add_glue_ref(cur_kanji_skip); add_glue_ref(cur_xkanji_skip);
-link(temp_head):=link(head);
if not is_char_node(tail)and(type(tail)=disp_node) then
begin free_node(tail,small_node_size); tail:=prev_node; link(tail):=null
end;
+link(temp_head):=link(head);
if is_char_node(tail) then tail_append(new_penalty(inf_penalty))
else if type(tail)<>glue_node then tail_append(new_penalty(inf_penalty))
@z
@@ -5274,7 +5274,10 @@
begin if head=tail then pop_nest {null paragraphs are ignored}
else line_break(widow_penalty);
@y
- begin if head=tail then pop_nest {null paragraphs are ignored}
+ begin if (link(head)=tail)and(not is_char_node(tail)and(type(tail)=disp_node)) then
+ begin free_node(tail,small_node_size); tail:=head; link(head):=null; end;
+ { |disp_node|-only paragraphs are ignored }
+ if head=tail then pop_nest {null paragraphs are ignored}
else begin adjust_hlist(head,true); line_break(widow_penalty)
end;
@z
@@ -5732,6 +5735,11 @@
@x [48.1145] l.22435 - pTeX: Call adjust_hlist at begin of display
else begin line_break(display_widow_penalty);@/
@y
+else if (link(head)=tail)and(not is_char_node(tail)and(type(tail)=disp_node)) then
+ begin free_node(tail,small_node_size); tail:=head; link(head):=null;
+ pop_nest; w:=-max_dimen;
+ end
+ { |disp_node|-only paragraphs are ignored }
else begin adjust_hlist(head,true); line_break(display_widow_penalty);@/
@z
More information about the tex-live-commits
mailing list.