[PATCH] D27654: Stop intercepting mallinfo and mallopt on FreeBSD

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 28 04:44:23 PST 2017


dim added a comment.

In https://reviews.llvm.org/D27654#659353, @eugenis wrote:

> This broke windows: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/5305


Ugh, apparently `not` does not work on Windows, or at least not the way I would expect it to:

  FAIL: AddressSanitizer-i386-windows :: TestCases/malloc-no-intercept.c (502 of 562)
  ******************** TEST 'AddressSanitizer-i386-windows :: TestCases/malloc-no-intercept.c' FAILED ********************
  Script:
  --
  not   C:/b/slave/sanitizer-windows/build/./bin/clang.exe -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -gcodeview  -fms-compatibility-version=19.00.24215.1 -Dtestfunc=mallinfo C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\malloc-no-intercept.c -o C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.tmp
  not   C:/b/slave/sanitizer-windows/build/./bin/clang.exe -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -gcodeview  -fms-compatibility-version=19.00.24215.1 -Dtestfunc=mallopt  C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\malloc-no-intercept.c -o C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.tmp
  not   C:/b/slave/sanitizer-windows/build/./bin/clang.exe -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -gcodeview  -fms-compatibility-version=19.00.24215.1 -Dtestfunc=memalign C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\malloc-no-intercept.c -o C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.tmp
  not   C:/b/slave/sanitizer-windows/build/./bin/clang.exe -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -gcodeview  -fms-compatibility-version=19.00.24215.1 -Dtestfunc=pvalloc  C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\malloc-no-intercept.c -o C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.tmp
  not   C:/b/slave/sanitizer-windows/build/./bin/clang.exe -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -gcodeview  -fms-compatibility-version=19.00.24215.1 -Dtestfunc=cfree    C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\malloc-no-intercept.c -o C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.tmp
  --
  Exit Code: 1
  
  Command Output (stdout):
  --
  $ "not" "C:/b/slave/sanitizer-windows/build/./bin/clang.exe" "-fsanitize=address" "-mno-omit-leaf-frame-pointer" "-fno-omit-frame-pointer" "-fno-optimize-sibling-calls" "-gline-tables-only" "-gcodeview" "-fms-compatibility-version=19.00.24215.1" "-Dtestfunc=mallinfo" "C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\malloc-no-intercept.c" "-o" "C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.tmp"
  # command output:
     Creating library C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.lib and object C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.exp
  
  malloc-no-intercept-f1349f.o : error LNK2019: unresolved external symbol _mallinfo referenced in function _main
  
  C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsConfig\TestCases\Output\malloc-no-intercept.c.tmp : fatal error LNK1120: 1 unresolved externals
  
  
  # command stderr:
  clang.exe: error: linker command failed with exit code 1120 (use -v to see invocation)

E.g the test cases are *supposed* to fail to to link, and in this case link failure means the test succeeded.  @hans, any clue on this?  Or should I just XFAIL this test on Windows?


Repository:
  rL LLVM

https://reviews.llvm.org/D27654





More information about the llvm-commits mailing list