- edited description
shm_open (libc.a) api issue
Hi
I'm compiling an open source application which utilizes POSIX shm_open api.
Unfortunately it crashes on shm_open call.
Here is the code
#include <fcntl.h>
#include <sys/mman.h>
int main()
{
int h = shm_open("/barfoo", O_RDWR|O_CREAT|O_EXCL, S_IRWXU);
return 0;
}
The program crashes with 'Illegal instruction (core dumped)'
I tried both gcc 6.5 and 9.1 but no luck.
Any idea what am I doing wrong?
Comments (4)
-
reporter -
reporter - edited description
-
Account Deactivated Seems that the shm_open is an unimplemented syscall on ibm i to cause the issue.
/* 839 0x0347 */ UNIMPSC(shm_open)
-
- changed status to resolved
FYI @Sebastian Misiewicz, unimplemented system calls will always signal a SIGILL (illegal instruction). You can read more here: https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/rzalf/rzalfanalysistool.htm
Both shmget and mmap are available in PASE for shared memory. If you feel that you need shm_open, please open an RFE.
- Log in to comment