xiaoxiang781216 commented on pull request #4129: URL: https://github.com/apache/incubator-nuttx/pull/4129#issuecomment-878812153
> when pthread_barrier_init is called, the barrier is an uninitialized garbage. it's value should not be checked. LTP testcase call pthread_barrier_init twice, and expect the second call return fail: https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/4-1.c#L81-L85 https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/4-1.c#L113-L123 Do you have better method to fix it? > do you have any real code relying on pthread_barrier_destroy detecting it? No, but it specify in the standard and check by LTP: https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/2-1.c#L121-L131 We must to follow. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
