This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[glibc/fw/gcc-10-fixes] nptl: Use uintptr_t for address diagnostic in nptl/tst-pthr


The branch 'fw/gcc-10-fixes' was updated to point to:

 d5873c6... nptl: Use uintptr_t for address diagnostic in nptl/tst-pthr

It previously pointed to:

 fe0f9ca... nptl: Add compiler barrier in nptl/tst-pthread-getattr

Diff:

!!! WARNING: THE FOLLOWING COMMITS ARE NO LONGER ACCESSIBLE (LOST):
-------------------------------------------------------------------

  fe0f9ca... nptl: Add compiler barrier in nptl/tst-pthread-getattr

commit fe0f9ca932585280325bb9779733761ff82e9ac3
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Jul 22 13:21:18 2019 +0200

    nptl: Add compiler barrier in nptl/tst-pthread-getattr
    
    Recent GCC versions warn about the attempt to return the address of a
    local variable:
    
    tst-pthread-getattr.c: In function â??allocate_and_testâ??:
    tst-pthread-getattr.c:54:10: error: function returns address of local variable [-Werror=return-local-addr]
       54 |   return mem;
          |          ^~~
    In file included from ../include/alloca.h:3,
                     from tst-pthread-getattr.c:26:
    ../stdlib/alloca.h:35:23: note: declared here
       35 | # define alloca(size) __builtin_alloca (size)
          |                       ^~~~~~~~~~~~~~~~~~~~~~~
    tst-pthread-getattr.c:51:9: note: in expansion of macro â??allocaâ??
       51 |   mem = alloca ((size_t) (mem - target));
          |         ^~~~~~


Summary of changes (added commits):
-----------------------------------

  d5873c6... nptl: Use uintptr_t for address diagnostic in nptl/tst-pthr

commit d5873c6e794d8bd9e68c3675341b80c91030ebae
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Jul 22 14:02:40 2019 +0200

    nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr
    
    Recent GCC versions warn about the attempt to return the address of a
    local variable:
    
    tst-pthread-getattr.c: In function â??allocate_and_testâ??:
    tst-pthread-getattr.c:54:10: error: function returns address of local variable [-Werror=return-local-addr]
       54 |   return mem;
          |          ^~~
    In file included from ../include/alloca.h:3,
                     from tst-pthread-getattr.c:26:
    ../stdlib/alloca.h:35:23: note: declared here
       35 | # define alloca(size) __builtin_alloca (size)
          |                       ^~~~~~~~~~~~~~~~~~~~~~~
    tst-pthread-getattr.c:51:9: note: in expansion of macro â??allocaâ??
       51 |   mem = alloca ((size_t) (mem - target));
          |         ^~~~~~
    
    The address itself is used in a check in the caller, so using
    uintptr_t instead is reasonable.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]