• Show log

    Commit

  • Hash : 7fa4b5b7
    Author : DRC
    Date : 2024-05-06T17:28:07

    jerror.c: Silence MSan uninitialized value warning
    
    If an error manager instance is passed to jpeg_std_error(), then its
    format_message() method will point to the format_message() function in
    jerror.c.  The format_message() function passes all eight values from
    the jpeg_error_mgr::msg_parm.i[] array as arguments to
    snprintf()/_snprintf_s(), even if the format string doesn't use all of
    those values.  Subsequently invoking one of the ERREXIT[1-6]() macros
    will leave the unused values uninitialized, and if the
    -fsanitize-memory-param-retval option (introduced in Clang 14) is
    enabled (which it is by default in Clang 16 and later), then MSan will
    complain when the format_message() function tries to pass the
    uninitialized-but-unused values as function arguments.
    
    This commit modifies jpeg_std_error() so that it zeroes out the error
    manager instance passed to it, thus working around the warning as well
    as simplifying the code.
    
    Closes #761
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/libjpeg-turbo.git
    Git SSH git@git.kmx.io:kc3-lang/libjpeg-turbo.git
    Public access ? public
    Description

    Fork of libjpeg with SIMD

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg_l thodg
    Tags