This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Pre-loading application memory



Hi, I was wondering if anyone could provide some insight as to how I could pre-load my entire application's memory heap with predefined values, like 0xDEADBEEF for example. I'm interested in doing this on gcc-3.0 x86 and gcc-psion-2.9 (symbian).


I'm trying to track down some elusive "invalid floating point operation" exceptions in a large application. This exception (I believe) is caused when a signal-NaN float (SNaN) is an operator to a floating point instruction. I'm assuming the root cause is there are some uninitialized floats laying about. If I can pre-load my application's heap with nothing but SNaN then I should be able to reliably reproduce the bug and trap it on my development system, and find the unitialized floats faster. It's a very large app, and line checking all these floats isn't getting me anywhere...

Any suggestions would be appreciated. Thanks!

-robert


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]