- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在构造函数中面临损坏。有人可以帮助我吗?
2873 int rc = _db->fetch_custom_sql_query(rwc.GetQueryName(),selectConstruct, HandleCustomSqlQueryResponse, (void*)&holder);
(gdb) p selectConstruct
$1 = {distinct = false, colsToBeSelected = {cols = {<std::_Vector_base<dbCol, std::allocator<dbCol> >> = {_M_impl = {<std::allocator<dbCol>> = {<__gnu_cxx::new_allocator<dbCol>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}}, tableName = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x3dd36f32d8 ""}}, where = {whereExprs = {<std::_Vector_base<whereExpr, std::allocator<whereExpr> >> = {_M_impl = {<std::allocator<whereExpr>> = {<__gnu_cxx::new_allocator<whereExpr>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, ops = {<std::_Vector_base<adjoinOperator, std::allocator<adjoinOperator> >> = {_M_impl = {<std::allocator<adjoinOperator>> = {<__gnu_cxx::new_allocator<adjoinOperator>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, namespaceCounts = {<std::_Vector_base<unsigned int, std::allocator<unsigned int> >> = {_M_impl = {<std::allocator<unsigned int>> = {<__gnu_cxx::new_allocator<unsigned int>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, useAsON = false}, groupBy = {cols = {<std::_Vector_base<dbCol, std::allocator<dbCol> >> = {_M_impl = {<std::allocator<dbCol>> = {<__gnu_cxx::new_allocator<dbCol>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}}, orders = {orders = {<std::_Vector_base<orderingTerm, std::allocator<orderingTerm> >> = {_M_impl = {<std::allocator<orderingTerm>> = {<__gnu_cxx::new_allocator<orderingTerm>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}}, limit = -1}
(gdb) stepi
0x00007ffff0df9b49 2873 int rc = _db- >fetch_custom_sql_query(rwc.GetQueryName(),selectConstruct, HandleCustomSqlQueryResponse, (void*)&holder);
(gdb) stepi
0x00007ffff0df9b50 2873 int rc = _db->fetch_custom_sql_query(rwc.GetQueryName(),selectConstruct, HandleCustomSqlQueryResponse, (void*)&holder);
(gdb) stepi
0x00007ffff0df9b53 2873 int rc = _db->fetch_custom_sql_query(rwc.GetQueryName(),selectConstruct, HandleCustomSqlQueryResponse, (void*)&holder);
(gdb) stepi
0x00007ffff0df9b5b 2873 int rc = _db->fetch_custom_sql_query(rwc.GetQueryName(),selectConstruct, HandleCustomSqlQueryResponse, (void*)&holder);
(gdb) stepi
0x00007ffff0df9b5e 2873 int rc = _db->fetch_custom_sql_query(rwc.GetQueryName(),selectConstruct, HandleCustomSqlQueryResponse, (void*)&holder);
(gdb) stepi
0x00007ffff0da8000 in simpleSelectConstruct::simpleSelectConstruct () from /opt/OV/lbin/OpsAgt/libDMLSegment.so
(gdb) stepi
simpleSelectConstruct::simpleSelectConstruct (this=0x7fffdbffdbb0) at /home/parakkal/COLLABNET_11.10_NEW/hpsw-oa/AgentFramework/cpp/src/include/OpsAgt/DBsupports.h:170
170 class simpleSelectConstruct{
/include/OpsAgt/DBsupports.h:170
170 class simpleSelectConstruct{
(gdb) p *this
$2 = {distinct = false, colsToBeSelected = {cols = {<std::_Vector_base<dbCol, std::allocator<dbCol> >> = {_M_impl = {<std::allocator<dbCol>> = {<__gnu_cxx::new_allocator<dbCol>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}}, tableName = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x0}}, where = {whereExprs = {<std::_Vector_base<whereExpr, std::allocator<whereExpr> >> = {_M_impl = {<std::allocator<whereExpr>> = {<__gnu_cxx::new_allocator<whereExpr>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, ops = {<std::_Vector_base<adjoinOperator, std::allocator<adjoinOperator> >> = {_M_impl = {<std::allocator<adjoinOperator>> = {<__gnu_cxx::new_allocator<adjoinOperator>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x3dd34bd704, _M_end_of_storage = 0x7ffff7ca52b0}}, <No data fields>}, namespaceCounts = {<std::_Vector_base<unsigned int, std::allocator<unsigned int> >> = {_M_impl = {<std::allocator<unsigned int>> = {<__gnu_cxx::new_allocator<unsigned int>> = {<No data fields>}, <No data fields>}, _M_start = 0x7fffdbffe910, _M_finish = 0x6, _M_end_of_storage = 0x4e}}, <No data fields>}, useAsON = false}, groupBy = {cols = {<std::_Vector_base<dbCol, std::allocator<dbCol> >> = {_M_impl = {<std::allocator<dbCol>> = {<__gnu_cxx::new_allocator<dbCol>> = {<No data fields>}, <No data fields>}, _M_start = 0x7fffdbffe910, _M_finish = 0x0, _M_end_of_storage = 0x7ffff6f54d1f}}, <No data fields>}}, orders = {orders = {<std::_Vector_base<orderingTerm, std::allocator<orderingTerm> >> = {_M_impl = {<std::allocator<orderingTerm>> = {<__gnu_cxx::new_allocator<orderingTerm>> = {<No data fields>}, <No data fields>}, _M_start = 0x7ffff7ca52b0, _M_finish = 0x7ffff6f5584d, _M_end_of_storage = 0x5509f0}}, <No data fields>}}, limit = -603988688}
(gdb) stepi
如果您看到上面的限制在构造函数中已损坏,_M_start、_M_finish 和 _M_end_of_storage 也是如此。 simpleSelectConstruct
类显示在此处
class simpleSelectConstruct{
public:
DBSupportsInterface simpleSelectConstruct()
{
distinct=false;
limit=-1;
}
bool distinct;
dbCols colsToBeSelected;
string tableName;
whereConstruct where;
dbCols groupBy;
orderBy orders;
int limit;
};
我已将完整信息发布在 https://gcc.gnu.org/ml/gcc-help/2014-08/msg00104.html
最佳答案
(gdb) stepi
0x00007ffff0df9b5e 2873 int rc =
_db->fetch_custom_sql_query(rwc.GetQueryName(),selectConstruct,HandleCustomSqlQueryResponse, (void*)&holder);
(gdb) stepi
0x00007ffff0da8000 in simpleSelectConstruct::simpleSelectConstruct ()
from /opt/OV/lbin/OpsAgt/libDMLSegment.so
(gdb) stepi
simpleSelectConstruct::simpleSelectConstruct (this=0x7fffdbffdbb0)
[SNIP]
(gdb) p *this
[SNIP OUTPUT BEFORE CONSTRUCTOR RUNS]
(gdb) stepi
0x00007ffff0e11892 170 class simpleSelectConstruct{
(gdb) stepi
0x00007ffff0e11894 170 class simpleSelectConstruct{
(gdb) stepi
0x00007ffff0e11896 170 class simpleSelectConstruct{
(gdb) stepi
0x00007ffff0e11898 170 class simpleSelectConstruct{
(gdb) p *this
[SNIP OUTPUT DURING CONSTRUCTOR]
(gdb)
[END OF DEBUGGING SESSION]
我没有看到腐败的证据。我看到你打印出一个未损坏的变量selectConstruct,进入simpleSelectConstruct
构造函数,打印即将构造的simpleSelectConstruct
,做四步,然后打印simpleSelectConstruct
只构建了一半。 (两者都不是 selectConstruct
变量)。您是否尝试等到构造函数完成之后?
当构造函数开始时:
distinct = false
colsToBeSelected =
cols = ..._M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0 ...
tableName = ..._M_p = 0x0 ...
where =
whereExprs = ..._M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0...
ops = ..._M_start = 0x0, _M_finish = 0x3dd34bd704, _M_end_of_storage = 0x7ffff7ca52b0...
namespaceCounts = ..._M_start = 0x7fffdbffe910, _M_finish = 0x6, _M_end_of_storage = 0x4e...
useAsON = false
groupBy =
cols = ..._M_start = 0x7fffdbffe910, _M_finish = 0x0, _M_end_of_storage = 0x7ffff6f54d1f...
orders = ..._M_start = 0x7ffff7ca52b0, _M_finish = 0x7ffff6f5584d, _M_end_of_storage = 0x5509f0...
limit = -603988688
构造函数中的四步之后:
distinct = false
colsToBeSelected =
cols = ..._M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0 ...
tableName = ..._M_p = 0x0...
where =
whereExprs = ..._M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0...
ops = ..._M_start = 0x0, _M_finish = 0x3dd34bd704, _M_end_of_storage = 0x7ffff7ca52b0...
namespaceCounts = ..._M_start = 0x7fffdbffe910, _M_finish = 0x6, _M_end_of_storage = 0x4e...
useAsON = false
groupBy =
cols = ..._M_start = 0x7fffdbffe910, _M_finish = 0x0, _M_end_of_storage = 0x7ffff6f54d1f...
orders = ..._M_start = 0x7ffff7ca52b0, _M_finish = 0x7ffff6f5584d, _M_end_of_storage = 0x5509f0...
limit = -603988688
构造函数显然还没有执行完。它似乎还处于 build 过程的早期阶段。我会假设这四个操作都是假的,然后是 cols
,所以下一步是构造 tableName
。
关于c++ - C++ 构造函数中的损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25314156/
C语言sscanf()函数:从字符串中读取指定格式的数据 头文件: ?
最近,我有一个关于工作预评估的问题,即使查询了每个功能的工作原理,我也不知道如何解决。这是一个伪代码。 下面是一个名为foo()的函数,该函数将被传递一个值并返回一个值。如果将以下值传递给foo函数,
CStr 函数 返回表达式,该表达式已被转换为 String 子类型的 Variant。 CStr(expression) expression 参数是任意有效的表达式。 说明 通常,可以
CSng 函数 返回表达式,该表达式已被转换为 Single 子类型的 Variant。 CSng(expression) expression 参数是任意有效的表达式。 说明 通常,可
CreateObject 函数 创建并返回对 Automation 对象的引用。 CreateObject(servername.typename [, location]) 参数 serv
Cos 函数 返回某个角的余弦值。 Cos(number) number 参数可以是任何将某个角表示为弧度的有效数值表达式。 说明 Cos 函数取某个角并返回直角三角形两边的比值。此比值是
CLng 函数 返回表达式,此表达式已被转换为 Long 子类型的 Variant。 CLng(expression) expression 参数是任意有效的表达式。 说明 通常,您可以使
CInt 函数 返回表达式,此表达式已被转换为 Integer 子类型的 Variant。 CInt(expression) expression 参数是任意有效的表达式。 说明 通常,可
Chr 函数 返回与指定的 ANSI 字符代码相对应的字符。 Chr(charcode) charcode 参数是可以标识字符的数字。 说明 从 0 到 31 的数字表示标准的不可打印的
CDbl 函数 返回表达式,此表达式已被转换为 Double 子类型的 Variant。 CDbl(expression) expression 参数是任意有效的表达式。 说明 通常,您可
CDate 函数 返回表达式,此表达式已被转换为 Date 子类型的 Variant。 CDate(date) date 参数是任意有效的日期表达式。 说明 IsDate 函数用于判断 d
CCur 函数 返回表达式,此表达式已被转换为 Currency 子类型的 Variant。 CCur(expression) expression 参数是任意有效的表达式。 说明 通常,
CByte 函数 返回表达式,此表达式已被转换为 Byte 子类型的 Variant。 CByte(expression) expression 参数是任意有效的表达式。 说明 通常,可以
CBool 函数 返回表达式,此表达式已转换为 Boolean 子类型的 Variant。 CBool(expression) expression 是任意有效的表达式。 说明 如果 ex
Atn 函数 返回数值的反正切值。 Atn(number) number 参数可以是任意有效的数值表达式。 说明 Atn 函数计算直角三角形两个边的比值 (number) 并返回对应角的弧
Asc 函数 返回与字符串的第一个字母对应的 ANSI 字符代码。 Asc(string) string 参数是任意有效的字符串表达式。如果 string 参数未包含字符,则将发生运行时错误。
Array 函数 返回包含数组的 Variant。 Array(arglist) arglist 参数是赋给包含在 Variant 中的数组元素的值的列表(用逗号分隔)。如果没有指定此参数,则
Abs 函数 返回数字的绝对值。 Abs(number) number 参数可以是任意有效的数值表达式。如果 number 包含 Null,则返回 Null;如果是未初始化变量,则返回 0。
FormatPercent 函数 返回表达式,此表达式已被格式化为尾随有 % 符号的百分比(乘以 100 )。 FormatPercent(expression[,NumDigitsAfterD
FormatNumber 函数 返回表达式,此表达式已被格式化为数值。 FormatNumber( expression [,NumDigitsAfterDecimal [,Inc
我是一名优秀的程序员,十分优秀!