ChingChang Hsiao wrote:
> I can't reply in my system, so I create the problem description again.
>
> I miss one source code line "char tempString[1024];"in the last email. The
> code dump happened after 4 days' run in a test script not immediately. The
> SQLITE statements seem to be ok. Could be
I can't reply in my system, so I create the problem description again.
It seems it's not the problem of sprintf. If it comes from sprintf array size,
the core dump will be like this " in __stack_chk_fail () from /lib/libc.so.6".
The code dump happened after 4 days' run in a test script, not
I can't reply in my system, so I create the problem description again.
I miss one source code line "char tempString[1024];"in the last email. The
code dump happened after 4 days' run in a test script not immediately. The
SQLITE statements seem to be ok. Could be a performance issue?
On Wed, Nov 2, 2011 at 2:57 AM, Teg wrote:
> What happens if you replace all the sprinfs with some simple inserts
> inserted directly into vector?
>
> dbStatements.push_back("INSERT INTO...");
>
Since you need integers and floats in your strings, you can use
std::ostringstream
Hello ChingChang,
How big is tempString? What kind of type is it? I wonder if you're
trashing the stack with the sprintf.
What happens if you replace all the sprinfs with some simple inserts
inserted directly into vector?
dbStatements.push_back("INSERT INTO...");
You need to simplify
On 1 Nov 2011, at 11:09pm, ChingChang Hsiao wrote:
> dbStatements.push_back( "COMMIT;" );
>
> // populate the DB
> vector::iterator dbStatementsIter;
> SqlQuery oper_db(operDatabase, __FILE__, __LINE__);
> for ( dbStatementsIter = dbStatements.begin(); dbStatementsIter !=
>
Do you know why it goes to core dump?
ChingChang
The source code is shown as below,
vector dbStatements;
dbStatements.push_back( "BEGIN TRANSACTION;" );
for ( int x = 0; x < 10; x++ ) {
sprintf( tempString,
"update utilization_table set utilization=%5.2f,sample=%d where
7 matches
Mail list logo