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

i can't call demo method,it report: System.AccessViolationException #36

Closed
Charltsing opened this issue May 31, 2023 · 11 comments
Closed
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Charltsing
Copy link

project(vs2022 ,net framework 4.72)
demo.zip

捕获

Did I make any mistake?

@trungnt2910
Copy link
Owner

Which version of the library are you using? The prerelease versions have known problems.

@Charltsing
Copy link
Author

Latest version

@trungnt2910
Copy link
Owner

The latest version has bugs (#34)

You might want to use MemoryModule.NET version 0.1.0 on NuGet instead.

@Charltsing
Copy link
Author

The latest version has bugs (#34)

You might want to use MemoryModule.NET version 0.1.0 on NuGet instead.

i try 0.1.0, but it has the same problem

maybe someting is wrong?

@Charltsing
Copy link
Author

@trungnt2910
Copy link
Owner

It seems like my implementation is getting the wrong address, off by 0x10000 bytes.

I am looking into this, haven't touched this code for quite a long time.

@trungnt2910
Copy link
Owner

Your example works fine on my new branch (https://github.com/trungnt2910/MemoryModule.NET/tree/dev/trungnt2910/Abstractions), where I wrote the PE loader from scratch.

My old branch was ported from the old MemoryModule C code, and to be honest I don't really understand what it is. The new one was created from scratch using a new design.

The only problem preventing this branch to be merged into master is #34. The approach of hooking TLS functions seems to not work on Windows since Windows does not have a dedicated function for TLS handling, instead Windows applications directly access the segment registers FS and GS.

I do not currently have much time to work on this project, but I would be grateful if you have any suggestions on how to fix this particular issue on the master branch.

@trungnt2910 trungnt2910 added bug Something isn't working help wanted Extra attention is needed labels Jun 1, 2023
@Charltsing
Copy link
Author

I hope to load dll with minimal code, MemoryModuleLite looks good

@trungnt2910
Copy link
Owner

I am aware of that repo, seems like it requires hooking some low-level thread lifetime functions that I don't understand yet.

@trungnt2910
Copy link
Owner

Sorry for the delay, but this issue should be fixed in the latest version. Please check the NuGet library for the latest review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants