Skip to content
  • Marc Alff's avatar
    e85a5e60
    Bug#25492129 --PERFORMANCE-SCHEMA-DIGESTS-SIZE=1 LEADS TO SIGSEGV · e85a5e60
    Marc Alff authored
    Before this fix, starting a server with
      --performance-schema-digests-size=1
    would cause a crash.
    
    The root cause is in function fund_or_create_digest().
    
    When scanning the digest array, the code skip entry [0]
    which is reserved for the "NULL" digest,
    and proceeds directly to entry [1].
    
    When --performance-schema-digests-size is 2 or more,
    the record at index [1] exists, but for a size of exactly 1,
    using this record causes a failure.
    
    The fix is ignore record 0 instead of adjusting to record 1,
    and let the while loop operate normally,
    as it accesses records safely already.
    e85a5e60
    Bug#25492129 --PERFORMANCE-SCHEMA-DIGESTS-SIZE=1 LEADS TO SIGSEGV
    Marc Alff authored
    Before this fix, starting a server with
      --performance-schema-digests-size=1
    would cause a crash.
    
    The root cause is in function fund_or_create_digest().
    
    When scanning the digest array, the code skip entry [0]
    which is reserved for the "NULL" digest,
    and proceeds directly to entry [1].
    
    When --performance-schema-digests-size is 2 or more,
    the record at index [1] exists, but for a size of exactly 1,
    using this record causes a failure.
    
    The fix is ignore record 0 instead of adjusting to record 1,
    and let the while loop operate normally,
    as it accesses records safely already.
Loading