[Bug gas/24165] fivefold time and memory usage since commit 3ae729d5 on large files generated by lto

2019-02-04 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24165

Martin Liška  changed:

   What|Removed |Added

 CC||marxin.liska at gmail dot com

--- Comment #2 from Martin Liška  ---
And the original test-case can be found here:
https://drive.google.com/file/d/1_63e0GbykhVAr_ZubOP4YuiZOW2ThoGl/view?usp=sharing

-- 
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/24168] New: segment fault in nm-new in binutils-2.30

2019-02-04 Thread zhangyn2012 at bupt dot edu.cn
https://sourceware.org/bugzilla/show_bug.cgi?id=24168

Bug ID: 24168
   Summary: segment fault in nm-new in binutils-2.30
   Product: binutils
   Version: 2.30
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: zhangyn2012 at bupt dot edu.cn
  Target Milestone: ---

Created attachment 11584
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11584=edit
input file triggering the bug

Hi, there.
I got a segment fault when testing nm-new in binutils-2.30 with the command
`nm-new -a -C -l --synthetic poc`. 
The compilation flags used were "-g -O2".

The stack dumps given by valgrind are as follows:
Stack dump:
==10084== Invalid read of size 8
==10084==at 0x403B55: print_symbol (nm.c:989)
==10084==by 0x403F73: print_symbols (nm.c:1089)
==10084==by 0x403F73: display_rel_file (nm.c:1205)
==10084==by 0x4050D9: display_file (nm.c:1325)
==10084==by 0x402FA9: main (nm.c:1799)
==10084==  Address 0x20 is not stack'd, malloc'd or (recently) free'd

-- 
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/24167] New: segment fault in objdump in binutils-2.26

2019-02-04 Thread zhangyn2012 at bupt dot edu.cn
https://sourceware.org/bugzilla/show_bug.cgi?id=24167

Bug ID: 24167
   Summary: segment fault in objdump in binutils-2.26
   Product: binutils
   Version: 2.26
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: zhangyn2012 at bupt dot edu.cn
  Target Milestone: ---

Created attachment 11583
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11583=edit
input file triggering the bug

Hi, there.
I triggered a segment fault when testing objdump in binutils-2.26.

poc: 文件格式 a.out-i386-linux
poc
体系结构:i386, 标志 0x01bf:
HAS_RELOC, EXEC_P, HAS_LINENO, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, WP_TEXT,
D_PAGED
起始地址 0xff00

节:
Idx Name  Size  VMA   LMA   File off  Algn
  0 .text ffe0  0020  0020  0020  2**3
  CONTENTS, ALLOC, LOAD, RELOC, CODE
  1 .data 0010        2**3
  CONTENTS, ALLOC, LOAD, RELOC, DATA
  2 .bss    0010  0010    2**3
  ALLOC
SYMBOL TABLE:
段错误



The command I test was `objdump -x -C poc`. 
The compilation flags used were "-g -O2".

I got the following stack dumps using valgrind:

$ valgrind --tool=memcheck ./objdump -x -C poc

Stack dumps:

==25269== Invalid read of size 1
==25269==at 0x4DFACA: d_abi_tags (cp-demangle.c:1311)
==25269==by 0x4E781F: d_prefix (cp-demangle.c:1499)
==25269==by 0x4E781F: d_nested_name (cp-demangle.c:1436)
==25269==by 0x4E781F: d_name (cp-demangle.c:1346)
==25269==by 0x4E7A77: d_encoding (cp-demangle.c:1257)
==25269==by 0x4E808C: cplus_demangle_mangled_name (cp-demangle.c:1172)
==25269==by 0x4E87F8: d_demangle_callback (cp-demangle.c:5894)
==25269==by 0x4E8966: d_demangle (cp-demangle.c:5945)
==25269==by 0x4E8B5B: cplus_demangle_v3 (cp-demangle.c:6102)
==25269==by 0x4D9E4B: cplus_demangle (cplus-dem.c:864)
==25269==by 0x44768A: bfd_demangle (bfd.c:1917)
==25269==by 0x407A6F: dump_symbols.isra.2 (objdump.c:2988)
==25269==by 0x407F7E: dump_bfd (objdump.c:3349)
==25269==by 0x4087B7: display_object_bfd (objdump.c:3420)
==25269==by 0x4087B7: display_any_bfd (objdump.c:3509)
==25269==  Address 0xe596f948 is not stack'd, malloc'd or (recently)
free'd

