[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-root program crashes Openbsd 2.8



Alexander Yurchenko <grange@rt.mipt.ru> writes:

> > The following program crashes OpenBSD 2.8 immediately -- panic:
> > timeout_add: to_ticks < 0.  It does this even when run as a regular
> > user.  I have confirmed
> 
> With the following patch my 3.0-beta box doesn't crash after running
> this program.

Geee. Try to change the value "215" to "22" in the program and I bet it
will still crash. Besides, you broke the semantics.

We're testing a correct solution right now. Be patient.

//art

> Index: src/sys/kern/tty.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/tty.c,v
> retrieving revision 1.46
> diff -u -r1.46 tty.c
> --- src/sys/kern/tty.c  2001/09/28 13:04:39     1.46
> +++ src/sys/kern/tty.c  2001/10/02 08:54:03
> @@ -1468,7 +1468,7 @@
>                                 goto sleep;
>                         goto read;
>                 }
> -               t *= 100000;            /* time in us */
> +               t *= 1000000;           /* time in us */
>  #define diff(t1, t2) (((t1).tv_sec - (t2).tv_sec) * 1000000 + \
>                          ((t1).tv_usec - (t2).tv_usec))
>                 if (m > 0) {
> 
> 
> -- 
>    Alexander Yurchenko (aka grange)