Merge ~vpa1977/ubuntu/+source/gettext:java21_compat into ubuntu/+source/gettext:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merge reported by: Vladimir Petko
Merged at revision: df2fd2e38216aa49706a37ea6e191387c968474e
Proposed branch: ~vpa1977/ubuntu/+source/gettext:java21_compat
Merge into: ubuntu/+source/gettext:ubuntu/devel
Diff against target: 489 lines (+395/-8)
5 files modified
debian/changelog (+9/-0)
debian/control (+2/-1)
debian/patches/07-java-17-support.patch (+27/-7)
debian/patches/12-in-language-java-avoid-stack-overflow.patch (+356/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Simon Chopin Pending
git-ubuntu import Pending
Review via email: mp+459117@code.launchpad.net

Description of the change

Changes:
 - Update list of supported Java versions
 - Bump Java compatibility level to 8
 - Default to 11 if Java version is not on the list (previously was using level 1.1. which is not supported by any relevant Java machine)
 - Cherry-pick upstream patch that fixes the stack overflow

Note: gettext 0.22.4 refactors Java support and this delta can be safely dropped with a new upstream release.

PPA: ppa:vpa1977/gettext
PPA (Default Java 21): ppa:vpa1977/gettext-21

Testing:
 - piuparts test[1]
 - build ssl-utils-clojure both with default Java 17[2] and 21[3]

[1] https://bugs.launchpad.net/ubuntu/+source/gettext/+bug/2050033/comments/1
[2] https://launchpadlibrarian.net/710814814/buildlog_ubuntu-noble-amd64.ssl-utils-clojure_3.5.3-1~ppa1_BUILDING.txt.gz
[3] https://launchpad.net/~vpa1977/+archive/ubuntu/gettext-21/+build/27676266/+files/buildlog_ubuntu-noble-amd64.ssl-utils-clojure_3.5.3-1~ppa1_BUILDING.txt.gz

To post a comment you must log in.
Revision history for this message
Simon Chopin (schopin) wrote :

This appears to have been sponsored already!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 3395c81..850f56c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
1gettext (0.21-14ubuntu1) noble; urgency=medium
2
3 * Update patches to support Java 21 (LP: #2050033):
4 - d/p/12-in-language-java-avoid-stack-overflow.patch: cherry-pick upstream
5 patch to resolve Java 21 FTBFS.
6 - d/p/07-java-17-support.patch: add Java versions, set release level 8.
7
8 -- Vladimir Petko <vladimir.petko@canonical.com> Mon, 22 Jan 2024 13:33:17 +1300
9
1gettext (0.21-14) unstable; urgency=medium10gettext (0.21-14) unstable; urgency=medium
211
3 * Update po-mode. Closes: #1055020.12 * Update po-mode. Closes: #1055020.
diff --git a/debian/control b/debian/control
index d888609..8b2d348 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
1Source: gettext1Source: gettext
2Section: devel2Section: devel
3Priority: optional3Priority: optional
4Maintainer: Santiago Vila <sanvila@debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Santiago Vila <sanvila@debian.org>
5Standards-Version: 4.6.26Standards-Version: 4.6.2
6Build-Depends: bison,7Build-Depends: bison,
7 debhelper-compat (= 13),8 debhelper-compat (= 13),
diff --git a/debian/patches/07-java-17-support.patch b/debian/patches/07-java-17-support.patch
index 499d627..b929832 100644
--- a/debian/patches/07-java-17-support.patch
+++ b/debian/patches/07-java-17-support.patch
@@ -11,7 +11,7 @@ Bug-Debian: https://bugs.debian.org/1012105
11 gt_JAVA_CHOICE11 gt_JAVA_CHOICE
12 12
13-gt_JAVACOMP([1.5], [1.6])13-gt_JAVACOMP([1.5], [1.6])
14+gt_JAVACOMP([1.7], [1.7])14+gt_JAVACOMP([1.8], [1.8])
15 AC_CHECK_PROG([JAR], [jar], [jar])15 AC_CHECK_PROG([JAR], [jar], [jar])
16 if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then16 if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
17 BUILDJAVA=yes17 BUILDJAVA=yes
@@ -22,7 +22,7 @@ Bug-Debian: https://bugs.debian.org/1012105
22 22
23 gt_JAVAEXEC23 gt_JAVAEXEC
24-gt_JAVACOMP([1.5])24-gt_JAVACOMP([1.5])
25+gt_JAVACOMP([1.7])25+gt_JAVACOMP([1.8])
26 AC_CHECK_PROG([JAR], [jar], [jar])26 AC_CHECK_PROG([JAR], [jar], [jar])
27 if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then27 if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
28 BUILDJAVA=yes28 BUILDJAVA=yes
@@ -33,7 +33,7 @@ Bug-Debian: https://bugs.debian.org/1012105
33 gt_JAVAEXEC([TestAWT], [$srcdir/m4])33 gt_JAVAEXEC([TestAWT], [$srcdir/m4])
34 dnl Check whether we can build Java programs.34 dnl Check whether we can build Java programs.
35-gt_JAVACOMP([1.5])35-gt_JAVACOMP([1.5])
36+gt_JAVACOMP([1.7])36+gt_JAVACOMP([1.8])
37 AC_CHECK_PROG([JAR], [jar], [jar])37 AC_CHECK_PROG([JAR], [jar], [jar])
38 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then38 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
39 BUILDJAVA=yes39 BUILDJAVA=yes
@@ -44,7 +44,7 @@ Bug-Debian: https://bugs.debian.org/1012105
44 gt_JAVAEXEC([Test15], [$srcdir/m4])44 gt_JAVAEXEC([Test15], [$srcdir/m4])
45 dnl Check whether we can build Java programs.45 dnl Check whether we can build Java programs.
46-gt_JAVACOMP([1.5], [1.6])46-gt_JAVACOMP([1.5], [1.6])
47+gt_JAVACOMP([1.7], [1.7])47+gt_JAVACOMP([1.8], [1.8])
48 AC_CHECK_PROG([JAR], [jar], [jar])48 AC_CHECK_PROG([JAR], [jar], [jar])
49 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then49 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
50 BUILDJAVA=yes50 BUILDJAVA=yes
@@ -55,7 +55,7 @@ Bug-Debian: https://bugs.debian.org/1012105
55 gt_JAVAEXEC([TestAWT], [$srcdir/m4])55 gt_JAVAEXEC([TestAWT], [$srcdir/m4])
56 dnl Check whether we can build Java programs.56 dnl Check whether we can build Java programs.
57-gt_JAVACOMP([1.5])57-gt_JAVACOMP([1.5])
58+gt_JAVACOMP([1.7])58+gt_JAVACOMP([1.8])
59 AC_CHECK_PROG([JAR], [jar], [jar])59 AC_CHECK_PROG([JAR], [jar], [jar])
60 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then60 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
61 BUILDJAVA=yes61 BUILDJAVA=yes
@@ -66,7 +66,7 @@ Bug-Debian: https://bugs.debian.org/1012105
66 gt_JAVAEXEC66 gt_JAVAEXEC
67 dnl Check whether we can build Java programs.67 dnl Check whether we can build Java programs.
68-gt_JAVACOMP([1.5])68-gt_JAVACOMP([1.5])
69+gt_JAVACOMP([1.7])69+gt_JAVACOMP([1.8])
70 AC_CHECK_PROG([JAR], [jar], [jar])70 AC_CHECK_PROG([JAR], [jar], [jar])
71 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then71 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
72 BUILDJAVA=yes72 BUILDJAVA=yes
@@ -77,7 +77,27 @@ Bug-Debian: https://bugs.debian.org/1012105
77 which is in a temporary directory in our case. */77 which is in a temporary directory in our case. */
78 java_sources[0] = java_file_name;78 java_sources[0] = java_file_name;
79- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,79- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,
80+ if (compile_java_class (java_sources, 1, NULL, 0, "1.7", "1.7", directory,80+ if (compile_java_class (java_sources, 1, NULL, 0, "1.8", "1.8", directory,
81 true, false, true, verbose > 0))81 true, false, true, verbose > 0))
82 {82 {
83 if (!verbose)83 if (!verbose)
84--- a/gettext-tools/gnulib-m4/javacomp.m4
85+++ b/gettext-tools/gnulib-m4/javacomp.m4
86@@ -127,7 +127,7 @@
87 }`
88 case "$target_version" in
89 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 9 | 10 | 11) ;;
90- 12 | 13 | 14 | 15 | 16 | 17)
91+ 12 | 13 | 14 | 15 | 16 | 17 | 18| 19| 20 | 21 | 22 | 23| 24 | 25 | 26)
92 dnl Assume that these (not yet released) Java versions will behave
93 dnl like the preceding ones.
94 target_version=11 ;;
95@@ -135,7 +135,7 @@
96 dnl JDK 1.1.X returns null.
97 target_version=1.1 ;;
98 *) AC_MSG_WARN([unknown target-version $target_version, please update gt_@&t@JAVACOMP macro])
99- target_version=1.1 ;;
100+ target_version=11 ;;
101 esac
102 else
103 target_version="1.1"
diff --git a/debian/patches/12-in-language-java-avoid-stack-overflow.patch b/debian/patches/12-in-language-java-avoid-stack-overflow.patch
84new file mode 100644104new file mode 100644
index 0000000..57d8260
--- /dev/null
+++ b/debian/patches/12-in-language-java-avoid-stack-overflow.patch
@@ -0,0 +1,356 @@
1Description: xgettext: In language Java, avoid stack overflow.
2 * gettext-tools/src/x-java.c (MAX_NESTING_DEPTH): New macro.
3 (paren_nesting_depth, brace_nesting_depth): New variables.
4 (extract_parenthesized): Increase and check paren_nesting_depth or
5 brace_nesting_depth before calling extract_parenthesized recursively.
6 (extract_java): Initialize paren_nesting_depth and brace_nesting_depth.
7 * gettext-tools/tests/xgettext-java-stackovfl-1: New file.
8 * gettext-tools/tests/xgettext-java-stackovfl-2: New file.
9 * gettext-tools/tests/xgettext-java-stackovfl-3: New file.
10 * gettext-tools/tests/xgettext-java-stackovfl-4: New file.
11 * gettext-tools/tests/Makefile.am (TESTS): Add them.
12Author: Bruno Haible <bruno@clisp.org>
13Origin: upstream, https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=f56d235faf788162c09487df129996ae62f1121f
14Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056293
15Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/gettext/+bug/2050033
16Forwarded: not-needed
17Applied-Upstream: f56d235faf788162c09487df129996ae62f1121f
18Last-Update: 2024-01-22
19--- a/gettext-tools/src/x-java.c
20+++ b/gettext-tools/src/x-java.c
21@@ -1,5 +1,5 @@
22 /* xgettext Java backend.
23- Copyright (C) 2003, 2005-2009, 2018-2020 Free Software Foundation, Inc.
24+ Copyright (C) 2003, 2005-2009, 2018-2023 Free Software Foundation, Inc.
25 Written by Bruno Haible <bruno@clisp.org>, 2003.
26
27 This program is free software: you can redistribute it and/or modify
28@@ -1431,6 +1431,14 @@
29 static flag_context_list_table_ty *flag_context_list_table;
30
31
32+/* Maximum supported nesting depth. */
33+#define MAX_NESTING_DEPTH 1000
34+
35+/* Current nesting depths. */
36+static int paren_nesting_depth;
37+static int brace_nesting_depth;
38+
39+
40 /* The file is broken into tokens. Scan the token stream, looking for
41 a keyword, followed by a left paren, followed by a string. When we
42 see this sequence, we have something to remember. We assume we are
43@@ -1566,6 +1574,12 @@
44 }
45
46 case token_type_lparen:
47+ if (++paren_nesting_depth > MAX_NESTING_DEPTH)
48+ {
49+ error_with_progname = false;
50+ error (EXIT_FAILURE, 0, _("%s:%d: error: too many open parentheses"),
51+ logical_file_name, line_number);
52+ }
53 if (extract_parenthesized (mlp, token_type_rparen,
54 inner_context, next_context_iter,
55 arglist_parser_alloc (mlp,
56@@ -1574,6 +1588,7 @@
57 arglist_parser_done (argparser, arg);
58 return true;
59 }
60+ paren_nesting_depth--;
61 next_context_iter = null_context_list_iterator;
62 state = 0;
63 continue;
64@@ -1597,6 +1612,12 @@
65 continue;
66
67 case token_type_lbrace:
68+ if (++brace_nesting_depth > MAX_NESTING_DEPTH)
69+ {
70+ error_with_progname = false;
71+ error (EXIT_FAILURE, 0, _("%s:%d: error: too many open braces"),
72+ logical_file_name, line_number);
73+ }
74 if (extract_parenthesized (mlp, token_type_rbrace,
75 null_context, null_context_list_iterator,
76 arglist_parser_alloc (mlp, NULL)))
77@@ -1604,6 +1625,7 @@
78 arglist_parser_done (argparser, arg);
79 return true;
80 }
81+ brace_nesting_depth--;
82 next_context_iter = null_context_list_iterator;
83 state = 0;
84 continue;
85@@ -1706,6 +1728,8 @@
86 phase6_last = token_type_eof;
87
88 flag_context_list_table = flag_table;
89+ paren_nesting_depth = 0;
90+ brace_nesting_depth = 0;
91
92 init_keywords ();
93
94--- a/gettext-tools/tests/Makefile.am
95+++ b/gettext-tools/tests/Makefile.am
96@@ -99,6 +99,8 @@
97 xgettext-its-1 xgettext-its-2 \
98 xgettext-java-1 xgettext-java-2 xgettext-java-3 xgettext-java-4 \
99 xgettext-java-5 xgettext-java-6 xgettext-java-7 \
100+ xgettext-java-stackovfl-1 xgettext-java-stackovfl-2 \
101+ xgettext-java-stackovfl-3 xgettext-java-stackovfl-4 \
102 xgettext-javascript-1 xgettext-javascript-2 xgettext-javascript-3 \
103 xgettext-javascript-4 xgettext-javascript-5 xgettext-javascript-6 \
104 xgettext-javascript-7 \
105--- /dev/null
106+++ b/gettext-tools/tests/xgettext-java-stackovfl-1
107@@ -0,0 +1,63 @@
108+#! /bin/sh
109+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
110+
111+# Test Java support: stack overflow prevented by nesting depth check.
112+
113+cat <<EOF > xg-j-so-1.java
114+((((((((((((((((((((((((((((((((((((((((((((((((((
115+((((((((((((((((((((((((((((((((((((((((((((((((((
116+((((((((((((((((((((((((((((((((((((((((((((((((((
117+((((((((((((((((((((((((((((((((((((((((((((((((((
118+((((((((((((((((((((((((((((((((((((((((((((((((((
119+((((((((((((((((((((((((((((((((((((((((((((((((((
120+((((((((((((((((((((((((((((((((((((((((((((((((((
121+((((((((((((((((((((((((((((((((((((((((((((((((((
122+((((((((((((((((((((((((((((((((((((((((((((((((((
123+((((((((((((((((((((((((((((((((((((((((((((((((((
124+((((((((((((((((((((((((((((((((((((((((((((((((((
125+((((((((((((((((((((((((((((((((((((((((((((((((((
126+((((((((((((((((((((((((((((((((((((((((((((((((((
127+((((((((((((((((((((((((((((((((((((((((((((((((((
128+((((((((((((((((((((((((((((((((((((((((((((((((((
129+((((((((((((((((((((((((((((((((((((((((((((((((((
130+((((((((((((((((((((((((((((((((((((((((((((((((((
131+((((((((((((((((((((((((((((((((((((((((((((((((((
132+((((((((((((((((((((((((((((((((((((((((((((((((((
133+(((((((((((((((((((((((((((((((((((((((((((((((((
134+bundle.gettext("Hello!")
135+))))))))))))))))))))))))))))))))))))))))))))))))))
136+))))))))))))))))))))))))))))))))))))))))))))))))))
137+))))))))))))))))))))))))))))))))))))))))))))))))))
138+))))))))))))))))))))))))))))))))))))))))))))))))))
139+))))))))))))))))))))))))))))))))))))))))))))))))))
140+))))))))))))))))))))))))))))))))))))))))))))))))))
141+))))))))))))))))))))))))))))))))))))))))))))))))))
142+))))))))))))))))))))))))))))))))))))))))))))))))))
143+))))))))))))))))))))))))))))))))))))))))))))))))))
144+))))))))))))))))))))))))))))))))))))))))))))))))))
145+))))))))))))))))))))))))))))))))))))))))))))))))))
146+))))))))))))))))))))))))))))))))))))))))))))))))))
147+))))))))))))))))))))))))))))))))))))))))))))))))))
148+))))))))))))))))))))))))))))))))))))))))))))))))))
149+))))))))))))))))))))))))))))))))))))))))))))))))))
150+))))))))))))))))))))))))))))))))))))))))))))))))))
151+))))))))))))))))))))))))))))))))))))))))))))))))))
152+))))))))))))))))))))))))))))))))))))))))))))))))))
153+))))))))))))))))))))))))))))))))))))))))))))))))))
154+)))))))))))))))))))))))))))))))))))))))))))))))))
155+EOF
156+
157+: ${XGETTEXT=xgettext}
158+${XGETTEXT} --omit-header --no-location -d xg-j-so-1.tmp xg-j-so-1.java || Exit 1
159+LC_ALL=C tr -d '\r' < xg-j-so-1.tmp.po > xg-j-so-1.po || Exit 1
160+
161+cat <<EOF > xg-j-so-1.ok
162+msgid "Hello!"
163+msgstr ""
164+EOF
165+
166+: ${DIFF=diff}
167+${DIFF} xg-j-so-1.ok xg-j-so-1.po
168+result=$?
169+
170+exit $result
171--- /dev/null
172+++ b/gettext-tools/tests/xgettext-java-stackovfl-2
173@@ -0,0 +1,56 @@
174+#! /bin/sh
175+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
176+
177+# Test Java support: stack overflow prevented by nesting depth check.
178+
179+cat <<EOF > xg-j-so-2.java
180+((((((((((((((((((((((((((((((((((((((((((((((((((
181+((((((((((((((((((((((((((((((((((((((((((((((((((
182+((((((((((((((((((((((((((((((((((((((((((((((((((
183+((((((((((((((((((((((((((((((((((((((((((((((((((
184+((((((((((((((((((((((((((((((((((((((((((((((((((
185+((((((((((((((((((((((((((((((((((((((((((((((((((
186+((((((((((((((((((((((((((((((((((((((((((((((((((
187+((((((((((((((((((((((((((((((((((((((((((((((((((
188+((((((((((((((((((((((((((((((((((((((((((((((((((
189+((((((((((((((((((((((((((((((((((((((((((((((((((
190+((((((((((((((((((((((((((((((((((((((((((((((((((
191+((((((((((((((((((((((((((((((((((((((((((((((((((
192+((((((((((((((((((((((((((((((((((((((((((((((((((
193+((((((((((((((((((((((((((((((((((((((((((((((((((
194+((((((((((((((((((((((((((((((((((((((((((((((((((
195+((((((((((((((((((((((((((((((((((((((((((((((((((
196+((((((((((((((((((((((((((((((((((((((((((((((((((
197+((((((((((((((((((((((((((((((((((((((((((((((((((
198+((((((((((((((((((((((((((((((((((((((((((((((((((
199+((((((((((((((((((((((((((((((((((((((((((((((((((
200+bundle.gettext("Hello!")
201+))))))))))))))))))))))))))))))))))))))))))))))))))
202+))))))))))))))))))))))))))))))))))))))))))))))))))
203+))))))))))))))))))))))))))))))))))))))))))))))))))
204+))))))))))))))))))))))))))))))))))))))))))))))))))
205+))))))))))))))))))))))))))))))))))))))))))))))))))
206+))))))))))))))))))))))))))))))))))))))))))))))))))
207+))))))))))))))))))))))))))))))))))))))))))))))))))
208+))))))))))))))))))))))))))))))))))))))))))))))))))
209+))))))))))))))))))))))))))))))))))))))))))))))))))
210+))))))))))))))))))))))))))))))))))))))))))))))))))
211+))))))))))))))))))))))))))))))))))))))))))))))))))
212+))))))))))))))))))))))))))))))))))))))))))))))))))
213+))))))))))))))))))))))))))))))))))))))))))))))))))
214+))))))))))))))))))))))))))))))))))))))))))))))))))
215+))))))))))))))))))))))))))))))))))))))))))))))))))
216+))))))))))))))))))))))))))))))))))))))))))))))))))
217+))))))))))))))))))))))))))))))))))))))))))))))))))
218+))))))))))))))))))))))))))))))))))))))))))))))))))
219+))))))))))))))))))))))))))))))))))))))))))))))))))
220+))))))))))))))))))))))))))))))))))))))))))))))))))
221+EOF
222+
223+: ${XGETTEXT=xgettext}
224+${XGETTEXT} --omit-header --no-location -d xg-j-so-2.tmp xg-j-so-2.java 2>xg-j-so-2.err
225+result=$?
226+cat xg-j-so-2.err
227+test $result = 1 || Exit 1
228+
229+exit 0
230--- /dev/null
231+++ b/gettext-tools/tests/xgettext-java-stackovfl-3
232@@ -0,0 +1,63 @@
233+#! /bin/sh
234+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
235+
236+# Test Java support: stack overflow prevented by nesting depth check.
237+
238+cat <<EOF > xg-j-so-3.java
239+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
240+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
241+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
242+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
243+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
244+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
245+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
246+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
247+{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
248+{{{{{{{{{{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}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
269+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
270+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
271+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
272+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
273+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
274+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
275+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
276+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
277+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
278+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
279+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
280+EOF
281+
282+: ${XGETTEXT=xgettext}
283+${XGETTEXT} --omit-header --no-location -d xg-j-so-3.tmp xg-j-so-3.java || Exit 1
284+LC_ALL=C tr -d '\r' < xg-j-so-3.tmp.po > xg-j-so-3.po || Exit 1
285+
286+cat <<EOF > xg-j-so-3.ok
287+msgid "Hello!"
288+msgstr ""
289+EOF
290+
291+: ${DIFF=diff}
292+${DIFF} xg-j-so-3.ok xg-j-so-3.po
293+result=$?
294+
295+exit $result
296--- /dev/null
297+++ b/gettext-tools/tests/xgettext-java-stackovfl-4
298@@ -0,0 +1,58 @@
299+#! /bin/sh
300+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
301+
302+# Test Java support: stack overflow prevented by nesting depth check.
303+
304+cat <<EOF > xg-j-so-4.java
305+{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}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
347+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
348+EOF
349+
350+: ${XGETTEXT=xgettext}
351+${XGETTEXT} --omit-header --no-location -d xg-j-so-4.tmp xg-j-so-4.java 2>xg-j-so-4.err
352+result=$?
353+cat xg-j-so-4.err
354+test $result = 1 || Exit 1
355+
356+exit 0
diff --git a/debian/patches/series b/debian/patches/series
index 546f2f4..2642572 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@
909-update-po-mode-1-of-3.patch909-update-po-mode-1-of-3.patch
1010-update-po-mode-2-of-3.patch1010-update-po-mode-2-of-3.patch
1111-update-po-mode-3-of-3.patch1111-update-po-mode-3-of-3.patch
1212-in-language-java-avoid-stack-overflow.patch

Subscribers

People subscribed via source and target branches