[Haskell-cafe] Unnecessarily strict implementations

Daniel Fischer daniel.is.fischer at web.de
Sun Sep 5 16:18:15 EDT 2010


On Sunday 05 September 2010 21:52:44, Henning Thielemann wrote:
> Daniel Fischer schrieb:
> > Yes. Ordinarily, lines in text files aren't longer than a few hundred
> > characters, leaking those, who cares?
>
> I got several space leaks of this kind in the past. They are very
> annoying. They are especially annoying if input comes from the outside
> world, where people can attack them to crash your program because of
> memory exhaustion.

That would likely be the case of long lines, wouldn't it?
I have trouble imagining a scenario where `lines' holding on to a few 
hundred characters which could already be released causes a noticeable 
space leak, let alone memory exhaustion.
If you have a case where leaking a few KB creates a serious problem, I'd 
like to learn about it.

Cheers,
Daniel


More information about the Haskell-Cafe mailing list