-- 
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 gas/24165] fivefold time and memory usage since commit 3ae729d5 on large files generated by lto

2019-02-04 Thread belyshev at depni dot sinp.msu.ru
https://sourceware.org/bugzilla/show_bug.cgi?id=24165

--- Comment #1 from Serge Belyshev  ---
The problem can be reproduced with synthetic testcase generated like this:

yes .p2align 5 | head -n50 > bug.s

-- 
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 gas/24165] New: fivefold time and memory usage since commit 3ae729d5 on large files generated by lto

2019-02-04 Thread belyshev at depni dot sinp.msu.ru
https://sourceware.org/bugzilla/show_bug.cgi?id=24165

Bug ID: 24165
   Summary: fivefold time and memory usage since commit 3ae729d5
on large files generated by lto
   Product: binutils
   Version: 2.33 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: belyshev at depni dot sinp.msu.ru
  Target Milestone: ---

Since fix for bug 22874, commit 3ae729d5, gas time and memory usage increased 5
times on very large files generated by lto.

Before:

gas/as-new: total time in assembly: 215.922071
frag chains:
0x1a78d60 .text1143697 frags
0x1a78df8 .data748 frags
0x1a78e90 .bss5393 frags
0x1a79518 .bss4466 frags
0x1a79188 .rodata50145 frags
0x1a79220 .rodata.str1.1   152 frags
0x1a792b8 .text.unlikely  1429 frags
0x1a79350 .rodata.str1.8 14809 frags
0x1a793e8 .text.startup789 frags
0x1a79480 .init_array3 frags
0x1a795b0 .rodata.cst8  27 frags
0x1a79648 .rodata.cst16109 frags
0x1a796e0 .rodata.cst4   7 frags
0x1a79778 .comment   2 frags
0x1a79810 .note.GNU-stack2 frags
0x1a798a8 .eh_frame 103243 frags
fixups: 1254022
637223 mini local symbols created, 446255 converted

Maximum resident set size (kbytes): 896072


After:

gas/as-new: total time in assembly: 1025.439759
frag chains:
0x992d60 .text12155234 frags
0x992df8 .data 748 frags
0x992e90 .bss 5393 frags
0x993518 .bss 4466 frags
0x993188 .rodata 50145 frags
0x993220 .rodata.str1.1152 frags
0x9932b8 .text.unlikely  38334 frags
0x993350 .rodata.str1.8  14809 frags
0x9933e8 .text.startup   15250 frags
0x993480 .init_array 3 frags
0x9935b0 .rodata.cst8   27 frags
0x993648 .rodata.cst16 109 frags
0x9936e0 .rodata.cst47 frags
0x993778 .comment2 frags
0x993810 .note.GNU-stack 2 frags
0x9938a8 .eh_frame  102827 frags
fixups: 1254022

Maximum resident set size (kbytes): 3831980


(source is a 150 MB .s file generated by lto final link for cc1plus, 11MB
compressed -- did not fit the attachment limit)

-- 
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


Re: How create small binaries with GNU binutils.

2019-02-04 Thread Nick Clifton
Hi Dmitry,

> Still, even this way, 400 bytes is more then twice as big, compared to
> fasm. Any suggestions, how to shrink binary futher?

This might be because the linker defaults to page aligning the binaries.
Have you tried linking with the --nmagic option ?  (Or alternatively the
--omagic option).

Cheers
  Nick


___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils