-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Infinite loop upon exiting a nodejs program #5323
Comments
The source for |
No local change, and no modifications of the JS output, AFAICT. Does it make a difference that it reads |
Oh, right. That |
I'm trying to get one. I misspoke when I stated that it was only node — it also happens on a regular webpage. It started happening when I moved to |
Would it help if I sent the compiled program? |
Could this be a recent regression? When I run on Module["_pthread_mutex_unlock"] = _pthread_mutex_unlock;
function __exit(status) {
// void _exit(int status);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html
Module['exit'](status);
}function _exit(status) {
__exit(status);
}function __Exit(status) {
__exit(status);
} Whereas on incoming, I get this: Module["_pthread_mutex_unlock"] = _pthread_mutex_unlock;
function _exit(status) {
__exit(status);
}function __Exit(status) {
__exit(status);
} |
If it's a regression, please bisect, the specific commit would be useful information. |
I can try, but each build cycle takes 25 minutes, so it's going to be a fairly painful task. |
Well, I'd guess it might be 7a5744d - perhaps just check that commit and the one before it? Or if a repro is quicker to make, that's better. |
Thanks, that's very helpful :) I'll try to make a repro. |
Alright, here it is: #include <unistd.h>
int main() {
_exit(0);
}
It took me a while, because this works fine:
|
And of course, it works if I return to
|
Thanks, looks like it was a bug in our system libs, fix is in #5325 (bug was old, but it just became noticeable recently with that commit mentioned before). |
Fixed by that merge. |
Thanks! |
I don't have a simple repro yet, but I'm seeing the following in the generated javascript code:
This causes an infinite loop when the node.js program completes:
I compiled with this:
Any idea ?
The text was updated successfully, but these errors were encountered: