[PATCH] D44285: Fix computeSymbolSizes SEGFAULT on invalid file
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 28 14:01:51 PDT 2018
aprantl added inline comments.
================
Comment at: test/tools/llvm-symbolizer/sym.test:22
RUN: llvm-symbolizer -inlining -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck --check-prefix="PRETTY" %s
+RUN: dd if=/dev/zero of=%t.zero_file bs=1024 count=1
+RUN: echo "0x1" > %t.input
----------------
This will not work on all operating systems. Since the file is only 1K in size, would you mind just checking in the binary?
================
Comment at: test/tools/llvm-symbolizer/sym.test:24
+RUN: echo "0x1" > %t.input
+RUN: llvm-symbolizer -obj=%t.zero_file < %t.input
----------------
This will also succeed if llvm-symbolizer is symlinked to /bin/true. Is there some way you could check the output?
Repository:
rL LLVM
https://reviews.llvm.org/D44285
More information about the llvm-commits
mailing list