[PATCH] D37331: [ELF] Prevent crash with binary inputs with non-ascii file names

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 10:39:30 PDT 2017


ruiu added inline comments.


================
Comment at: test/ELF/format-binary-non-ascii.s:4
+
+# RUN: ld.lld -o %t.elf %t£.o --format=binary %t£.o
+# RUN: llvm-readobj -symbols %t.elf | FileCheck %s
----------------
I don't think this test is portable because handling of non-ascii characters in command line arguments can vary depending on system. I believe this file itself is encoded in UTF-8, but some system may decide to convert it to UTF-16, or simply rejects creating such file.

There's probably no easy way to write a portable test, so I'd omit a test. That's unfortunate though.


https://reviews.llvm.org/D37331





More information about the llvm-commits mailing list