From Bugzilla Helper: User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020913 Description of problem: $ echo hello > foo.html $ aspell check foo.html does nothing, continually grows in memory and eventually triggers the OOM killer. Version-Release number of selected component (if applicable): aspell-0.33.7.1-21 How reproducible: Always Steps to Reproduce: 1. echo hello > foo.html 2. aspell check foo.html Actual Results: OOM trigger Expected Results: Normal termination, no errors. Additional info:
I can confirm this bug. A quick strace reveals a slew of brk() kernel calls between an occasional mmap2() call. I don't have aspell-debuginfo installed but to map out what standard functions are being called during the infinite allocation loop: $ gdb aspell GNU gdb Red Hat Linux (5.3post-0.20021129.18rh) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)... (gdb) r check /tmp/foo.html Starting program: /usr/bin/aspell check /tmp/foo.html (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... Program received signal SIGINT, Interrupt. 0x42076472 in sYSMALLOc () from /lib/tls/libc.so.6 (gdb) where #0 0x42076472 in sYSMALLOc () from /lib/tls/libc.so.6 #1 0x4207360b in malloc () from /lib/tls/libc.so.6 #2 0x40163e2e in operator new(unsigned) () from /usr/lib/libstdc++.so.5 #3 0x400a1826 in afilter::MapReplReadError::expecting_keyword::clone() const () from /usr/lib/libaspell.so.10 #4 0x4009feea in autil::GenericCopyPtr<afilter::MapReplReadError::error, autil::ClonePtr<afilter::MapReplReadError::error>::Parms>::GenericCopyPtr(autil::GenericCopyPtr<afilter::MapReplReadError::error, autil::ClonePtr<afilter::MapReplReadError::error>::Parms> const&) () from /usr/lib/libaspell.so.10 #5 0x400a0956 in __gnu_cxx::__normal_iterator<autil::ClonePtr<afilter::MapReplReadError::error>*, std::vector<autil::ClonePtr<afilter::MapReplReadError::error>, std::allocator<autil::ClonePtr<afilter::MapReplReadError::error> > > > std::__uninitialized_copy_aux<__gnu_cxx::__normal_iterator<autil::ClonePtr<afilter::MapReplReadError::error>*, std::vector<autil::ClonePtr<afilter::MapReplReadError::error>, std::allocator<autil::ClonePtr<afilter::MapReplReadError::error> > > >, __gnu_cxx::__normal_iterator<autil::ClonePtr<afilter::MapReplReadError::error>*, std::vector<autil::ClonePtr<afilter::MapReplReadError::error>, std::allocator<autil::ClonePtr<afilter::MapReplReadError::error> > > > >(__gnu_cxx::__normal_iterator<autil::ClonePtr<afilter::MapReplReadError::error>*, std::vector<autil::ClonePtr<afilter::MapReplReadError::error>, std::allocator<autil::ClonePtr<afilter::MapReplReadError::error> > > >, __gnu_cxx::__normal_iterator<autil::ClonePtr<afilter::MapReplReadError::error>*, std::vector<autil::ClonePtr<afilter::MapReplReadError::error>, std::allocator<autil::ClonePtr<afilter::MapReplReadError::error> > > >, __gnu_cxx::__normal_iterator<autil::ClonePtr<afilter::MapReplReadError::error>*, std::vector<autil::ClonePtr<afilter::MapReplReadError::error>, std::allocator<autil::ClonePtr<afilter::MapReplReadError::error> > > >, __false_type) () from /usr/lib/libaspell.so.10 #6 0x4009fca7 in std::vector<autil::ClonePtr<afilter::MapReplReadError::error>, std::allocator<autil::ClonePtr<afilter::MapReplReadError::error> > >::_M_insert_aux(__gnu_cxx::__normal_iterator<autil::ClonePtr<afilter::MapReplReadError::error>*, std::vector<autil::ClonePtr<afilter::MapReplReadError::error>, std::allocator<autil::ClonePtr<afilter::MapReplReadError::error> > > >, autil::ClonePtr<afilter::MapReplReadError::error> const&) () from /usr/lib/libaspell.so.10 #7 0x4009d20d in afilter::MapReplReadError::ambiguous_uni_str::mesg() const () from /usr/lib/libaspell.so.10 #8 0x4009f480 in afilter::read(std::string const&, autil::ConfigData&, afilter::MapReplData&, std::ostream&, int) () from /usr/lib/libaspell.so.10 #9 0x400b5daf in afilter::get_map(std::string const&, autil::ConfigData&, afilter::MapReplData&) () from /usr/lib/libaspell.so.10 #10 0x400aca4f in afilter::get_repl_itr(std::string const&, std::string const&, autil::ConfigData&) () from /usr/lib/libaspell.so.10 #11 0x400ac8b6 in afilter::get_repl_itr(std::string const&, std::string const&, autil::ConfigData&) () from /usr/lib/libaspell.so.10 #12 0x4009b77a in afilter::get_filter_itr(std::string const&, autil::ConfigData&) () from /usr/lib/libaspell.so.10 #13 0x4008fa0f in aspell::get_filter_itr_throw(std::string const&, autil::ConfigData&) () from /usr/lib/libaspell.so.10 #14 0x080540b2 in std::vector<char const*, std::allocator<char const*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<char const**, std::vector<char const*, std::allocator<char const*> > >, char const* const&) () #15 0x0804ff48 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char) () #16 0x0804d8b4 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char) () #17 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6 (gdb)
The HTML/SGML parser seems to actually work pretty well in aspell-0.50.3-6 in Raw Hide.
fixed in rawhide's 0.50