[Bug binutils/23471] [2.31.1, regression] /usr/bin/objcopy: memory exhausted on m68k

2018-08-01 Thread glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23471

--- Comment #6 from John Paul Adrian Glaubitz  ---
I have filed #86820 now: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86820

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/23471] [2.31.1, regression] /usr/bin/objcopy: memory exhausted on m68k

2018-08-01 Thread glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23471

John Paul Adrian Glaubitz  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from John Paul Adrian Glaubitz  ---
(In reply to Nick Clifton from comment #4)
> (In reply to John Paul Adrian Glaubitz from comment #3)
> 
> Phew!  Well that is good to hear as I was dreading trying to bisect this one.

That was actually what I was just going through :-). I kept checking out older
major revisions and the problem would still reproduce such that at some point I
dropped the idea of binutils being to be blamed here.

> Would you mind closing this PR and opening a gcc one instead please ?

Absolutely.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/23471] [2.31.1, regression] /usr/bin/objcopy: memory exhausted on m68k

2018-08-01 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23471

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #4 from Nick Clifton  ---
(In reply to John Paul Adrian Glaubitz from comment #3)

Phew!  Well that is good to hear as I was dreading trying to bisect this one.

Would you mind closing this PR and opening a gcc one instead please ?

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/23471] [2.31.1, regression] /usr/bin/objcopy: memory exhausted on m68k

2018-08-01 Thread glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23471

--- Comment #3 from John Paul Adrian Glaubitz  ---
I have narrowed it down to being a compiler bug. The problem shows with
binutils built with gcc-8. Building the same version with gcc-7 makes the
problem go away and strip works correctly again.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/23471] [2.31.1, regression] /usr/bin/objcopy: memory exhausted on m68k

2018-08-01 Thread glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23471

--- Comment #2 from John Paul Adrian Glaubitz  ---
Here's the strace output for when strip fails:

execve("/usr/bin/strip", ["strip", "json2yaml"], 0xefc34d4c /* 18 vars */) = 0
brk(NULL)   = 0x80024000
uname({sysname="Linux", nodename="pacman", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=57724, ...}) = 0
mmap2(NULL, 57724, PROT_READ, MAP_PRIVATE, 3, 0) = 0xc002
close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/m68k-linux-gnu/libbfd-2.31.1-system.so",
O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\4\0\0\0\1\0\1\343\240\0\0\0004"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=674200, ...}) = 0
mmap2(NULL, 698280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xc002f000
mprotect(0xc00ca000, 12288, PROT_NONE)  = 0
mmap2(0xc00cd000, 36864, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0xc00cd000
mmap2(0xc00d6000, 14248, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xc00d6000
close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/m68k-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\4\0\0\0\1\0\0$\330\0\0\0004"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=100268, ...}) = 0
mmap2(NULL, 107084, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xc00da000
mprotect(0xc00f2000, 4096, PROT_NONE)   = 0
mmap2(0xc00f3000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0xc00f3000
close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/m68k-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\4\0\0\0\1\0\0\16\0\0\0\0004"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9800, ...}) = 0
mmap2(NULL, 16712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xc00f5000
mprotect(0xc00f7000, 4096, PROT_NONE)   = 0
mmap2(0xc00f8000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xc00f8000
close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/m68k-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\4\0\0\0\1\0\2\22\34\0\0\0004"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1314240, ...}) = 0
mmap2(NULL, 1326676, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xc00fa000
mprotect(0xc0233000, 12288, PROT_NONE)  = 0
mmap2(0xc0236000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13a000) = 0xc0236000
mmap2(0xc023c000, 7764, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xc023c000
close(3)= 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xc001b000
set_thread_area(0xc0022dd0) = 0
mprotect(0xc0236000, 8192, PROT_READ)   = 0
mprotect(0xc00f8000, 4096, PROT_READ)   = 0
mprotect(0xc00f3000, 4096, PROT_READ)   = 0
mprotect(0xc00cd000, 24576, PROT_READ)  = 0
mprotect(0x80021000, 4096, PROT_READ)   = 0
mprotect(0xc001d000, 4096, PROT_READ)   = 0
munmap(0xc002, 57724)   = 0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
get_thread_area()   = 0xc0022dd0
brk(NULL)   = 0x80024000
brk(0x80045000) = 0x80045000
get_thread_area()   = 0xc0022dd0
get_thread_area()

[Bug binutils/23471] [2.31.1, regression] /usr/bin/objcopy: memory exhausted on m68k

2018-08-01 Thread glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=23471

--- Comment #1 from John Paul Adrian Glaubitz  ---
This shows the regression:

Version 2.31.1-2 in Debian:

(sid-m68k-sbuild)root@nofan:/tmp# strip json2yaml 
/usr/bin/strip:json2yaml: memory exhausted
(sid-m68k-sbuild)root@nofan:/tmp#

Downgrading to an older version:

(sid-m68k-sbuild)root@nofan:/tmp# apt install
binutils-common=2.30.90.20180710-1 binutils=2.30.90.20180710-1
libbinutils=2.30.90.20180710-1 binutils-m68k-linux-gnu=2.30.90.20180710-1

And:

(sid-m68k-sbuild)root@nofan:/tmp# strip json2yaml 
(sid-m68k-sbuild)root@nofan:/tmp#

I could not reproduce it with a cross-binutils on amd64.

The binary has to be quite large in order to be able to reproduce the problem:

(sid-m68k-sbuild)root@nofan:/tmp# ls -l *yaml* 
-rwxr-xr-x 1 root root 43823968 Aug  1 09:29 json2yaml
-rwxr-xr-x 1 root root 31365076 Aug  1 09:29 yaml2json
(sid-m68k-sbuild)root@nofan:/tmp# strip yaml2json 
(sid-m68k-sbuild)root@nofan:/tmp# strip json2yaml 
/usr/bin/strip:json2yaml: memory exhausted
(sid-m68k-sbuild)root@nofan:/tmp#

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils