search
HomeDatabaseMysql Tutorial[Access violation ] 2G内地址错误访问

如无特殊说明 环境都是x86系列cpu ia-32 如果是64位会特殊说明的 例子都是引用swd 更详细的说明请看swd一书 以下说明及以后的博客都会有理解偏差的地方 还请各位前辈和战友指正一二 毕竟本人也是一边看书一边记录 难免会有天圆地方的思想 qq 604015858 欢迎

如无特殊说明 环境都是x86系列cpu ia-32 如果是64位会特殊说明的
例子都是引用swd 更详细的说明请看swd一书
以下说明及以后的博客都会有理解偏差的地方 还请各位前辈和战友指正一二 毕竟本人也是一边看书一边记录 难免会有天圆地方的思想
qq 604015858 欢迎随时指导交流

对windows来说 一个任务就是一个线程
cpu对任务的保护分为 任务间保护和任务内保护
任务间保护通过段机制和页机制来实现
任务内保护通过权限来实现

以下话题描述一下任务内保护
每个app(应用程序)都会有4G的空间 高2G放系统的数据和代码的映射
低2G app自用 当你访问高2G空间的系统空间 而又没有赋予访问特权 那就会出现如下出错:

[Access violation ] 2G内地址错误访问

Access violation - code c0000005 (first chance)
00401035 c705808080a022000000 mov dword ptr ds:[0A0808080h],22h ds:0023:a0808080=????????

将22h放到a0808080时出错 信息就是 访问系统空间时没有被授权 肯定会被拒绝

ps:以下是我配置windbg的信息
(由于我接触windbg时很茫然 下面贴上我的设置 希望可以给刚接触的朋友一个提示 不至于向我当初那样茫然 这些设置可能不正规 但至少效果出来了)
1:获取windbg
去微软官网下载windows调试工具集 或是在网上下载一个
安装之后你会在Debugging Tools for Windows目录下发现很多小工具 windbg.exe就是其中之一 这是一个弹药库 windbg只是其中的一支*

2:符号表的设置
系统符号设置: 可以参看http://blog.chinaunix.net/uid-24709751-id-4217635.html这个博客
不要以为这就完了 还需要设置你需要调试对象的pdb:
app符号设置:
[Access violation ] 2G内地址错误访问
你只需要设置前面的“D:\zwkkkkkkkkkkkkkkkkkkkkkk\百度云管家\科锐10DVD\DVD6 MFC编程\swd\bin\Debug”后面的是系统符号设置 如果你做了 就不需要在这添加了 windbg会自动添加在这儿

如果你的pdb目录不止一个 就需要把多个路径都写在这儿

还有一个问题 就是这个对话框怎么出现的?
windbg菜单栏 file下面的符号设置
windbg对很多路径都做了兼容处理 具体可以看一下windbg的帮助 网上有人把windbg的帮助翻译成中文了 不愿意看英文的可以找下中文了解一下

2: 应用程序路径
如果你调试的是dump文件 这个需要设置一下

3: 源文件路径
如果你有源文件 可以把源文件路径设置一下 第一张图的左上角那个窗口显示的就是源文件
大部分情况下 能获得到pdb就很不错了 但是为了方便学习 我还是加上了源文件 用以了解windbg报的每一个错误提示信息

至于windbg的用法 可以慢慢学习 用到几个命令学习几个 这也是本系列的一个重要目标之一

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the role of InnoDB redo logs and undo logs.Explain the role of InnoDB redo logs and undo logs.Apr 15, 2025 am 12:16 AM

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

What are the key metrics to look for in an EXPLAIN output (type, key, rows, Extra)?What are the key metrics to look for in an EXPLAIN output (type, key, rows, Extra)?Apr 15, 2025 am 12:15 AM

Key metrics for EXPLAIN commands include type, key, rows, and Extra. 1) The type reflects the access type of the query. The higher the value, the higher the efficiency, such as const is better than ALL. 2) The key displays the index used, and NULL indicates no index. 3) rows estimates the number of scanned rows, affecting query performance. 4) Extra provides additional information, such as Usingfilesort prompts that it needs to be optimized.

What is the Using temporary status in EXPLAIN and how to avoid it?What is the Using temporary status in EXPLAIN and how to avoid it?Apr 15, 2025 am 12:14 AM

Usingtemporary indicates that the need to create temporary tables in MySQL queries, which are commonly found in ORDERBY using DISTINCT, GROUPBY, or non-indexed columns. You can avoid the occurrence of indexes and rewrite queries and improve query performance. Specifically, when Usingtemporary appears in EXPLAIN output, it means that MySQL needs to create temporary tables to handle queries. This usually occurs when: 1) deduplication or grouping when using DISTINCT or GROUPBY; 2) sort when ORDERBY contains non-index columns; 3) use complex subquery or join operations. Optimization methods include: 1) ORDERBY and GROUPB

Describe the different SQL transaction isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable) and their implications in MySQL/InnoDB.Describe the different SQL transaction isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable) and their implications in MySQL/InnoDB.Apr 15, 2025 am 12:11 AM

MySQL/InnoDB supports four transaction isolation levels: ReadUncommitted, ReadCommitted, RepeatableRead and Serializable. 1.ReadUncommitted allows reading of uncommitted data, which may cause dirty reading. 2. ReadCommitted avoids dirty reading, but non-repeatable reading may occur. 3.RepeatableRead is the default level, avoiding dirty reading and non-repeatable reading, but phantom reading may occur. 4. Serializable avoids all concurrency problems but reduces concurrency. Choosing the appropriate isolation level requires balancing data consistency and performance requirements.

MySQL vs. Other Databases: Comparing the OptionsMySQL vs. Other Databases: Comparing the OptionsApr 15, 2025 am 12:08 AM

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

How does MySQL index cardinality affect query performance?How does MySQL index cardinality affect query performance?Apr 14, 2025 am 12:18 AM

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

MySQL: Resources and Tutorials for New UsersMySQL: Resources and Tutorials for New UsersApr 14, 2025 am 12:16 AM

The MySQL learning path includes basic knowledge, core concepts, usage examples, and optimization techniques. 1) Understand basic concepts such as tables, rows, columns, and SQL queries. 2) Learn the definition, working principles and advantages of MySQL. 3) Master basic CRUD operations and advanced usage, such as indexes and stored procedures. 4) Familiar with common error debugging and performance optimization suggestions, such as rational use of indexes and optimization queries. Through these steps, you will have a full grasp of the use and optimization of MySQL.

Real-World MySQL: Examples and Use CasesReal-World MySQL: Examples and Use CasesApr 14, 2025 am 12:15 AM

MySQL's real-world applications include basic database design and complex query optimization. 1) Basic usage: used to store and manage user data, such as inserting, querying, updating and deleting user information. 2) Advanced usage: Handle complex business logic, such as order and inventory management of e-commerce platforms. 3) Performance optimization: Improve performance by rationally using indexes, partition tables and query caches.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools