Created attachment 575286 [details, diff] patch needed for gcc-9.1 gcc-9 doesn't allow NULL parameters to printf. The attached patch checks for this. The error was /var/tmp/Big_Tmp/portage/www-client/seamonkey-2.49.9.1_p0/work/thunderbird-52.9.1/mozilla/js/xpconnect/src/XPCWrappedNative.cpp:2221:41: error: '%s' directive argument is null [-Werror=format-overflow=] 2221 | name = JS_sprintf_append(name, fmt, | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~ 2222 | array[i]->GetNameString()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~
is it a wrong patch? Only whitespace was removed in the patch.
(In reply to Jonas Stein from comment #1) > is it a wrong patch? Only whitespace was removed in the patch. Why do you think so? Here is the patch again --- a/mozilla/js/xpconnect/src/XPCWrappedNative.cpp.ORIG 2018-07-09 21:54:43.000000000 +0200 +++ b/mozilla/js/xpconnect/src/XPCWrappedNative.cpp 2019-05-04 17:49:23.893560494 +0200 @@ -2218,15 +2218,16 @@ const char* fmt = (i == 0) ? "(%s" : (i == count-1) ? ", %s)" : ", %s"; + + if (!name) { + return nullptr; + } name = JS_sprintf_append(name, fmt, array[i]->GetNameString()); } } } - if (!name) { - return nullptr; - } const char* fmt = "[xpconnect wrapped %s" FMT_ADDR FMT_STR(" (native") FMT_ADDR FMT_STR(")") "]"; if (si) { i.e. the check if(!name) has been moved up before the JS_sprintf_append function call.
Seems as if all firefox and thunderbird based on esr have the same problem, and spidermonkey too? I don't have yet set up gcc-9.1, just had a glance at the file. Would you mind to check?
(In reply to tt_1 from comment #3) > Seems as if all firefox and thunderbird based on esr have the same problem, > and spidermonkey too? I don't have yet set up gcc-9.1, just had a glance at > the file. Would you mind to check? Please do not assume anything. I have done tested thunderbird-60.x and it is fine with gcc-9.
*** Bug 686084 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4306d728998b0eaf3e863d887920813e6af91e1a commit 4306d728998b0eaf3e863d887920813e6af91e1a Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-06-17 14:31:18 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-06-17 14:31:18 +0000 www-client/seamonkey: Fixed build with gcc9 Thanks-to: Helmut Jarausch <jarausch@igpm.rwth-aachen.de> Closes: https://bugs.gentoo.org/685092 Package-Manager: Portage-2.3.67, Repoman-2.3.14 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> www-client/seamonkey/files/seamonkey-gcc9.patch | 22 ++++++++++++++++++++++ www-client/seamonkey/seamonkey-2.49.9.1_p0.ebuild | 5 ++++- 2 files changed, 26 insertions(+), 1 deletion(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50c601ef08f894524b063c37e3eff641b7e1df23 commit 50c601ef08f894524b063c37e3eff641b7e1df23 Author: Jory Pratt <anarchy@gentoo.org> AuthorDate: 2019-10-14 02:58:46 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-10-14 06:43:38 +0000 www-client/seamonkey: Fix gcc-9 support to not break plugins Closes: https://bugs.gentoo.org/685092 Signed-off-by: Jory Pratt <anarchy@gentoo.org> Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> www-client/seamonkey/files/seamonkey-gcc9.patch | 22 ---------------------- ...ey-2.49.5.ebuild => seamonkey-2.49.5-r1.ebuild} | 6 +++--- www-client/seamonkey/seamonkey-2.49.9.1_p0.ebuild | 6 +++--- 3 files changed, 6 insertions(+), 28 deletions(-)