On Fri, 4 Nov 2022, LIU Hao wrote:

在 2022/11/4 14:42, Martin Storsjö 写道:

But I think this still is kinda safe. After my revert-patch, Clang shouldn't see any of the functions with __asm__ renames at all.

GCC needs these renamings, to allow using gnu_inline, to fix issues with __builtin_va_arg_pack(). Strictly speaking, only the functions that use __builtin_va_arg_pack() need this change. (Ideally we'd do it for others as well, but we practically can't really do it for all of them yet.)

Clang doesn't support __builtin_va_arg_pack(), so none of the function wrappers that use __builtin_va_arg_pack() should be visible to Clang right now.

So with that, I think we are safe - but we can't apply the same pattern on other functions even if that would be ideal. (We can hide it behind ifdefs if we wanted to, but that makes for even more complicated code.)

If Clang gains support for __builtin_va_arg_pack() in the future, let's hope that all these cases of infinite recursion have been resolved by then, before we unlock the __builtin_va_arg_pack() codepaths for it.


Attached is the squashed patch. There are only four functions that get asm aliases; all of them are defined within `#if __MINGW_FORTIFY_VA_ARG ... #endif` blocks. Does this look good to you?

Yes, this looks good to me - thanks! I've had this combination included in my nightly test builds for the last few days and haven't run into any issues with it.

// Martin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to