[LLVMdev] Segfault when trying to schedule custom ImmutablePass

Devang Patel dpatel at apple.com
Tue May 31 10:27:59 PDT 2011


On May 30, 2011, at 4:56 PM, Michael Ilseman wrote:

> I'm in a debug build with assertions turned on for llvm-2.9, and I get
> a segfault whenever I try to schedule one of my own immutable passes
> in a pass manager. It seems that one of the passes that I'm scheduling
> (IndVarSimplify) attempts to ask for TargetData if it's available (I'm
> not providing it), and that's when it segfaults. If I split that pass
> into it's own pass manager, then everything works fine. It might be
> the case that I'm not properly identifying myself to the pass manager
> as an immutable pass, but I'm trying to handle myself identically to
> how e.g. TargetData is handled. Should I submit this as a bug? 

yup, that's a good idea. Please include a reproduce test case (i.e. skeleton of all your passes such that anyone can reproduce this crash using the info) to help investigate the issue.

Thanks!
-
Devang




More information about the llvm-dev mailing list