Benjamin Mahler created MESOS-8852:
--------------------------------------

             Summary: process::loop does not guarantee stack overflow 
prevention.
                 Key: MESOS-8852
                 URL: https://issues.apache.org/jira/browse/MESOS-8852
             Project: Mesos
          Issue Type: Bug
          Components: libprocess
            Reporter: Benjamin Mahler


One of the goals of process::loop is to prevent stack overflows in the case 
that the callbacks are completing synchronously. However, it's still possible 
for process::loop to stack overflow if the body and iterate futures transition 
between the checking of them being ready and the setting of the continuation 
callbacks. If the futures continuously transition in these windows, the stack 
will overflow.

One way to fix this would be to provide an atomic set-callbacks-if-pending 
function on Future (e.g. {{bool setIfPending(...)}} that allows the caller to 
avoid accidentally invoking callbacks synchronously when setting the callbacks.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to