Optimising and crashes

BlitzMax Forums/Brucey's Modules/Optimising and crashes

Brucey(Posted 2011) [#1]
So there I was, working on wxMax on Mac, having recently rebuilt everything for 2.9.1, and when I try to run some samples, they all crash at various places.

For a while I thought I'd broken the build somewhere, and somehow built incompatible libs.

But eventually I discovered that using any optimisation (-O2, -O3, etc) for the BlitzMax modules, resulted in the application crashing. Going with the default (-Os) allowed the apps to run as expected.

The wxWidgets static libs do not have any -O compiler options. I dunno what the default is then?

It's a bit strange that it seems to be optimising out code that is actually required to run!

Oh well.. lesson learned, I guess?

Now I just need to see if my BMK supports optional (app/module) optimisation...


GW(Posted 2011) [#2]
Being able to define opt level flags in a module would be awesome.
Most everything works at -O3 except the image libs. its kinda a pain to segregate them out when you do a total rebuild.