Hi everyone,
I've run into problem with GCCE compiler (the one coming with Symbian SDKs - csl-arm-2005Q1C).
My application was occasionally closing with KERN-EXEC 3 and I managed to get minimal code to reproduce:
Code:
#include <e32def.h>
#include <vector>
static void f1(bool, unsigned long)
{
int* i = new int;
}
struct A
{
virtual void f2(const void* p,
const std::vector<int>& v1,
const std::vector<int>& v2,
bool b,
unsigned long n) =0;
};
struct B
: public A
{
void f2(const void* p,
const std::vector<int>& v1,
const std::vector<int>& v2,
bool b,
unsigned long n)
{
std::vector<int> l = v1;
f1(b, n);
}
};
GLDEF_C TInt E32Main()
{
std::vector<int> v;
A* a = new B;
a->f2(NULL, v, v, false, 1000);
return 0;
}
It should be built against OpenC (\Epoc32\include\stdapis) with 5th Edition 1.0 SDK.
You can download the test package from here:
http://qarea.com/set/test_gcce.zip
It also includes code to reproduce with estlib+STLport (just uncomment an appropriate section in the MMP file).
Notes:
- This only reproduces with -O2 optimization in release configuration
- This doesn't reproduce with WINSCW or RVCT builds
- I haven't tested with newer versions of GCCE since they are not officially supported by Nokia
Thanks for assistance,
Sergey.