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

Link.exe chokes on debug info generated by UASM #194

Open
vid512 opened this issue Dec 3, 2023 · 5 comments
Open

Link.exe chokes on debug info generated by UASM #194

vid512 opened this issue Dec 3, 2023 · 5 comments
Labels
Milestone

Comments

@vid512
Copy link

vid512 commented Dec 3, 2023

In some cases, debug info generated by UASM, when linked with standard .lib, causes MS link.exe to throw "LINK : fatal error LNK1102: out of memory". This is in any case a bug in MS linker, but I strongly suspect it gets triggered by invalid debug info generated by UASM.

I managed to strip the problem down to following minimal example. Hopefully it should be simple enough to check the resulting debug info manually. Unfortunately I know nothing about whatever debug format is used.

util.asm

p typedef ptr byte

x STRUCT
  y p ?
x ENDS

ExitProcess PROTO :DWORD
z EQU ExitProcess

end

reproduce with:

uasm64 -c -Zi -win64 util.asm
link /DEBUG util.obj kernel32.lib
@john-terraspace
Copy link
Member

john-terraspace commented Dec 3, 2023 via email

@vid512
Copy link
Author

vid512 commented Dec 3, 2023

I use 64 bit linker:

Microsoft (R) Incremental Linker Version 14.38.33130.0
Copyright (C) Microsoft Corporation.  All rights reserved.

With /Zi8, the problem disappears on the particular minimal example I posted, but persists with my original larger codebase.

I can try to reduce failing code with /Zi8 to minimal example again, if that helps, but that will take some effort. Let me know if there's any purpose in doing so.

@john-terraspace
Copy link
Member

john-terraspace commented Dec 3, 2023 via email

@john-terraspace
Copy link
Member

I've managed to fix the minimal example in 2.57 for -Zi, but as you said larger codebase still exhibits issue even with -Zi8 - so we'll need another minimal test case to try and narrow that one down.

john-terraspace added a commit that referenced this issue Aug 5, 2024
@john-terraspace john-terraspace added this to the V2.57 milestone Aug 5, 2024
@vid512
Copy link
Author

vid512 commented Aug 7, 2024

I don't have the example with larger codebase anymore, nor do I remember how I tested it. So, I think you can close this issue for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants