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 v3] Add cancellation regression test for getpwuid_r.


On 12/09/2016 01:13 AM, Carlos O'Donell wrote:
+	{
+	  pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL);
+	  /* Increase the buffer size.  */
+	  free (wbuf);
+	  wbufsz = wbufsz * 2;
+	  wbuf = xmalloc (wbufsz);
+	  pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);
+	}

Is it really necessary to disable cancellation around free and (x)malloc?

Our implementations really shouldn't be cancellation points, and for free, this is rather critical.

Thanks,
Florian


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