This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] getpid/vfork/raise fix


>>>>> On Wed, 10 Mar 2004 15:50:52 +0100, Jakub Jelinek <jakub@redhat.com> said:

  >>  Most scratch registers are _not_ preserved across system calls.
  >> You could spill the register onto the memory stack though.  If it
  >> uses at most 16 bytes, you won't have to adjust the stack pointer
  >> even.

  Jakub> But as soon as you spill something into memory the vfork
  Jakub> child can clobber it and you restore in the parent something
  Jakub> different from what you saved.

How many registers need to be preserved?  Just one?  (Sorry, I could
read the code but I'm a bit preoccupied with other stuff at the
moment.)  If it's just one, I think you could use r11 because that one
is required to be preserved for the light-weight syscall convention.

	--david


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]