REBOL3 tracker
  0.9.12 beta
Ticket #0002106 User: anonymous


TypeBug Statusbuilt Date19-Feb-2014 18:07
Versionr3 master CategoryPorts Submitted byabolka
PlatformAll Severitycrash Priorityhigh

Summary Potential problem: do we have to protect ports from GC which are pointed to via the linked list of pending requests
Description Quoting from HostileFork's pull request 158:

> While looking at the REBREQ field, I noticed a ->next field for a
> linked list of more REBREQs. As the previous problem had come from
> a port being GC'd out from under a REBREQ, I was concerned that
> these other requests might be holding ports that were similarly
> unaccounted for. @earl explained that if a request had made it
> into an event, then it had been processed and the ->next field
> would be NULL. The ->next field was only used by REBDEV devices
> when holding requests in a pending queue. In a "better safe than
> sorry" philosophy I added a Mark_Pending_Requests() function to
> walk the pending queue for the devices during a Recycle() and mark
> the ports they hold as used... it does pick up some ports, so this
> could well be an issue. However the current layering doesn't
> support a way to cleanly get at devices pending queues from the GC
> so the "unclean" code is under #if NEED_TO_MARK_PENDING_REQUESTS

;; Source:

While the primary bug addressed by pull request #158 has now been fixed, this potential issue still needs to be investigated.

If the pending requests need to be traversed and associated ports marked to protect them from GC, we need to clean up the layering so that this can be implemented cleanly.

If traversing the pending requests is not necessary, a few documenting remarks should be added in the code to explain why it is not necessary.
Example code


Assigned ton/a Fixed inr3 master Last Update6-Mar-2014 23:22

21-Feb-2014 02:32

This appears to related or a fix of this:
21-Feb-2014 09:19

Related tickets: #1642, #1784, #2032

Date User Field Action Change
6-Mar-2014 23:22 abolka Fixedin Modified => r3 master
6-Mar-2014 23:22 abolka Status Modified pending => built
21-Feb-2014 09:51 Ladislav Priority Modified normal => high
21-Feb-2014 09:49 Ladislav Type Modified Issue => Bug
21-Feb-2014 09:19 Ladislav Comment : 0004264 Added -
21-Feb-2014 09:11 Ladislav Severity Modified minor => crash
21-Feb-2014 09:04 Ladislav Category Modified Unspecified => Ports
21-Feb-2014 09:04 Ladislav Status Modified submitted => pending
21-Feb-2014 02:32 BrianH Comment : 0004260 Added -
19-Feb-2014 18:08 abolka Description Modified -
19-Feb-2014 18:07 abolka Ticket Added -