Hello community, here is the log from the commit of package firebird for openSUSE:Factory checked in at 2015-08-05 19:13:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/firebird (Old) and /work/SRC/openSUSE:Factory/.firebird.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "firebird" Changes: -------- --- /work/SRC/openSUSE:Factory/firebird/firebird-classic.changes 2014-12-19 09:40:15.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.firebird.new/firebird-classic.changes 2015-08-05 19:13:30.000000000 +0200 @@ -1,0 +2,31 @@ +Mon Jul 27 11:52:53 UTC 2015 - mkubecek@suse.cz + +- fix libfbembed package name in baselibs.conf so that the + libfbembed2_5-32bit is built + +------------------------------------------------------------------- +Mon Jul 27 06:32:09 UTC 2015 - mkubecek@suse.cz + +- upgrade to upstream version 2.5.4 (final) + * CORE-4558: SuperServer dies when client is disconnected + abnormally during the index navigational scan + * CORE-4676: Crash on unexpected client disconnection with opened + transaction + * CORE-4075: Server bugchecks or crashes on exception in + calculated index + * CORE-4624: Firebird handles ':' characters in mount table + entries invalid +- Backported-fix-for-CORE-4788-Superclassic-server-han.patch: + CORE-4788: Superclassic server hangs when receiving network + packet +- Backported-fix-for-CORE-4785-Bad-packet-of-op_execut.patch: + CORE-4785: Bad packet of op_execute kills the server +- Fixed-s-tandalone-switch-in-posix-server.patch: + fix -s(tandalone) switch in posix server +- Added-check-for-failed-fork-system-call.patch: + add check for failed fork() system call +- Apply-Partial-patch-for-C-11-compilation-of-the-Fire.patch: + Libreoffice-patch-C-11-new-delete-replacement-functi.patch: + two patches from LibreOffice fixing C++11 build + +------------------------------------------------------------------- firebird.changes: same change Old: ---- Firebird-2.5.4.26821-0.tar.xz New: ---- Added-check-for-failed-fork-system-call.patch Apply-Partial-patch-for-C-11-compilation-of-the-Fire.patch Backported-fix-for-CORE-4785-Bad-packet-of-op_execut.patch Backported-fix-for-CORE-4788-Superclassic-server-han.patch Firebird-2.5.4.26856-0.tar.xz Fixed-s-tandalone-switch-in-posix-server.patch Libreoffice-patch-C-11-new-delete-replacement-functi.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ firebird-classic.spec ++++++ --- /var/tmp/diff_new_pack.rmoVh5/_old 2015-08-05 19:13:31.000000000 +0200 +++ /var/tmp/diff_new_pack.rmoVh5/_new 2015-08-05 19:13:31.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package firebird-classic # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%define upversion 2.5.4.26821 +%define upversion 2.5.4.26856 %define pkgversion Firebird-%{upversion}-0 %define bname firebird @@ -48,17 +48,25 @@ License: SUSE-IDPL-1.0 and SUSE-IBPL-1.0 Group: Productivity/Databases/Servers +# SUSE specific patches Patch1: allow-creating-buildRoot-as-non-root-user.patch Patch2: fbguard-allow-creating-a-guard-pidfile.patch Patch3: use-killproc-in-stop-branch-of-SuSE-init-script.patch Patch4: disable-xinetd-service-by-default.patch Patch5: do-not-use-DatabaseAccess-Full-in-default-config.patch Patch6: add-pkgconfig-files.patch - +# backport from upstream 2.5 branch +Patch11: Backported-fix-for-CORE-4788-Superclassic-server-han.patch +Patch12: Backported-fix-for-CORE-4785-Bad-packet-of-op_execut.patch +Patch13: Fixed-s-tandalone-switch-in-posix-server.patch +Patch14: Added-check-for-failed-fork-system-call.patch +Patch15: Apply-Partial-patch-for-C-11-compilation-of-the-Fire.patch +Patch16: Libreoffice-patch-C-11-new-delete-replacement-functi.patch +# backport from upstream 3.0 branch Patch21: Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch Patch22: isql-fix-output-if-charset-is-different-from-locale.patch Patch23: isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch - +# SUSE only, 2.5 only Patch31: add-experimental-support-for-m68k-architecture.patch %description @@ -82,6 +90,12 @@ %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 %patch21 -p1 %patch22 -p1 %patch23 -p1 ++++++ firebird.spec ++++++ --- /var/tmp/diff_new_pack.rmoVh5/_old 2015-08-05 19:13:31.000000000 +0200 +++ /var/tmp/diff_new_pack.rmoVh5/_new 2015-08-05 19:13:31.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package firebird # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%define upversion 2.5.4.26821 +%define upversion 2.5.4.26856 %define pkgversion Firebird-%{upversion}-0 %if 0%{?suse_version} < 1130 @@ -46,17 +46,25 @@ License: SUSE-IDPL-1.0 and SUSE-IBPL-1.0 Group: Productivity/Databases/Servers +# SUSE specific patches Patch1: allow-creating-buildRoot-as-non-root-user.patch Patch2: fbguard-allow-creating-a-guard-pidfile.patch Patch3: use-killproc-in-stop-branch-of-SuSE-init-script.patch Patch4: disable-xinetd-service-by-default.patch Patch5: do-not-use-DatabaseAccess-Full-in-default-config.patch Patch6: add-pkgconfig-files.patch - +# backport from upstream 2.5 branch +Patch11: Backported-fix-for-CORE-4788-Superclassic-server-han.patch +Patch12: Backported-fix-for-CORE-4785-Bad-packet-of-op_execut.patch +Patch13: Fixed-s-tandalone-switch-in-posix-server.patch +Patch14: Added-check-for-failed-fork-system-call.patch +Patch15: Apply-Partial-patch-for-C-11-compilation-of-the-Fire.patch +Patch16: Libreoffice-patch-C-11-new-delete-replacement-functi.patch +# backport from upstream 3.0 branch Patch21: Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch Patch22: isql-fix-output-if-charset-is-different-from-locale.patch Patch23: isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch - +# SUSE only, 2.5 only Patch31: add-experimental-support-for-m68k-architecture.patch %description @@ -75,6 +83,12 @@ %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 %patch21 -p1 %patch22 -p1 %patch23 -p1 ++++++ Added-check-for-failed-fork-system-call.patch ++++++ From: alexpeshkoff <alexpeshkoff@65644016-39b1-43b1-bf79-96bc8fe82c15> Date: Mon, 1 Jun 2015 13:59:25 +0000 Subject: Added check for failed fork() system call Patch-mainline: v2.5.5 Git-commit: f3516ad3248f3094d6d6cc80140a1c45fdefbce2 git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@61687 65644016-39b1-43b1-bf79-96bc8fe82c15 --- src/remote/inet.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index 040afdb251bb..22f9bdb3d1b5 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -1076,10 +1076,23 @@ rem_port* INET_connect(const TEXT* name, } return NULL; } + #ifdef WIN_NT if (flag & SRVR_debug) #else - if ((flag & SRVR_debug) || !fork()) + int pid = 0; + if (!(flag & SRVR_debug)) + { + pid = fork(); + if (pid < 0) + { + inet_error(port, "fork", isc_net_connect_err, inetErrNo); + disconnect(port); + return NULL; + } + } + + if (!pid) #endif { SOCLOSE(port->port_handle); -- 2.4.6 ++++++ Apply-Partial-patch-for-C-11-compilation-of-the-Fire.patch ++++++ From: mapopa <mapopa@65644016-39b1-43b1-bf79-96bc8fe82c15> Date: Wed, 3 Jun 2015 08:11:03 +0000 Subject: Apply Partial patch for C++11 compilation of the Firebird code in libreoffice http://cgit.freedesktop.org/libreoffice/core/commit/?id=9fe159ef7cb7cfe5c1c9... Patch-mainline: v2.5.5 Git-commit: 5f95721af98b30cb6abc33f368748bd25958beb0 git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@61701 65644016-39b1-43b1-bf79-96bc8fe82c15 --- src/common/classes/alloc.cpp | 4 ++-- src/common/cvt.cpp | 2 +- src/gpre/c_cxx.cpp | 10 +++++----- src/gpre/exp.cpp | 6 +++--- src/gpre/gpre.cpp | 6 +++--- src/gpre/int_cxx.cpp | 10 +++++----- src/gpre/pat.cpp | 2 +- src/jrd/perf.cpp | 6 +++--- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/common/classes/alloc.cpp b/src/common/classes/alloc.cpp index 20615b9e81ef..41c242b79159 100644 --- a/src/common/classes/alloc.cpp +++ b/src/common/classes/alloc.cpp @@ -1123,7 +1123,7 @@ void MemoryPool::print_contents(FILE* file, bool used_only, const char* filter_p if (blk->mbk_flags & MBK_LAST) break; } - fprintf(file, "Blocks %"SIZEFORMAT" min %"SIZEFORMAT" max %"SIZEFORMAT" size %"SIZEFORMAT" \n\n", + fprintf(file, "Blocks %" SIZEFORMAT " min %" SIZEFORMAT " max %" SIZEFORMAT " size %" SIZEFORMAT " \n\n", cnt, min, max, sum); } @@ -1326,7 +1326,7 @@ MemoryPool* MemoryPool::createPool(MemoryPool* parent, MemoryStats& stats) FreeMemoryBlock* freeBlock = blockToPtr<FreeMemoryBlock*>(blk); freeBlock->fbk_next_fragment = NULL; - BlockInfo temp = {blockLength, freeBlock}; + BlockInfo temp = {static_cast<size_t>(blockLength), freeBlock}; pool->freeBlocks.add(temp); if (!pool->parent_redirect) { diff --git a/src/common/cvt.cpp b/src/common/cvt.cpp index 00396489527a..4389a0ae68fa 100644 --- a/src/common/cvt.cpp +++ b/src/common/cvt.cpp @@ -144,7 +144,7 @@ class DummyException {}; #ifndef NATIVE_QUAD #ifndef WORDS_BIGENDIAN -static const SQUAD quad_min_int = { 0, SLONG_MIN }; +static const SQUAD quad_min_int = { 0, static_cast<ULONG>(SLONG_MIN) }; static const SQUAD quad_max_int = { -1, SLONG_MAX }; #else static const SQUAD quad_min_int = { SLONG_MIN, 0 }; diff --git a/src/gpre/c_cxx.cpp b/src/gpre/c_cxx.cpp index f819750fe195..f8fe95964afb 100644 --- a/src/gpre/c_cxx.cpp +++ b/src/gpre/c_cxx.cpp @@ -876,7 +876,7 @@ static void gen_based( const act* action, int column) if (based_on->bas_flags & BAS_segment) { if (*variable != '*') - fprintf(gpreGlob.out_file, "[%"SLONGFORMAT"]", length); + fprintf(gpreGlob.out_file, "[%" SLONGFORMAT "]", length); } else if (field->fld_array_info) { @@ -885,7 +885,7 @@ static void gen_based( const act* action, int column) for (const dim* dimension = field->fld_array_info->ary_dimension; dimension; dimension = dimension->dim_next) { - fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1); + fprintf(gpreGlob.out_file, " [%" SLONGFORMAT "]", dimension->dim_upper - dimension->dim_lower + 1); } if (field->fld_array_info->ary_dtype <= dtype_varying && field->fld_length > 1) @@ -1577,7 +1577,7 @@ static void gen_drop_database( const act* action, int column) const gpre_dbb* db = (gpre_dbb*) action->act_object; align(column); - fprintf(gpreGlob.out_file, "isc_drop_database (%s, %"SIZEFORMAT", \"%s\", rdb$k_db_type_gds);", + fprintf(gpreGlob.out_file, "isc_drop_database (%s, %" SIZEFORMAT ", \"%s\", rdb$k_db_type_gds);", status_vector(action), strlen(db->dbb_filename), db->dbb_filename); set_sqlcode(action, column); @@ -3521,7 +3521,7 @@ static void gen_trans( const act* action, int column) static void gen_type( const act* action, int column) { - printa(column, "%"SLONGFORMAT, (SLONG)(IPTR)action->act_object); + printa(column, "%" SLONGFORMAT, (SLONG)(IPTR)action->act_object); } @@ -3673,7 +3673,7 @@ static void make_array_declaration(ref* reference) for (const dim* dimension = field->fld_array_info->ary_dimension; dimension; dimension = dimension->dim_next) { - fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1); + fprintf(gpreGlob.out_file, " [%" SLONGFORMAT "]", dimension->dim_upper - dimension->dim_lower + 1); } if (field->fld_array_info->ary_dtype <= dtype_varying) diff --git a/src/gpre/exp.cpp b/src/gpre/exp.cpp index fb56fc4f5ca5..de981b03221b 100644 --- a/src/gpre/exp.cpp +++ b/src/gpre/exp.cpp @@ -398,7 +398,7 @@ SINT64 EXP_SINT64_ordinal(bool advance_flag) if (gpreGlob.token_global.tok_type != tok_number) CPR_s_error("<number>"); - const char format[8] = "%"SQUADFORMAT; + const char format[8] = "%" SQUADFORMAT; SINT64 n; sscanf(gpreGlob.token_global.tok_string, format, &n); @@ -428,7 +428,7 @@ SLONG EXP_SLONG_ordinal(bool advance_flag) const SLONG n = atoi(gpreGlob.token_global.tok_string); char buffer[32]; - sprintf(buffer, "%"SLONGFORMAT, n); + sprintf(buffer, "%" SLONGFORMAT, n); if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0) PAR_error("Numeric value out of range"); @@ -478,7 +478,7 @@ ULONG EXP_ULONG_ordinal(bool advance_flag) const ULONG n = atoi(gpreGlob.token_global.tok_string); char buffer[32]; - sprintf(buffer, "%"ULONGFORMAT, n); + sprintf(buffer, "%" ULONGFORMAT, n); if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0) PAR_error("Numeric value out of range"); diff --git a/src/gpre/gpre.cpp b/src/gpre/gpre.cpp index b00f889f490c..4140dda34c60 100644 --- a/src/gpre/gpre.cpp +++ b/src/gpre/gpre.cpp @@ -2525,9 +2525,9 @@ static void pass2( SLONG start_position) if (line_pending) { if (line == 1) - fprintf(gpreGlob.out_file, "#line %"SLONGFORMAT" \"%s\"\n", line, backlash_fixed_file_name); + fprintf(gpreGlob.out_file, "#line %" SLONGFORMAT " \"%s\"\n", line, backlash_fixed_file_name); else - fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line, backlash_fixed_file_name); + fprintf(gpreGlob.out_file, "\n#line %" SLONGFORMAT " \"%s\"", line, backlash_fixed_file_name); line_pending = false; } @@ -2668,7 +2668,7 @@ static void pass2( SLONG start_position) { if (c == '\n' && line_pending) { - fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line + 1, backlash_fixed_file_name); + fprintf(gpreGlob.out_file, "\n#line %" SLONGFORMAT " \"%s\"", line + 1, backlash_fixed_file_name); line_pending = false; } if (c == EOF) diff --git a/src/gpre/int_cxx.cpp b/src/gpre/int_cxx.cpp index 1f8ee6d5bc2a..88b12f8e0214 100644 --- a/src/gpre/int_cxx.cpp +++ b/src/gpre/int_cxx.cpp @@ -290,7 +290,7 @@ static void gen_compile( const gpre_req* request, int column) fprintf(gpreGlob.out_file, "if (!%s)", request->req_handle); align(column); fprintf(gpreGlob.out_file, - "%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%"ULONGFORMAT", sizeof(jrd_%"ULONGFORMAT"), true);", + "%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%" ULONGFORMAT ", sizeof(jrd_%" ULONGFORMAT "), true);", request->req_handle, request->req_ident, request->req_ident); } @@ -478,7 +478,7 @@ static void gen_receive( const gpre_req* request, const gpre_port* port) { fprintf(gpreGlob.out_file, - "EXE_receive (tdbb, %s, %d, %d, (UCHAR*) &jrd_%"ULONGFORMAT");", + "EXE_receive (tdbb, %s, %d, %d, (UCHAR*) &jrd_%" ULONGFORMAT ");", request->req_handle, port->por_msg_number, port->por_length, port->por_ident); } @@ -495,7 +495,7 @@ static void gen_request( const gpre_req* request) if (!(request->req_flags & REQ_exp_hand)) fprintf(gpreGlob.out_file, "static void\t*%s;\t// request handle \n", request->req_handle); - fprintf(gpreGlob.out_file, "static const UCHAR\tjrd_%"ULONGFORMAT" [%d] =", + fprintf(gpreGlob.out_file, "static const UCHAR\tjrd_%" ULONGFORMAT " [%d] =", request->req_ident, request->req_length); align(INDENT); fprintf(gpreGlob.out_file, "{\t// blr string \n"); @@ -588,7 +588,7 @@ static void gen_send( const gpre_req* request, const gpre_port* port, int column } align(column); - fprintf(gpreGlob.out_file, "EXE_send (tdbb, %s, %d, %d, (UCHAR*) &jrd_%"ULONGFORMAT");", + fprintf(gpreGlob.out_file, "EXE_send (tdbb, %s, %d, %d, (UCHAR*) &jrd_%" ULONGFORMAT ");", request->req_handle, port->por_msg_number, port->por_length, port->por_ident); } @@ -716,7 +716,7 @@ static void make_port( const gpre_port* port, int column) fprintf(gpreGlob.out_file, fmtstr, reference->ref_ident, name); } align(column); - fprintf(gpreGlob.out_file, "} jrd_%"ULONGFORMAT";", port->por_ident); + fprintf(gpreGlob.out_file, "} jrd_%" ULONGFORMAT ";", port->por_ident); } diff --git a/src/gpre/pat.cpp b/src/gpre/pat.cpp index 12323663d6ba..64318307a624 100644 --- a/src/gpre/pat.cpp +++ b/src/gpre/pat.cpp @@ -417,7 +417,7 @@ void PATTERN_expand( USHORT column, const TEXT* pattern, PAT* args) } } else if (long_flag) { - sprintf(p, "%"SLONGFORMAT, long_value); + sprintf(p, "%" SLONGFORMAT , long_value); } else { sprintf(p, "%d", value); diff --git a/src/jrd/perf.cpp b/src/jrd/perf.cpp index 85aa6aeca615..cd3a210f5de5 100644 --- a/src/jrd/perf.cpp +++ b/src/jrd/perf.cpp @@ -164,20 +164,20 @@ static int perf_format(const P* before, const P* after, case 'b': case 'c': case 'x': - sprintf(p, "%"SQUADFORMAT, delta); + sprintf(p, "%" SQUADFORMAT , delta); while (*p) p++; break; case 'u': case 's': - sprintf(p, "%"SQUADFORMAT".%.2"SQUADFORMAT, delta / TICK, (delta % TICK) * 100 / TICK); + sprintf(p, "%" SQUADFORMAT ".%.2" SQUADFORMAT , delta / TICK, (delta % TICK) * 100 / TICK); while (*p) p++; break; case 'e': - sprintf(p, "%"SQUADFORMAT".%.2"SQUADFORMAT, delta / 100, delta % 100); + sprintf(p, "%" SQUADFORMAT ".%.2" SQUADFORMAT , delta / 100, delta % 100); while (*p) p++; break; -- 2.4.6 ++++++ Backported-fix-for-CORE-4785-Bad-packet-of-op_execut.patch ++++++ From: alexpeshkoff <alexpeshkoff@65644016-39b1-43b1-bf79-96bc8fe82c15> Date: Wed, 13 May 2015 13:25:02 +0000 Subject: Backported fix for CORE-4785: Bad packet of op_execute kills the server Patch-mainline: v2.5.5 Git-commit: 6500ec6a0def6bcedfeaed073027c66e0c6f7a41 git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@61535 65644016-39b1-43b1-bf79-96bc8fe82c15 --- src/dsql/dsql.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/dsql/dsql.cpp b/src/dsql/dsql.cpp index dc5b2fe9a8f1..99eba27e82b1 100644 --- a/src/dsql/dsql.cpp +++ b/src/dsql/dsql.cpp @@ -91,7 +91,7 @@ static bool get_indices(SLONG*, const UCHAR**, SLONG*, SCHAR**); static USHORT get_request_info(thread_db*, dsql_req*, SLONG, UCHAR*); static bool get_rsb_item(SLONG*, const UCHAR**, SLONG*, SCHAR**, USHORT*, USHORT*); static dsql_dbb* init(Attachment*); -static void map_in_out(dsql_req*, dsql_msg*, USHORT, const UCHAR*, USHORT, UCHAR*, const UCHAR* = 0); +static void map_in_out(thread_db*, dsql_req*, dsql_msg*, USHORT, const UCHAR*, USHORT, UCHAR*, const UCHAR* = 0); static USHORT parse_blr(USHORT, const UCHAR*, const USHORT, dsql_par*); static dsql_req* prepare(thread_db*, dsql_dbb*, jrd_tra*, USHORT, const TEXT*, USHORT, USHORT); static UCHAR* put_item(UCHAR, const USHORT, const UCHAR*, UCHAR*, const UCHAR* const, const bool copy = true); @@ -520,7 +520,7 @@ ISC_STATUS DSQL_fetch(thread_db* tdbb, return 100; } - map_in_out(NULL, message, 0, blr, msg_length, dsql_msg_buf); + map_in_out(tdbb, NULL, message, 0, blr, msg_length, dsql_msg_buf); trace.fetch(false, res_successful); return FB_SUCCESS; @@ -1001,7 +1001,7 @@ static void execute_blob(thread_db* tdbb, UCHAR bpb[24]; dsql_blb* blob = request->req_blob; - map_in_out(request, blob->blb_open_in_msg, in_blr_length, in_blr, in_msg_length, NULL, in_msg); + map_in_out(tdbb, request, blob->blb_open_in_msg, in_blr_length, in_blr, in_msg_length, NULL, in_msg); UCHAR* p = bpb; *p++ = isc_bpb_version1; @@ -1046,7 +1046,7 @@ static void execute_blob(thread_db* tdbb, request->req_blob->blb_blob = BLB_create2(tdbb, request->req_transaction, blob_id, bpb_length, bpb); - map_in_out(NULL, blob->blb_open_out_msg, out_blr_length, out_blr, out_msg_length, out_msg); + map_in_out(tdbb, NULL, blob->blb_open_out_msg, out_blr_length, out_blr, out_msg_length, out_msg); } } @@ -1260,7 +1260,7 @@ static void execute_request(thread_db* tdbb, dsql_msg* message = request->req_send; if (message) - map_in_out(request, message, in_blr_length, in_blr, in_msg_length, NULL, in_msg); + map_in_out(tdbb, request, message, in_blr_length, in_blr, in_msg_length, NULL, in_msg); // we need to map_in_out before tracing of execution start to let trace // manager know statement parameters values @@ -1311,7 +1311,7 @@ static void execute_request(thread_db* tdbb, message->msg_buffer, 0); if (out_msg_length) - map_in_out(NULL, message, 0, out_blr, out_msg_length, out_msg); + map_in_out(tdbb, NULL, message, 0, out_blr, out_msg_length, out_msg); // if this is a singleton select, make sure there's in fact one record @@ -2168,7 +2168,8 @@ static dsql_dbb* init(Attachment* attachment) @param in_dsql_msg_buf **/ -static void map_in_out( dsql_req* request, +static void map_in_out( thread_db* tdbb, + dsql_req* request, dsql_msg* message, USHORT blr_length, const UCHAR* blr, @@ -2176,12 +2177,18 @@ static void map_in_out( dsql_req* request, UCHAR* dsql_msg_buf, const UCHAR* in_dsql_msg_buf) { - thread_db* tdbb = JRD_get_thread_data(); + // When mapping data from the external world, request will be non-NULL. + // When mapping data from an internal message, request will be NULL. USHORT count = parse_blr(blr_length, blr, msg_length, message->msg_parameters); - // When mapping data from the external world, request will be non-NULL. - // When mapping data from an internal message, request will be NULL. + // Sanity check + + if (count && !(request ? in_dsql_msg_buf : dsql_msg_buf)) + { + ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-804) << + Arg::Gds(isc_dsql_sqlda_err)); + } dsql_par* parameter; -- 2.4.6 ++++++ Backported-fix-for-CORE-4788-Superclassic-server-han.patch ++++++ From: alexpeshkoff <alexpeshkoff@65644016-39b1-43b1-bf79-96bc8fe82c15> Date: Tue, 12 May 2015 12:17:47 +0000 Subject: Backported fix for CORE-4788: Superclassic server hangs when receiving network packet Patch-mainline: v2.5.5 Git-commit: 2f892f76c8b937a34f96341e91a76cab0638b8af git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@61526 65644016-39b1-43b1-bf79-96bc8fe82c15 --- src/remote/inet.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index 6646d897b1f7..075d10ecac07 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -3124,6 +3124,13 @@ static bool packet_receive(rem_port* port, UCHAR* buffer, SSHORT buffer_length, const timeval savetime = timeout; const SOCKET ph = port->port_handle; + if (ph == INVALID_SOCKET) + { + if (!(port->port_flags & PORT_disconnect)) { + inet_error(port, "invalid socket in packet_receive", isc_net_read_err, EINVAL); + } + return false; + } // Unsed to send a dummy packet, but too big to be defined in the loop. PACKET packet; -- 2.4.6 ++++++ Firebird-2.5.4.26821-0.tar.xz -> Firebird-2.5.4.26856-0.tar.xz ++++++ /work/SRC/openSUSE:Factory/firebird/Firebird-2.5.4.26821-0.tar.xz /work/SRC/openSUSE:Factory/.firebird.new/Firebird-2.5.4.26856-0.tar.xz differ: char 25, line 1 ++++++ Fixed-s-tandalone-switch-in-posix-server.patch ++++++ From: alexpeshkoff <alexpeshkoff@65644016-39b1-43b1-bf79-96bc8fe82c15> Date: Fri, 22 May 2015 14:34:02 +0000 Subject: Fixed -s(tandalone) switch in posix server Patch-mainline: v2.5.5 Git-commit: 01c2fafc21d2170f6c49caaea1fc7e5481350858 git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@61602 65644016-39b1-43b1-bf79-96bc8fe82c15 --- src/remote/inet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index 075d10ecac07..040afdb251bb 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -2611,7 +2611,7 @@ static bool_t inet_getbytes( XDR* xdrs, SCHAR* buff, u_int count) **************************************/ #ifdef REM_SERVER const rem_port* port = (rem_port*) xdrs->x_public; - if ((port->port_flags & PORT_server) && !(port->port_server_flags & SRVR_debug)) + if (port->port_flags & PORT_server) { return REMOTE_getbytes(xdrs, buff, count); } -- 2.4.6 ++++++ Libreoffice-patch-C-11-new-delete-replacement-functi.patch ++++++ From: mapopa <mapopa@65644016-39b1-43b1-bf79-96bc8fe82c15> Date: Wed, 3 Jun 2015 08:22:32 +0000 Subject: Libreoffice patch : C++11: new/delete replacement functions cannot be inline https://www.mail-archive.com/libreoffice@lists.freedesktop.org/msg79870.html Patch-mainline: v2.5.5 Git-commit: 98f8bc43e98348929b4fa9906c8cef29542e9b8e git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/branches/B2_5_Release@61702 65644016-39b1-43b1-bf79-96bc8fe82c15 --- src/common/classes/alloc.cpp | 18 ++++++++++++++++++ src/common/classes/alloc.h | 20 ++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/common/classes/alloc.cpp b/src/common/classes/alloc.cpp index 41c242b79159..5e9167585984 100644 --- a/src/common/classes/alloc.cpp +++ b/src/common/classes/alloc.cpp @@ -2103,3 +2103,21 @@ void AutoStorage::ProbeStack() const #endif } // namespace Firebird + +void* operator new(size_t s) THROW_BAD_ALLOC +{ + return Firebird::MemoryPool::globalAlloc(s); +} +void* operator new[](size_t s) THROW_BAD_ALLOC +{ + return Firebird::MemoryPool::globalAlloc(s); +} + +void operator delete(void* mem) throw() +{ + Firebird::MemoryPool::globalFree(mem); +} +void operator delete[](void* mem) throw() +{ + Firebird::MemoryPool::globalFree(mem); +} diff --git a/src/common/classes/alloc.h b/src/common/classes/alloc.h index 8684b3d88a99..6d4136235e8e 100644 --- a/src/common/classes/alloc.h +++ b/src/common/classes/alloc.h @@ -492,23 +492,11 @@ using Firebird::MemoryPool; inline static MemoryPool* getDefaultMemoryPool() { return Firebird::MemoryPool::processMemoryPool; } // Global versions of operators new and delete -inline void* operator new(size_t s) THROW_BAD_ALLOC -{ - return Firebird::MemoryPool::globalAlloc(s); -} -inline void* operator new[](size_t s) THROW_BAD_ALLOC -{ - return Firebird::MemoryPool::globalAlloc(s); -} +void* operator new(size_t s) THROW_BAD_ALLOC; +void* operator new[](size_t s) THROW_BAD_ALLOC; -inline void operator delete(void* mem) throw() -{ - Firebird::MemoryPool::globalFree(mem); -} -inline void operator delete[](void* mem) throw() -{ - Firebird::MemoryPool::globalFree(mem); -} +void operator delete(void* mem) throw(); +void operator delete[](void* mem) throw(); #ifdef DEBUG_GDS_ALLOC inline void* operator new(size_t s, Firebird::MemoryPool& pool, const char* file, int line) -- 2.4.6 ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.rmoVh5/_old 2015-08-05 19:13:31.000000000 +0200 +++ /var/tmp/diff_new_pack.rmoVh5/_new 2015-08-05 19:13:31.000000000 +0200 @@ -2,5 +2,5 @@ +/usr/lib(64)?/libib_util.so libfbclient2 +/usr/lib(64)?/libfbclient.* -libfbembed2 +libfbembed2_5 +/usr/lib(64)?/libfbembed.*