• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CrossDevelopment + Optimization + stringstream -> crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: CrossDevelopment + Optimization + stringstream -> crash
      • From: Michael Babin <email@hidden>
  • Prev by Date: Fix & Continue not working
  • Next by Date: Re: Get access to specified frameworks in custom script phase
  • Previous by thread: Re: Fix & Continue not working
  • Next by thread: Re: CrossDevelopment + Optimization + stringstream -> crash
  • Index(es):
    • Date
    • Thread