[PATCH] D33670: Fix crash when processing relocations in .eh_frame

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 05:19:40 PDT 2017


grimar added inline comments.


================
Comment at: test/ELF/mips64-eh-abs-reloc.s:1
+# Having an R_MIPS_64 relocation in eh_frame would previously crash LLD
+# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd %s -o %t.o
----------------
You're missing REQUIRES: mips


================
Comment at: test/ELF/mips64-eh-abs-reloc.s:3
+# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd %s -o %t.o
+# RUN: llvm-readobj -r %t.o | FileCheck %s -check-prefix OBJ
+
----------------
We do not check what llvm-mc produces in tests for LLD I think.


================
Comment at: test/ELF/mips64-eh-abs-reloc.s:13
+# RUN: ld.lld --eh-frame-hdr -Bdynamic -o %t-dynamic.exe %t.o %t-foo.so
+# RUN: llvm-readobj -r %t-dynamic.exe | FileCheck %s -check-prefix NO-RELOCS
+
----------------
Not sure why do you need to check this. Did executable case crash before this patch ?
Generally I think you just need simplest test that crashed before and do not crash after.


https://reviews.llvm.org/D33670





More information about the llvm-commits mailing list