Comments (7)
Hi,
To compile code with STL (containers), kernel_stl.h needs to be included before including any STL headers. Please try with the header and let me know if that works for you.
Thank you,
from ddimon.
It does compile now, however I had some problems.
After isolating the problem it seems that std::vector is not working if the std::vector variable is a class variable.
I instead created pointer to the vector and initialize it using "new" in the initialize function,
when I'm done I use delete of course.
There is another thing that i've seen happening, wierdly happening only when using the ddimon (without any of my additional code) - I use WinDBG to track debug prints. Sometimes after using WinDBG and closing it while ddimon is installed I reopen it and try to capture kernel debug output and I get this message:
Only after restarting I can use WinDBG again. Did you experience something like this / do you know why it's happening?
from ddimon.
Hi,
As for the first issue. are you using the vector inside a global object? If you place a std::vector object directly as a global object, its contractor should be called, but I am not sure when it is placed inside a plain struct (w/ no constructor). Can you share the struct declaration?
For the issue with DebugView, does this happen only when DdiMon (or HyperPlatform) is loaded? I have seen the same issue on Windows 10, but I seemed to happen regardless of if you installed DdiMon.
from ddimon.
I think the constructor of std::vector is just not being called since creating class object is not calling the constructor of the class (this is the reason for the seperate initialize function),
to create the class object I allocate it using ExAllocatePoolWithTag and than in the initialize function I create the std::vector and save it's pointer.
If I use it as a class member:
class container
{
public:
container(); // If I create class object this is not being called
~container(); // Neither is this
bool add_module(module* app_module);
module* get_module(void* addr);
bool is_in_container(void* addr);
bool initialize();
void finalize();
private:
ModulesMap* m_modules_map;
std::vector<module*> m_modules; // I instead use std::vector<module*>* to later create the std::vector
};
and the initialize function:
bool
container::initialize() {
m_modules_map = static_cast<ModulesMap*>(ModulesMapInitialization());
if (nullptr == m_modules_map) {
return false;
}
m_modules = new std::vector<module*>;
return true;
}
and just use it as:
m_modules->push_back(app_module);
The second issue:
I do use windows 10 for testing, you are right I recheck and it seems it happens after I open windbg second time with kernel debugging turn on.
Accidently close the issue
from ddimon.
Thank you for sharing the code. Right, constructor would not be called when ExAllocatePoolWithTag() or anything other than 'new' is used. It is an expected behaviour. If you use new or construct an object on stack or as a global object, its constructor should be called. To avoid new/delete, this can be an option.
from ddimon.
Yeah I remember trying to use new but without kernel_stl functionality it didn't work, therefor I used allocation function instead of just creating class object (now that I know I can use new I will convert the code).
I have another unrelated question: When I install ddimon I see some lag in the programs running (the most obvious is gui apps), so for example if I run calc and move it's window fast it seems smooth but after I install ddimon and move the window it seems like it's stuttering.
I thought it might be the hooks, but after removing them it still seem to stutter.
Have any idea why this is happening / what part of the hypervisor causing it?
edit: nevermind I have kinda weird behavior of sometimes it stutter and sometimes it doesn't, if I will find the cause I will update.
Thanks for all the help!
from ddimon.
You are welcome.
from ddimon.
Related Issues (20)
- DPC_WATCHDOG_VIOLATION ISSUE HOT 1
- Slow Performance
- Debug without kernel? HOT 1
- Calculate code length HOT 2
- BSOD in windows7 HOT 1
- problem when compiling HOT 8
- DPC_WATCHDOG_VIOLATION from Shadow Hooks HOT 8
- Countering HV detections HOT 4
- Q
- TSC HOT 1
- vs2019 compilation error HOT 2
- EPT Entries HOT 6
- BSOD sgdt
- Missing method due to new version of hyperplatform HOT 2
- ddimon build error
- build error
- Hello, I noticed your project FU_ Hypervisor, do you plan to continue maintenance? HOT 3
- How cound i use ShpEnablePageShadowingForRW hide kernel memory? HOT 5
- Question HOT 1
- Not hooking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddimon.