[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[creduce-bugs] A few segfaults



The attached test-case causes several segfaults:

markus at x4 /tmp % clang_delta --transformation=remove-trivial-base-template --counter=1 test.ii
Stack dump:
0.      <eof> parser at end of file
[1]    24527 segmentation fault  clang_delta --transformation=remove-trivial-base-template --counter=1 test.ii
markus at x4 /tmp % clang_delta --transformation=remove-unresolved-base --counter=1 test.ii
Stack dump:
0.      <eof> parser at end of file
[1]    31577 segmentation fault  clang_delta --transformation=remove-unresolved-base --counter=1 test.ii
markus at x4 /tmp % clang_delta --transformation=empty-struct-to-int --counter=1 test.ii
Stack dump:
0.      <eof> parser at end of file
[1]    31656 segmentation fault  clang_delta --transformation=empty-struct-to-int --counter=1 test.ii
markus at x4 /tmp % clang_delta --transformation=rename-class --counter=1 test.ii
Stack dump:
0.      <eof> parser at end of file
[1]    31675 segmentation fault  clang_delta --transformation=rename-class --counter=1 test.ii
markus at x4 /tmp %  

-- 
Markus
-------------- next part --------------
namespace mpl_ {
            }
                namespace boost {
            namespace mpl {
        using namespace mpl_;
        }
            }
                namespace mpl_ {
            struct int_;
            }
                template < typename T > struct convert_void {
                typedef T type;
            };
                class new_allocator {
            };
                template < typename > using __allocator_base = new_allocator;
                template < typename _Tp > class allocator:__allocator_base < _Tp > {
            public:     template < typename > struct rebind     {
                typedef allocator other;
            };
            };
                namespace mpl_ {
            template < typename T > struct integral_c {
            static const T value = 0;
        };
            }
                namespace boost {
            template < class T, T > struct integral_constant:mpl::integral_c < T > {
            typedef integral_constant type;
        };
            struct is_reference:boost::integral_constant < bool, 0 > {
        };
            struct is_volatile:boost::integral_constant < bool, 0 > {
        };
            template < typename > struct is_void:boost::integral_constant < bool, 0 > {
        };
            template < class T > struct has_nothrow_copy_imp {
            static const bool value = __has_nothrow_copy (T) && is_volatile::value                               && is_reference::value;
        };
            template < typename T > struct has_nothrow_copy:boost::integral_constant <     bool, boost::has_nothrow_copy_imp < T >::value > {
        };
            namespace mpl {
        template < typename T2 > struct if_c {
        typedef T2 type;
    };
        template < typename F2 > struct eval_if {
        typedef F2 f_;
        typedef typename f_::type type;
    };
        template < typename > struct begin_impl;
        struct sequence_tag_impl {
        template < typename Sequence > struct result2_     {
            typedef typename Sequence::tag type;
        };
    };
        template < typename Sequence > struct sequence_tag:sequence_tag_impl::result2_ < Sequence > {
    };
        template < typename Sequence > struct begin {
        typedef typename sequence_tag < Sequence >::type tag_;
        typedef typename begin_impl < tag_ >::template apply <     Sequence >::type type;
    };
        template < typename > struct deref;
        struct list_tag;
        template < typename T > struct l_item {
        typedef list_tag tag;
        typedef l_item type;
        typedef T item;
    };
        template < typename > struct l_iter;
        template < typename Node > struct deref <l_iter < Node > > {
        typedef typename Node::item type;
    };
        template <> struct begin_impl <list_tag > {
        template < typename List > struct apply     {
            typedef l_iter < typename List::type > type;
        };
    };
        }
            template < typename T0 > struct make_variant_list {
            typedef typename mpl::l_item < typename convert_void <     T0 >::type >::type type;
        };
            template < typename T > T & cast_storage ();
            namespace mpl {
        template < typename T > struct identity {
        typedef T type;
    };
        }
            template < typename Iter > struct visitation_impl_step {
            typedef typename mpl::deref < Iter >::type type;
        };
            template < typename Visitor, typename VoidPtrCV,          typename T > void visitation_impl_invoke_impl (Visitor & p1, VoidPtrCV,                  T *) {
            p1.internal_visit (cast_storage < T > (), 0);
        }
            template < typename Visitor, typename VoidPtrCV, typename T, typename NoBackupFlag > void visitation_impl_invoke (Visitor & p1,         VoidPtrCV, T * p3,         NoBackupFlag) {
            visitation_impl_invoke_impl (p1, 0, p3);
        }
            template < typename Which, typename step0, typename Visitor, typename VoidPtrCV, typename NoBackupFlag > void visitation_impl (Visitor & p1, VoidPtrCV,         NoBackupFlag, Which *,         step0 *) {
            typedef typename step0::type T0;
            switch (0)     case 0:     visitation_impl_invoke (p1, 0, static_cast < T0 * >(0), 0);
        }
            namespace mpl {
        template < typename Seq1 > struct transform {
        typedef Seq1 type;
    };
        }
            template < typename T0_ > class variant {
            typedef T0_ unwrapped_T0_;
            typedef typename mpl::eval_if < make_variant_list < unwrapped_T0_ >     >::type specified_types;
            typedef typename mpl::eval_if < mpl::identity < specified_types >     >::type recursive_enabled_types;
            typedef typename mpl::transform <     recursive_enabled_types >::type internal_types;
        public:     class assigner     {
            variant & lhs_;
        public:         assigner (variant & p1, int):lhs_ (p1)         {
            }
    template < typename RhsT > void internal_visit (RhsT &, int)         {
                typename has_nothrow_copy < RhsT >::type nothrow_copy;
            }
        };
            void operator= (variant & p1)     {
            assigner visitor (*this, 0);
            p1.internal_apply_visitor (visitor);
        }
        template < typename Visitor,     typename VoidPtrCV > void internal_apply_visitor_impl (Visitor & p1,             VoidPtrCV)     {
            typedef typename mpl::begin < internal_types >::type first_it;
            typedef visitation_impl_step < first_it > first_step;
            visitation_impl (p1, 0, 0, static_cast < mpl::int_ * >(0),                          static_cast < first_step * >(0));
        }
        template < typename Visitor > void internal_apply_visitor (Visitor & p1)     {
            internal_apply_visitor_impl (p1, 0);
        }
        };
            template < class Backend > class number {
            Backend m_backend;
        };
            namespace backends {
        template < class = mpl::if_c < allocator < int >>::type > struct cpp_int_backend;
        template < class Allocator > struct cpp_int_base:Allocator::template rebind < int >::other {
    };
        template < class Allocator > struct cpp_int_backend:cpp_int_base < Allocator > {
        Allocator base_type;
        cpp_int_backend (cpp_int_backend &) noexcept (boost::is_void <             Allocator >::             value):base_type () {
    }
    };
        }
            using boost::backends::cpp_int_backend;
            }
                boost::variant < boost::number < boost::cpp_int_backend <> >>value;
                void foo () {
                boost::variant < boost::number < boost::cpp_int_backend <> >>v;
                v = value;
            }