[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

Alouest via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 27 06:08:45 PST 2019


Alouest added a comment.

Greetings,

I stumbled upon a bug while toying with your example Bye.cpp. I modified your pass to make a ModulePass and while it works with

  /build/bin/opt -goodbye -wave-goodbye test.ll

It's making clang crash with the command

  /build/bin/clang test.c

I've included the pass, the error logs and some files to reproduce the bug (hello2.bc is supposed to be placed in the directory where you start your code). 
It seems that the bug is coming from StringMap.cpp, it looks like NumBuckets is not always initialized when accessed, raising a SegFault.
In my example, this function is called by Module::getFunction (StringRef).

I'm a beginner in LLVM so I might just be doing dumb things.

F10889373: test-df7efc.c <https://reviews.llvm.org/F10889373>

F10889372: Bye.cpp <https://reviews.llvm.org/F10889372>

F10889371: test.c <https://reviews.llvm.org/F10889371>

F10889370: test-df7efc.sh <https://reviews.llvm.org/F10889370>

F10889369: hello2.bc <https://reviews.llvm.org/F10889369>

F10889368: test.ll <https://reviews.llvm.org/F10889368>

F10889367: log <https://reviews.llvm.org/F10889367>


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61446/new/

https://reviews.llvm.org/D61446





More information about the cfe-commits mailing list