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

Fix issues with vector slice function #279

Merged
merged 4 commits into from
Jan 31, 2020
Merged

Conversation

lehins
Copy link
Contributor

@lehins lehins commented Jan 31, 2020

Fixes #257

* Streaming causing bounds to not be checked, thus not failing slicing.
  Which differed from the semantics of `slice` when compiled with -O0
* Out of memory explosion when size supplied to `slice` is too high
@cartazio
Copy link
Contributor

wonderful! of course we need to fix that fusion rule, but this is better than not.

(i think we could maybe change the rules around to push around the interval information into the fused code, but thats not what we 're here for today)

@lehins
Copy link
Contributor Author

lehins commented Jan 31, 2020

To be honest I am pretty sure it is NOT possible fixing that fusion rule without changing semantics of slice not throwing an error.

@cartazio
Copy link
Contributor

it is possible or impossible? i'm confused :)

@lehins
Copy link
Contributor Author

lehins commented Jan 31, 2020

Sorry, not possible 🤦‍♂️

@cartazio
Copy link
Contributor

i'm going to say "yes, impossible if we dont change the rules/fusion stuff", but i THINK if we add some hooks for "evidence" passing that we can later erase, there might be a way :)

@cartazio
Copy link
Contributor

this may be slightly beyond what GHC can currently do, and that might motivate some fun slow motion compiler hacking

@lehins
Copy link
Contributor Author

lehins commented Jan 31, 2020

I've been wrong before ;) There might be a trick that I am simply not aware of.

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

Successfully merging this pull request may close these issues.

Segfaults and "internal errors" when vector slice overflows
2 participants