[LLVMdev] Possible issue with DenseMap when using AliasSetTracker

Oliver Horst oliver.horst at informatik.uni-augsburg.de
Fri Feb 8 07:20:08 PST 2013


Dear All,

while willing to assist developers to adhere strictly to coding guidelines, I
wrote the attached program called "alias-detector". The program's intent is to
utilize the BasicAliasAnalysis to get a list of aliases for each pointer in a
certain program code. First it initializes clang as frontend, executes the
EmitLLVMOnlyAction, and then processes the produced Module with the following
three passes:
1. BasicAliasAnalysis -- The basic alias analysis
2. AliasTrackerPass -- BasicBlockPass that creates an AliasSet for each pointer
in the analyzed code (line 261 and line 94 respectively)
3. AliasDetectorPass -- BasicBlockPass that prints the AliasSet of each pointer
in the analyzed code (line 264 and line 133 respectively)

The first Pass seems to work flawlessly. However, the 2nd Pass fails due to a
segmentation fault that somehow seems to be related to the DenseMap data
structure. However, I wasn't able to pin down the issue. Accordingly, I'd like
to ask for an advise. Maybe someone with more knowledge of the code basis could
have a closer look on the topic and could tell whether this is really an issue
of the DenseMap or me using it incorrectly.

I'm currently using llvm and clang in release version 3.2.
Please find attached the "alias-detector" program and its backtrace.

Best regards
Oliver Horst
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alias-detector.cpp
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130208/6eefc12c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: backtrace.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130208/6eefc12c/attachment.txt>


More information about the llvm-dev mailing list