-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix hangs and segfaults when egregiously long symbol is used #8241
Conversation
@@ -462,6 +462,10 @@ static jl_sym_t *mk_symbol(const char *str) | |||
size_t len = strlen(str); | |||
size_t nb = (sizeof(jl_sym_t)+len+1+7)&-8; | |||
|
|||
if (len >= SYM_POOL_SIZE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to use nb > SYM_POOL_SIZE
.
Dare I ask why you have symbols of length >=524,288? |
Jeez, that's a big symbol. |
Ok. Used nb instead of length. @jiahao , would you believe any of the following?
|
💯 |
That's a very worthy @jiahao response! :-) |
This looks like a 0.3 backport candidate. Will cherry-pick as soon as it is merged 🍒 |
Fix hangs and segfaults when egregiously long symbol is used
|
Backported to release-0.3 in 8c1b105 |
Julia hangs when I have a program with a symbol of length
2**19
. It then segfaults when I ^C. Longer symbols segfault immediately. Oddly, a symbol of length 2**19 causes julia to segfault immediately when I run it under gdb.This causes an julia to error out instead hanging or segfaulting.