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

crash (segmentation fault) on circular references #475

Closed
npitre opened this issue Dec 24, 2020 · 6 comments
Closed

crash (segmentation fault) on circular references #475

npitre opened this issue Dec 24, 2020 · 6 comments

Comments

@npitre
Copy link
Contributor

npitre commented Dec 24, 2020

The following is sure to crash the program here:

# This data file was generated by the Spreadsheet Calculator.  That is SC-IM, the improved one!
# You almost certainly shouldn't edit it.

let A0 = 1
let A1 = 2
let A2 = @sum(A0:A1)
let A4 = 4
let A5 = 2
let A6 = @sum(A0:A5)-A2
# the next command fails to detect the cycle
let A8 = @sum(A0:A8)-A7
# this should crash the program
recalc
# if it didn't crash above, the following will do
let A8 =
@andmarti1424
Copy link
Owner

Thank you for sharing this. Will test this and try to get it fixed.

@andmarti1424
Copy link
Owner

@npitre Please check out my latest commit. Hopefully, and if god exists, this should be fixed.

@npitre
Copy link
Contributor Author

npitre commented Mar 22, 2021

Not quite.

Here I get:

$ ./sc-im --nocurses crash.sc
Circular reference in eval (cell A8)
Segmentation fault (core dumped)

And the stack backtrace is almost infinite. Something is recursing indefinitely.

andmarti1424 added a commit that referenced this issue Mar 22, 2021
@andmarti1424
Copy link
Owner

Please @npitre try again. Thanks!

@npitre
Copy link
Contributor Author

npitre commented Mar 22, 2021 via email

@andmarti1424
Copy link
Owner

God exists then

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

No branches or pull requests

2 participants