All of lore.kernel.org
 help / color / mirror / Atom feed
* bug in kernel
@ 2005-03-14 14:48 Evgeniy
  2005-03-14 14:51 ` Arjan van de Ven
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Evgeniy @ 2005-03-14 14:48 UTC (permalink / raw)
  To: linux-kernel

Here is a simple program.

#include <stdio.h>
#include <errno.h>
main(){
  int err;
  err=read(0,NULL,6);
  printf("%d %d\n",err,errno);
}

I think that it should be an error : Null pointer assignment, like in windows.
But in practise it is not so. 
Mandrake Linux kernel 2.4.21-0.13mdk
I am a programmer too and i am very interested to solve this problem. Please, 
send me fragment of sourse code of kernel with this bug.
Thanks.
Sorry for my English

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: bug in kernel
@ 2005-03-14 15:47 Pat Kane
  0 siblings, 0 replies; 7+ messages in thread
From: Pat Kane @ 2005-03-14 15:47 UTC (permalink / raw)
  To: linux-kernel

I ran the little test program on my 2.4.26  Knoppix system, and got the 
following two results:

  strace a.out < /dev/tty
   ...
   read(0, NULL, 6)                        = 1
   ...

  strace a.out < /dev/zero
   ...
   read(0, 0, 6)                           = -1 EFAULT (Bad address)
   ...

The first case looks broken.

Pat
---




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-03-14 16:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-14 14:48 bug in kernel Evgeniy
2005-03-14 14:51 ` Arjan van de Ven
2005-03-14 14:55   ` Arjan van de Ven
2005-03-14 15:22 ` Bernhard Rosenkraenzer
2005-03-14 15:55 ` Martin Zwickel
2005-03-14 16:57 ` linux-os
  -- strict thread matches above, loose matches on Subject: below --
2005-03-14 15:47 Pat Kane

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.