This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC][PATCH] fix Read_symbols datarace


After update to gcc 4.9.2, link of my project failed,
because of ld.gold crash.
I reproduce this problem:
https://sourceware.org/bugzilla/show_bug.cgi?id=17538                                                                                          

Today I dig into this, and see that problem in
that multiply threads run
Read_symbols::do_read_symbols
which call
Plugin_manager::claim_file
which call
this->objects_.push_back

without any sync, and so std::vector was modified
in many threads without any locks, which of course
cause crashes.

Attached patch fix problem for me.
Comments?

-- 
/Evgeniy

Attachment: patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]