public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/18805] New: GDB crushes on loading symbols (init class with tuple)
@ 2015-08-11 16:48 tower120 at gmail dot com
  2015-08-11 16:50 ` [Bug gdb/18805] " tower120 at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tower120 at gmail dot com @ 2015-08-11 16:48 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-04-07 11:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-11 16:48 [Bug gdb/18805] New: GDB crushes on loading symbols (init class with tuple) tower120 at gmail dot com
2015-08-11 16:50 ` [Bug gdb/18805] " tower120 at gmail dot com
2015-08-11 16:55 ` tower120 at gmail dot com
2015-08-11 17:23 ` tower120 at gmail dot com
2015-08-15  5:26 ` xdje42 at gmail dot com
2015-08-15  5:32 ` xdje42 at gmail dot com
2020-04-07 11:42 ` [Bug gdb/18805] GDB crashes " ssbssa at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).