[test-suite] r311413 - [test-suite] Adding the Pathfinder Benchmark

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 16:23:34 PDT 2017


This patch fixes the UBSAN errors:

diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c b/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c
index a4ef5d05..d0145857 100644
--- a/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c
+++ b/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c
@@ -47,21 +47,21 @@
     options->doStatistics = false;
     options->writeOutputFile = false;
     options->outputFile = NULL;
     options->buildType = endNodesOnly;
     return(options);
  }
 
  Configuration* Configuration_new()
  {
     Configuration *new = malloc(sizeof(Configuration));
-    SearchOptions *options = malloc(sizeof(SearchOptions));
+    SearchOptions *options = SearchOptions_new();
     if ( !new || !options )
     {
         if ( new ) free(new);
         if ( options ) free(options);
         return(NULL);
     }
     new->graphs = NULL;
     new->signatures = NULL;
     new->searchOptions = options;
     new->qThreadCount = 0;


... and it also fixes the bi-modal results, but now I'm always getting the "Total 44669 legs found" result, which is not what the benchmark reference solution expects (it expects 117563).

Ideas?

-- adrian


> On Aug 23, 2017, at 4:13 PM, Adrian Prantl via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Hello Hal,
> 
> thanks for fixing the warnings, I think I have found another problem with the Pathfinder code!
> 
> To reproduce:
> 
> $ clang --version
> clang version 6.0.0 (trunk 311476) (llvm/trunk 311467)
> $ rm -f /tmp/pathfinder 
> $ clang bitfield.c configuration.c gettime.c graph.c graphGen.c main.c node.c parsing.c searchAlgorithms.c searchDiagram.c statistics.c systemCallMap.c utils.c vectorUtils.c yaml.c -o /tmp/pathfinder -isysroot "/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/"
> $ for i in `seq 8`; do /tmp/pathfinder -x /Data/llvm/projects/test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/medsmall1.adj_list |grep 'legs found' & done
> $ [...]
>> Total 44669 legs found
>> Total 44669 legs found
>> Total 117563 legs found
>> Total 117563 legs found
>> Total 117563 legs found
>> Total 117563 legs found
>> Total 117563 legs found
>> Total 117563 legs found
> 
> 
> I think the code is somehow bi-modal in its output. This is causing all of our internal LNT bots to fail at the moment. For some reason it does not seem to reproduce on green dragon though.
> 
> I tried the obvious and compiled the code with ASAN+UBSAN:
> 
>> Immediately before parallel
>> Immediately before nested for's
>> searchAlgorithms.c:269:46: runtime error: load of value 190, which is not a valid value for type 'bool'
>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior searchAlgorithms.c:269:46 in 
>> 
>> 117563 found for 137641 searches. Overall Time: 0:0:0.000
>> searchAlgorithms.c:658:19: runtime error: load of value 190, which is not a valid value for type 'bool'
>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior searchAlgorithms.c:658:19 in 
>> searchAlgorithms.c:664:19: runtime error: load of value 190, which is not a valid value for type 'bool'
>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior searchAlgorithms.c:664:19 in 
>> 
>> 
>> Total 117563 legs found
> 
> Could you please take a look at these issues?
> -- adrian
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list