Discussion:
[Bug gdb/23558] New: Regression: REPLACE_GETCWD gets set to 1 when cross-compiling
b7.10110111 at gmail dot com
2018-08-21 21:06:12 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Bug ID: 23558
Summary: Regression: REPLACE_GETCWD gets set to 1 when
cross-compiling
Product: gdb
Version: 8.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: b7.10110111 at gmail dot com
Target Milestone: ---

After some time, cross-compiling gdb for armv5 and aarch64 uses rpl_getcwd
instead of normal getcwd. This results in crashes on startup (bug 23555) due to
failure to determine current directory on Android 8.0 (logged in via
SimpleSSHD), unless run as root.

git-bisect reports the following commit as the culprit:

6ec2e0f5bddc69d55e09fe56792edf7a109ff8ae is the first bad commit
commit 6ec2e0f5bddc69d55e09fe56792edf7a109ff8ae
Author: Sergio Durigan Junior <***@redhat.com>
Date: Fri Sep 8 20:09:12 2017 -0400

Import "glob" and "getcwd" modules from gnulib

Before this commit, REPLACE_GETCWD is 0, and the true getcwd system call is
called.
--
You are receiving this mail because:
You are on the CC list for the bug.
b7.10110111 at gmail dot com
2018-08-21 21:07:08 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Ruslan <b7.10110111 at gmail dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target| |aarch64-linux-gnu
CC| |sergiodj at redhat dot com
Host| |aarch64-linux-gnu
Build| |i686-pc-linux-gnu
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-22 05:30:01 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #1 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Thanks for the report.

I would like to understand better what is happening. When you cross-compile
GDB, you're also cross-compiling the gnulib module responsible for providing
getcwd. I wonder if there's any caveat when using getcwd on Android.

Would it be possible to provide instructions on how to reproduce this?

Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-22 00:06:30 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2018-08-22
Assignee|unassigned at sourceware dot org |sergiodj at redhat dot com
Ever confirmed|0 |1
--
You are receiving this mail because:
You are on the CC list for the bug.
b7.10110111 at gmail dot com
2018-08-22 00:24:57 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #2 from Ruslan <b7.10110111 at gmail dot com> ---
Post by sergiodj at redhat dot com
I wonder if there's any caveat when using getcwd on Android.
On Android apps have quite restricted access to the filesystem. See e.g. the
following terminal session via SimpleSSHD:

$ cd
$ pwd
/data/user/0/org.galexander.sshd/home
$ ls ..
bin cache code_cache files home lib shared_prefs
$ ls ../..
ls: ../..: Permission denied

This "Permission denied" is what makes rpl_getcwd fail.
Post by sergiodj at redhat dot com
Would it be possible to provide instructions on how to reproduce this?
If you mean to reproduce the REPLACE_GETCWD being set to 1, then it's simple:
just run the following commands from the build directory:

../binutils-gdb/configure --host=aarch64-linux-gnu --target=aarch64-linux-gnu
make
grep REPLACE_GETCWD= . -rI

You'll see the output from grep:

./gdb/build-gnulib/config.log:REPLACE_GETCWD='1'
./gdb/gdbserver/build-gnulib-gdbserver/config.log:REPLACE_GETCWD='1'

