[llvm-dev] Get segfault with ModulePass

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 12 10:31:52 PDT 2017


On 6/11/2017 9:14 AM, Gerion Entrup via llvm-dev wrote:
> Hi,
>
> thanks for the answer.
>
> Am Sonntag, 11. Juni 2017, 02:16:36 CEST schrieben Sie:
>> Have you tried building LLVM with assertions enabled? Assertions are
>> often a good way to catch API misuses, but they aren't on by default
>> for release builds.
> Good advice. You're right. Now an assertion triggers. The problem
> seems to be the argument iterator.
>
> Do you know some way to circumvent this. I've found no way to directly
> get the ith argument of a function.

Have you tried dumping the function declaration which crashes 
("F->dump()")?  I suspect you're running into a function that doesn't 
have as many arguments as you expect.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-dev mailing list