Bug 26230 - Invalid free in _bfd_coff_free_symbols
Summary: Invalid free in _bfd_coff_free_symbols
Status: RESOLVED DUPLICATE of bug 25447
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.34
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-13 01:04 UTC by lxumei8
Modified: 2020-07-13 01:23 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
poc_file (96 bytes, model/x.stl-binary)
2020-07-13 01:04 UTC, lxumei8
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lxumei8 2020-07-13 01:04:21 UTC
Created attachment 12693 [details]
poc_file

Invalid free in _bfd_coff_free_symbols

Reproduce steps:
1.download binutils-2.34 and build
2.run objdump with the following command line:
objdump --dwarf-check -C -g -f --dwarf -x poc_file

stack trace:
#0  __GI_raise (sig=sig@entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff78208b1 in __GI_abort () at abort.c:79
#2  0x00007ffff7869907 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7996dfa "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff787097a in malloc_printerr (str=str@entry=0x7ffff7994fe8 "free(): invalid pointer") at malloc.c:5350
#4  0x00007ffff7877e8c in _int_free (have_lock=0x0, p=0x555555ea3fb0, av=0x7ffff7bcbc40 <main_arena>) at malloc.c:4157
#5  __GI___libc_free (mem=0x555555ea3fc0) at malloc.c:3124
#6  0x0000555555a09305 in _bfd_coff_free_symbols (abfd=0x555555ea0630) at ../../bfd/coffgen.c:1782
#7  _bfd_coff_close_and_cleanup (abfd=0x555555ea0630) at ../../bfd/coffgen.c:3180
#8  0x00005555557b6d23 in bfd_close_all_done (abfd=0x555555ea0630) at ../../bfd/opncls.c:789
#9  0x00005555555bc9b5 in display_file (last_file=0x1, target=<optimized out>, filename=0x7fffffffe65a "id:000000,sig:06,src:011281,op:MOpt-core-havoc,rep:8") at ../../binutils/objdump.c:5016
#10 main (argc=<optimized out>, argc@entry=0x8, argv=<optimized out>, argv@entry=0x7fffffffe368) at ../../binutils/objdump.c:5349
#11 0x00007ffff7801b97 in __libc_start_main (main=0x5555555bb6d0 <main>, argc=0x8, argv=0x7fffffffe368, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe358)
    at ../csu/libc-start.c:310
#12 0x00005555555bd58a in _start ()
Comment 1 Alan Modra 2020-07-13 01:23:52 UTC
Yet another dup

*** This bug has been marked as a duplicate of bug 25447 ***