Comments (3)
Also scan_black
which is called in scan
will occasionally need to cycle blacks back over the visited white nodes (in the depth direction if that makes sense). So trace
needs the capability to loop around and revisit the same nodes. However the trace implementation for RefCell
does not revisit the same nodes in a recursive loop-like style when they are already locked for reading.
That means that this library needs its own RefCell
separate from the one supplied by the std
.
from bacon-rajan-cc.
I believe I've fixed the issue that you pointed out in the first comment in 7cd96af.
I don't really follow your second comment. Perhaps you could create a test case that shows the problem?
from bacon-rajan-cc.
Its been a while since I've looked at this code.
If I remember correctly:
In second comment just means that a user using RefCell will not allow you to visit the same gc node twice in the gc algorithm. Which can break the algorithm with resetting colors etc.
To avoid the problem trace can be done iteratively instead of recursively (add a stack vec from thread local and use it to convert recursive trace into an iterative trace)
If I find some time, I'll wip up a test case to demonstrate the problem.
from bacon-rajan-cc.
Related Issues (19)
- CcBox (and likely Cc) need 'static (or !Drop) bound for soundness HOT 2
- Update to be buildable with Nightly or Stable rust HOT 6
- Clarify Trace trait usage HOT 1
- Drop is unsound
- How to user #[derive(Trace)?] HOT 3
- Invalid Memory Access HOT 2
- data is deallocated while holding a mutable reference
- Add atomic support. HOT 1
- attempt to subtract with overflow HOT 2
- Crash on keeping weak references after collecting a cycle (minor bug)
- How to use Cc<T> with multithreading? HOT 4
- Add function to insure all memory is freed at the at the end of each test. HOT 1
- Miri flag passing changed HOT 1
- "Invalid access during cycle collection" - collect_cycles() leaves live nodes with zero refs HOT 4
- Weak<> doesn't work properly HOT 1
- miri shows undefined behaviour when run with -Zmiri-tag-raw-pointers HOT 1
- Incorrect Docs for Trace
- Use-after-free? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bacon-rajan-cc.