This is an automated email from the ASF dual-hosted git repository.
truckman pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push:
new a205075113 Fix SunVersion selftest failed coredump
a205075113 is described below
commit a205075113a03de2167587dcb2d5a5fc9a4229bf
Author: Don Lewis <[email protected]>
AuthorDate: Thu Nov 14 01:06:15 2024 -0800
Fix SunVersion selftest failed coredump
When building with the --debug config option, a selftest is run to
validate the Java version sanity checking code. The version syntax
is:
// 0 = major, 1 = minor, 2 = maintenance, 3 = update
with the first three parts delimted by '.' and the last part by '_'.
Originally, the update part only allowed two digits, but it was
later extended to three.
//1.4.1_01-, 1.4.1_01a, the numerical part may only be 2 chars.
//1.7.0_161, 1.8.0_162, it's as long as 3 chars in later Java version.
The code didn't actually accept three digit update values until this
commit:
commit 3bd2d6aed629c4323ea9e8426acfb793eb9046fd
Author: Damjan Jovanovic <[email protected]>
Date: Sun Apr 15 15:00:46 2018 +0000
Allow the Java version suffix (eg. the 162 in 1.8.0_162) to be
3 digits long.
Patch by: me
Unfortunately, this breaks the selftest, which has a list of valid
versions that should be accepted and another list that should be
rejected. One of the bad values is 1.5.0_010. After the above commit
this version was no longer rejected, which cause a failed assert and
core dump;
Error: File .../main/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx,
Line 375: SunVersion selftest failed
Fix by adding a three digit update version to the valid versions list
and changing the bad list to have a four digit update.
Merge this change along with 3bd2d6aed629c4323ea9e8426acfb793eb9046f
(cherry picked from commit f73c1d468b0850dc4afd9b2e31bf586c89d596a7)
---
main/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/main/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
b/main/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index a36f2fef8f..796b6a309f 100644
--- a/main/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/main/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -338,12 +338,15 @@ SelfTest::SelfTest()
"1.4.1_01", "9.90.99_09", "1.4.1_99",
"1.4.1_00a",
"1.4.1-ea", "1.4.1-beta", "1.4.1-rc1",
- "1.5.0_01-ea", "1.5.0_01-rc2"};
+ "1.5.0_01-ea", "1.5.0_01-rc2",
+ "1.7.0_161"};
char const * badVersions[] = {".4.0", "..1", "", "10.0", "10.10.0.",
"10.10.0-", "10.10.0.",
"10.2-2", "10_10.0", "10..10","10.10", "a.0.999",
"1.4b.1_01", "9.90.-99_09", "1.4.1_99-",
"1.4.1_00a2", "1.4.0_z01z", "1.4.1__99A",
- "1.4.1-1ea", "1.5.0_010", "1.5.0._01-",
"1.5.0_01-eac"};
+ // "1.5.0_010" is now valid
+ // "1.4.1-1ea", "1.5.0_010", "1.5.0._01-",
"1.5.0_01-eac"};
+ "1.4.1-1ea", "1.8.0_0100", "1.5.0._01-",
"1.5.0_01-eac"};
char const * orderedVer[] = { "1.3.1-ea", "1.3.1-beta", "1.3.1-rc1",
"1.3.1", "1.3.1_00a", "1.3.1_01", "1.3.1_01a",
"1.3.2", "1.4.0", "1.5.0_01-ea", "2.0.0"};