gnu/gcc/7d7cbf984e4a26d6b6f5098c7e4adb12a427eb4a c++: coroutines: initialize refcount
If the promise ctor throws, the EH cleanup will access refcount before
it is initialized. Initialize it to zero so that cleanups can take
place.
This seems very hard to hit on systems that ensure the stack starts
out zero-initialized, but on VxWorks in kernel mode, this hits more
often than not on various architectures.
for gcc/cp/ChangeLog
* coroutines.cc (cp_coroutine_transform::build_ramp_function):
Zero-initialize refcount.
1 file changed