Skip to content

Fix issues with vector slice function - #279

Merged
cartazio merged 4 commits into
masterfrom
lehins/257-fix-slice-overflow
Jan 31, 2020
Merged

cartazio merged 4 commits into
masterfrom
lehins/257-fix-slice-overflow

Conversation

@lehins

@lehins lehins commented Jan 31, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

lehins commented Jan 31, 2020 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

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

@lehins

lehins commented Jan 31, 2020

Copy link
Copy Markdown
Contributor Author

Sorry, not possible 🤦‍♂️

@cartazio

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@lehins

lehins commented Jan 31, 2020

Copy link
Copy Markdown
Contributor Author

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

@cartazio
cartazio merged commit 90c4e69 into master Jan 31, 2020
@lehins
lehins deleted the lehins/257-fix-slice-overflow branch February 1, 2020 14:04
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