GNUAspell / aspell

http://aspell.net
GNU Lesser General Public License v2.1
236 stars 50 forks source link

Memory leak #600

Closed adamsmd closed 6 months ago

adamsmd commented 3 years ago

The following triggers a memory leak in aspell at a rate of approximately 1GB per minute (which is approximately 10,000 lines of input).

perl -e 'for $x1 ("A".."Z") { for $x2 ("A".."Z") { for $x3 ("A".."Z") { print STDERR "$x1$x2$x3\n"; for $x4 ("A".."Z") { for $x5 ("A".."Z") { print "$x1$x2$x3$x4$x5\n" } } } } }' | aspell -a >/dev/null

The following also triggers a memory leak in aspell but it is a much slower leak.

perl -e 'while (1) { print "QWETDSFDG\n" } '|aspell -a >/dev/null

This is for Aspell 0.60.8 on Ubuntu 20.04.

kevina commented 3 years ago

Thank you for finding this.

Valgrind classifies the leak as "still reachable" which is why I didn't discover it sooner.

This should be fixed in #601.

adamsmd commented 3 years ago

I can confirm that #601 fixes the issue on my end. As far as I am concerned, this issue can be closed (modulo whatever your development process is with regard to waiting until the fix is merged).

kevina commented 3 years ago

@adamsmd Thanks for verifying the fix. The issue will get closed automatically after I fix up and merge the P.R.

ndvbd commented 1 year ago

What's the status? Was it merged?