On 2024-11-12 LIU Hao wrote:
> 在 2024-11-12 22:49, Lasse Collin 写道:
> > The _exit(255) trick is clearly not an acceptable default. My patch
> > should be reverted until a better one is made. It might be that all
> > apps that want safe argv[] for main() will need something special on
> > Windows (like setting UTF-8 code page in manifest).  
> 
> Are you requesting for a revert now?

I'm suggesting it because the patch clearly is harmful for some types of
apps which don't need it for security reasons. I leave the final
decision to MinGW-w64 maintainers.

> Manifests are much dirtier work. It's not like a function which we
> just call somewhere; it's an XML element that is to be inserted into
> a resource file, and each module can only contain at most one such
> file - multiple files don't magically merge. GCC knows about
> 'default-manifest.o' which may be superseded by a user-supplied one.

Right. I haven't tested but I've understood that with CMake one can have
manifest XML files as source files, and CMake will use MSVC's mt.exe to
merge the manifest files. But CMake supports it only with MSVC. With
MinGW-w64, the .manifest files are ignored completely, and one has to
use a resource file to add the manifest.

> > Pali's comments made me I wonder if we should wait and see if
> > Microsoft will do something about this issue in 1-2 months. With
> > bad luck even a milder fix might result in unwanted differences in
> > command line handling between MinGW-w64 and MSVC built executables.
> >  
> 
> I second this.

Alright. So even if some ideas were discussed now, committing them
could wait a few weeks.

-- 
Lasse Collin


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to