public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zed at lab127 dot karelia.ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug d/101692] Program crushes at unpredictable moment of time
Date: Sat, 31 Jul 2021 16:09:23 +0000	[thread overview]
Message-ID: <bug-101692-4-Cb4P41Itz8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101692-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101692

--- Comment #5 from Eugene Zhiganov <zed at lab127 dot karelia.ru> ---

Eventually I used following workaround:

    RxSm[] rxMachines;
    auto rxPool = new RestRoom();
    for (int k = 0; k < nConnections; k++) {
        auto sm = new RxSm(rxPool);
        rxMachines ~= sm;
        sm.run();
    }

This rxMachines array is just for the purpose of holding references,
since references in linked list are not counted at all by GC.

Now everything works fine, no mystical crashes any more :)
(...and I am beginning to dislike GC even more than before)

But the question remained.
Not counting references in Slist - is that by design?

  parent reply	other threads:[~2021-07-31 16:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 10:56 [Bug d/101692] New: " zed at lab127 dot karelia.ru
2021-07-31  7:18 ` [Bug d/101692] " zed at lab127 dot karelia.ru
2021-07-31  7:22 ` zed at lab127 dot karelia.ru
2021-07-31 11:50 ` zed at lab127 dot karelia.ru
2021-07-31 14:54 ` zed at lab127 dot karelia.ru
2021-07-31 16:09 ` zed at lab127 dot karelia.ru [this message]
2021-07-31 19:20 ` [Bug d/101692] Referenses in Slist are not counted by GC zed at lab127 dot karelia.ru
2021-08-01  7:58 ` zed at lab127 dot karelia.ru
2021-08-03 15:20 ` zed at lab127 dot karelia.ru
2021-08-03 15:21 ` zed at lab127 dot karelia.ru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-101692-4-Cb4P41Itz8@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).