NULL successors exposed via GraphTraits

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

NULL successors exposed via GraphTraits

Thomas Pani
Clang's CFG construction introduces NULL successors for infeasible paths.
These are exposed via GraphTraits iterators, which is currently unhandled in LLVM code, e.g. in llvm::DFSPass(...)

To reproduce:
    $ echo "int main() { return 0 ? 0 : 0; }" | clang -cc1 -analyze -analyzer-checker=debug.DumpDominators -x c -
segfaults in llvm::DFSPass()

The question is, should this be fixed in LLVM or Clang?
I'm attaching a patch for llvm::DFSPass(), but I suppose there are other pieces in LLVM that would need adaption...

This is also assigned to the Clang static analyzer folks in Bugzilla #16085 [1].


-- 
Thomas Pani                                http://forsyte.at
Vienna University of Technology              [hidden email]
Institute of Information Systems          +43 1 58801-740013
Favoritenstraße 9-11, 1040 Wien, Austria        DVR: 0005886

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

null_succ_DFSPass.diff (902 bytes) Download Attachment