[PATCH] Gold-plugin: Broaden scope of get/release_input_file to scope of Module.

Jan Voung jvoung at chromium.org
Tue Feb 10 13:00:11 PST 2015


I've been testing with gold instead bfd ld.

The call chain is roughly this:

#0  gold::File_read::View::~View (this=0x86891e8) at ../../../src/binutils/gold/fileread.cc:141
#1  0x0821dafa in gold::File_read::clear_views (this=0x86734c8, mode=gold::File_read::CLEAR_VIEWS_NORMAL) at ../../../src/binutils/gold/fileread.cc:844
#2  0x0821ed7e in gold::File_read::release (this=0x86734c8) at ../../../src/binutils/gold/fileread.cc:300
#3  0x0821eef0 in gold::File_read::unlock (this=0x86734c8, task=0x8673260) at ../../../src/binutils/gold/fileread.cc:332
#4  0x0810dc97 in gold::Object::unlock (this=0x8679140, t=0x8673260) at ../../../src/binutils/gold/object.h:431
#5  0x083d9e49 in gold::Plugin_manager::release_input_file (this=0x8663ba8, handle=0) at ../../../src/binutils/gold/plugin.cc:801
#6  0x083d5f30 in gold::release_input_file (handle=0x0) at ../../../src/binutils/gold/plugin.cc:1521
#7  0xf7fca621 in allSymbolsReadHook(llvm::raw_fd_ostream*) () from LLVMgold.so

Where line 141 at the top of the stack is:

File_read::View::~View() {
//...

  case DATA_MMAPPED:
    if (::munmap(const_cast<unsigned char*>(this->data_), this->size_) != 0)

//...
}

So are you saying that clear_views() shouldn't be called?


http://reviews.llvm.org/D7539

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list