-
Notifications
You must be signed in to change notification settings - Fork 158
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
toLower crashes GHC for large inputs #221
Comments
The first failing commit is cfb8278. In that commit the initial size of the buffer is increased, but only by a factor of 3. That should not couse a crash right? |
The bug also hit is in production. Any ideas how to fix it? |
ping @bgamari -- since you authored the size-hints fix, do you see how this over-allocation (or maybe it's actually an integer underflow?) could occur? |
I will have a look once 8.6 alpha1 is out. |
@bgamari as alpha1 was out some time ago already... did you have time to look at this? |
@bgamari any progress on this? I'm a bit worried because we have to work around the problem in production with a fix that is easy to forget or break. |
@bgamari any progress on this? I'm a bit worried because we have to work around the problem in production with a fix that is easy to forget or break. |
I'm looking at it now; sorry for the delay. |
Can anybody confirm which Apparently it's been introduced in cfb8278#diff-3378cc573525bb476703cba5c67d5dbeR403 so is |
I have created https://ghc.haskell.org/trac/ghc/ticket/15581 for the fact that the number in |
@nh2 yeah, it's definitely something I'd like to know too; i.e. where did the overflow originate exactly; i.e. where does the first signed negative interpretation of the amount occur in the callgraph And to answer your original question:
whereas
|
The negative memory problem is fixed in 8.6.1. As for why this program is failing, that's because |
@osa1 well, Do you happen to know the GHC commit or GHC Trac ticket number which covered the fix that went into GHC 8.6.1? |
I think it's probably https://phabricator.haskell.org/D4373 . |
Ah, I see... so it was merely an aesthetic bug |
It seems to want to allocate huge amounts of memory. It iven semms to overflow:
The text was updated successfully, but these errors were encountered: