Bug 114066 - fillup segfaults on "noeol" (bigendian)
Summary: fillup segfaults on "noeol" (bigendian)
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: ConsoleApps (show other bugs)
Version: Beta 3
Hardware: Other All
: P5 - None : Normal
Target Milestone: ---
Assignee: Joerg Dippel
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-30 09:27 UTC by Ruediger Oertel
Modified: 2005-09-02 10:42 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
picture of oops (368.64 KB, image/jpeg)
2005-08-31 16:21 UTC, Ruediger Oertel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruediger Oertel 2005-08-30 09:27:49 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.
Comment 1 Ruediger Oertel 2005-08-31 16:21:00 UTC
Created attachment 48335 [details]
picture of oops
Comment 2 Forgotten User ZhJd0F0L3x 2005-08-31 17:16:13 UTC
this attachment probably belongs to bug #106232
Comment 3 Ruediger Oertel 2005-09-01 10:21:06 UTC
yes, sorry. 
 
Comment 4 Dr. Werner Fink 2005-09-02 10:42:29 UTC
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.