Fixes: e3bf6e5e773 ("winegcc: Store all the boolean options in global variables.") Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58006
From: Aida Jonikienė aidas957@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58006 --- tools/winegcc/winegcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 0e9ad6bcab2..70ee06f32d4 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -2037,7 +2037,7 @@ int main(int argc, char **argv)
is_pe = is_pe_target( target ); if (is_pe) use_msvcrt = true; - if (strendswith( output_name, ".fake" )) fake_module = true; + if (output_name && strendswith( output_name, ".fake" )) fake_module = true;
if (!section_align) section_align = "0x1000"; if (!file_align) file_align = section_align;
This fix solves the segfault issue (wine 10.4 + this MR):
❯ winegcc --version gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7) Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Tested on Fedora 41 x86_64 shared-WoW64 build from: https://copr.fedorainfracloud.org/coprs/patrickl/test/build/8806880/
This merge request was closed by Aida Jonikienė.
Superseded by ebebb210eeeb33804aaa592f2e4507ba1bcfaad3