Skip Menu |

Download (untitled) / with headers
text/plain 2.2KiB
From Mon Dec 28 12:44:37 1998
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU []) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id MAA22067 for <bugs@RT-11.MIT.EDU>; Mon, 28 Dec 1998 12:44:36 -0500
Received: from by MIT.EDU with SMTP
id AA03938; Mon, 28 Dec 98 12:44:25 EST
Received: (from fcusack@localhost)
by (8.9.1/8.9.1) id MAA25789;
Mon, 28 Dec 1998 12:45:54 -0500 (EST)
Message-Id: <>
Date: Mon, 28 Dec 1998 12:45:54 -0500 (EST)
To: krb5-bugs@MIT.EDU
Subject: setjmp() bug in prompter.c
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 679
>Category: krb5-libs
>Synopsis: POSIX says automatic vars are undefined after setjmp()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Mon Dec 28 12:45:01 EST 1998
>Originator: Frank Cusack
Icon CMT Corp.
Show quoted text
>Release: krb5-current-19981119
System: SunOS ratbert 5.6 Generic_105181-09 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

Show quoted text
OK, I don't know if it's POSIX that says it, but after longjmp(),
automatic vars are undefined. In lib/krb5/os/prompter.c,
krb5_prompter_posix(), ointrfunc *should* be a global, volatile,
or static var to get around this (signal handler gets reset
to ointrfunc when krb5_prompter_posix() returns, possibly
after an interrupt).

The fix below just makes it a global.
Show quoted text
Index: prompter.c
RCS file: /icon/d04/cvsroot/3rd-party/krb5-19981119/lib/krb5/os/prompter.c,v
retrieving revision 1.2
diff -u -r1.2 prompter.c
--- prompter.c 1998/11/25 06:50:50 1.2
+++ prompter.c 1998/12/28 17:35:22
@@ -13,6 +13,7 @@
#endif /* ECHO_PASSWORD */

static jmp_buf pwd_jump;
+static krb5_sigtype (*ointrfunc)();

static krb5_sigtype
@@ -34,7 +35,6 @@

register char *ptr;
int scratchchar;
- krb5_sigtype (*ointrfunc)();
krb5_error_code errcode;
int i;
Show quoted text
volatile qualifier was added to ointrfunc a while ago.