[PATCH] Fix data race in pj_time_decode()

BC
b17 c0de
Sat, Oct 8, 2016 12:31 PM

Hi,
Use localtime_r() instead of localtime() (if available) since
localtime() is not thread safe. This fixes a data race in
pj_time_decode() which is called from multiple threads. Please apply.

Kal

Hi, Use localtime_r() instead of localtime() (if available) since localtime() is not thread safe. This fixes a data race in pj_time_decode() which is called from multiple threads. Please apply. Kal
BC
b17 c0de
Thu, Oct 20, 2016 11:02 AM

Can someone from PJSIP please review this?

On Sat, Oct 8, 2016 at 2:31 PM, b17 c0de b17c0de@gmail.com wrote:

Hi,
Use localtime_r() instead of localtime() (if available) since
localtime() is not thread safe. This fixes a data race in
pj_time_decode() which is called from multiple threads. Please apply.

Kal

Can someone from PJSIP please review this? On Sat, Oct 8, 2016 at 2:31 PM, b17 c0de <b17c0de@gmail.com> wrote: > Hi, > Use localtime_r() instead of localtime() (if available) since > localtime() is not thread safe. This fixes a data race in > pj_time_decode() which is called from multiple threads. Please apply. > > Kal
NI
Nanang Izzuddin
Fri, Oct 21, 2016 7:45 AM

Hi Kal,

Seems like Riza have checked in it to SVN trunk (
https://trac.pjsip.org/repos/changeset/5458) but unfortunately somehow
forgot to update you about it.

Thank you for the report and the patch.

BR,
nanang

On Thu, Oct 20, 2016 at 6:02 PM, b17 c0de b17c0de@gmail.com wrote:

Can someone from PJSIP please review this?

On Sat, Oct 8, 2016 at 2:31 PM, b17 c0de b17c0de@gmail.com wrote:

Hi,
Use localtime_r() instead of localtime() (if available) since
localtime() is not thread safe. This fixes a data race in
pj_time_decode() which is called from multiple threads. Please apply.

Kal

Hi Kal, Seems like Riza have checked in it to SVN trunk ( https://trac.pjsip.org/repos/changeset/5458) but unfortunately somehow forgot to update you about it. Thank you for the report and the patch. BR, nanang On Thu, Oct 20, 2016 at 6:02 PM, b17 c0de <b17c0de@gmail.com> wrote: > Can someone from PJSIP please review this? > > On Sat, Oct 8, 2016 at 2:31 PM, b17 c0de <b17c0de@gmail.com> wrote: > > Hi, > > Use localtime_r() instead of localtime() (if available) since > > localtime() is not thread safe. This fixes a data race in > > pj_time_decode() which is called from multiple threads. Please apply. > > > > Kal > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >