[compiler-rt] r190828 - Check the function we just called for errors, not an incoming argument. Noticed

Nick Lewycky nicholas at mxc.ca
Mon Sep 16 17:23:28 PDT 2013


Author: nicholas
Date: Mon Sep 16 19:23:28 2013
New Revision: 190828

URL: http://llvm.org/viewvc/llvm-project?rev=190828&view=rev
Log:
Check the function we just called for errors, not an incoming argument. Noticed
by inspection.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=190828&r1=190827&r2=190828&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Mon Sep 16 19:23:28 2013
@@ -685,7 +685,7 @@ uptr ReadBinaryName(/*out*/char *buf, up
   uptr module_name_len = internal_readlink(
       "/proc/self/exe", buf, buf_len);
   int readlink_error;
-  if (internal_iserror(buf_len, &readlink_error)) {
+  if (internal_iserror(module_name_len, &readlink_error)) {
     if (proc_self_exe_cache_len) {
       // If available, use the cached module name.
       CHECK_LE(proc_self_exe_cache_len, buf_len);





More information about the llvm-commits mailing list