From 81c40233964de949e2eae9e04f8d94b97ee436da Mon Sep 17 00:00:00 2001 From: dimitr Date: Fri, 7 Jun 2013 09:51:13 +0000 Subject: [PATCH] Since we (unexpectedly for me) seem to support BLR > 64KB, I'm committing a workaround for CORE-4113 (EXECUTE BLOCK prepare fails). The debug info does not support longish BLR, so don't pretend to find something there beyond the 64KB limit. If someone can think of a better solution, please jump in. --- src/jrd/par.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jrd/par.cpp b/src/jrd/par.cpp index e20b442251..6bdf175b04 100644 --- a/src/jrd/par.cpp +++ b/src/jrd/par.cpp @@ -2617,7 +2617,7 @@ jrd_nod* PAR_parse_node(thread_db* tdbb, CompilerScratch* csb, USHORT expected) **************************************/ SET_TDBB(tdbb); - const USHORT blr_offset = csb->csb_blr_reader.getOffset(); + const ULONG blr_offset = csb->csb_blr_reader.getOffset(); const SSHORT blr_operator = csb->csb_blr_reader.getByte(); if (blr_operator < 0 || blr_operator >= FB_NELEM(type_table)) { @@ -3418,7 +3418,7 @@ jrd_nod* PAR_parse_node(thread_db* tdbb, CompilerScratch* csb, USHORT expected) } size_t pos = 0; - if (csb->csb_dbg_info.blrToSrc.find(blr_offset, pos)) + if (blr_offset <= MAX_USHORT && csb->csb_dbg_info.blrToSrc.find(blr_offset, pos)) { Firebird::MapBlrToSrcItem& i = csb->csb_dbg_info.blrToSrc[pos]; jrd_nod* node_src = PAR_make_node(tdbb, e_src_info_length);