This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: struct msgbuf wrong mtype size on ILP32 and possibly x32


* Cyril Hrubis <chrubis@suse.cz> [2015-03-17 16:57:50 +0100]:
> I've got a bugreport for LTP that msgrcv and msgsnd are hanging forever
> on -mabi=ilp32 (and possibly on x32).
> 
> The issue seems to be that sizeof(long) != sizeof(__syscall_slong_t) on
> these (which is used to define mtype in glibc headers and likely the
> size used in kernel) which is probably the reason for the test hang.
> 
> The proposed solution for fixing LTP is to replace the long in the
> custom defined msgbuf structures with __syscall_slong_t which is
> obviously wrong. Not only it uses glibc internal type but also breaks
> backward compatibilty.
> 
> I'm pretty sure that this needs to be fixed somewhere in glibc/kernel
> because the mtype being long is part of the ABI. Or at least man page
> and numerous tutorials on net suggets so.
> 

this is just another case where the kernel x32 abi
(and thus glibc) fails to follow the standard/man

just like with timespec, timex and sysinfo structs

the userspace api should use long and not __syscall_slong_t

> See for reference the LTP discussion:
> 
> https://github.com/linux-test-project/ltp/pull/30
> 
> -- 
> Cyril Hrubis
> chrubis@suse.cz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]