S
Scott Nesbitt
The following code cores on AIX 4.3.3 w/ VisualAge 5.0.2 and AIX 5.1
with VisualAge 6.0, but works fine on HP/UX, Solaris, and Linux.
#include <iostream>
#include <vector>
typedef struct WORK_ORDER_STRU
{
char field1[1024];
} TEST_STRU;
typedef std::vector<WORK_ORDER_STRU> Test_Vector;
int main()
{
Test_Vector fooStorage;
WORK_ORDER_STRU foo;
for (unsigned int i = 0; i < 50000; ++i)
{
fooStorage.push_back(foo);
}
}
$ xlC test.cpp
$ ./a.out
Abort(coredump)
$
Any suggestions? I was almost positive this was a bug in in
VisualAge, but then I installed gcc/g++ and got the same result. Now
I suspect a memory allocation bug in AIX.
Thanks,
Scott Nesbitt
with VisualAge 6.0, but works fine on HP/UX, Solaris, and Linux.
#include <iostream>
#include <vector>
typedef struct WORK_ORDER_STRU
{
char field1[1024];
} TEST_STRU;
typedef std::vector<WORK_ORDER_STRU> Test_Vector;
int main()
{
Test_Vector fooStorage;
WORK_ORDER_STRU foo;
for (unsigned int i = 0; i < 50000; ++i)
{
fooStorage.push_back(foo);
}
}
$ xlC test.cpp
$ ./a.out
Abort(coredump)
$
Any suggestions? I was almost positive this was a bug in in
VisualAge, but then I installed gcc/g++ and got the same result. Now
I suspect a memory allocation bug in AIX.
Thanks,
Scott Nesbitt