https://bugs.winehq.org/show_bug.cgi?id=55308
Bug ID: 55308 Summary: tools/winebuild/res16.c:156:5: runtime error: null pointer passed as argument 1, which is declared to never be null (UndefinedBehaviorSanitizer) Product: Wine Version: 8.13 Hardware: x86-64 OS: Linux Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: tools Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com Distribution: Debian
Created attachment 74908 --> https://bugs.winehq.org/attachment.cgi?id=74908 build log
I've been using UndefinedBehaviorSanitizer at my day job and found it pretty useful, so did some brief testing on it with Wine.
Not everything builds (notably loader/ and dlls/ntdll/unix/), but most other stuff does.
For this issue, just recompiling tools/winebuild is enough to see the issue: ./configure && make -j12 cd tools/winebuild make clean make CFLAGS="-fsanitize=undefined" LDFLAGS="-fsanitize=undefined" cd ../../dlls/avifile.dll16/ make clean && make
tools/winegcc/winegcc -o dlls/avifile.dll16/i386-windows/avifile.dll16 --wine-objdir . -b i686-w64-mingw32 -Wl,--wine-builtin -shared \ dlls/avifile.dll16/avifile.dll16.spec -m16 -Wb,--main-module,avifil32.dll \ dlls/avifile.dll16/i386-windows/main.o dlls/avifil32/i386-windows/libavifil32.a \ dlls/winecrt0/i386-windows/libwinecrt0.a dlls/ucrtbase/i386-windows/libucrtbase.a \ dlls/krnl386.exe16/i386-windows/libkernel.a dlls/kernel32/i386-windows/libkernel32.a \ dlls/ntdll/i386-windows/libntdll.a -Wl,--disable-stdcall-fixup tools/winebuild/res16.c:156:5: runtime error: null pointer passed as argument 1, which is declared to never be null
Seems to affect most win16 dlls, there are a total of 44 occurrences (build log attached).
https://bugs.winehq.org/show_bug.cgi?id=55308
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zeb Figura z.figura12@gmail.com --- I was skeptical but it turns out this really is UB; see https://bugzilla.mozilla.org/show_bug.cgi?id=1401200#c6.