FreeBSD Bugzilla – Attachment 108716 Details for
Bug 149621
devel/valgrind failng shmat(). Returns Invalid Argument.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 674 bytes, created by
Stephen Sanders
on 2010-08-13 16:30:02 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Stephen Sanders
Created:
2010-08-13 16:30:02 UTC
Size:
674 bytes
patch
obsolete
>#include <errno.h> >#include <stdio.h> >#include <stdlib.h> >#include <machine/param.h> >#include <sys/types.h> >#include <sys/ipc.h> >#include <sys/shm.h> > > >int main( char **argv, int argc ) >{ > int shmId = shmget( 0, 4096, IPC_PRIVATE|SHM_R|SHM_W); > char *page = NULL; > > if( shmId == -1 ) > { > printf("shmget failed on '%s'\n", strerror( errno )); > exit( 0 ); > } > > page = shmat( shmId, 0, 0 ); > if( page == (char *)-1 ) > { > printf("shmat failed on '%s'\n", strerror( errno )); > exit( 0 ); > } > > if( shmdt( page ) != 0 ) > { > printf("shmdt failed on '%s'\n", strerror( errno )); > exit( 0 ); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 149621
: 108716 |
108717