This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Undefined behaviour in posix_openpt?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yaroslav Popovitch <yp at sot dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Wed, 11 Jun 2003 15:35:47 +0200
- Subject: Re: Undefined behaviour in posix_openpt?
- References: <Pine.LNX.4.44.0306111611300.26882-100000@ares.sot.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jun 11, 2003 at 04:25:48PM +0300, Yaroslav Popovitch wrote:
>
>
> I was checking posix_openpt code(glibc-2.2.5 and glibc-2.2.93) and found
> strange code.
>
> There is a static variable( have_no_dev_ptmx )
> which is not initialized by default
> values. As result, the behaviour of function becomes undefined.
It is static, so it is not undefined, but zero.
Jakub