I am trying to reverse an ELF (C++) binary using IDA v6.95. Decompiler complains that the call analysis is failing. I am attaching the IDB database. What can I do to fix the IDB?


Call analysis failed at: 08048B19

The instruction at that location:

call __ZNSaIcEC1Ev ; std::allocator<char>::allocator(void)

Now decompile this function:

int __stdcall std::allocator<char>::allocator(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) {
    return std::allocator<char>::allocator(a1, a2, a3, a4, a5, a6, a7, a8);

Notice that hexrays has the function signature wrong, it expects too many arguments. After changing it to:

void __stdcall std__allocator_char___allocator()

The main functon will decompile.

Note that hexrays doesn't accept the template arguments <char> and namespace specifier std:: in a function prototype. Since changing the prototype does not rename the function you can replace the function name with any name, as long as ida considers it valid.

| improve this answer | |
  • Doesn't work for me. Can you please share your IDB? – Holmes.Sherlock Jun 6 '17 at 4:11
  • ah, i made a typo: the function signature should be: void __stdcall std__allocator_char___allocator() without the < and > – Willem Hengeveld Jun 6 '17 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.