Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC version regression #946

Closed
cracyc opened this issue Apr 16, 2021 · 3 comments
Closed

GCC version regression #946

cracyc opened this issue Apr 16, 2021 · 3 comments

Comments

@cracyc
Copy link
Contributor

cracyc commented Apr 16, 2021

The gcc built version fails when loading krnl386 into the first task.

7e6c:trace:module:LoadModule16 name krnl386.exe, paramBlock FFFFFFFF
7e6c:trace:module:MODULE_LoadModule16 found "krnl386.exe16" with embedded 16-bit module
7e6c:trace:module:GetModuleHandle16 (krnl386.exe)
7e6c:trace:module:MODULE_LoadModule16 Trying built-in 'krnl386.exe'
7e6c:trace:module:NE_LoadSegment Loading segment 1, hSeg=1016, flags=0002
7e6c:trace:module:NE_LoadSegment Loading segment 2, hSeg=101f, flags=0003
7e6c:trace:module:NE_InitResourceHandler InitResourceHandler[1007]
7e6c:trace:module:GetModuleHandle16 (KERNEL)
7e6c:trace:module:GetProcAddress16 0000 'DefResourceHandler'
7e6c:trace:loaddll:MODULE_LoadModule16 Loaded module "krnl386.exe" : builtin
7e6c:trace:module:GetModuleHandle16 (krnl386.exe)
7e6c:trace:module:MODULE_LoadModule16 Loaded module 'krnl386.exe' at 0x101f.
7e6c:trace:module:GetModuleHandle16 (user.exe)
7e6c:trace:module:NE_GetOrdinal (1007,'DllEntryPoint')
7e6c:trace:module:NE_GetOrdinal   Found: ordinal=669
7e6c:trace:module:GetProcAddress16 1007 'DllEntryPoint'
7e6c:trace:module:GetProcAddress16 returning 10174F36
7e6c:trace:module:GetProcAddress16 1007 014c
7e6c:trace:module:GetProcAddress16 returning 101F0010
7e6c:trace:module:GetModuleHandle16 (KERNEL)
7e6c:trace:module:GetProcAddress16 0000 'DOS3Call'
7e6c:trace:module:LoadModule16 name system.drv, paramBlock FFFFFFFF
7e6c:trace:module:MODULE_LoadModule16 found "system.drv16" with embedded 16-bit module
...
7e6c:trace:module:NE_GetOrdinal (111f,'SignalProc')
7e6c:trace:module:NE_GetOrdinal   Found: ordinal=314
7e6c:trace:module:GetProcAddress16 111f 'SignalProc'
7e6c:trace:module:GetProcAddress16 returning 11275A06
7e6c:trace:module:NE_GetOrdinal (119f,'DllEntryPoint')
7e6c:trace:module:GetProcAddress16 119f 'DllEntryPoint'
7e6c:trace:module:LoadModule16 name C:\WINWORD\WINWORD.dll, paramBlock 0064FC70
7e6c:trace:module:MODULE_LoadModule16 Trying native dll 'C:\WINWORD\WINWORD.dll'
7e6c:trace:module:NE_InitResourceHandler InitResourceHandler[11b7]
7e6c:trace:module:GetModuleHandle16 (KERNEL)
7e6c:trace:module:GetProcAddress16 0000 'DefResourceHandler'
7e6c:trace:loaddll:MODULE_LoadModule16 Loaded module "C:\\WINWORD\\WINWORD.dll" : native
7e6c:trace:module:GetModuleHandle16 (C:\WINWORD\WINWORD.dll)
7e6c:trace:module:MODULE_LoadModule16 Loaded module 'C:\WINWORD\WINWORD.dll' at 0x11b7.
7e6c:trace:module:GetModuleHandle16 (KERNEL)
7e6c:trace:module:GetProcAddress16 0000 'DOS3Call'
8aa0:trace:module:NE_LoadDLLs Loading 'KERNEL'
8aa0:trace:module:GetModuleHandle16 (KERNEL)
8aa0:trace:module:GetModuleFileName16 11f7 -> 'C:\WINWORD\WINWORD.DLL'
8aa0:trace:module:MODULE_LoadModule16 Trying native dll 'KERNEL.dll'
8aa0:trace:module:GetModuleFileName16 11f7 -> 'C:\WINWORD\WINWORD.DLL'
8aa0:trace:module:GetModuleFileName16 11f7 -> 'C:\WINWORD\WINWORD.DLL'
8aa0:trace:module:MODULE_LoadModule16 Trying native dll 'KERNEL.EXE'
8aa0:trace:module:GetModuleFileName16 11f7 -> 'C:\WINWORD\WINWORD.DLL'
Could not load 'KERNEL.DLL' required by 'WINWORD', error=2
8aa0:trace:module:GetModuleHandle16 (user.exe)
8aa0:trace:module:NE_GetOrdinal (111f,'SignalProc')
8aa0:trace:module:NE_GetOrdinal   Found: ordinal=314
8aa0:trace:module:GetProcAddress16 111f 'SignalProc'

Kernel's module handle is 0 which is clearly wrong. Seems like it's not properly aliasing krnl386 to kernel, the msvc built version works fine though.

@otya128
Copy link
Owner

otya128 commented Apr 16, 2021

Seems to be broken after b8c7634

@otya128
Copy link
Owner

otya128 commented Apr 16, 2021

In cmake build, local heap size is also specified for krnl386, and it seems to be broken in this case.
b8c7634#diff-0b2b9cc8a7b4ed79f6558d4fc140eca7ee77878be40b677e163c58836dcaa3a6R100-R105

otya128 added a commit that referenced this issue Apr 16, 2021
@cracyc
Copy link
Contributor Author

cracyc commented Apr 16, 2021

Oops, my bad then. Thanks for the fix.

@cracyc cracyc closed this as completed Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants