You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason, semctl09 fails unless compiled with -O0.
semctl09.c:141: TINFO: Test SEM_STAT_ANY with nobody user
semctl09.c:163: TPASS: SEM_INFO returned valid index 10 to semid 10
semctl09.c:175: TFAIL: Counted used = 1, semuse = 0
semctl09.c:118: TFAIL: semusz = 0, expected 1
semctl09.c:125: TFAIL: semaem = 0, expected 2
semctl09.c:141: TINFO: Test SEM_STAT_ANY with root user
semctl09.c:163: TPASS: SEM_INFO returned valid index 10 to semid 10
semctl09.c:175: TFAIL: Counted used = 1, semuse = 0
semctl09.c:118: TFAIL: semusz = 0, expected 1
semctl09.c:125: TFAIL: semaem = 0, expected 2
It looks like __semctl64 is used for the actual call. With -O0, it seems to return the same structure that is returned in the kernel, with -O1 not, the structure gets mostly zeroed after the call
semid = do_semctl(TST_RET, 0, SEM_STAT_ANY);
Most likely semid_ds is not the right thing to put into the call to SEM_STAT_ANY (making it static confirms the issue by segfault).
E.g. char info[2048]; in do_semctl() fixes the issue.
The text was updated successfully, but these errors were encountered:
I suppose that this is the same problem as shmctl, we are mixing the kernel syscall with the glibc structure layout. I suppose that we need the kernel structure layout for the raw syscall instead of the glibc layout.
For some reason, semctl09 fails unless compiled with -O0.
It looks like __semctl64 is used for the actual call. With -O0, it seems to return the same structure that is returned in the kernel, with -O1 not, the structure gets mostly zeroed after the call
Most likely semid_ds is not the right thing to put into the call to SEM_STAT_ANY (making it static confirms the issue by segfault).
E.g.
char info[2048];
in do_semctl() fixes the issue.The text was updated successfully, but these errors were encountered: