Bug 16747 - the declaration of lio_listio is missing a restrict qualifier
Summary: the declaration of lio_listio is missing a restrict qualifier
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: librt (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-24 17:40 UTC by Szabolcs Nagy
Modified: 2015-08-27 22:21 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szabolcs Nagy 2014-03-24 17:40:05 UTC
lio_listio is declared in glibc as

	extern int lio_listio (int __mode,
			       struct aiocb *const __list[__restrict_arr],
			       int __nent, struct sigevent *__restrict __sig)
	  __THROW __nonnull ((2));

but the standard prototype is http://pubs.opengroup.org/onlinepubs/9699919799/functions/lio_listio.html

	int lio_listio(int, struct aiocb *restrict const *restrict, int, struct sigevent *restrict);

note the two restrict qualifiers in the second argument

these two prototypes are not compatible
Comment 1 joseph@codesourcery.com 2014-03-24 18:27:32 UTC
A fix should make the extra restrict conditional on __USE_XOPEN2K, given 
that it's not there in older standards and affects type compatibility 
(unlike most uses of restrict which are only on the parameters themselves 
and so don't affect type compatibility).