小编kza*_*eli的帖子

boost/rapidxml解析崩溃

我们在pub/sub代理实现中使用boost/rapidxml进行XML解析,对于某个XML有效负载,代理崩溃了.

为了消除尽可能多的变量,我实现了一个只执行XML解析的简短测试程序,崩溃类似.

我的简短测试程序在这里找到:

#include <stdio.h>       // printf
#include <unistd.h>      // read
#include <sys/types.h>   // open
#include <sys/stat.h>    // open
#include <fcntl.h>       // open
#include <errno.h>       // errno
#include <string.h>      // strerror
#include "rapidxml.hpp"
#ifdef LONG_RAPIDXML_NAME_SPACE
// boost version >= 1.45
using namespace boost::property_tree::detail::rapidxml;
#else
// boost version <= 1.44
using namespace rapidxml;
#endif
/* ****************************************************************************
*
* xmlTreePresent -
*/
static void xmlTreePresent(xml_node<>* nodeP, std::string indent, int depth = 0)
{
    static int callNo = 0;
    ++callNo;
    if(nodeP == NULL) …
Run Code Online (Sandbox Code Playgroud)

c++ boost rapidxml

1
推荐指数
1
解决办法
1013
查看次数

标签 统计

boost ×1

c++ ×1

rapidxml ×1