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

修正 hook 时遇到偶发的段错误 #4

Closed
wants to merge 1 commit into from
Closed

修正 hook 时遇到偶发的段错误 #4

wants to merge 1 commit into from

Conversation

coolxv
Copy link

@coolxv coolxv commented May 9, 2018

地址可能在页边界

@coolxv coolxv closed this May 9, 2018
@caikelun
Copy link
Collaborator

caikelun commented May 9, 2018

@coolxv 请问你是实际遇到过这个问题引起的崩溃吗?比如把内存地址打印出来看一下,发现确实跨越了两个页?我之前的理解是:正常情况下程序逻辑里的函数指针变量会自动对齐到4或8字节边界,GOT加载地址也至少会对齐到4或8字节边界。但是是否存在异常情况确实说不好。。但是这个修改应该是无害的,我根据你的修改提交了: f139e19 。再次感谢~

@caikelun
Copy link
Collaborator

caikelun commented May 9, 2018

@coolxv overview 里的示例代码我们就暂时不修改了哈,那个主要是用来配合文章演示用的,用固定的偏移地址来定位GOT的,应该能确定不会跨页。

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

Successfully merging this pull request may close these issues.

2 participants