The following commit has been merged in the openafs-stable-1_8_x branch:
commit f6e6ed4b316378031676d7180b9e71336a3c9f62
Author: Cheyenne Wills <[email protected]>
Date:   Tue Jun 7 11:14:55 2022 -0600

    lwp: Ignore dangling-pointer warning in process.c
    
    In lwp/process.c the address of a stack variable is saved as part of
    creating a new context.  GCC-12 is flagging the statement with a
    diagnostic:
    
      ./process.c:46:24: error: storing the address of local variable
          ‘stackvar’ in ‘*savearea.topstack’ [-Werror=dangling-pointer=]
       46 |     savearea->topstack = (char *)&stackvar;
          |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
    
    In this particular case, the code is meaning to save the address of the
    stack in preparation of setting up a new context, which requires knowing
    the address the current stack.
    
    The diagnostic is changed from a warning to an error when configured
    with --enable-checking.
    
    Set the env variable CFLAGS_NODANGLING_POINTER to
    '-Wno-dangling-pointer' if the compiler supports the option and update
    the src/lwp/Makefile.in to use the flag when compiling process.c
    
    Reviewed-on: https://gerrit.openafs.org/14957
    Reviewed-by: Andrew Deason <[email protected]>
    Reviewed-by: Michael Meffie <[email protected]>
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Benjamin Kaduk <[email protected]>
    (cherry picked from commit 748ae0fc25c51316d741afd9b9dfd479ffdf3250)
    
    Change-Id: I03d2d4a77b4a391f023f40e9793968e03a50c241
    Reviewed-on: https://gerrit.openafs.org/15062
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Andrew Deason <[email protected]>
    Reviewed-by: Michael Meffie <[email protected]>
    Reviewed-by: Stephan Wiesand <[email protected]>

 CODING              | 4 +++-
 src/cf/osconf.m4    | 4 ++++
 src/lwp/Makefile.in | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

-- 
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs

Reply via email to