On 14 November 2017 at 11:40, Liu Hao <lh_mo...@126.com> wrote: > On 2017/11/14 9:58, Liu Hao wrote: >> On 2017/11/13 11:11, David Lee wrote: >>> Built and tested a cross compiler (i686-w64-mingw32-gcc 6.4.0) on >>> debian stretch with master mingw-w64. Same crash. >>> >> Yeah I just updated MSYS2's repos and observed the crash... can't imagine >> why it didn't crash a few days ago. >> >> The patch for mingw_vfscanf.c on SF is a bit complex so let me take a deep >> look at it. >> >> > > AFAICT the C99 standard doesn't treat the format strings of *scanf and w*canf > and differently. > That is, %s always designates a narrow string and %ls always designates a > wide string. So are %c and %lc. > > Basing on that, I think the fix in 72d60c1a06490ec5937e6c620956b167bf0bf329 > can be applied cleanly to its wide variant. > The patch attached is confirmed to fix the crash on x86_64 and i686. Please > review. >
Tried on my cross compiler and the crash went away. Thanks. I need to test more (e.g. field width + assignment suppression for %s) though. 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