[Bug gold/15070] gold crashes on ARMv5 due to unaligned memory access
http://sourceware.org/bugzilla/show_bug.cgi?id=15070 --- Comment #6 from cvs-commit at gcc dot gnu.org cvs-commit at gcc dot gnu.org --- CVSROOT:/cvs/src Module name:src Changes by:ccout...@sourceware.org2013-07-15 16:49:20 Modified files: gold : ChangeLog fileread.h nacl.h Log message: 2013-07-15 Shawn Landden shawnland...@gmail.com gold/ PR gold/15070 * fileread.h (File_read::get_view): Clarify comment about ALIGNED. * nacl.h (Sniff_file::View::View): Request aligned view. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=srcr1=1.1090r2=1.1091 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/fileread.h.diff?cvsroot=srcr1=1.49r2=1.50 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/nacl.h.diff?cvsroot=srcr1=1.1r2=1.2 -- 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 gold/15070] gold crashes on ARMv5 due to unaligned memory access
http://sourceware.org/bugzilla/show_bug.cgi?id=15070 Cary Coutant ccoutant at google dot com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Cary Coutant ccoutant at google dot com --- I've applied Shawn's patch and updated the comment in fileread.h. -cary -- 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 gold/15070] gold crashes on ARMv5 due to unaligned memory access
http://sourceware.org/bugzilla/show_bug.cgi?id=15070 --- Comment #5 from Shawn Landden shawnlandden at gmail dot com --- Mentioned this to you today at Tools Cauldron. Ping. -- 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 gold/15070] gold crashes on ARMv5 due to unaligned memory access
http://sourceware.org/bugzilla/show_bug.cgi?id=15070 Shawn Landden shawnlandden at gmail dot com changed: What|Removed |Added Attachment #6839|0 |1 is obsolete|| --- Comment #4 from Shawn Landden shawnlandden at gmail dot com 2013-02-05 16:54:14 UTC --- Comment on attachment 6839 -- http://sourceware.org/bugzilla/attachment.cgi?id=6839 alternate fix Then can you push the first patch? -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- 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 gold/15070] gold crashes on ARMv5 due to unaligned memory access
http://sourceware.org/bugzilla/show_bug.cgi?id=15070 --- Comment #3 from Ian Lance Taylor ian at airs dot com 2013-01-31 05:35:12 UTC --- Yes, in this case naturally aligned means aligned to the size from the ELF class. That's the alignment that matters to gold. I'm fine with changing the comment. There are two kinds of alignment requirement in gold. First, as you say, files in archives can be misaligned when mmapped into memory. Second, many relocations must be aligned; in this case the required alignment depends on the size of the relocation. The elfcpp library requires that ELF data structures be aligned. The patch in the original comment looks right to me. It corresponds to the code in is_elf_object. The patch in comment #2 is not correct. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- 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 gold/15070] gold crashes on ARMv5 due to unaligned memory access
http://sourceware.org/bugzilla/show_bug.cgi?id=15070 --- Comment #1 from Roland McGrath roland at gnu dot org 2013-01-30 22:29:45 UTC --- It looks like that fix will work fine. But it is far from obvious that it's what's required or if it's the ideal thing. The comment on File_read::get_view says the flag is true if the data must be naturally aligned. What the fileread.cc code actually does is ensure that it is aligned to the word-size of the ELF file (i.e. only ever to 32 bits or to 64 bits). What naturally aligned means to me is aligned to the size of the datum in question, so in get_view it looks like it would require it to be aligned to the SIZE parameter. That would be unnecessarily large alignment for ELFCLASS64 (Elf64_Ehdr is 64 bytes) and nonsensical for ELFCLASS32 (Elf32_Ehdr is 52 bytes, not a power of two). So I think the comment on File_read::get_view in fileread.h should be changed to be more clear about the meaning of its ALIGNED parameter. That aside, it's not at all clear to me across all those layers where the alignment requirement comes from. The elfcpp code is a bit light on comments, but I don't see any place that it states there are alignment requirements for the pointers that File::View::data returns. If that is the intent, then it should be stated clearly somewhere in the interface comments. I think the scenario hitting this must be looking at files in an archive. I can't think of any other situation in which the start of the ELF header could ever be misaligned. This makes me wonder if every other place in gold that's using elfcpp code with its implicit assumption of aligned header data has correctly indicated in its View implementations that the alignment must be ensured. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- 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 gold/15070] gold crashes on ARMv5 due to unaligned memory access
http://sourceware.org/bugzilla/show_bug.cgi?id=15070 --- Comment #2 from Shawn Landden shawnlandden at gmail dot com 2013-01-31 02:26:54 UTC --- Created attachment 6839 -- http://sourceware.org/bugzilla/attachment.cgi?id=6839 alternate fix -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- 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 gold/15070] gold crashes on ARMv5 due to unaligned memory access
http://sourceware.org/bugzilla/show_bug.cgi?id=15070 Ian Lance Taylor ian at airs dot com changed: What|Removed |Added CC||dougkwan at google dot com, ||roland at gnu dot org -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- 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