COMException:传递给系统调用的数据区域太小

发布于 2024-07-08 03:16:26 字数 449 浏览 7 评论 0原文

在创建 Windows Workflow Foundation 运行时实例时,偶尔会出现本文标题中定义的消息以及 HResult 0x8007007A。

错误文本非常不言自明,并且在 Workflow Foundation 程序集上使用 Reflector,我已将问题范围缩小到 ADVAPI32.DLL 中的以下调用之一。

设置内核对象安全 恢复自我 开放进程令牌 GetKernelObjectSecurity

我已经消除了 RevertToSelf(),因为它不需要输入参数,因此无法传递太小的数据结构。

GetKernelObjectSecurity 将结构作为输入,这可能是错误的,但此错误是暂时的,没有明显的再现步骤。

我认为它与应用程序中某处的内存管理有关,但无法找到 HResult 含义的良好定义。 谁能指出这个 HResult 的良好定义的方向?

The message defined in the title of this post, along with the HResult 0x8007007A occasionally occurs while creating an instance of a Windows Workflow Foundation Runtime.

The error text is pretty self explanitory, and using Reflector over the Workflow Foundation assemblies I have narrowed down the problem to one of the following calls in ADVAPI32.DLL.

SetKernelObjectSecurity
RevertToSelf
OpenProcessToken
GetKernelObjectSecurity

I have eliminated RevertToSelf() because it takes no input parameters, so can't be passing in a data structure that is too small.

GetKernelObjectSecurity takes as input a structure, and this could possibly be wrong, but this error is transient, with no apparent reproduction steps.

I think have a feeling it has to do with memory management somewhere in the app, but can't track down a good definition of what the HResult means. Can anyone point me in the direction of a good definition of this HResult?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

z祗昰~ 2024-07-15 03:16:26

我可以提供一些猜测。

正如你所说,错误消息听起来很解释性。

OpenProcessToken 似乎不太可能成为候选者,因为您从未直接向其传递内存区域的大小

GetKernelObjectSecurity 或 SetKernelObjectSecurity 似乎是不错的选择。 我认为您没有直接调用它们,因此您不知道使用什么逻辑将内存区域传递到这些函数中。 是否有可能,例如,您正在使用的库之一中有一个用于安全描述符的固定大小缓冲区,并且一旦缓冲区耗尽,它就会占用缓冲区的剩余大小(例如零)并将其传递给您的 GetKernelObjectSecurity ?

(一般来说,我预计它更有可能来自像这样的 WF 运行时实现错误,而不是操作系统错误。)

I can provide some speculation.

As you say, the error message sounds pretty explanatory.

OpenProcessToken seems less likely as a candidate, since you never directly pass it the size of a memory area.

GetKernelObjectSecurity or SetKernelObjectSecurity seem like good candidates. I take it you are not calling them directly, so you don't know what logic is being used to pass a region of memory into those functions. Is it possible that e.g. there is a fixed size buffer for security descriptors in one of the libraries you are using, and that once the buffer is exhausted, it takes the remaining size of the buffer (e.g. zero) and passes it into GetKernelObjectSecurity for you?

(In general, I would expect it more likely to be from a WF runtime implementation bug like this, and not e.g. an OS bug.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文