2

I am running ltrace -c -C ./a.out to do some profiling of my an application but its giving error as follows:

Error: call nesting too deep!

my code is very simple as

void StrinstrTest(long loop/*4000*/)
{

        std::string s("SS");
        double price = 90;
        double b = 90;
        double a= 90;
        int msize = 19;
        std::string first("FIRST");
        for(int i = 0 ; i<loop; i++)
        {
                std::stringstream ss;
                ss << "Hi "
                 << 'D' << s << 'D' << price
                 << 'D' << msize << endl;
                {
                     ss << 'D' << first << 'D'
                     << b<< 'D' << a;


                }
                string s = ss.str();
        }
}
CrazyC
  • 1,840
  • 6
  • 39
  • 60

1 Answers1

0

You must be using an old version of ltrace.

It works as expected with recent versions (at least 0.7.3 and up).

Juan Cespedes
  • 1,299
  • 12
  • 27