Re: Is this a bug in libc6?
>>"Gregory" == Gregory S Stark <email@example.com> writes:
Gregory> Manoj Srivastava <firstname.lastname@example.org> writes:
>> Permissible undefined behaviour ranges from ignoring the situation
>> completely with unpredictable results, to behaving during
>> translation or program execution in a documented manner
>> charecteristic of the environment (with or without the issuance of
>> a diagnostic message), to terminating a translation or execution
>> (with the issuance of a diagnostic message).
Gregory> No it's not a requirement. Requirements are stated in the for
Gregory> "the implementation shall" or "the implementation must", not
Gregory> "permissable behaviour ranges from ... to ...".
I think I disagree here. I think both should be followed by
implemntations. What is the point of having a permissible behaviour
defined in the standard otherwise?
Gregory> First of all the latter phrasing doesn't say anything about
Gregory> whether other behaviour is premissable, and second who's to
Gregory> say what falls between the three stated points in the "range"
Gregory> or what constitutes "unpredictable results".
I interpret this to mean that *all* permissible undefined
behaviour has to fall in the categories listed, and the whole range
is explicitly defined in the sentence. "Unpredictable results" is not
constrained by the standard, except that it be documented and be a
"characteristic of the environment."
Gregory> What has happened here is that gnu libc has chosen the first
Gregory> choice. Failing to check the input and print a diagnostic
Gregory> message or exit, it completely ignored the situation. The
Gregory> "unpredictable results" (or not so unpredictable really) was
Gregory> that the program received a SEGV.
It still has to document the behaviour.
Gregory> Experience shows checking arguments is not usually hard or
Gregory> expensive and I would support suggesting the glibc people
Gregory> change this behaviour. But it's certainly permissable under
Gregory> ISO to not do so. Thanks for quoting the spec so we can all
Gregory> verify that it explicitly allows the implementation to not
I think I disagree here.
>> (You must admit the comments about monkeys, first made by Chris
>> Torek, was made under frustation and extreme provocation; and was
>> meant more to drive the lesson home that to be an interpretation of
>> the standard).
Gregory> If this conversation goes on much longer i'll be in a similar
Gregory> state soon.
Quite so. This is way off topic for this list now, and should
be taken to personal email.
"I have often thought that if there had been a good rap group around
in those days I might have chosen a career in music instead of
politics." Richard Nixon
Manoj Srivastava <email@example.com> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com