summaryrefslogtreecommitdiff
path: root/grc/core/generator/Generator.py
diff options
context:
space:
mode:
authorDarek Kawamoto <darek@he360.com>2016-12-01 11:59:03 -0500
committerJohnathan Corgan <johnathan@corganlabs.com>2016-12-01 10:01:55 -0800
commit8f590d7bfaa22a42ccb2392f9822206ed003c82a (patch)
treeeeecae8be19a1f34865c0f6d8c60c68d30a3e998 /grc/core/generator/Generator.py
parent925ecdd9d2b5c6a7706b25e8244a2110ecb78e34 (diff)
pmt: Adding memory fence to ~pmt_t for proper multi-core ARM execution.
Occasionally, flowgraphs running on my E3xx processor would segfault in the pmt_t destructor (an odd place to crash). When this segfault happens, it's common (but not guaranteed) for the top of the coredump backtrace to be at 0x0000001c or 0x00000018. Always near or at the top was always a pmt destructor, such as ~pmt_pair() or ~pmt_tuple(). After reading up in Boost Reference Counter Example Implementation, it seems as though we need to add a memory fence to ensure proper memory ordering (this issue did not happen on Intel processors due to the stronger memory model there). This commit changes the pmt_t's internal implementation (pmt_int.h and pmt.cc) of intrusive_ptr_add_ref and intrusive_ptr_release to be exactly like boost's recommended example, and seems to prevent this kind of segfault. Additionally, since Ubuntu 12.04 comes with boost 1.48, which does not have boost/atomic.hpp, the changes are wrapped in #if conditions until support for this configuration is discontinued.
Diffstat (limited to 'grc/core/generator/Generator.py')
0 files changed, 0 insertions, 0 deletions