3 Feb
2020
3 Feb
'20
10:29 p.m.
February 3, 2020 10:40 AM, "Piotr Caban" <piotr.caban(a)gmail.com> wrote:
Hi Chip,
On 2/2/20 11:55 PM, Chip Davis wrote:
+/* INTERNAL: Copy lc_handle, lc_id, and lc_category from one threadlocinfo to another */ +static void copy_threadlocinfo_category(MSVCRT_pthreadlocinfo locinfo, MSVCRT_pthreadlocinfo old_locinfo, int category) +{ + locinfo->lc_handle[category] = old_locinfo->lc_handle[category]; + locinfo->lc_id[category] = old_locinfo->lc_id[category]; + if(!locinfo->lc_category[category].locale) {
Why are you checking locinfo->lc_category[category].locale here?
To avoid overwriting it and leaking it in case it was set by init_category_name() earlier. Also, if I don't do this, the msvcr110 tests fail.
Thanks, Piotr
Chip