-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What happens when the runtime runs out of task ids? #1767
Comments
It's probably a naive question but why don't you change rust_task_id to uint64_t and call it a day? I can see 2^31 overflowing given enough time but 2^64? |
That sounds like a reasonable solution to me. |
I tried to implement this and hit some weird test failures on windows. Didn't investigate further. |
@brson: is this still an issue? it seems like the scheduler could use the address of the first stack segment as a unique identifier |
Stumbled across this. The newsched runtime doesn't actually have task ids, so this shouldn't be a bug anymore. @brson, should we just close it? If task ids do end up a concept again, they will likely be a concept in a library wrapping tasks with "fun features", and so not the domain of the core runtime. |
Obsolete in the new runtime. |
Currently the runtime assigns task id's (intptr_t) to each task, starting at 0. When the current task id hits INTPTR_MAX the runtime theoretically fails an assert and crashes. Would be sweet if the runtime didn't crash in this situation. Ports within a single task also have a similar problem, and soon schedulers will as well.
The text was updated successfully, but these errors were encountered: