Re: Named address spaces on x86 GNU/Linux

2021-07-31 Thread Segher Boessenkool
On Thu, Jul 29, 2021 at 04:08:36PM +, Joseph Myers wrote:
> On Thu, 29 Jul 2021, Florian Weimer via Gcc wrote:
> > On GNU/Linux, SEGFS is used to implement the thread pointer, to avoid
> > dedicating a general-purpose register to it.  At address zero with the
> > SEGFS prefix, the offset itself is stored so that userspace can read it
> > without having to call into the kernel.  So the SEGFS null pointer is a
> > valid address, and so are some bytes after it (depending on TCB layout,
> > some of which is specified by the ABI or is part of the de-facto ABI
> > used by GCC).
> 
> That suggests that we need a target hook to describe null pointer 
> properties for a given address space.  In an address space where null 
> pointers are valid to dereference, there should be no diagnostics for 
> arithmetic on / dereferencing them - and more generally, 
> -fno-delete-null-pointer-checks should be in effect for pointers to such 
> an address space (so I don't think this is just a warning issue, you can 
> probably get wrong code from null pointer check deletion in such an 
> address space).

There already is TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID?  So this just
isn't used everywhere it should?


Segher


gcc-11-20210731 is now available

2021-07-31 Thread GCC Administrator via Gcc
Snapshot gcc-11-20210731 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/11-20210731/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 11 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch 
releases/gcc-11 revision 396117287d93ed90847bc73601b5cada57b7b697

You'll find:

 gcc-11-20210731.tar.xz   Complete GCC

  SHA256=c38ed1af825d4de2f71067c81ea15bca63eb304efef5088c309718625a9acb21
  SHA1=3efc1b916e859382590b6d40798ee3a1a6667571

Diffs from 11-20210717 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-11
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.