https://bugs.winehq.org/show_bug.cgi?id=36199
Bug ID: 36199 Summary: valgrind shows several warnings under crypt32/tests/chain.c Product: Wine Version: 1.7.17 Hardware: x86 OS: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: crypt32 Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com
Created attachment 48320 --> https://bugs.winehq.org/attachment.cgi?id=48320 valgrind log
A few in glibc: ==17802== Thread 2: ==17802== Invalid read of size 1 ==17802== at 0x40187FA: strcmp (strcmp.S:34) ==17802== by 0x4008925: _dl_map_object (dl-load.c:2113) ==17802== by 0x4013383: dl_open_worker (dl-open.c:224) ==17802== by 0x400F1F5: _dl_catch_error (dl-error.c:187) ==17802== by 0x4012D93: _dl_open (dl-open.c:650) ==17802== by 0x435093A: do_dlopen (dl-libc.c:87) ==17802== by 0x400F1F5: _dl_catch_error (dl-error.c:187) ==17802== by 0x4350A2A: dlerror_run (dl-libc.c:46) ==17802== by 0x4350AB0: __libc_dlopen_mode (dl-libc.c:163) ==17802== by 0x4221819: pthread_cancel_init (unwind-forcedunwind.c:52) ==17802== by 0x42219FB: _Unwind_ForcedUnwind (unwind-forcedunwind.c:129) ==17802== by 0x421F732: __pthread_unwind (unwind.c:129) ==17802== by 0x421A080: pthread_exit (pthreadP.h:280) ==17802== by 0x7BC8E1A9: terminate_thread (thread.c:349) ==17802== by 0x7BC87009: ??? (signal_i386.c:2571) ==17802== by 0x6A5F357: ??? ==17802== by 0x4218F92: start_thread (pthread_create.c:309) ==17802== by 0x431D7ED: clone (clone.S:129) ==17802== Address 0x693d913 is on thread 1's stack ==17802==
==17802== Invalid read of size 4 ==17802== at 0x4352239: _Unwind_IteratePhdrCallback (unwind-dw2-fde-glibc.c:112) ==17802== by 0x43503E2: dl_iterate_phdr (dl-iteratephdr.c:76) ==17802== by 0x4352AF9: _Unwind_Find_FDE (unwind-dw2-fde-glibc.c:267) ==17802== by 0x6B9E336: ??? (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/32/libgcc_s.so.1) ==17802== by 0x6B9EB21: ??? (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/32/libgcc_s.so.1) ==17802== by 0x6B9F10F: _Unwind_ForcedUnwind (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/32/libgcc_s.so.1) ==17802== by 0x42219F1: _Unwind_ForcedUnwind (unwind-forcedunwind.c:137) ==17802== by 0x421F732: __pthread_unwind (unwind.c:129) ==17802== by 0x421A080: pthread_exit (pthreadP.h:280) ==17802== by 0x7BC8E1A9: terminate_thread (thread.c:349) ==17802== by 0x7BC87009: ??? (signal_i386.c:2571) ==17802== by 0x6A5F357: ??? ==17802== by 0x4218F92: start_thread (pthread_create.c:309) ==17802== by 0x431D7ED: clone (clone.S:129) ==17802== Address 0x693c034 is on thread 1's stack ==17802==
==17802== Thread 1 crypt32_test.exe.so: ==17802== Jump to the invalid address stated on the next line ==17802== at 0x693E820: ??? (in /lib32/libresolv-2.19.so) ==17802== by 0x425F4E8: __run_exit_handlers (exit.c:82) ==17802== by 0x425F54C: exit (exit.c:104) ==17802== by 0x7BC68772: NtTerminateProcess (process.c:63) ==17802== by 0x7BC5941B: RtlExitUserProcess (loader.c:2538) ==17802== by 0x7B868D09: ??? (process.c:2668) ==17802== Address 0x693e820 is on thread 1's stack ==17802==
and several possible leaks: ==17802== 20 bytes in 1 blocks are possibly lost in loss record 50 of 427 ==17802== at 0x7BC4C6B7: notify_alloc (heap.c:255) ==17802== by 0x7BC50EFB: RtlAllocateHeap (heap.c:1716) ==17802== by 0x514398B: CryptMemAlloc (main.c:124) ==17802== by 0x511E0A9: CertAddStoreToCollection (collectionstore.c:519) ==17802== by 0x5164B4B: CRYPT_SysOpenStoreW (store.c:592) ==17802== by 0x5165ADF: CertOpenStore (store.c:907) ==17802== by 0x51136FD: CRYPT_CreateChainEngine (chain.c:130) ==17802== by 0x511394F: get_chain_engine (chain.c:175) ==17802== by 0x511ADC0: CertGetCertificateChain (chain.c:2894) ==17802== by 0x4E618AA: testVerifyCertChainPolicy (chain.c:4790) ==17802== by 0x4E61C4C: func_chain (chain.c:4844) ==17802== by 0x4EB7F67: run_test (test.h:584) ==17802== by 0x4EB8356: main (test.h:654) ==17802==
==17802== 60 bytes in 3 blocks are possibly lost in loss record 197 of 427 ==17802== at 0x7BC4C6B7: notify_alloc (heap.c:255) ==17802== by 0x7BC50EFB: RtlAllocateHeap (heap.c:1716) ==17802== by 0x514398B: CryptMemAlloc (main.c:124) ==17802== by 0x5157661: ContextPropertyList_SetProperty (proplist.c:132) ==17802== by 0x515788F: ContextPropertyList_Copy (proplist.c:215) ==17802== by 0x511E9AF: Context_CopyProperties (context.c:130) ==17802== by 0x510AB6C: Cert_clone (cert.c:139) ==17802== by 0x5163664: MemStore_addContext (store.c:151) ==17802== by 0x5163A35: MemStore_addCert (store.c:243) ==17802== by 0x510B119: add_cert_to_store (cert.c:263) ==17802== by 0x510B27F: CertAddCertificateContextToStore (cert.c:287) ==17802== by 0x510A852: CertAddEncodedCertificateToStore (cert.c:65) ==17802== by 0x515E94A: add_ms_root_certs (rootstore.c:732) ==17802== by 0x515EB12: create_root_store (rootstore.c:808) ==17802== by 0x515EC6C: CRYPT_RootOpenStore (rootstore.c:829) ==17802== by 0x516435C: CRYPT_SysRegOpenStoreW (store.c:435) ==17802== by 0x5165ADF: CertOpenStore (store.c:907) ==17802== by 0x5164BAF: CRYPT_SysOpenStoreW (store.c:604) ==17802== by 0x5165ADF: CertOpenStore (store.c:907) ==17802== by 0x51136FD: CRYPT_CreateChainEngine (chain.c:130) ==17802==
==17802== 96 bytes in 1 blocks are possibly lost in loss record 294 of 427 ==17802== at 0x7BC4C6B7: notify_alloc (heap.c:255) ==17802== by 0x7BC50EFB: RtlAllocateHeap (heap.c:1716) ==17802== by 0x61ACD34: heap_alloc_zero (internet.h:121) ==17802== by 0x61ADCA1: create_netconn (netconnection.c:369) ==17802== by 0x619CFF2: open_http_connection (http.c:4826) ==17802== by 0x619D68C: HTTP_HttpSendRequestW (http.c:4972) ==17802== by 0x619EE2C: HttpSendRequestExW (http.c:5511) ==17802== by 0x61643F8: HTTP_RetrieveEncodedObjectW (cryptnet_main.c:933) ==17802== by 0x6165930: CryptRetrieveObjectByUrlW (cryptnet_main.c:1479) ==17802== by 0x5118CA0: CRYPT_FindIssuer (chain.c:2039) ==17802== by 0x51193A2: CRYPT_GetIssuer (chain.c:2168) ==17802== by 0x511952F: CRYPT_BuildSimpleChain (chain.c:2200) ==17802== by 0x511976F: CRYPT_GetSimpleChainForCert (chain.c:2247) ==17802== by 0x5119885: CRYPT_BuildCandidateChainFromCert (chain.c:2277) ==17802== by 0x511AE8B: CertGetCertificateChain (chain.c:2914) ==17802== by 0x4E5F02E: testGetCertChain (chain.c:3996) ==17802== by 0x4E61C51: func_chain (chain.c:4845) ==17802== by 0x4EB7F67: run_test (test.h:584) ==17802== by 0x4EB8356: main (test.h:654) ==17802==
etc. (full log attached)
https://bugs.winehq.org/show_bug.cgi?id=36199
--- Comment #1 from Austin English austinenglish@gmail.com --- ==30263== Jump to the invalid address stated on the next line ==30263== at 0x64A9CE0: ??? (in /usr/lib/libnss_dns-2.18.so) ==30263== by 0x4E897010: __run_exit_handlers (in /usr/lib/libc-2.18.so) ==30263== by 0x4E89706C: exit (in /usr/lib/libc-2.18.so) ==30263== by 0x7BC6972A: NtTerminateProcess (process.c:63) ==30263== by 0x7BC56F4D: RtlExitUserProcess (loader.c:2538) ==30263== by 0x7B85EE11: ??? (in /home/austin/wine-valgrind/dlls/kernel32/kernel32.dll.so) ==30263== Address 0x64a9ce0 is on thread 1's stack ==30263==
https://bugs.winehq.org/show_bug.cgi?id=36199
--- Comment #2 from Austin English austinenglish@gmail.com --- A couple more: ==31063== Thread 2: ==31063== Invalid read of size 1 ==31063== at 0x40187FA: strcmp (strcmp.S:34) ==31063== by 0x4008925: _dl_map_object (dl-load.c:2113) ==31063== by 0x4013383: dl_open_worker (dl-open.c:224) ==31063== by 0x400F1F5: _dl_catch_error (dl-error.c:187) ==31063== by 0x4012D93: _dl_open (dl-open.c:650) ==31063== by 0x435593A: do_dlopen (dl-libc.c:87) ==31063== by 0x400F1F5: _dl_catch_error (dl-error.c:187) ==31063== by 0x4355A2A: dlerror_run (dl-libc.c:46) ==31063== by 0x4355AB0: __libc_dlopen_mode (dl-libc.c:163) ==31063== by 0x4226819: pthread_cancel_init (unwind-forcedunwind.c:52) ==31063== by 0x42269FB: _Unwind_ForcedUnwind (unwind-forcedunwind.c:129) ==31063== by 0x4224732: __pthread_unwind (unwind.c:129) ==31063== by 0x421F080: pthread_exit (pthreadP.h:280) ==31063== by 0x7BC8E259: terminate_thread (thread.c:349) ==31063== by 0x7BC870B9: ??? (signal_i386.c:2571) ==31063== by 0x646F357: ??? ==31063== by 0x421DF92: start_thread (pthread_create.c:309) ==31063== by 0x43227ED: clone (clone.S:129) ==31063== Address 0x634c913 is on thread 1's stack ==31063==
==31063== Thread 1 crypt32_test.exe.so: ==31063== Invalid read of size 2 ==31063== at 0x400E6C5: _dl_fixup (dl-runtime.c:91) ==31063== by 0x4014C8F: _dl_runtime_resolve (dl-trampoline.S:36) ==31063== by 0x634D852: ??? (in /lib32/libresolv-2.19.so) ==31063== by 0x400F963: _dl_fini (dl-fini.c:252) ==31063== by 0x42644E8: __run_exit_handlers (exit.c:82) ==31063== by 0x426454C: exit (exit.c:104) ==31063== by 0x7BC68822: NtTerminateProcess (process.c:63) ==31063== by 0x7BC594CB: RtlExitUserProcess (loader.c:2554) ==31063== by 0x7B868D09: ??? (process.c:2668) ==31063== Address 0x634c9b6 is on thread 1's stack ==31063==
https://bugs.winehq.org/show_bug.cgi?id=36199
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |valgrind
https://bugs.winehq.org/show_bug.cgi?id=36199
donanykey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |donanykey@gmail.com
--- Comment #3 from donanykey@gmail.com --- Hi Austin, You might want to re-test this, I am not reported any leaks in `chain` tests with 1.9.22 and wineserver running in a separate process
https://bugs.winehq.org/show_bug.cgi?id=36199
--- Comment #4 from donanykey@gmail.com --- Please read "wineserver launched beforehand and keep running to check leaks in tests only" in my previous comment where "separate process", sorry for typo
https://bugs.winehq.org/show_bug.cgi?id=36199
--- Comment #5 from Austin English austinenglish@gmail.com --- ==17432== Thread 2: ==17432== Invalid read of size 1 ==17432== at 0x401850A: strcmp (strcmp.S:34) ==17432== by 0x4007DC4: _dl_map_object (dl-load.c:1962) ==17432== by 0x4012F43: dl_open_worker (dl-open.c:226) ==17432== by 0x400EDD4: _dl_catch_error (dl-error.c:187) ==17432== by 0x4012928: _dl_open (dl-open.c:649) ==17432== by 0x437411D: do_dlopen (dl-libc.c:87) ==17432== by 0x400EDD4: _dl_catch_error (dl-error.c:187) ==17432== by 0x43741E9: dlerror_run (dl-libc.c:46) ==17432== by 0x437426D: __libc_dlopen_mode (dl-libc.c:163) ==17432== by 0x424D8FB: pthread_cancel_init (unwind-forcedunwind.c:52) ==17432== by 0x424DAD4: _Unwind_ForcedUnwind (unwind-forcedunwind.c:126) ==17432== by 0x424B949: __pthread_unwind (unwind.c:121) ==17432== by 0x42441E0: __do_cancel (pthreadP.h:283) ==17432== by 0x42441E0: pthread_exit (pthread_exit.c:28) ==17432== by 0x7BC99407: terminate_thread (thread.c:373) ==17432== by 0x7BC8FA49: ??? (signal_i386.c:2700) ==17432== by 0x689F367: ??? ==17432== by 0x4243260: start_thread (pthread_create.c:333) ==17432== by 0x433F31D: clone (clone.S:114) ==17432== Address 0x677f891 is on thread 1's stack ==17432==
with wine-2.1