2

I have a compliacted C and C++ code with heavy mathematics calculations. I use intel C++ - the latest update to compile. I use optimizatons and the application does not give the expected answer. After a long time I managed to reduce the problem to getting EXCEPTION_FLT_STACK_CHECK 0xc0000092. If I compile without optimization - The program work as expected.

It's a single threaded code on Winxp64 (the application is 32-bit).

MSVC 2010 gives the same results with Debug or Release builds. (I mean Good=Expected results)

Can someone help me where to look? Currently I suspect a compiler bug - since I have no asmsembly code of my own, Only compiler-generated code. I looked at the assembler and it's SSE/x87 mixed code.

I'm looking for directions to look for. Since I'm on trial version (of the intel compiler) I don't have much time for investigations.

I will try to use /Qfp-stack-check tommorow to see if i can find something wrong with my code.

* Update * I just found a bug in intel compiler. A function returns a value on st(0) but the calling function does not remove it. That way i get the stack exception. Workaround is to use the returned value even that i dont always need it. I will try to reproduce it with code that I can share.

After this workaround intel was faster 35% then msvc2010 on the same code. - That's the main result.

mordy

Mordy Shahar
  • 107
  • 8
  • 2
    Post the code centering around the IP where the `EXCEPTION_FLT_STACK_CHECK` occurred. – Brian Cain Dec 11 '12 at 18:46
  • I'm not sure I will be able to do it. I'm just looking for directions and probable causes. – Mordy Shahar Dec 11 '12 at 19:06
  • 1
    Are you using borland c++ builder by chance? if so, http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6563244 – crh225 Dec 11 '12 at 20:00
  • You can post your solution as an answer and accept it, so this question doesn't show up as unanswered. That's better than editing the solution into the question. – Peter Cordes Aug 04 '15 at 01:45

1 Answers1

2
  • Update * I just found a bug in intel compiler. A function returns a value on st(0) but the calling function does not remove it. That way i get the stack exception. Workaround is to use the returned value even that i dont always need it.
Mordy Shahar
  • 107
  • 8