Advertisement
JoshDreamland

JDI killer--small test case

Aug 15th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. namespace std {
  2.   int a; // This definition helps the segfault manifest; it's ultimately not important
  3.   template<typename x, typename y, typename z> class bs; // This line is important; changing it in any way will fix the segfault.
  4. }
  5.  
  6. namespace std {
  7.   template<typename x, typename y, typename z> class bs {
  8.     typedef y a;  // This definition helps the segfault manifest; it's ultimately not important, but it is important that you typedef a template parameter.
  9.     const does_not_exist* b(int, int, int); // This is where our segfault manifests; the modifier is important but which one does not matter. The key is that the type does not exist.
  10.   };
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement