Re: on buffer overflows and insecurity
- From: Eric Sosman <Eric.Sosman@xxxxxxx>
- Date: Mon, 24 Sep 2007 18:24:52 -0400
jacob navia wrote On 09/24/07 16:37,:
Eric Sosman wrote:
Richard Harter wrote On 09/24/07 14:34,:
[...]
I don't quite understand your objection. What we are talking
about are the error codes (that should be) required by the
standard. Clearly the standard cannot specify codes for all
possible errors in all possible implementations. What it can do
is specify that there are codes for the commonest errors.
... but then it would need to describe those commonest
errors in an unambiguous and system-independent way. Since
Exxx values have no hierarchy or other structure, fopen()
could produce ENOHOPE *or* EBADLUCK *or* some platform-
defined Exxx, but not a superposition of more than one.
If the Standard required that failures due to resource
exhaustion produce EALLGONE, it would thereby prevent the
implementation from using the more informative but platform-
specific ENOCHEESE.
It would be nice to raise the floor on QoI, but not at
the cost of instituting a ceiling.
Of course not, if we use just the lower 3 bits of errno
and leave the rest for the different implementations
That's the kind of "structure" I alluded to earlier,
where part of the value summarizes an error and other parts
add detail. However, adding such structure to hitherto-
unstructured sets of errno values would be a *huge* job!
It would either change some existing Exxx values (forcing
recompilation of millions of modules) or introduce new ones
that supersede the old (forcing editing *and* recompilation
of millions of modules). The uptake rate of C99 has been
leisurely if not glacial, but compared to the uptake of a
C0x that began by breaking millions of valid programs ...
--
Eric.Sosman@xxxxxxx
.
- References:
- returning error from main()
- From: junky_fellow@xxxxxxxxxxx
- Re: on buffer overflows and insecurity (was returning error from main())
- From: jacob navia
- Re: on buffer overflows and insecurity (was returning error from main())
- From: Charlie Gordon
- Re: on buffer overflows and insecurity
- From: Ben Bacarisse
- Re: on buffer overflows and insecurity
- From: Richard Tobin
- Re: on buffer overflows and insecurity
- From: jacob navia
- Re: on buffer overflows and insecurity
- From: Mark McIntyre
- Re: on buffer overflows and insecurity
- From: jacob navia
- Re: on buffer overflows and insecurity
- From: Ian Collins
- Re: on buffer overflows and insecurity
- From: jacob navia
- Re: on buffer overflows and insecurity
- From: Eric Sosman
- Re: on buffer overflows and insecurity
- From: Richard Harter
- Re: on buffer overflows and insecurity
- From: $)CHarald van D)&k
- Re: on buffer overflows and insecurity
- From: Richard Harter
- Re: on buffer overflows and insecurity
- From: Eric Sosman
- Re: on buffer overflows and insecurity
- From: jacob navia
- returning error from main()
- Prev by Date: Re: Callling a function from another file...
- Next by Date: Re: returning error from main()
- Previous by thread: Re: on buffer overflows and insecurity
- Next by thread: Re: on buffer overflows and insecurity
- Index(es):
Relevant Pages
|