On 11 November 2017 at 21:47, Hannes Domani via Mingw-w64-public <mingw-w64-public@lists.sourceforge.net> wrote: > Am Samstag, 11. November 2017, 10:15:00 MEZ hat Liu Hao <lh_mo...@126.com> > Folgendes geschrieben: > >> Debugging in assembly exposes indirection through a null pointer in >> `mingw-w64-crt/stdio/mingw_wvfscanf.c` around or after line 906: >> >> ``` >> optimize_alloc ((flags & IS_ALLOC_USED) != 0, pstr, str_sz, (wstr - >> (wchar_t *) *pstr), sizeof (wchar_t));` >> ``` > > pstr==NULL, so the *pstr part crashes. > >> The CRT libraries of those toolchains were not compiled with debug >> information. Further investigation might not be possible. >> >> I am not able to reproducible this problem on master. You might want to >> try a newer version and see if the problem still exists. > > It doesn't look fixed on master, mingw_wvfscanf.c is the same in v5.x and > master. > > But as far as I can tell this was fixed in mingw_vfscanf in here: > https://sourceforge.net/p/mingw-w64/mailman/message/27912175/ > https://sourceforge.net/p/mingw-w64/mingw-w64/ci/72d60c1a06490ec5937e6c620956b167bf0bf329/ > > There is even the suggestion that mingw_wvfscanf.c might need a similar fix, > which was never done. >
Looks like the fix was in mingw_vfscanf.c but not in mingw_wvfscanf.c. optimize_alloc() looks different in each file. I'll try building a GCC with master mingw-w64, test it and see what happens. David Lee. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public