当我在Perl中打印到stderr时,为什么IIS崩溃? [英] Why does IIS crash when I print to stderr in Perl?
问题描述
这让我发疯了.我们有IIS(6),Windows 2008和ActiveState Perl 5.10.由于某种原因,无论何时我们发出警告或鲤鱼,它最终都会破坏应用程序池.当然,这很重要,因为这意味着我们的错误实际上会引起问题.
This has been driving me crazy. We have IIS (6) and windows 2008 and ActiveState Perl 5.10. For some reason whenever we do a warn or a carp it eventually corrupts the app pool. Of course, that's a pretty big deal since it means that our errors actually cause problems.
这是在Perl(5.8)和Windows(2003)和IIS(5)的早期版本中发生的.无论如何,基本上,我放入carp
或warn
并得到一条错误消息,然后出现一些垃圾文本.有什么想法吗?
This happened with the previous version of Perl (5.8) and Windows (2003) and IIS (5.) Anyway, basically I put in a carp
or a warn
and I get an error message and then some garbage text. Any thoughts?
推荐答案
检查以确保IIS和perl DLL与相同版本的C运行时库链接. (使用depends.exe或dumpbin/depends).
Check to make sure that IIS and the perl DLL are linked with the same version of the C runtime library. (Use depends.exe or dumpbin /dependents).
展开:问题可能是IIS将其FILE *表放在一个位置,而perl DLL认为它将在稍有不同的位置.当perl找到stderr句柄时,它将随机内存视为文件句柄,结果可预测.
To expand: the problem may be that IIS has its FILE* table in one place, and the perl DLL thinks it's going to be in a slightly different place. When perl goes to find the stderr handle, it treats random memory as a file handle, with predictable results.
这篇关于当我在Perl中打印到stderr时,为什么IIS崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!