while the values should be 0.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-22 00:39:15 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #3 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
(In reply to Ruslan from comment #2)
Post by b7.10110111 at gmail dot com
Post by sergiodj at redhat dot com
I wonder if there's any caveat when using getcwd on Android.
On Android apps have quite restricted access to the filesystem. See e.g. the
$ cd
$ pwd
/data/user/0/org.galexander.sshd/home
$ ls ..
bin cache code_cache files home lib shared_prefs
$ ls ../..
ls: ../..: Permission denied
This "Permission denied" is what makes rpl_getcwd fail.
OK, but this is another issue, right? You mentioned that if GDB uses the
system's getcwd, then the error doesn't happen. How does using the system's
getcwd differ from using rpl_getcwd?
Post by b7.10110111 at gmail dot com
Post by sergiodj at redhat dot com
Would it be possible to provide instructions on how to reproduce this?
If you mean to reproduce the REPLACE_GETCWD being set to 1, then it's
../binutils-gdb/configure --host=aarch64-linux-gnu --target=aarch64-linux-gnu
make
grep REPLACE_GETCWD= . -rI
./gdb/build-gnulib/config.log:REPLACE_GETCWD='1'
./gdb/gdbserver/build-gnulib-gdbserver/config.log:REPLACE_GETCWD='1'
while the values should be 0.
What I meant was that I would like to have instructions on how to reproduce the
issue you're having. Do you have this issue on any AArch64 machine? From your
description, this only happens on Android. I've never set up an Android
emulator before (assuming you're using an emulator; I confess I don't even
know). Some instructions on how to set up a system where this failure occurs
would help a lot.

Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
b7.10110111 at gmail dot com
2018-08-22 06:30:05 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #4 from Ruslan <b7.10110111 at gmail dot com> ---
I think I didn't make it clear: I don't use any Android NDK. The
cross-compilation I do here is based simply on cross-compiled gcc and glibc.
So, there shouldn't be any more caveat to "real" getcwd here than there would
be e.g. on Debian aarch64. Yet it seems the configure script assumes that
getcwd aborts on long cwd_length.

As I've checked, nothing like this happens. The following loop fails sooner due
to ENAMETOOLONG on `cd`:

for i in `seq 1 1000`; do mkdir test && cd test; done

After running it (and having `pwd` output a 4100-char path), starting gdb with
real getcwd doesn't lead to abort, so everything is fine here.
How does using the system's getcwd differ from using rpl_getcwd?
System's getcwd does the getcwd system call, while rpl_getcwd tries to walk the
filesystem and deduce current directory. The system call simply returns the
path, while the walk comes across EACCES.
Do you have this issue on any AArch64 machine?
I currently don't have easy access to any non-android AArch64, but as the
problem is due to cross-compilation, not specifically the aarch64 host, I can
reproduce it on ARMv5TE-based Raspbian on Raspberry Pi (Model B). Here's how:

$ cd /tmp
$ mkdir -p test/a/b/c
$ cd test/a/b/c
$ chmod a-r ..
$ /tmp/gdb # the one compiled without workarounds
Segmentation fault
$ chmod a+r ..
$ /tmp/gdb -q
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
schwab@linux-m68k.org
2018-08-22 06:56:44 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #5 from Andreas Schwab <***@linux-m68k.org> ---
gnulib is doing a few runtime checks, and when cross-compiling it assumes
pessimistic answers. You can avoid that by presetting some cache variables.
--
You are receiving this mail because:
You are on the CC list for the bug.
b7.10110111 at gmail dot com
2018-08-22 07:08:07 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #6 from Ruslan <b7.10110111 at gmail dot com> ---
(In reply to Andreas Schwab from comment #5)
Post by ***@linux-m68k.org
gnulib is doing a few runtime checks, and when cross-compiling it assumes
pessimistic answers. You can avoid that by presetting some cache variables.
Yes, but before commit 6ec2e0f5bddc69d55e09fe56792edf7a109ff8ae for some reason
it didn't replace getcwd when cross-compiling, which was fine without any
special actions from the user.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-22 21:12:38 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #7 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
OK, after spending some time understanding the issue, and talking to Simon
Marchi on IRC, my opinion is that this is a gnulib bug. I sent an email to the
upstream ml:

<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00130.html>

It's possible to override the gnulib choices by manually setting
gl_cv_func_getcwd_path_max=yes and gl_cv_func_getcwd_abort_bug=no, but I don't
think this is the proper solution. Also, rpl_getcwd should be fixed anyway.
Let's see what the gnulib folks have to say.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-22 16:42:45 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #8 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
A request from Paul Eggert:

9 The first thing that Gnulib rpl_getcwd should do, is call the system
10 getcwd and, if that succeeds (or if it fails with errno == ERANGE), it
11 should just return what the system getcwd returns. This is in the
12 HAVE_MINIMALLY_WORKING_GETCWD branch of gnulib/lib/getcwd.c. Can you
13 investigate why that isn't happening on Android? For example, what is
14 the value of HAVE_MINIMALLY_WORKING_GETCWD?

Ruslan, could you please check if HAVE_MINIMALLY_WORKING_GETCWD is defined?
Based on the fact that gl_cv_func_getcwd_path_max is being set to "no", I
suspect it's not being defined, but I figured it's better to double check with
you. Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-23 02:03:40 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #9 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Another request from Paul:

17 What's the value of host_os?
18
19 If you build and run the gl_cv_func_getcwd_path_max test program on
20 that platform, what value does it return?

Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
b7.10110111 at gmail dot com
2018-08-23 00:51:28 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #10 from Ruslan <b7.10110111 at gmail dot com> ---
(In reply to Sergio Durigan Junior from comment #8)
Post by sergiodj at redhat dot com
Ruslan, could you please check if HAVE_MINIMALLY_WORKING_GETCWD is defined?
$ grep HAVE_MINIMALLY_WORKING_GETCWD . -rI
./gdb/gdbserver/build-gnulib-gdbserver/config.h:/* #undef
HAVE_MINIMALLY_WORKING_GETCWD */
./gdb/build-gnulib/config.h:/* #undef HAVE_MINIMALLY_WORKING_GETCWD */

(In reply to Sergio Durigan Junior from comment #9)
Post by sergiodj at redhat dot com
17 What's the value of host_os?
$ find . -name '*.log' -exec grep '\<host_os=' {} \; | sort -u
host_os='linux-gnu'
Post by sergiodj at redhat dot com
19 If you build and run the gl_cv_func_getcwd_path_max test program on
20 that platform, what value does it return?
It returns zero.
--
You are receiving this mail because:
You are on the CC list for the bug.
palves at redhat dot com
2018-08-23 09:46:39 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Pedro Alves <palves at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |palves at redhat dot com

--- Comment #11 from Pedro Alves <palves at redhat dot com> ---
It may be simpler (avoid roundtrips) to CC Ruslan on the gnulib thread.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-23 06:04:12 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #12 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Hello Ruslan, could you please try the patch attached to:

https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00137.html

Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
b7.10110111 at gmail dot com
2018-08-23 07:06:57 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #13 from Ruslan <b7.10110111 at gmail dot com> ---
(In reply to Sergio Durigan Junior from comment #12)
Post by sergiodj at redhat dot com
https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00137.html
It doesn't cleanly apply to current binutils-gdb:
gdb/gnulib/import/m4/getcwd-path-max.m4 starts with "# serial 19", while the
patch is based on 20. If I manually apply the second hunk, nothing is changed
in the build results (HAVE_MINIMALLY_WORKING_GETCWD is still undefined).
Do I have to somehow regenerate the configure script?
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-23 17:52:52 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #14 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
(In reply to Ruslan from comment #13)
Post by b7.10110111 at gmail dot com
(In reply to Sergio Durigan Junior from comment #12)
Post by sergiodj at redhat dot com
https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00137.html
gdb/gnulib/import/m4/getcwd-path-max.m4 starts with "# serial 19", while the
patch is based on 20. If I manually apply the second hunk, nothing is
changed in the build results (HAVE_MINIMALLY_WORKING_GETCWD is still
undefined).
Do I have to somehow regenerate the configure script?
I should have been more clear, sorry.

The patch was proposed for the upstream gnulib version. However, GDB uses its
own copy, which means that the patch probably won't apply cleanly.

And yeah, you need to regenerate the configure script. Or just apply the
following patch:

diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure
index 8c3027635f..1ad0650216 100644
--- a/gdb/gnulib/configure
+++ b/gdb/gnulib/configure
@@ -16923,6 +16923,7 @@ else
if test "$cross_compiling" = yes; then :
case "$host_os" in
aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
+ *-gnu | gnu*) gl_cv_func_getcwd_path_max='yes';;
*) gl_cv_func_getcwd_path_max=no;;
esac
else
--
You are receiving this mail because:
You are on the CC list for the bug.
b7.10110111 at gmail dot com
2018-08-23 19:22:43 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #15 from Ruslan <b7.10110111 at gmail dot com> ---
(In reply to Sergio Durigan Junior from comment #14)
Post by sergiodj at redhat dot com
And yeah, you need to regenerate the configure script. Or just apply the
With this patch it works normally.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-23 17:12:49 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #16 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
(In reply to Ruslan from comment #15)
Post by b7.10110111 at gmail dot com
(In reply to Sergio Durigan Junior from comment #14)
Post by sergiodj at redhat dot com
And yeah, you need to regenerate the configure script. Or just apply the
With this patch it works normally.
Thanks for testing. A more complete fix has been pushed to gnulib upstream:


https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=a96d2e67052c879b1bcc5bc461722beac75fc372

I'll soon propose a patch to GDB which updates our local gnulib copy and pulls
this patch in.
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-08-29 16:28:52 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #17 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sergio Durigan Junior
<***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7a6dbc2fdb2323c35e981f93236f323e9d7c0b24

commit 7a6dbc2fdb2323c35e981f93236f323e9d7c0b24
Author: Sergio Durigan Junior <***@redhat.com>
Date: Mon Aug 27 18:56:03 2018 -0400

Update gnulib to current upstream master

It has been a while since we don't update our gnulib copy against
their upstream master branch, so I thought I'd propose this patch. It
also fixes (at least) one bug reported against GDB:

https://sourceware.org/bugzilla/show_bug.cgi?id=23558

The problem reported there is about the replacement of 'getcwd' when
cross-compiling GDB. With our current gnulib copy, the mechanism for
deciding whether to use the system's 'getcwd' or gnulib's version is
too simplistic and pessimistic, so when cross-compiling we always end
up using gnulib's version, which has a limitation: it cannot handle
the situation when the parent directory doesn't have read permissions.

This has been reported against upstream gnulib and the fix has been
pushed here:


https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=a96d2e67052c879b1bcc5bc461722beac75fc372

I regtested this patch on Fedora 28 x86-64, and there were no
regressions.

OK?

gdb/ChangeLog:

2018-08-29 Sergio Durigan Junior <***@redhat.com>

PR gdb/23555
PR gdb/23558
* gnulib/aclocal.m4: Regenerate.
* gnulib/config.in: Regenerate.
* gnulib/configure: Regenerate.
* gnulib/import/Makefile.am: Update.
* gnulib/import/Makefile.in: Update.
* gnulib/import/extra/snippet/_Noreturn.h: Rename to...
* gnulib/import/_Noreturn.h: ... this.
* gnulib/import/alloca.in.h: Update.
* gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
* gnulib/import/arg-nonnull.h: ... this.
* gnulib/import/assure.h: Update.
* gnulib/import/at-func.c: Update.
* gnulib/import/basename-lgpl.c: Update.
* gnulib/import/extra/snippet/c++defs.h: Rename to...
* gnulib/import/c++defs.h: ... this.
* gnulib/import/canonicalize-lgpl.c: Update.
* gnulib/import/cdefs.h: Update.
* gnulib/import/chdir-long.c: Update.
* gnulib/import/chdir-long.h: Update.
* gnulib/import/cloexec.c: Update.
* gnulib/import/cloexec.h: Update.
* gnulib/import/close.c: Update.
* gnulib/import/closedir.c: Update.
* gnulib/import/config.charset: Update.
* gnulib/import/dirent-private.h: Update.
* gnulib/import/dirent.in.h: Update.
* gnulib/import/dirfd.c: Update.
* gnulib/import/dirname-lgpl.c: Update.
* gnulib/import/dirname.h: Update.
* gnulib/import/dosname.h: Update.
* gnulib/import/dup-safer-flag.c: Update.
* gnulib/import/dup-safer.c: Update.
* gnulib/import/dup.c: Update.
* gnulib/import/dup2.c: Update.
* gnulib/import/errno.in.h: Update.
* gnulib/import/error.c: Update.
* gnulib/import/error.h: Update.
* gnulib/import/exitfail.c: Update.
* gnulib/import/exitfail.h: Update.
* gnulib/import/extra/update-copyright: Update.
* gnulib/import/fchdir.c: Update.
* gnulib/import/fcntl.c: Update.
* gnulib/import/fcntl.in.h: Update.
* gnulib/import/fd-hook.c: Update.
* gnulib/import/fd-hook.h: Update.
* gnulib/import/fd-safer-flag.c: Update.
* gnulib/import/fd-safer.c: Update.
* gnulib/import/fdopendir.c: Update.
* gnulib/import/filename.h: Update.
* gnulib/import/filenamecat-lgpl.c: Update.
* gnulib/import/filenamecat.h: Update.
* gnulib/import/flexmember.h: Update.
* gnulib/import/float+.h: Update.
* gnulib/import/float.c: Update.
* gnulib/import/float.in.h: Update.
* gnulib/import/fnmatch.c: Update.
* gnulib/import/fnmatch.in.h: Update.
* gnulib/import/fnmatch_loop.c: Update.
* gnulib/import/fpucw.h: Update.
* gnulib/import/frexp.c: Update.
* gnulib/import/frexpl.c: Update.
* gnulib/import/fstat.c: Update.
* gnulib/import/fstatat.c: Update.
* gnulib/import/getcwd-lgpl.c: Update.
* gnulib/import/getcwd.c: Update.
* gnulib/import/getdtablesize.c: Update.
* gnulib/import/getlogin_r.c: Update.
* gnulib/import/getprogname.c: Update.
* gnulib/import/getprogname.h: Update.
* gnulib/import/gettext.h: Update.
* gnulib/import/gettimeofday.c: Update.
* gnulib/import/glob-libc.h: Update.
* gnulib/import/glob.c: Update.
* gnulib/import/glob.in.h: Update.
* gnulib/import/glob_internal.h: Update.
* gnulib/import/glob_pattern_p.c: Update.
* gnulib/import/globfree.c: Update.
* gnulib/import/hard-locale.c: Update.
* gnulib/import/hard-locale.h: Update.
* gnulib/import/intprops.h: Update.
* gnulib/import/inttypes.in.h: Update.
* gnulib/import/isnan.c: Update.
* gnulib/import/isnand-nolibm.h: Update.
* gnulib/import/isnand.c: Update.
* gnulib/import/isnanl-nolibm.h: Update.
* gnulib/import/isnanl.c: Update.
* gnulib/import/itold.c: Update.
* gnulib/import/libc-config.h: Update.
* gnulib/import/limits.in.h: Update.
* gnulib/import/localcharset.c: Update.
* gnulib/import/localcharset.h: Update.
* gnulib/import/localtime-buffer.c: Update.
* gnulib/import/localtime-buffer.h: Update.
* gnulib/import/lstat.c: Update.
* gnulib/import/m4/00gnulib.m4: Update.
* gnulib/import/m4/__inline.m4: Update.
* gnulib/import/m4/absolute-header.m4: Update.
* gnulib/import/m4/alloca.m4: Update.
* gnulib/import/m4/builtin-expect.m4: Update.
* gnulib/import/m4/canonicalize.m4: Update.
* gnulib/import/m4/chdir-long.m4: Update.
* gnulib/import/m4/close.m4: Update.
* gnulib/import/m4/closedir.m4: Update.
* gnulib/import/m4/configmake.m4: Update.
* gnulib/import/m4/d-ino.m4: Update.
* gnulib/import/m4/d-type.m4: Update.
* gnulib/import/m4/dirent_h.m4: Update.
* gnulib/import/m4/dirfd.m4: Update.
* gnulib/import/m4/dirname.m4: Update.
* gnulib/import/m4/double-slash-root.m4: Update.
* gnulib/import/m4/dup.m4: Update.
* gnulib/import/m4/dup2.m4: Update.
* gnulib/import/m4/eealloc.m4: Update.
* gnulib/import/m4/environ.m4: Update.
* gnulib/import/m4/errno_h.m4: Update.
* gnulib/import/m4/error.m4: Update.
* gnulib/import/m4/exponentd.m4: Update.
* gnulib/import/m4/exponentl.m4: Update.
* gnulib/import/m4/extensions.m4: Update.
* gnulib/import/m4/extern-inline.m4: Update.
* gnulib/import/m4/fchdir.m4: Update.
* gnulib/import/m4/fcntl-o.m4: Update.
* gnulib/import/m4/fcntl.m4: Update.
* gnulib/import/m4/fcntl_h.m4: Update.
* gnulib/import/m4/fdopendir.m4: Update.
* gnulib/import/m4/filenamecat.m4: Update.
* gnulib/import/m4/flexmember.m4: Update.
* gnulib/import/m4/float_h.m4: Update.
* gnulib/import/m4/fnmatch.m4: Update.
* gnulib/import/m4/fnmatch_h.m4: Update.
* gnulib/import/m4/fpieee.m4: Update.
* gnulib/import/m4/frexp.m4: Update.
* gnulib/import/m4/frexpl.m4: Update.
* gnulib/import/m4/fstat.m4: Update.
* gnulib/import/m4/fstatat.m4: Update.
* gnulib/import/m4/getcwd-abort-bug.m4: Update.
* gnulib/import/m4/getcwd-path-max.m4: Update.
* gnulib/import/m4/getcwd.m4: Update.
* gnulib/import/m4/getdtablesize.m4: Update.
* gnulib/import/m4/getlogin.m4: Update.
* gnulib/import/m4/getlogin_r.m4: Update.
* gnulib/import/m4/getpagesize.m4: Update.
* gnulib/import/m4/getprogname.m4: Update.
* gnulib/import/m4/gettimeofday.m4: Update.
* gnulib/import/m4/glibc21.m4: Update.
* gnulib/import/m4/glob.m4: Update.
* gnulib/import/m4/glob_h.m4: Update.
* gnulib/import/m4/gnulib-cache.m4: Update.
* gnulib/import/m4/gnulib-common.m4: Update.
* gnulib/import/m4/gnulib-comp.m4: Update.
* gnulib/import/m4/gnulib-tool.m4: Update.
* gnulib/import/m4/hard-locale.m4: Update.
* gnulib/import/m4/include_next.m4: Update.
* gnulib/import/m4/inttypes-pri.m4: Update.
* gnulib/import/m4/inttypes.m4: Update.
* gnulib/import/m4/isnand.m4: Update.
* gnulib/import/m4/isnanl.m4: Update.
* gnulib/import/m4/largefile.m4: Update.
* gnulib/import/m4/limits-h.m4: Update.
* gnulib/import/m4/localcharset.m4: Update.
* gnulib/import/m4/locale-fr.m4: Update.
* gnulib/import/m4/locale-ja.m4: Update.
* gnulib/import/m4/locale-zh.m4: Update.
* gnulib/import/m4/localtime-buffer.m4: Update.
* gnulib/import/m4/longlong.m4: Update.
* gnulib/import/m4/lstat.m4: Update.
* gnulib/import/m4/malloc.m4: Update.
* gnulib/import/m4/malloca.m4: Update.
* gnulib/import/m4/math_h.m4: Update.
* gnulib/import/m4/mbrtowc.m4: Update.
* gnulib/import/m4/mbsinit.m4: Update.
* gnulib/import/m4/mbsrtowcs.m4: Update.
* gnulib/import/m4/mbstate_t.m4: Update.
* gnulib/import/m4/memchr.m4: Update.
* gnulib/import/m4/memmem.m4: Update.
* gnulib/import/m4/mempcpy.m4: Update.
* gnulib/import/m4/memrchr.m4: Update.
* gnulib/import/m4/mkdir.m4: Update.
* gnulib/import/m4/mkstemp.m4: Update.
* gnulib/import/m4/mmap-anon.m4: Update.
* gnulib/import/m4/mode_t.m4: Update.
* gnulib/import/m4/msvc-inval.m4: Update.
* gnulib/import/m4/msvc-nothrow.m4: Update.
* gnulib/import/m4/multiarch.m4: Update.
* gnulib/import/m4/nocrash.m4: Update.
* gnulib/import/m4/off_t.m4: Update.
* gnulib/import/m4/onceonly.m4: Update.
* gnulib/import/m4/open-cloexec.m4: Update.
* gnulib/import/m4/open.m4: Update.
* gnulib/import/m4/openat.m4: Update.
* gnulib/import/m4/opendir.m4: Update.
* gnulib/import/m4/pathmax.m4: Update.
* gnulib/import/m4/rawmemchr.m4: Update.
* gnulib/import/m4/readdir.m4: Update.
* gnulib/import/m4/readlink.m4: Update.
* gnulib/import/m4/realloc.m4: Update.
* gnulib/import/m4/rename.m4: Update.
* gnulib/import/m4/rewinddir.m4: Update.
* gnulib/import/m4/rmdir.m4: Update.
* gnulib/import/m4/save-cwd.m4: Update.
* gnulib/import/m4/secure_getenv.m4: Update.
* gnulib/import/m4/setenv.m4: Update.
* gnulib/import/m4/signal_h.m4: Update.
* gnulib/import/m4/ssize_t.m4: Update.
* gnulib/import/m4/stat-time.m4: Update.
* gnulib/import/m4/stat.m4: Update.
* gnulib/import/m4/std-gnu11.m4: Update.
* gnulib/import/m4/stdbool.m4: Update.
* gnulib/import/m4/stddef_h.m4: Update.
* gnulib/import/m4/stdint.m4: Update.
* gnulib/import/m4/stdio_h.m4: Update.
* gnulib/import/m4/stdlib_h.m4: Update.
* gnulib/import/m4/strchrnul.m4: Update.
* gnulib/import/m4/strdup.m4: Update.
* gnulib/import/m4/strerror.m4: Update.
* gnulib/import/m4/string_h.m4: Update.
* gnulib/import/m4/strstr.m4: Update.
* gnulib/import/m4/strtok_r.m4: Update.
* gnulib/import/m4/sys_socket_h.m4: Update.
* gnulib/import/m4/sys_stat_h.m4: Update.
* gnulib/import/m4/sys_time_h.m4: Update.
* gnulib/import/m4/sys_types_h.m4: Update.
* gnulib/import/m4/tempname.m4: Update.
* gnulib/import/m4/time_h.m4: Update.
* gnulib/import/m4/unistd-safer.m4: Update.
* gnulib/import/m4/unistd_h.m4: Update.
* gnulib/import/m4/warn-on-use.m4: Update.
* gnulib/import/m4/wchar_h.m4: Update.
* gnulib/import/m4/wchar_t.m4: Update.
* gnulib/import/m4/wctype_h.m4: Update.
* gnulib/import/m4/wint_t.m4: Update.
* gnulib/import/malloc.c: Update.
* gnulib/import/malloc/scratch_buffer.h: Update.
* gnulib/import/malloc/scratch_buffer_grow.c: Update.
* gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
* gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
* gnulib/import/malloca.c: Update.
* gnulib/import/malloca.h: Update.
* gnulib/import/malloca.valgrind: Update.
* gnulib/import/math.in.h: Update.
* gnulib/import/mbrtowc.c: Update.
* gnulib/import/mbsinit.c: Update.
* gnulib/import/mbsrtowcs-impl.h: Update.
* gnulib/import/mbsrtowcs-state.c: Update.
* gnulib/import/mbsrtowcs.c: Update.
* gnulib/import/memchr.c: Update.
* gnulib/import/memmem.c: Update.
* gnulib/import/mempcpy.c: Update.
* gnulib/import/memrchr.c: Update.
* gnulib/import/mkdir.c: Update.
* gnulib/import/mkstemp.c: Update.
* gnulib/import/msvc-inval.c: Update.
* gnulib/import/msvc-inval.h: Update.
* gnulib/import/msvc-nothrow.c: Update.
* gnulib/import/msvc-nothrow.h: Update.
* gnulib/import/open.c: Update.
* gnulib/import/openat-die.c: Update.
* gnulib/import/openat-priv.h: Update.
* gnulib/import/openat-proc.c: Update.
* gnulib/import/openat.c: Update.
* gnulib/import/openat.h: Update.
* gnulib/import/opendir.c: Update.
* gnulib/import/pathmax.h: Update.
* gnulib/import/pipe-safer.c: Update.
* gnulib/import/rawmemchr.c: Update.
* gnulib/import/readdir.c: Update.
* gnulib/import/readlink.c: Update.
* gnulib/import/realloc.c: Update.
* gnulib/import/ref-add.sin: Update.
* gnulib/import/ref-del.sin: Update.
* gnulib/import/rename.c: Update.
* gnulib/import/rewinddir.c: Update.
* gnulib/import/rmdir.c: Update.
* gnulib/import/same-inode.h: Update.
* gnulib/import/save-cwd.c: Update.
* gnulib/import/save-cwd.h: Update.
* gnulib/import/scratch_buffer.h: Update.
* gnulib/import/secure_getenv.c: Update.
* gnulib/import/setenv.c: Update.
* gnulib/import/signal.in.h: Update.
* gnulib/import/stat-time.c: Update.
* gnulib/import/stat-time.h: Update.
* gnulib/import/stat-w32.c: Update.
* gnulib/import/stat-w32.h: Update.
* gnulib/import/stat.c: Update.
* gnulib/import/stdbool.in.h: Update.
* gnulib/import/stddef.in.h: Update.
* gnulib/import/stdint.in.h: Update.
* gnulib/import/stdio.in.h: Update.
* gnulib/import/stdlib.in.h: Update.
* gnulib/import/str-two-way.h: Update.
* gnulib/import/strchrnul.c: Update.
* gnulib/import/strdup.c: Update.
* gnulib/import/streq.h: Update.
* gnulib/import/strerror-override.c: Update.
* gnulib/import/strerror-override.h: Update.
* gnulib/import/strerror.c: Update.
* gnulib/import/string.in.h: Update.
* gnulib/import/stripslash.c: Update.
* gnulib/import/strnlen1.c: Update.
* gnulib/import/strnlen1.h: Update.
* gnulib/import/strstr.c: Update.
* gnulib/import/strtok_r.c: Update.
* gnulib/import/sys_stat.in.h: Update.
* gnulib/import/sys_time.in.h: Update.
* gnulib/import/sys_types.in.h: Update.
* gnulib/import/tempname.c: Update.
* gnulib/import/tempname.h: Update.
* gnulib/import/time.in.h: Update.
* gnulib/import/unistd--.h: Update.
* gnulib/import/unistd-safer.h: Update.
* gnulib/import/unistd.in.h: Update.
* gnulib/import/unsetenv.c: Update.
* gnulib/import/verify.h: Update.
* gnulib/import/extra/snippet/warn-on-use.h: Update.
* gnulib/import/wchar.in.h: Update.
* gnulib/import/wctype.in.h: Update.
* gnulib/import/xalloc-oversized.h: Update.
* gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
"53e2c179f26a890fa6685af4b6c1397ee370433b".
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-08-29 16:31:15 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED

--- Comment #18 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
palves at redhat dot com
2018-09-03 15:26:08 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Pedro Alves <palves at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
Target Milestone|--- |8.2

--- Comment #19 from Pedro Alves <palves at redhat dot com> ---
Reopening so we remember to decide whether to checky-pick the gnulib fix (not
the whole update/import) to the 8.2 branch before 8.2 is out.
--
You are receiving this mail because:
You are on the CC list for the bug.
brobecker at gnat dot com
2018-09-03 17:06:10 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Joel Brobecker <brobecker at gnat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |brobecker at gnat dot com

--- Comment #20 from Joel Brobecker <brobecker at gnat dot com> ---
Oh la la, just in the nick of time! I was just about to start when I noticed
this patch's milestone being updated.

Let's decide quickly, because it's really time to release 8.2. Looking at the
patch itself, it looks relatively safe to cherry-pick it. As far as I can tell,
it's not a direct regression (GDB 8.1 seems to have the culprit patch), and
cross-compiling GDB doesn't seem to be something that strikes me as very
common. But on the other hand, I can see someone cross-compiler from GNU/Linux
a GDB for Windows, simply because it's a lot faster to build on GNU/Linux, I've
done it many times in the past.

So, I agree the patch seems useful for gdb-8.2. If Pedro still agrees it is a
good idea, please cherry-pick and push ASAP.

Thank you!
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-09-03 17:33:20 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #21 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Created attachment 11228
--> https://sourceware.org/bugzilla/attachment.cgi?id=11228&action=edit
Patch to be backported to 8.2

I'm attaching a proposed patch to be backported.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-09-03 17:33:50 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #22 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
(In reply to Sergio Durigan Junior from comment #21)
Created attachment 11228 [details]
Patch to be backported to 8.2
I'm attaching a proposed patch to be backported.
I meant "to be pushed". The patch has already been backported.
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-09-04 18:02:03 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #23 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The gdb-8.2-branch branch has been updated by Joel Brobecker
<***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f30171bf98082846a725c1d116650d0c8998564c

commit f30171bf98082846a725c1d116650d0c8998564c
Author: Sergio Durigan Junior <***@redhat.com>
Date: Tue Sep 4 19:51:46 2018 +0200

fix incorrect gnulib getcwd replacement when cross-compiling GDB

This fixes a GDB crash observed on Android 8.0 when GDB was
cross-compiled. This patch is a backport of a patch pushed
upstream in gnulib.

gdb/ChangeLog (Sergio Durigan Junior <***@redhat.com>):

PR gdb/23558
* gnulib/import/m4/getcwd-path-max.m4: Add handling of Hurd,
Linux and kFreeBSD platforms.
* gnulib/configure: Regenerate.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-09-10 11:41:11 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #24 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Hello, Ruslan,

I'd like to know if you could test the latest release of GDB, 8.2, and check if
the problem still persists with it. The backported fix from gnulib should be
present in this release.

Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-09-10 17:53:36 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #25 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sergio Durigan Junior
<***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5e8754f90abbbf832987477eea4ee91a9d2f694c

commit 5e8754f90abbbf832987477eea4ee91a9d2f694c
Author: Sergio Durigan Junior <***@redhat.com>
Date: Mon Sep 10 12:22:59 2018 -0400

Revert "Update gnulib to current upstream master"

This reverts commit 7a6dbc2fdb2323c35e981f93236f323e9d7c0b24 ("Update
gnulib to current upstream master"). It is needed because the gnulib
update caused problems with people using old GCC compilers (version
4.8, for example), which support C99 but don't default to using it.
Unfortunately this broke GDB for these users. A more detailed report
of what happened can be found at:

https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00157.html

The reason for updating our gnulib copy was to fix PR gdb/23558.
Reverting this patch reintroduces the bug, so in order to fix it I
will submit a subsequent patch which cherry-picks the fix from gnulib.

gdb/ChangeLog:
2018-09-10 Sergio Durigan Junior <***@redhat.com>

Revert:
2018-08-29 Sergio Durigan Junior <***@redhat.com>

PR gdb/23555
PR gdb/23558
* gnulib/aclocal.m4: Regenerate.
* gnulib/config.in: Regenerate.
* gnulib/configure: Regenerate.
* gnulib/import/Makefile.am: Update.
* gnulib/import/Makefile.in: Update.
* gnulib/import/extra/snippet/_Noreturn.h: Rename to...
* gnulib/import/_Noreturn.h: ... this.
* gnulib/import/alloca.in.h: Update.
* gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
* gnulib/import/arg-nonnull.h: ... this.
* gnulib/import/assure.h: Update.
* gnulib/import/at-func.c: Update.
* gnulib/import/basename-lgpl.c: Update.
* gnulib/import/extra/snippet/c++defs.h: Rename to...
* gnulib/import/c++defs.h: ... this.
* gnulib/import/canonicalize-lgpl.c: Update.
* gnulib/import/cdefs.h: Update.
* gnulib/import/chdir-long.c: Update.
* gnulib/import/chdir-long.h: Update.
* gnulib/import/cloexec.c: Update.
* gnulib/import/cloexec.h: Update.
* gnulib/import/close.c: Update.
* gnulib/import/closedir.c: Update.
* gnulib/import/config.charset: Update.
* gnulib/import/dirent-private.h: Update.
* gnulib/import/dirent.in.h: Update.
* gnulib/import/dirfd.c: Update.
* gnulib/import/dirname-lgpl.c: Update.
* gnulib/import/dirname.h: Update.
* gnulib/import/dosname.h: Update.
* gnulib/import/dup-safer-flag.c: Update.
* gnulib/import/dup-safer.c: Update.
* gnulib/import/dup.c: Update.
* gnulib/import/dup2.c: Update.
* gnulib/import/errno.in.h: Update.
* gnulib/import/error.c: Update.
* gnulib/import/error.h: Update.
* gnulib/import/exitfail.c: Update.
* gnulib/import/exitfail.h: Update.
* gnulib/import/extra/update-copyright: Update.
* gnulib/import/fchdir.c: Update.
* gnulib/import/fcntl.c: Update.
* gnulib/import/fcntl.in.h: Update.
* gnulib/import/fd-hook.c: Update.
* gnulib/import/fd-hook.h: Update.
* gnulib/import/fd-safer-flag.c: Update.
* gnulib/import/fd-safer.c: Update.
* gnulib/import/fdopendir.c: Update.
* gnulib/import/filename.h: Update.
* gnulib/import/filenamecat-lgpl.c: Update.
* gnulib/import/filenamecat.h: Update.
* gnulib/import/flexmember.h: Update.
* gnulib/import/float+.h: Update.
* gnulib/import/float.c: Update.
* gnulib/import/float.in.h: Update.
* gnulib/import/fnmatch.c: Update.
* gnulib/import/fnmatch.in.h: Update.
* gnulib/import/fnmatch_loop.c: Update.
* gnulib/import/fpucw.h: Update.
* gnulib/import/frexp.c: Update.
* gnulib/import/frexpl.c: Update.
* gnulib/import/fstat.c: Update.
* gnulib/import/fstatat.c: Update.
* gnulib/import/getcwd-lgpl.c: Update.
* gnulib/import/getcwd.c: Update.
* gnulib/import/getdtablesize.c: Update.
* gnulib/import/getlogin_r.c: Update.
* gnulib/import/getprogname.c: Update.
* gnulib/import/getprogname.h: Update.
* gnulib/import/gettext.h: Update.
* gnulib/import/gettimeofday.c: Update.
* gnulib/import/glob-libc.h: Update.
* gnulib/import/glob.c: Update.
* gnulib/import/glob.in.h: Update.
* gnulib/import/glob_internal.h: Update.
* gnulib/import/glob_pattern_p.c: Update.
* gnulib/import/globfree.c: Update.
* gnulib/import/hard-locale.c: Update.
* gnulib/import/hard-locale.h: Update.
* gnulib/import/intprops.h: Update.
* gnulib/import/inttypes.in.h: Update.
* gnulib/import/isnan.c: Update.
* gnulib/import/isnand-nolibm.h: Update.
* gnulib/import/isnand.c: Update.
* gnulib/import/isnanl-nolibm.h: Update.
* gnulib/import/isnanl.c: Update.
* gnulib/import/itold.c: Update.
* gnulib/import/libc-config.h: Update.
* gnulib/import/limits.in.h: Update.
* gnulib/import/localcharset.c: Update.
* gnulib/import/localcharset.h: Update.
* gnulib/import/localtime-buffer.c: Update.
* gnulib/import/localtime-buffer.h: Update.
* gnulib/import/lstat.c: Update.
* gnulib/import/m4/00gnulib.m4: Update.
* gnulib/import/m4/__inline.m4: Update.
* gnulib/import/m4/absolute-header.m4: Update.
* gnulib/import/m4/alloca.m4: Update.
* gnulib/import/m4/builtin-expect.m4: Update.
* gnulib/import/m4/canonicalize.m4: Update.
* gnulib/import/m4/chdir-long.m4: Update.
* gnulib/import/m4/close.m4: Update.
* gnulib/import/m4/closedir.m4: Update.
* gnulib/import/m4/configmake.m4: Update.
* gnulib/import/m4/d-ino.m4: Update.
* gnulib/import/m4/d-type.m4: Update.
* gnulib/import/m4/dirent_h.m4: Update.
* gnulib/import/m4/dirfd.m4: Update.
* gnulib/import/m4/dirname.m4: Update.
* gnulib/import/m4/double-slash-root.m4: Update.
* gnulib/import/m4/dup.m4: Update.
* gnulib/import/m4/dup2.m4: Update.
* gnulib/import/m4/eealloc.m4: Update.
* gnulib/import/m4/environ.m4: Update.
* gnulib/import/m4/errno_h.m4: Update.
* gnulib/import/m4/error.m4: Update.
* gnulib/import/m4/exponentd.m4: Update.
* gnulib/import/m4/exponentl.m4: Update.
* gnulib/import/m4/extensions.m4: Update.
* gnulib/import/m4/extern-inline.m4: Update.
* gnulib/import/m4/fchdir.m4: Update.
* gnulib/import/m4/fcntl-o.m4: Update.
* gnulib/import/m4/fcntl.m4: Update.
* gnulib/import/m4/fcntl_h.m4: Update.
* gnulib/import/m4/fdopendir.m4: Update.
* gnulib/import/m4/filenamecat.m4: Update.
* gnulib/import/m4/flexmember.m4: Update.
* gnulib/import/m4/float_h.m4: Update.
* gnulib/import/m4/fnmatch.m4: Update.
* gnulib/import/m4/fnmatch_h.m4: Update.
* gnulib/import/m4/fpieee.m4: Update.
* gnulib/import/m4/frexp.m4: Update.
* gnulib/import/m4/frexpl.m4: Update.
* gnulib/import/m4/fstat.m4: Update.
* gnulib/import/m4/fstatat.m4: Update.
* gnulib/import/m4/getcwd-abort-bug.m4: Update.
* gnulib/import/m4/getcwd-path-max.m4: Update.
* gnulib/import/m4/getcwd.m4: Update.
* gnulib/import/m4/getdtablesize.m4: Update.
* gnulib/import/m4/getlogin.m4: Update.
* gnulib/import/m4/getlogin_r.m4: Update.
* gnulib/import/m4/getpagesize.m4: Update.
* gnulib/import/m4/getprogname.m4: Update.
* gnulib/import/m4/gettimeofday.m4: Update.
* gnulib/import/m4/glibc21.m4: Update.
* gnulib/import/m4/glob.m4: Update.
* gnulib/import/m4/glob_h.m4: Update.
* gnulib/import/m4/gnulib-cache.m4: Update.
* gnulib/import/m4/gnulib-common.m4: Update.
* gnulib/import/m4/gnulib-comp.m4: Update.
* gnulib/import/m4/gnulib-tool.m4: Update.
* gnulib/import/m4/hard-locale.m4: Update.
* gnulib/import/m4/include_next.m4: Update.
* gnulib/import/m4/inttypes-pri.m4: Update.
* gnulib/import/m4/inttypes.m4: Update.
* gnulib/import/m4/isnand.m4: Update.
* gnulib/import/m4/isnanl.m4: Update.
* gnulib/import/m4/largefile.m4: Update.
* gnulib/import/m4/limits-h.m4: Update.
* gnulib/import/m4/localcharset.m4: Update.
* gnulib/import/m4/locale-fr.m4: Update.
* gnulib/import/m4/locale-ja.m4: Update.
* gnulib/import/m4/locale-zh.m4: Update.
* gnulib/import/m4/localtime-buffer.m4: Update.
* gnulib/import/m4/longlong.m4: Update.
* gnulib/import/m4/lstat.m4: Update.
* gnulib/import/m4/malloc.m4: Update.
* gnulib/import/m4/malloca.m4: Update.
* gnulib/import/m4/math_h.m4: Update.
* gnulib/import/m4/mbrtowc.m4: Update.
* gnulib/import/m4/mbsinit.m4: Update.
* gnulib/import/m4/mbsrtowcs.m4: Update.
* gnulib/import/m4/mbstate_t.m4: Update.
* gnulib/import/m4/memchr.m4: Update.
* gnulib/import/m4/memmem.m4: Update.
* gnulib/import/m4/mempcpy.m4: Update.
* gnulib/import/m4/memrchr.m4: Update.
* gnulib/import/m4/mkdir.m4: Update.
* gnulib/import/m4/mkstemp.m4: Update.
* gnulib/import/m4/mmap-anon.m4: Update.
* gnulib/import/m4/mode_t.m4: Update.
* gnulib/import/m4/msvc-inval.m4: Update.
* gnulib/import/m4/msvc-nothrow.m4: Update.
* gnulib/import/m4/multiarch.m4: Update.
* gnulib/import/m4/nocrash.m4: Update.
* gnulib/import/m4/off_t.m4: Update.
* gnulib/import/m4/onceonly.m4: Update.
* gnulib/import/m4/open-cloexec.m4: Update.
* gnulib/import/m4/open.m4: Update.
* gnulib/import/m4/openat.m4: Update.
* gnulib/import/m4/opendir.m4: Update.
* gnulib/import/m4/pathmax.m4: Update.
* gnulib/import/m4/rawmemchr.m4: Update.
* gnulib/import/m4/readdir.m4: Update.
* gnulib/import/m4/readlink.m4: Update.
* gnulib/import/m4/realloc.m4: Update.
* gnulib/import/m4/rename.m4: Update.
* gnulib/import/m4/rewinddir.m4: Update.
* gnulib/import/m4/rmdir.m4: Update.
* gnulib/import/m4/save-cwd.m4: Update.
* gnulib/import/m4/secure_getenv.m4: Update.
* gnulib/import/m4/setenv.m4: Update.
* gnulib/import/m4/signal_h.m4: Update.
* gnulib/import/m4/ssize_t.m4: Update.
* gnulib/import/m4/stat-time.m4: Update.
* gnulib/import/m4/stat.m4: Update.
* gnulib/import/m4/std-gnu11.m4: Update.
* gnulib/import/m4/stdbool.m4: Update.
* gnulib/import/m4/stddef_h.m4: Update.
* gnulib/import/m4/stdint.m4: Update.
* gnulib/import/m4/stdio_h.m4: Update.
* gnulib/import/m4/stdlib_h.m4: Update.
* gnulib/import/m4/strchrnul.m4: Update.
* gnulib/import/m4/strdup.m4: Update.
* gnulib/import/m4/strerror.m4: Update.
* gnulib/import/m4/string_h.m4: Update.
* gnulib/import/m4/strstr.m4: Update.
* gnulib/import/m4/strtok_r.m4: Update.
* gnulib/import/m4/sys_socket_h.m4: Update.
* gnulib/import/m4/sys_stat_h.m4: Update.
* gnulib/import/m4/sys_time_h.m4: Update.
* gnulib/import/m4/sys_types_h.m4: Update.
* gnulib/import/m4/tempname.m4: Update.
* gnulib/import/m4/time_h.m4: Update.
* gnulib/import/m4/unistd-safer.m4: Update.
* gnulib/import/m4/unistd_h.m4: Update.
* gnulib/import/m4/warn-on-use.m4: Update.
* gnulib/import/m4/wchar_h.m4: Update.
* gnulib/import/m4/wchar_t.m4: Update.
* gnulib/import/m4/wctype_h.m4: Update.
* gnulib/import/m4/wint_t.m4: Update.
* gnulib/import/malloc.c: Update.
* gnulib/import/malloc/scratch_buffer.h: Update.
* gnulib/import/malloc/scratch_buffer_grow.c: Update.
* gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
* gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
* gnulib/import/malloca.c: Update.
* gnulib/import/malloca.h: Update.
* gnulib/import/malloca.valgrind: Update.
* gnulib/import/math.in.h: Update.
* gnulib/import/mbrtowc.c: Update.
* gnulib/import/mbsinit.c: Update.
* gnulib/import/mbsrtowcs-impl.h: Update.
* gnulib/import/mbsrtowcs-state.c: Update.
* gnulib/import/mbsrtowcs.c: Update.
* gnulib/import/memchr.c: Update.
* gnulib/import/memmem.c: Update.
* gnulib/import/mempcpy.c: Update.
* gnulib/import/memrchr.c: Update.
* gnulib/import/mkdir.c: Update.
* gnulib/import/mkstemp.c: Update.
* gnulib/import/msvc-inval.c: Update.
* gnulib/import/msvc-inval.h: Update.
* gnulib/import/msvc-nothrow.c: Update.
* gnulib/import/msvc-nothrow.h: Update.
* gnulib/import/open.c: Update.
* gnulib/import/openat-die.c: Update.
* gnulib/import/openat-priv.h: Update.
* gnulib/import/openat-proc.c: Update.
* gnulib/import/openat.c: Update.
* gnulib/import/openat.h: Update.
* gnulib/import/opendir.c: Update.
* gnulib/import/pathmax.h: Update.
* gnulib/import/pipe-safer.c: Update.
* gnulib/import/rawmemchr.c: Update.
* gnulib/import/readdir.c: Update.
* gnulib/import/readlink.c: Update.
* gnulib/import/realloc.c: Update.
* gnulib/import/ref-add.sin: Update.
* gnulib/import/ref-del.sin: Update.
* gnulib/import/rename.c: Update.
* gnulib/import/rewinddir.c: Update.
* gnulib/import/rmdir.c: Update.
* gnulib/import/same-inode.h: Update.
* gnulib/import/save-cwd.c: Update.
* gnulib/import/save-cwd.h: Update.
* gnulib/import/scratch_buffer.h: Update.
* gnulib/import/secure_getenv.c: Update.
* gnulib/import/setenv.c: Update.
* gnulib/import/signal.in.h: Update.
* gnulib/import/stat-time.c: Update.
* gnulib/import/stat-time.h: Update.
* gnulib/import/stat-w32.c: Update.
* gnulib/import/stat-w32.h: Update.
* gnulib/import/stat.c: Update.
* gnulib/import/stdbool.in.h: Update.
* gnulib/import/stddef.in.h: Update.
* gnulib/import/stdint.in.h: Update.
* gnulib/import/stdio.in.h: Update.
* gnulib/import/stdlib.in.h: Update.
* gnulib/import/str-two-way.h: Update.
* gnulib/import/strchrnul.c: Update.
* gnulib/import/strdup.c: Update.
* gnulib/import/streq.h: Update.
* gnulib/import/strerror-override.c: Update.
* gnulib/import/strerror-override.h: Update.
* gnulib/import/strerror.c: Update.
* gnulib/import/string.in.h: Update.
* gnulib/import/stripslash.c: Update.
* gnulib/import/strnlen1.c: Update.
* gnulib/import/strnlen1.h: Update.
* gnulib/import/strstr.c: Update.
* gnulib/import/strtok_r.c: Update.
* gnulib/import/sys_stat.in.h: Update.
* gnulib/import/sys_time.in.h: Update.
* gnulib/import/sys_types.in.h: Update.
* gnulib/import/tempname.c: Update.
* gnulib/import/tempname.h: Update.
* gnulib/import/time.in.h: Update.
* gnulib/import/unistd--.h: Update.
* gnulib/import/unistd-safer.h: Update.
* gnulib/import/unistd.in.h: Update.
* gnulib/import/unsetenv.c: Update.
* gnulib/import/verify.h: Update.
* gnulib/import/extra/snippet/warn-on-use.h: Update.
* gnulib/import/wchar.in.h: Update.
* gnulib/import/wctype.in.h: Update.
* gnulib/import/xalloc-oversized.h: Update.
* gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
"53e2c179f26a890fa6685af4b6c1397ee370433b".
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-09-10 17:53:43 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #26 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sergio Durigan Junior
<***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e2fc52e745757a11f7a4a256984cabbe5474f55a

commit e2fc52e745757a11f7a4a256984cabbe5474f55a
Author: Sergio Durigan Junior <***@redhat.com>
Date: Mon Sep 10 12:52:04 2018 -0400

Fix PR gdb/23558: Use system's 'getcwd' when cross-compiling GDB

This is a backport of a gnulib fix for the following bug:

https://sourceware.org/bugzilla/show_bug.cgi?id=23558

The problem reported there is about the replacement of 'getcwd' when
cross-compiling GDB. With our current gnulib copy, the mechanism for
deciding whether to use the system's 'getcwd' or gnulib's version is
too simplistic and pessimistic, so when cross-compiling we always end
up using gnulib's version, which has a limitation: it cannot handle
the situation when the parent directory doesn't have read permissions.

The solution is to backport the following gnulib commit:

commit a96d2e67052c879b1bcc5bc461722beac75fc372
Author: Bruno Haible <***@clisp.org>
Date: Thu Aug 23 21:13:19 2018 +0200

getcwd: Add cross-compilation guesses.

gdb/ChangeLog:
2018-09-10 Sergio Durigan Junior <***@redhat.com>

PR gdb/23555
PR gdb/23558
* gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
guesses.
--
You are receiving this mail because:
You are on the CC list for the bug.
b7.10110111 at gmail dot com
2018-09-10 19:00:55 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #27 from Ruslan <b7.10110111 at gmail dot com> ---
(In reply to Sergio Durigan Junior from comment #24)
Post by sergiodj at redhat dot com
I'd like to know if you could test the latest release of GDB, 8.2, and check
if the problem still persists with it. The backported fix from gnulib
should be present in this release.
I've checked out tag gdb-8.2-release in the git repo, this version seems to
work normally.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-09-10 20:05:07 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED

--- Comment #28 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
(In reply to Ruslan from comment #27)
Post by b7.10110111 at gmail dot com
(In reply to Sergio Durigan Junior from comment #24)
Post by sergiodj at redhat dot com
I'd like to know if you could test the latest release of GDB, 8.2, and check
if the problem still persists with it. The backported fix from gnulib
should be present in this release.
I've checked out tag gdb-8.2-release in the git repo, this version seems to
work normally.
Thanks, I'm closing the bug then.
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-09-12 22:40:46 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=23643
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-09-19 03:49:44 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23558

--- Comment #29 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Simon Marchi <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b567ca638c274e27969975403b885973af9ccae6

commit b567ca638c274e27969975403b885973af9ccae6
Author: Simon Marchi <***@ericsson.com>
Date: Tue Sep 18 23:40:55 2018 -0400

Carry the gnulib getcwd backport as a patch

Commit

e2fc52e7457 ("Fix PR gdb/23558: Use system's 'getcwd' when
cross-compiling GDB")

backported some changes from a future gnulib version to our import.
However, this means that every time someone wants to change our gnulib
import (e.g. add a module), they must make sure not to include that
backported change. It also means that someone running the
update-gnulib.sh script without changes will get some diffs and wonder
why.

Instead, I suggest we carry that backport as a patch applied by the
update-gnulib.sh script after running the import tool. It will make it
clear what backport or local modification we have and should make
running update-gnulib.sh give a reproducible result.

There is a hunk in the configure file in this patch, this is because the
commit that backported the getcwd bits didn't include the re-generated
configure.

Note: you'll need this patch as well to get deterministic results:

Generate aclocal-m4-deps.mk more deterministically and portably.
https://sourceware.org/ml/gdb-patches/2018-09/msg00643.html

gdb/ChangeLog:

*
patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
New file.
* update-gnulib.sh: Apply patch.
* configure: Re-generate.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...