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: [PATCH] Add cancellation test for getpwuid_r.


On 12/05/2016 04:42 PM, Carlos O'Donell wrote:
Add a regression test for the fix in 312be3f9f5eab1643d7dcc7728c76d413d4f2640
which corrects cancellation problems around getpwuid_r.

No regressions on x86_64. Test hangs without the aformentioned fix, but passes
after the fix.

OK to checkin?

The test is invalid. getpwuid_r is not safe for cancellation because the NSS service modules might not be.

I assume that your test targets nss_files, so you could call __nss_configure_lookup to restrict lookups to this service module. Even then, it is debatable whether this is expected to work at present.

The test misuses _SC_GETPW_R_SIZE_MAX because it is not a maximum, only a hint. It probably does not matter here, but we should not publish any code which uses the NSS *_r functions incorrectly.

Thanks,
Florian


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