This is the mail archive of the mailing list for the GCC 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]

Fall 2017 GNU Toolchain Update

Hi Guys,

  A new version of GLIBC and a whole boatload of new GCC features
  means that there is lots to report this time.


  Version 2.26 is now out.  There are loads of new features and bug
  fixes in this release.  Some of the highlights include:

  * A per-thread cache has been added to malloc. Access to the cache
    requires no locks and therefore significantly accelerates the fast
    path to allocate and free small amounts of memory. Refilling an
    empty cache requires locking the underlying arena. Performance
    measurements show significant gains in a wide variety of user
    workloads. Workloads were captured using a special instrumented
    malloc and analyzed with a malloc simulator.

  * Unicode 10.0.0 Support.

  * The tunables feature is now enabled by default.  This allows users
    to tweak behavior of the GNU C Library using the GLIBC_TUNABLES
    environment variable.

  * New function reallocarray, which resizes an allocated block (like
    realloc) to the product of two sizes, with a guaranteed clean
    failure upon integer overflow in the multiplication.

  For the full announcement see:


  Gcc is currently in stage 1 and open for all kinds of exciting new
  features.  Here are some that have made it in already:
   Enables support for the next revision of the ISO C++ standard,
   tentatively planned for 2020.  Support is highly experimental, and
   will almost certainly in incompatible ways in future releases.

   Warn about functions that might be candidates for the (cold)
   attribute.  This is based on static detection and generally will
   only warn about functions which always leads to a call to another
   cold function such as wrappers of C++ throw or fatal error
   reporting functions leading to abort. 

   Warn whenever a pointer is cast such that the required alignment of
   the target is increased.  For example, warn if a "char *" is
   cast to an "int *" regardless of the target machine.

   Generate code to prevent stack clash style attacks.  When this
   option is enabled, the compiler will only allocate one page of
   stack space at a time and each page is accessed immediately after
   allocation.  Thus, it prevents allocations from jumping over any
   stack guard page provided by the operating system.

   Most targets do not fully support stack clash protection.  However,
   on those targets the option will protect dynamic stack allocations.
   The option may also provide limited protection for static stack
   allocations if the target supports the -fstack-check=specific
   This option enables instrumentation of pointer arithmetics.  If the
   pointer arithmetics overflows, a run-time error is issued.

   This option enables instrumentation of arguments to selected
   builtin functions.  If an invalid value is passed to such
   arguments, a run-time error is issued.  E.g. passing 0 as the
   argument to __builtin_ctz or __builtin_clz invokes undefined
   behavior and is diagnosed by this option.

   Enable code instrumentation of control-flow transfers to increase
   program security by checking that target addresses of control-flow
   transfer instructions (such as indirect function calls, function
   returns and indirect jump) are valid.  This prevents diverting the
   flow of control to an unexpected target.  This is intended to
   protect against such threats as Return-oriented Programming (ROP),
   and similarly call/jmp-oriented programming (COP/JOP).

   Generate <N> NOPs right at the beginning of each function, with the
   function entry point before the <M<th NOP.  If <M> is omitted, it
   defaults to 0 so the function entry points to the address just at
   the first NOP.

   The NOP instructions reserve extra space which can be used to patch
   in any desired instrumentation at run time, provided that the code
   segment is writable.

   For run-time identification, the starting addresses of these areas, 
   which correspond to their respective function entries minus <M>,
   are additionally collected in the __patchable_function_entries
   section of the resulting binary.

   Produce a static position independent executable on targets that
   support it.  A static position independent executable is similar to
   a static executable, but can be loaded at any address without a
   dynamic linker.  For predictable results, you must specify the
   same set of options used for compilation (-fpie, -fPIE, or model
   suboptions) when you specify this linker option. 
  There is also a new variable attribute:

    This specifies that an object or member declaration with type
    array of "char" or pointer to "char" is intended to store
    character arrays that do not necessarily contain a terminating NUL
    This is useful to avoid warnings when such an array or pointer is
    used as an argument to a bounded string manipulation function such
    as strncpy.  For example without the attribute this code:

      struct Data
        char name [32] __attribute__ ((nonstring));

      void f (struct Data * pd, const char * s)
        strncpy (pd->name, s, sizeof pd->name);

   would produce a warning about the call to strncpy not producing a
   terminated string.


  Version 2.29.1 has been released.  This is just a point release over
  the original 2.29 release, but it does include some important bug
  fixes, especially for x86_64 and PowerPC.

  In the development sources support for the command line option "-z
  globalaudit" has been added.  This forces audit libraries to be run 
  for every dynamic object loaded by an executable - provided that the
  loader supports this functionality.

  Also the EXCLUDE_FILE linker script directive can now be placed
  within any of the SORT_* directives, to partition files out of the

  The x86_64 assembler adds support for the GFNI, VAES, VPCLMULQDQ,
  NOAVX512_VNNI, and NOAVX512_BITALG extensions to the instruction

  The PowerPC assembler now has support for the Freescale SPE2


  * GDB now supports access to the guarded-storage-control registers
    and the software-based guarded-storage broadcast control registers
    on IBM z14.
  * On Unix systems, GDB now supports transmitting environment
    variables that are to be set or unset to GDBserver.  These
    variables will affect the environment to be passed to the remote

  * GDB no longer assumes functions with no debug information return 'int'.

    This means that GDB now refuses to call such functions unless you
    tell it the function's type, by either casting the call to the
    declared return type, or by casting the function to a function
    pointer of the right type, and calling that: 

      (gdb) p getenv ("PATH")
      'getenv' has unknown return type; cast the call to its declared return type
      (gdb) p (char *) getenv ("PATH")
      $1 = 0x7fffffffe "/usr/local/bin:/"...

    Similarly, GDB no longer assumes that global variables with no
    debug info have type 'int', and refuses to print the variable's
    value unless you tell it the variable's type:

      (gdb) p var
      'var' has unknown type; cast it to its declared type
      (gdb) p (float) var
      $3 = 3.14

  * Support for ARM and AArch64 on FreeBSD has been added.

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