在 dll 中使用 std::stringstream 时的 AV

AV when using std::stringstream in dll

当我使用 std::stringstream 并在 dll 中调用 << 运算符时,我遇到了问题。调用此操作员后,我的应用程序在关闭时报告访问冲突。

在我的测试项目中有一个 exe 和一个 dll。对于这两个选项 "link with dynamic RTL" 都是活动的。从 exe 中调用 dll 的以下函数:

void __stdcall Test(void)
{
    ss.str();
    ss << 1;
}

我在QC里找到了一个这样的报告: qc.embarcadero.com/wc/qcmain.aspx?d=37491

是否有任何关于此问题或解决方法的更新信息? 不幸的是,禁用 RTL 的动态链接对我来说不是一个选项。

我可以用 C++ Builder XE6 和 XE7 的行为重现这个

问候 KD

Embarcadero 提供了解决此问题的方法:

http://edn.embarcadero.com/article/39758#RADStudio2010ReleaseNotes-VCL%2FRTLNotes