CrossDevelopment + Optimization + stringstream -> crash
CrossDevelopment + Optimization + stringstream -> crash
- Subject: CrossDevelopment + Optimization + stringstream -> crash
- From: Christian Rüegg <email@hidden>
- Date: Fri, 17 Jun 2005 13:22:43 +0200
An application crashes when the cross development 10.2.8 sdk, stringstream
and optimization is used.
CrashResult: Executable ³CrossPlatformTest² has exited due to signal 10
(SIGBUS).
Configuration: 10.3.9 with Xcode 1.5 (on 3 Macs)
1. Create a "C++ Tool" Template project
2. Change the "Cross-Develop Target SDK" to "10.2.8" (Project Info -> Tab
General)
3. Build and run the "Deployment" target, the application will crash
4. Change the "Optimization Level" of the Deployment Target from "Fastest
Smallest -Os" to "None"
5. Clean the target, build and run the "Deployment" target again and it will
run.
What I'm doing wrong? Thanks,
Christian
// This app will crash in deployment style
// Project Settings:
// MACOSX_DEPLOYMENT_TARGET = 10.2;
// SDKROOT = /Developer/SDKs/MacOSX10.2.8.sdk;
//
// Target Development:
// GCC_OPTIMIZATION_LEVEL = -O0 -> OK
//
// Target Deployment:
// GCC_OPTIMIZATION_LEVEL = -Os -> crash
// Environment
// XCode 1.5
// OS X: 10.3.9
#include <iostream>
#include <sstream>
using namespace std;
int main (int argc, char * const argv[])
{
cout << "Hello, World!" << endl;
for(int i = 0; i < 3; ++i) {
stringstream ss;
ss << i;
cout << "i from a stringstream: " << ss.str() << endl;
}
return 0;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden