Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#14 shmget() need not to be tested with size_t size=-1.

System Calls
closed
mreed
Testcases (27)
5
2007-03-16
2006-07-10
Yokotashi
No

The testcases/kernel/syscalls/ipc/shmget/shmget02.c
fails on ppc64 in test, which try to put to shmget()
size=-1. Size in shmget() is size_t which is unsigned,
so (int)(-1) will be retyped and shmget() gets 2^32-1
Bytes without problem.

This test is in Linux needless, because size_t is
unsigned at all archs and on other arch this fails
because 2^32-1>SHMMAX, I mean.

I suggest change size from int to size_t and wipe out
test with size=-1.

I didn't make mistake, I hope.

Discussion

  • Yokotashi
    Yokotashi
    2006-07-10

    patch to repair behavior on all archs

     
    Attachments
    • assigned_to: nobody --> mreed10
     
  • Subrata Modak
    Subrata Modak
    2007-03-16

    • status: open --> closed
     
  • Subrata Modak
    Subrata Modak
    2007-03-16

    Logged In: YES
    user_id=1737361
    Originator: NO

    Closing this.