• malff@lambda.hsd1.co.comcast.net.'s avatar
    Bug#33618 (Crash in sp_rcontext) · c3ad0cac
    malff@lambda.hsd1.co.comcast.net. authored
    Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted)
    
    The server used to crash when REPEAT or another control instruction
    was used in conjunction with labels and a LEAVE instruction.
    
    The crash was caused by a missing "pop" of handlers or cursors in the
    code representing the stored program. When executing the code in a loop,
    this missing "pop" would result in a stack overflow, corrupting memory.
    
    Code generation has been fixed to produce the missing h_pop/c_pop
    instructions.
    
    Also, the logic checking that labels at the beginning and the end of a
    statement are matched was incorrect, causing Bug 33983.
    End labels, when used, must match the label used at the beginning of a block.
    c3ad0cac
sp_rcontext.h 7.34 KB