X86-64的Windows下多少推入一个32位堆栈上的异常? [英] How much is pushed onto a 32-bit stack under Windows x86-64 on an exception?

查看:285
本文介绍了X86-64的Windows下多少推入一个32位堆栈上的异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此这个问题,我给的并行语言,我已经实现了一些背景。编译器生成本地X86-32 code。

In this this question, I give some background on a parallel language I have implemented. The compiler generates native x86-32 code.

一个关键实施决策是从堆为每个函数(调用)分配堆栈空间。这允许递归,直到你用完了虚拟机,并​​启用了词法作用域仙人掌栈甚至嵌套并行儿童等。

A key implementation decision is to allocate stack space from the heap for every function (call). This allows for recursion until you run out of VM, and enables a cactus stack for lexical scopes even for nested parallel children, etc.

编译器的code生成器可以计算出有多少堆栈空间是由函数本身需要;这是混乱,但简单,它已经不那么好。有来自OS调用堆栈的需求没有问题;我的函数不作任何(如果是这样的需要,code切换到一个标准的大筹码,莫非是系统调用,然后再切换回)。是在例外和异步调用的面部安全,它增加了一个令人震惊的常数,presently约500字节到由函数需要的堆栈空间,旨在涵盖的x86-32完整上下文保存,从窗口32的经验校准

The compiler's code generator can compute how much stack space is needed by the function itself; that's messy but straightforward and it already does that well. There's no problem with stack demands from OS calls; my functions don't make any (if that's needed, the code switches to a standard "big stack", does the system calls, and then switches back). To be safe in the face of exceptions and asynchronous calls, it adds an egregious constant, presently about 500 bytes to that stack space needed by a function, intended to cover a x86-32 complete context save, calibrated from windows 32 experience.

这语言和非同步化异常处理上的x86-32系统的所有工作都。我们有上运行x86-64系统这32位实现偶然问题。我怀疑堆栈溢出异常。

This language and the asynch exception handling all work great on x86-32 systems. We have occasional problems running this 32 bit implementation on x86-64 systems. I suspect a stack overflow on an exception.

问题是,有多少可以在Windows 64机器上运行我的32位实现当Windows推入堆栈的(被零除)硬件异常或StopThread电话,?我紧张的Windows推一个完整的x86-64的背景下,这是不是一个X86-32环境的方式做大。有谁知道?有没有回答这一章和诗句文档?

The question is, how much can Windows push onto a stack for a (divide by zero) hardware exception, or a StopThread call, when running my 32 bit implementation on a Windows 64 box? I'm nervous that Windows pushes a complete x86-64 context, which is way bigger than an x86-32 context. Does anybody know? Is there a document that answers this chapter-and-verse?

我即将准备好运行一些动态试验看看。

I'm about ready to run some dynamic experiments to see.

推荐答案

同样的堆栈背景下,如果你在x64盒说起模拟X32的环境,那么它完全尺寸上X32同样这在我的情况是0x3E0字节对齐到DWORD。

The same stack context, if you talking about emulated x32 environment on a x64 box, then its exactly the same size as on a x32 which in my case is 0x3E0 bytes aligned to DWORD.

模拟上WOW64过程一切都应该被处理以完全相同的,至少是X32计数器组成部分,当涉及到的功能,现在如果你依靠TEB32用于检查堆栈这是一个不同的情况下,你可以在本文中看到

Everything emulated on WOW64 process should be handled exactly the same at is x32 counter part at least when it comes to functionality, now if you rely on TEB32 for inspect the stack that is a different case, as you can see on this article:

http://www.dumpanalysis.org/blog/index.php/2009/07/07/raw-stack-dump-of-wow64-process/

可悲的是没有一个正式的文件我能找到关于你的问题。

Sadly there isn't an official paper i could find regarding your question.

另外这里是一个有趣的文章,你可以阅读有关WOW64仿真过程:

Also here is an interesting paper you can read regarding WOW64 emulated process:

http://blog.rewolf.pl/blog/?p=102 #.UBTmHaBEUXw

最后,如果你的意思是有一个堆栈取得函数来处理异常可以无后顾之忧地完成,我可以在这里看到的跟踪日志后的例外是触发,如何在堆栈进行了一些功能,接收异常矿SEH之前,它似乎是某种Avast的引擎或者一些间谍软件,我不能究任何可懂得模块,因为函数后传中,它是dealloced。

Finally if what you meant is to have an stack made function to handle exceptions it can be done without any worry, i can see here on trace logs after the exception is trigger, how some function made in stack, is receiving the exception before the mine SEH, it seems to be some kind of Avast engine or maybe some spyware, i cant trace it to any knowed module since after the function pass, it is dealloced.

希望我已经帮助的东西。

Hope that i've helped on something.

PS:如果你可以张贴一些额外的信息,也许堆栈日志和你的函数来处理异常,我们可以帮助更多的

PS: If you can post some extra info maybe the stack log and your function to handle exceptions, we could help more.

这篇关于X86-64的Windows下多少推入一个32位堆栈上的异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