Re: shmat() ... is it a bug?

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2003-08-29 10:48:27
>>>>> On Thu, 28 Aug 2003 17:04:10 -0700, Umut Aymakoglu <umuta@us.ibm.com> said:

  Umut> Below ,I have 2 small programs which shows a problem in
  Umut> shmat() when the executable linked with the curses
  Umut> library(libncurses). Has anybody seen something like this?

  Umut> a.c --> allocates a shared memory segment and attaches.
  Umut> b.c --> attaching the allocated shared memory segment using the address
  Umut> from a.c

The bug is in the program: you can't assume that a fixed virtual
address is available for mapping.  When you link against -lncurses, it
happens to get loaded at the same address as "a" mapped the shared
memory segment.  Obviously, you can't have the shared memory segment
and libncurses mapped at the same address, hence the failure.

	--david
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Aug 28 20:54:57 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:17 EST