[PATCH 0/1] MR7646: winegcc: Don't call strendswith() with a NULL output_name.
Fixes: e3bf6e5e773 ("winegcc: Store all the boolean options in global variables.") Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58006 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7646
From: Aida Jonikienė <aidas957(a)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; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7646
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/ -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7646#note_98786
This merge request was closed by Aida Jonikienė. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7646
Superseded by ebebb210eeeb33804aaa592f2e4507ba1bcfaad3 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7646#note_99018
participants (2)
-
Aida Jonikienė -
Patrick Laimbock (@Patrick)