Bugzilla – Bug 114066
fillup segfaults on "noeol" (bigendian)
Last modified: 2005-09-02 10:42:29 UTC
Updating etc/sysconfig/powersave/thermal... /.build_patchrpmcheck_scr: line 377: 12325 Segmentation fault bin/fillup -q etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE happening on ppc and s390. turned out, that $SYSC_TEMPLATE was a file with no EOL at end of file.
Created attachment 48335 [details] picture of oops
this attachment probably belongs to bug #106232
yes, sorry.
I've a patch which makes fillup work with out -fno-strict-aliasing and also work on big endian systems (see bug #114066). All tests are passed without error. The changes for strict-aliasing are trivial. The problem with files without newlines is that simple. First of all fillup has to add a newline if the file does not have one at last byte. Next is the the usage of EOF aka -1. This leads, after the cast to char to the character ΓΏ aka 0xFF and this is wrong. Beside this the comparision of *buffer == EOF is always true on big endian without a cast like (char)EOF. I've changed all checks for EOF and the memset with EOF to use the ASCII 0. If a user really wants to ignore this I've activated the -e, --ignoreeof option for that.