Processors
Intel® Processors, Tools, and Utilities
14537 Discussions

verify if the address being accessed is a part of a process memory

Peace
Beginner
462 Views

How can I know that the address I am about to access is a part of the process's memory? I mean for example  if I try to do this in a random process mov eax, [0x010], it is gonna crash as 0x10 is not in process's memory same goes with indirect memory accessing using a register.

0 Kudos
3 Replies
Alberto_R_Intel
Employee
425 Views

Peace, Thank you for posting in the Intel® Communities Support.


In order for us to provide the most accurate assistance on this topic, we just wanted to confirm a few details?

What is the model of the Intel® processor in question?

Are you a developer?

Are you working on a project?

The information requested, is it because you are designing, building, or modifying hardware or software?

Are you using a specific platform?

Besides the Intel® processor, are you using any Intel® hardware or software?


Any questions please let me know.


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
Peace
Beginner
410 Views

Model: Intel(R) Core(TM) i7-7500U
No, not exactly a developer, but I do work on a few projects, especially in x86/x64 assembly. But I also know a little bit of C++ and LUA.
Yes, I am working on a project.
Yes, I am modifying a basic software I made in C++.
Yes, I am using Windows OS.
Yes, the GPU in my laptop is Intel(R) HD Graphics 620.

I just wanted to know that if there is a way I could prevent my program from crashing when the address outside the memory of a program is being accessed. (in assembly.)

0 Kudos
n_scott_pearson
Super User
403 Views
C++ supports Structured Exception Handling, which you can use to react to instructions/statements/routines that could fail due to bad pointers, etc. Microsoft provides examples of how to use this capability.
Hope this helps,
...S
0 Kudos
Reply