Command "cssclean filename.css" produces a "fFoating point exception (core dumped)" with my CSS file.
Bug seen with dspam 3.9.0 (experimental kubuntu packages, or self-compiled from git version 2009-09-22) on a 64-bit Linux.
I tracked the bug and it appears that, in the hash driver, _hash_drv_set_spamrecord() calls itself a great number of times without ever returning, and always seeks offset 0. Finally, _hash_drv_autoexetend() returns a nonzero value, and for the first time _hash_drv_set_spamrecord() returns with EFAILURE code. That's at this point that a floating point exception appears.
I got the impression that the hash driver has some kind of protection against infinite recursion, but that it does not work properly.
The funny thing is that dspam works very correctly with that CSS file. It's only cssclean that has a problem.
The CSS file is too big (40 Mb) to be attached here. Please send a private email and I'll publish it on some web site.
Well, as a matter of fact, the core dump is not always reproductible:
- when _hash_drv_set_spamrecord() returns with an error code, the program ends cleanly
- otherwise, it at times tries to seek a non-zero offset (apparently very big and outside of the file) and then it generates a floating point exception.
Sorry, I mixed up both cases.
Still, how could we avoid having broken CSS files? Could cssclean fix them to some extend? Could the core dump be avoided by checking the value of the offset?