“坏指针”某些 PC 上有静态缓冲区
我有一个命令行应用程序,可以将文件转换为我的格式,还有一个插件,可以让另一个应用程序读取我的格式,但该插件在某些电脑上有一些奇怪的问题。
命令行应用程序和插件共享相同的代码来访问文件,并且 CLI 在所有测试的 PC 上运行,但该插件在某些 PC 上会出现一些严重的问题,并且始终具有相同的操作。
我已经尝试过调试它,但它没有任何意义,我有一些静态缓冲区被声明为“#pragma omp threadprivate”,因为它们被多个线程使用,其中一些在两台 Windows XP PC 上是“bad ptr”,但在两台 Windows XP PC 上则不然windows 7,怎么会发生这种情况?
I have a command line application that converts files to my format and a plug-in which enables another application to read my format but the plug-in has some weird problems on some PCs.
The command line application and plug-in share the same code for accessing the files and the CLI works on all tested PCs but the plug-in gives some serious problems on some PCs and always with the same operations.
I already tried debugging it but it just makes no sense, I have some static buffers which are declared "#pragma omp threadprivate" as they are used by multiple threads and some of these are "bad ptr" on two windows XP PCs but not on windows 7, how can this happen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定这是 Windows XP 与 Windows 7 的问题。我所能做的似乎是时间问题而不是操作系统引起的问题。您的应用程序上运行哪种线程同步
Not sure it is Windows XP vs Windows 7 Issue. All i can seems to be timing issue rather os causing the issue though. What kind thread synch you are running on your application