http://bugs.winehq.org/show_bug.cgi?id=34810
Bug #: 34810 Summary: The winspool.drv:info test crashes on Windows 8 Product: Wine Version: 1.7.5 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: spooler AssignedTo: wine-bugs@winehq.org ReportedBy: fgouget@codeweavers.com Classification: Unclassified
winspool.drv:info test crashes on Windows 8 as can be seen on the WineTest site: http://test.winehq.org/data/tests/winspool.drv:info.html
Here is a crash report:
info.c:2923: Test failed: AddJobA() failed le=50 info.c:2929: Test failed: GetJobA() failed le=87 info.c:2934: this is the last test seen before the exception info: unhandled exception c0000005 at 0040B24A
Which corresponds to these lines:
2922 ret = AddJobA( printer, 1, (BYTE *)add_job, needed, &needed ); 2923 ok( ret, "AddJobA() failed le=%d\n", GetLastError() ); -> Failed with ERROR_NOT_SUPPORTED and no job is created.
2925 ret = GetJobA( printer, add_job->JobId, 2, NULL, 0, &needed ); 2926 ok( !ret, "got %d\n", ret ); -> Fails as expected but with ERROR_INVALID_PARAMETER, not ERROR_INSUFFICIENT_BUFFER. So needed is 0.
2927 job_info = HeapAlloc( GetProcessHeap(), 0, needed ); -> So here we allocate a 0-byte structure!
2928 ret = GetJobA( printer, add_job->JobId, 2, (BYTE *)job_info, needed, &needed ); 2929 ok( ret, "GetJobA() failed le=%d\n", GetLastError() ); -> Again ERROR_INVALID_PARAMETER.
Then we crash when we try to dereference a pointer in the 0-byte job_info structure we allocated.
So it looks like this is all because JOB_INFO_2 is not supported anymore. Yet MSDN says nothing about that. Does that make sense?