unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Siddhesh Poyarekar <siddhesh@gotplt.org>
Cc: GLIBC Devel <libc-alpha@sourceware.org>,
	 Rafal Luzynski <digitalfreak@lingonborough.com>,
	"Carlos O'Donell" <carlos@redhat.com>,
	 Joseph Myers <joseph@codesourcery.com>
Subject: Re: 2.29 freeze update: Last fortnight
Date: Tue, 15 Jan 2019 19:13:08 -0800	[thread overview]
Message-ID: <CAMe9rOoRhoH55wXtEa4thjF83yMz6muTg=N1TbFYch2iGtVyeg@mail.gmail.com> (raw)
In-Reply-To: <05ad17bc-be3b-5bfb-a80b-6f2a85528974@gotplt.org>

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.

      parent reply	other threads:[~2019-01-16  3:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 14:37 2.29 freeze update: Last fortnight Siddhesh Poyarekar
2019-01-15 16:52 ` Rafal Luzynski
2019-01-15 17:02   ` Zack Weinberg
2019-01-15 17:16     ` Rafal Luzynski
2019-01-15 17:49       ` Paul Eggert
2019-01-15 18:16         ` Rafal Luzynski
2019-01-15 18:22           ` Paul Eggert
2019-01-15 22:03             ` Rafal Luzynski
2019-01-15 17:09   ` Carlos O'Donell
2019-01-17  6:30     ` TAMUKI Shoichi
2019-01-17  6:29   ` TAMUKI Shoichi
2019-01-17 20:32     ` Rafal Luzynski
2019-01-18 13:58       ` TAMUKI Shoichi
2019-01-18 15:35         ` Rafal Luzynski
2019-01-15 20:09 ` Jochen Hein
2019-01-16  3:44   ` Siddhesh Poyarekar
2019-01-15 20:17 ` Carlos O'Donell
2019-01-16  3:47   ` Siddhesh Poyarekar
2019-01-22  3:28     ` Siddhesh Poyarekar
2019-01-22  3:52       ` H.J. Lu
2019-01-22 22:14         ` Joseph Myers
2019-01-22  4:21       ` Carlos O'Donell
2019-01-22 12:00         ` Florian Weimer
2019-01-22 13:06           ` Carlos O'Donell
2019-01-22 13:11             ` Szabolcs Nagy
2019-01-22 13:23               ` Carlos O'Donell
2019-01-22 15:17                 ` Siddhesh Poyarekar
2019-01-22 15:48                   ` Carlos O'Donell
2019-01-22 16:06                     ` DCO or Copyright Assignment? Why not both Siddhesh Poyarekar
2019-01-28 13:00                       ` Florian Weimer
2019-01-22 10:18       ` 2.29 freeze update: Last fortnight Rafal Luzynski
2019-01-16  3:13 ` H.J. Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOoRhoH55wXtEa4thjF83yMz6muTg=N1TbFYch2iGtVyeg@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=carlos@redhat.com \
    --cc=digitalfreak@lingonborough.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@gotplt.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).