https://sourceware.org/bugzilla/show_bug.cgi?id=31009
Nick Clifton <nickc at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nickc at redhat dot com --- Comment #1 from Nick Clifton <nickc at redhat dot com> --- Hi Jonny, (In reply to Jonny Weir from comment #0) > linking stage when -O3 is used (-O2 builds and links correctly). To be > clear, the only difference between success and failure is the optimisation > level that is used. And to be even more clear, you are talking about the compiler's optimization level and not the linker's, correct ? > /bin/ld: BFD (GNU Binutils for Debian) 2.41 assertion fail > ../../bfd/merge.c:243 Are you able to attach a debugger to the linker and discover the values that are triggering this assertion ? The code looks like this: // We must not need resizing, otherwise _index is wrong BFD_ASSERT (bfdtab->count + 1 <= table->nbuckets * 2 / 3); So it would be interesting to know the values of bfdtab->count and table->nbuckets. Given that you are linking a very large project, I do wonder if the problem is that one of these fields is overflowing. Are you able to build a version of the linker with undefined behaviour sanitization enabled and then find out if that catches something ? > I appreciate that this description is quite vague without an example piece > of code to illustrate the problem, but something appears to have been > changed that causes this recursive output of messages upon failure. The change was (almost certainly) commit 1a528d3ef07f, which reworked the string merge code to greatly improve its speed. So far the changes have proved to be very robust, but it may be that this is the first time that they have been asked to handle an extremely large project. > Unfortunately, due to the nature and complexity of the project, I have been > unable > to provide a code example that generates the above output. As an alternative, if we are able to offer you patches (to the linker) to try out, are you able to apply and build your own linker to use for testing ? Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug.