libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Run-Time Check Failure(Static Link in Debug)


From: luozhaotian
Subject: Re: [libmicrohttpd] Run-Time Check Failure(Static Link in Debug)
Date: Tue, 12 Sep 2023 10:37:31 +0800 (CST)

(1) The library from Latest Windows binary: https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-latest-w32-bin.zip

(2) basicauthentication.cpp from libmicrohttpd-latest.tar.gz(libmicrohttpd-0.9.77/doc/examples/basicauthentication.c)  without any source code modification

(3) Compiler:  Microsoft Visual Studio Community 2022 (64 bit) - Current Version 17.5.3


Compile Command:

/JMC /permissive- /ifcOutput "x64\Debug\" /GS /W4 /Zc:wchar_t /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc143.pdb" /Zc:inline /fp:precise /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /FC /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\Hello.pch" /diagnostics:column 


Linker Command:

/OUT:"D:\PROJ\CppProj\libmicorhttpd\Hello\x64\Debug\Hello.exe" /MANIFEST /NXCOMPAT /PDB:"D:\PROJ\CppProj\libmicorhttpd\Hello\x64\Debug\Hello.pdb" /DYNAMICBASE "libmicrohttpd_d.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /NODEFAULTLIB:"libcmtd.lib" /INCREMENTAL /PGD:"D:\PROJ\CppProj\libmicorhttpd\Hello\x64\Debug\Hello.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\Hello.exe.intermediate.manifest" /LTCGOUT:"x64\Debug\Hello.iobj" /ERRORREPORT:PROMPT /ILK:"x64\Debug\Hello.ilk" /NOLOGO /TLBID:1 


(4)The parameters of MHD_base64_to_bin_n

> Hello.exe!MHD_base64_to_bin_n(const char * base64, unsigned __int64 base64_len, void * bin, unsigned __int64 bin_size) line 1422 C

+ base64 0x000001aba251f07d "cm9vdDpwYSQkdzByZA==" const char *

base64_len 20 unsigned __int64

bin 0x000001aba25116f0 void *

bin_size 15 unsigned __int64

i 0 unsigned __int64

+ in 0x000001aba251f07d "cm9vdDpwYSQkdzByZA==" const unsigned char * const

j 0 unsigned __int64

+ map 0x00007ff65af9c8f0 {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ...} const int[256]

+ out 0x000001aba25116f0  <invalid character in string> unsigned char * const

v1 28 const int

v2 38 const int

v3 61 const int

v4 47 const int


0x000001ABA25116F0  72 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd  r???????????????

(5)Try with current git master, the same problem exists.








At 2023-09-12 00:53:19, "Evgeny Grin" <k2k@yandex.ru> wrote: >Hi, > >Could you please try with current git master? > >-- >Evgeny > >On 11.09.2023 16:19, Evgeny Grin wrote: >> Hi, >> >> Did you build it from the official tarbal archive? >> >> Have you compiled the example without any source code modification? >> >> What is your compiler, librarian and linker settings? >> Share your "Command line" for the library and the application if you >> added a VS project. >> >> Can you share the content of 'base64' and 'base64_len' parameters, >> when MHD_base64_to_bin_n() is called and then aborted with run-time >> check? >> >> Probably VS compiler requires an extra casting, while in practice the >> code has enough castings already. >> >

Attachment: Hello.zip
Description: Zip archive

Attachment: lib.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]