2002 2003 2004 2005 2006 2007 2008 2009 <2010> 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 <2010> 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Fixed: Segfaults in 3.14 branch since merging ca-over-tcp |
From: | Ralph Lange <[email protected]> |
To: | Jeff Hill <[email protected]> |
Cc: | "'EPICS Core Talk'" <[email protected]> |
Date: | Wed, 18 Aug 2010 10:59:09 -0400 |
On 17.08.2010 21:00, Jeff Hill wrote:
Looks like a potential issue. option 1) You might insert "this->chanTable.removeAll ()" after line 295 in ~cac which will cause cac::transferChanToVirtCircuit to noop return at line 583. You would need to supply a temporary (auto) tsSLList<T> target to removeAll but could safely ignore [...] option 2) Just add a bool flag to cac as you propose, set it just after line 295 in ~cac, and check it at the beginning of cac::transferChanToVirtCircuit. It would also need to be initialized in the cac ctor. Of course the set and test will need to be protected by a Guard. The downside is that this requires slightly more memory at runtime, but this is no-doubt insignificant. Perhaps the only downside is needing to remember the purpose of yet another binary flag a few years down the road.
I'll go with the simple approach. This is a one-way communication, so a proper set-and-test is not necessary.I will set the flag (under the lock) at the beginning of the cac dtor and check it (under the lock) at the beginning of cac::transferChanToVirtCircuit - that should do it. I think a comment will reliably remove the need to remember the purpose of the flag. ;-)
Thanks for your help! Ralph