This is the mail archive of the libc-alpha@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]

Re: 2.29 freeze update: Last fortnight


On Tue, Jan 15, 2019 at 6:37 AM Siddhesh Poyarekar <siddhesh@gotplt.org> wrote:
>
> Hello folks,
>
> We are into the last fortnight of the 2.29 freeze and as far as I can
> tell all blockers with the exception of the ChangeLog script and the
> strftime change have been dealt with.
>
> How is the progress on the strftime change?  It would be nice to wrap it
> up this week so that we can declare a hard freeze for the last week.
>
> As for the ChangeLog script, it need not adhere to the hard freeze given
> that the script is independent.  However we do need to agree on the way
> forward for it so that we can do away with the ChangeLog entries for
> 2.30 development and see how it goes.
>
> Anything else that needs attention?
>

I found an x32 bug.  But I couldn't open glibc bug.   I just reported
it here for
record:

On x32, size_t is 32 bit.  We must not use 64-bit register for size_t in
assembly codes for x32:

[hjl@gnu-cfl-1 size-1]$ cat tst-size_t-1.c
#include <string.h>
#include <stdlib.h>
#include <sys/mman.h>

struct foo
{
  size_t len;
  void *p;
};

static void
__attribute__ ((noinline, noclone))
func (struct foo a, struct foo b)
{
  memcpy (a.p, b.p, a.len);
}

int
main (void)
{
  char bufb[20] = "foo";
  struct foo b = { sizeof (bufb), bufb };
  char *bufa = (char*)mmap(NULL, 0x1000,
   PROT_WRITE|PROT_READ,
   MAP_PRIVATE | MAP_ANONYMOUS,
   -1, 0);
  struct foo a = { 0x1000, bufa };
  func (a, b);
  if (memcmp (bufa, bufb, sizeof (bufa)))
    abort ();
  return 0;
}
[hjl@gnu-cfl-1 size-1]$ make tst-size_t-1-dynamic
gcc -mx32 -g -O2   -c -o tst-size_t-1.o tst-size_t-1.c
gcc -mx32 -L. -nostdlib -nostartfiles -o tst-size_t-1-dynamic \
-Wl,-dynamic-linker=/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux/elf/ld-linux-x32.so.2
\
-Wl,-z,nocombreloc \
/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux/csu/crt1.o
/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux/csu/crti.o
\
`gcc -mx32 --print-file-name=crtbegin.o` \
tst-size_t-1.o \
-Wl,-rpath=/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux:/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux/nptl:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../libx32:.
\
  \
 \
 \
/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux/libc.so.6 \
/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux/elf/ld-linux-x32.so.2
\
/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux/libc_nonshared.a \
-Wl,-as-needed /usr/lib/gcc/x86_64-redhat-linux/8/x32/libgcc_s.so
-Wl,--no-as-needed `gcc -mx32 --print-file-name=crtend.o` \
/export/build/gnu/tools-build/glibc-x32/build-x86_64-linux/csu/crtn.o
[hjl@gnu-cfl-1 size-1]$ gdb tst-size_t-1-dynamic
GNU gdb (GDB) Fedora 8.2-6.fc29
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from tst-size_t-1-dynamic...done.
(gdb) b func
Breakpoint 1 at 0x4011c0: file tst-size_t-1.c, line 15.
(gdb) r
Breakpoint 1, func (a=..., b=b@entry=...) at tst-size_t-1.c:15
15   memcpy (a.p, b.p, a.len);
(gdb) step
__memmove_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:222
222 movq %rdi, %rax
(gdb) p/x $rdx
$1 = 0xf7e1f00000001000
(gdb) f 1
#1  0x004010cb in main () at tst-size_t-1.c:28
28   func (a, b);
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
__memmove_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:376
376 VMOVU -VEC_SIZE(%rsi, %rdx), %VEC(5)
(gdb)

-- 
H.J.


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