[PATCH] taskschd: Fix some server binding handle leaks (Valgrind).
Alexandre Julliard
julliard at winehq.org
Mon Jun 3 15:39:07 CDT 2019
Sven Baars <sven.wine at gmail.com> writes:
> Signed-off-by: Sven Baars <sven.wine at gmail.com>
> ---
> dlls/taskschd/task.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
This breaks the tests:
../../../tools/runtest -q -P wine -T ../../.. -M schtasks.exe -p schtasks.exe_test.exe schtasks && touch schtasks.ok
0042:fixme:schtasks:wmain Print current tasks state
0009:fixme:taskschd:read_actions stub
0009:fixme:taskschd:read_task unhandled Task element L"Exec"
0009:fixme:taskschd:read_task unhandled Task element L"Command"
0009:fixme:taskschd:read_task unhandled Task node type 3
0009:fixme:taskschd:RegistrationInfo_get_SecurityDescriptor 0x1faeb0,0x66fa90: stub
0009:fixme:taskschd:write_settings stub
0044:err:rpc:I_RpcGetBuffer no binding
wine: Unhandled exception 0x000006a6 in thread 44 at address 0x7b451e3c (thread 0044), starting debugger...
Unhandled exception: 0x000006a6 in 32-bit code (0x7b451e3c).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:7b451e3c ESP:0066f9c4 EBP:0066fa28 EFLAGS:00000212( - -- I -A- - )
EAX:0066f9d0 EBX:00000000 ECX:0066fa40 EDX:00000000
ESI:00000036 EDI:00000000
Stack dump:
0x0066f9c4: 00000002 00000028 00000000 000006a6
0x0066f9d4: 00000000 00000000 7b451e3c 00000000
0x0066f9e4: 00000000 00000000 4d430003 00000058
0x0066f9f4: 00000002 00000090 00000030 00000002
0x0066fa04: 00000040 00000000 00000000 00000000
0x0066fa14: 00000000 00000000 4d430003 0066fa40
Backtrace:
=>0 0x7b451e3c RaiseException+0x7c(code=<couldn't compute location>, flags=<couldn't compute location>, nbargs=<couldn't compute location>, args=<couldn't compute location>) [/home/julliard/wine/wine/dlls/kernel32/except.c:86] in kernel32 (0x0066fa28)
1 0x7e50388e RpcRaiseException+0x1d(exception=<couldn't compute location>) [/home/julliard/wine/wine/dlls/rpcrt4/rpcrt4_main.c:192] in rpcrt4 (0x0066fa58)
2 0x7e4cefba NdrGetBuffer+0x89(stubmsg=<couldn't compute location>, buflen=<couldn't compute location>, handle=<couldn't compute location>) [/home/julliard/wine/wine/dlls/rpcrt4/ndr_clientserver.c:174] in rpcrt4 (0x0066fa98)
3 0x7db24c4c SchRpcRetrieveTask+0x10b(path=<couldn't compute location>, languages=<couldn't compute location>, n_languages=<couldn't compute location>, xml=<couldn't compute location>) [/home/julliard/wine/wine/dlls/taskschd/schrpc_c.c:414] in taskschd (0x0066fca8)
4 0x7db16c21 RegisteredTask_create+0x230() [/home/julliard/wine/wine/dlls/taskschd/regtask.c:365] in taskschd (0x0066fd08)
5 0x7db1022e TaskFolder_GetTask+0x6d(iface=<couldn't compute location>, name=<couldn't compute location>, task=<couldn't compute location>) [/home/julliard/wine/wine/dlls/taskschd/folder.c:275] in taskschd (0x0066fd68)
6 0x00401dcc wmain+0x49b(argc=0x5, argv=0x231318) [/home/julliard/wine/wine/programs/schtasks/../../include/taskschd.h:1730] in schtasks (0x0066fe38)
7 0x0040139d server+0x40139c() in schtasks (0x0066fec8)
8 0x7b47eaf2 call_process_entry+0x11() in kernel32 (0x0066fee8)
9 0x7b480a28 start_process+0x157(entry=<is not available>, peb=<is not available>) [/home/julliard/wine/wine/dlls/kernel32/process.c:1257] in kernel32 (0x0066ffd8)
10 0x7b47eafe start_process_wrapper+0x9() in kernel32 (0x0066ffec)
0x7b451e3c RaiseException+0x7c [/home/julliard/wine/wine/dlls/kernel32/except.c:86] in kernel32: addl $12,%esp
86 }
Modules:
Module Address Debug info Name (62 modules)
PE 400000- 465000 Dwarf schtasks
ELF 7b400000-7b848000 Dwarf kernel32<elf>
\-PE 7b430000-7b848000 \ kernel32
ELF 7bc00000-7bd35000 Deferred ntdll<elf>
\-PE 7bc30000-7bd35000 \ ntdll
ELF 7c000000-7c005000 Deferred <wine-loader>
ELF 7dabd000-7daf5000 Deferred xmllite<elf>
\-PE 7dad0000-7daf5000 \ xmllite
ELF 7daf5000-7db4d000 Dwarf taskschd<elf>
\-PE 7db00000-7db4d000 \ taskschd
ELF 7db6f000-7db76000 Deferred libxfixes.so.3
ELF 7db76000-7db83000 Deferred libxcursor.so.1
ELF 7db83000-7db96000 Deferred libxi.so.6
ELF 7db96000-7db9a000 Deferred libxcomposite.so.1
ELF 7db9a000-7dba7000 Deferred libxrandr.so.2
ELF 7dba7000-7dbb3000 Deferred libxrender.so.1
ELF 7dbb3000-7dbba000 Deferred libxxf86vm.so.1
ELF 7dbba000-7dbbf000 Deferred libxinerama.so.1
ELF 7dbbf000-7dbca000 Deferred librt.so.1
ELF 7dbca000-7dbe9000 Deferred libbsd.so.0
ELF 7dbe9000-7dbf0000 Deferred libxdmcp.so.6
ELF 7dbf0000-7dbf5000 Deferred libxau.so.6
ELF 7dbf5000-7dc23000 Deferred libxcb.so.1
ELF 7dc23000-7dd72000 Deferred libx11.so.6
ELF 7dd72000-7dd87000 Deferred libxext.so.6
ELF 7ddc0000-7de71000 Deferred winex11<elf>
\-PE 7dde0000-7de71000 \ winex11
ELF 7de71000-7de97000 Deferred imm32<elf>
\-PE 7de80000-7de97000 \ imm32
ELF 7e165000-7e16f000 Deferred libuuid.so.1
ELF 7e16f000-7e1aa000 Deferred libexpat.so.1
ELF 7e1aa000-7e1f7000 Deferred libfontconfig.so.1
ELF 7e1f7000-7e216000 Deferred libz.so.1
ELF 7e216000-7e255000 Deferred libpng16.so.16
ELF 7e255000-7e318000 Deferred libfreetype.so.6
ELF 7e351000-7e49d000 Deferred oleaut32<elf>
\-PE 7e380000-7e49d000 \ oleaut32
ELF 7e49d000-7e543000 Dwarf rpcrt4<elf>
\-PE 7e4c0000-7e543000 \ rpcrt4
ELF 7e543000-7e695000 Deferred gdi32<elf>
\-PE 7e560000-7e695000 \ gdi32
ELF 7e695000-7e8c6000 Deferred user32<elf>
\-PE 7e6c0000-7e8c6000 \ user32
ELF 7e8c6000-7e95f000 Deferred advapi32<elf>
\-PE 7e8e0000-7e95f000 \ advapi32
ELF 7e95f000-7ead9000 Deferred ole32<elf>
\-PE 7e990000-7ead9000 \ ole32
ELF 7ead9000-7ebae000 Deferred msvcrt<elf>
\-PE 7eb00000-7ebae000 \ msvcrt
ELF 7ee79000-7ee8e000 Deferred libnss_files.so.2
ELF 7ee8e000-7eea9000 Deferred libnsl.so.1
ELF 7eea9000-7eeb7000 Deferred libnss_nis.so.2
ELF 7eeb7000-7eec1000 Deferred libnss_compat.so.2
ELF 7eec1000-7efc7000 Deferred libm.so.6
ELF 7efcd000-7eff9000 Deferred version<elf>
\-PE 7efd0000-7eff9000 \ version
ELF f7b05000-f7b0b000 Deferred libdl.so.2
ELF f7b0b000-f7ce9000 Deferred libc.so.6
ELF f7ce9000-f7d0a000 Deferred libpthread.so.0
ELF f7d43000-f7efc000 Dwarf libwine.so.1
ELF f7efe000-f7f28000 Deferred ld-linux.so.2
ELF f7f2b000-f7f2d000 Deferred [vdso].so
Threads:
process tid prio (all id:s are in hex)
00000008 schtasks.exe_test.exe
00000009 0
0000000e services.exe
00000031 0
0000002b 0
00000022 0
0000001c 0
00000015 0
00000014 0
00000013 0
00000010 0
0000000f 0
00000011 plugplay.exe
00000017 0
00000016 0
00000012 0
00000018 svchost.exe
00000040 0
0000003f 0
0000003e 0
0000003b 0
0000003a 0
0000001f 0
0000001e 0
0000001d 0
00000019 0
0000001a explorer.exe
00000027 0
00000026 0
00000025 0
0000001b 0
00000020 winedevice.exe
00000028 0
00000024 0
00000023 0
00000021 0
00000029 winedevice.exe
0000002e 0
0000002d 0
0000002c 0
0000002a 0
0000002f rpcss.exe
00000038 0
00000037 0
00000035 0
00000034 0
00000033 0
00000032 0
00000030 0
00000043 (D) C:\windows\system32\schtasks.exe
00000044 0 <==
System information:
Wine build: wine-4.9-253-gf7c9ae5c47eb
Platform: i386
Version: Windows 7
Host system: Linux
Host version: 4.19.0-5-amd64
schtasks.c:188: Test failed: r = 1702
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list