Anonymous | Login | Signup for a new account | 11-10-2008 10:58 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000731 | [BusyBox] Other | major | always | 02-18-06 10:52 | 03-24-06 08:59 | ||||
Reporter | rfelker | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | |||||||
Summary | 0000731: [PORTABILITY] libbb/printf.c... need I say more? | ||||||||
Description |
The comments in the file itself explain the situation. |
||||||||
Additional Information |
The issue here is much more serious than just porability between implementations; it's even an issue between different versions of the same implementation. There is no reason that the internals of the FILE structure should remain fixed between versions of an implementation; thus, busybox compiled against one version could cause horrible catastrophic crashes and data corruption if run with a newer version of the C library that changes the layout of FILE. This is much worse than having utilities fail to report nonserious printf errors. If you insist on this type of error reporting, there are at least 2 ways to make it portable: 1. Wrap the FILE pointer in your own structure, and keep the error code in there. Call bb_*printf with the wrapper structure, and use macros so that all other stdio functions get called on the FILE pointer directly. 2. Have printf.c keep a list of FILE objects it's seen and the error condition for each, then query this condition in addition to ferror() when reporting errors at program-exit. |
||||||||
Attached Files | |||||||||
|
Notes | |
(0001195) rfelker 03-24-06 08:36 |
Resolved by svn 14627. Can someone mark this issue as such? |
(0001196) vapier 03-24-06 08:59 |
bugs you file you can close yourself ... |
Copyright © 2000 - 2006 Mantis Group |