Skip to content
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

missing bounds checking for GenSym #10426

Closed
mlubin opened this issue Mar 7, 2015 · 6 comments
Closed

missing bounds checking for GenSym #10426

mlubin opened this issue Mar 7, 2015 · 6 comments

Comments

@mlubin
Copy link
Member

mlubin commented Mar 7, 2015

This reliably segfaults:

julia> eval(:($(GenSym(-1000000000)) = 1))

signal (11): Segmentation fault
unknown function (ip: -2072084214)
unknown function (ip: -2072083467)
unknown function (ip: -2072083060)
jl_expand at /mnt/hdd/mlubin/julia-0.4/usr/bin/../lib/libjulia.so (unknown line)
@tkelman
Copy link
Contributor

tkelman commented Mar 7, 2015

Could 32-bit integer overflow in GenSym construction be the root cause of #10045? a0266d4?w=1 is too complicated for me to figure out what to do about it though. @vtjnash

@JeffBezanson
Copy link
Sponsor Member

Yes the gensym boxing function is declared with UIBOX_FUNC but the argument type is ssize_t. I have a patch.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 7, 2015

Could 32-bit integer overflow in GenSym construction be the root cause of #10045

no, that would imply the creation of 2^32 gensym objects, which would require more memory than a 32-bit processor can address

@tkelman
Copy link
Contributor

tkelman commented Mar 7, 2015

Would you be convinced otherwise if I run the tests repeatedly overnight on my local machine and they all pass now? ff9718e failed the first time, but on cb09d28 I'm at 5 (and counting) successes in a row now.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 7, 2015

i would be very confused: a function with 2^31 variables would be quite impressive

@tkelman
Copy link
Contributor

tkelman commented Mar 7, 2015

Nevermind. Damnit. Run number 8 failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants