This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/18805] New: GDB crushes on loading symbols (init class with tuple)


https://sourceware.org/bugzilla/show_bug.cgi?id=18805

            Bug ID: 18805
           Summary: GDB crushes on loading symbols (init class with tuple)
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: tower120 at gmail dot com
  Target Milestone: ---

GDB <= 7.9.1 crushes (seg fault) on loading symbols with the following code:


template < class FnSequence = std::tuple<> >
struct LazyFn{
    const FnSequence fn_sequence;

    LazyFn(FnSequence fn_sequence = std::tuple<>() )
            :fn_sequence(fn_sequence){}
};


int main() {
  auto f1 = [](auto&& x){cout << "Hello, World!" << endl;};
  using F1 = decltype(f1);
  auto lazy = LazyFn< std::tuple<F1> >(std::tuple<F1>(f1));

  return 0;
}

-----------------------------------------------------------------
With additional function it works ok:


template <class T>
auto make_lazy(T t){
    return LazyFn<T>(t);
}

auto lazy = make_lazy(f1);

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]