• 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
Hard clang crash in Xcode 4.6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hard clang crash in Xcode 4.6


  • Subject: Hard clang crash in Xcode 4.6
  • From: Jean-Denis Muys <email@hidden>
  • Date: Fri, 08 Feb 2013 11:30:09 +0100

Hi,

I have this build failure:

clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.1
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/cv/tw4r4vx93vl4dtdtl_5869g00000gp/T/UriDispatcherLibTests-Za5OKO.mm
clang: note: diagnostic msg: /var/folders/cv/tw4r4vx93vl4dtdtl_5869g00000gp/T/UriDispatcherLibTests-Za5OKO.sh
clang: note: diagnostic msg: 

********************
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254

Which looks like a hard clang crash. Can somebody try to reproduce that crash? Here is a reduction source code (objective-C++ code):


#include <map>
#include <string>

std::string NSString2String(NSString *from)
{
    const char *cfrom = [from UTF8String];
    std::string result(cfrom);
    return result;
}

void NSDictionary2stringMap(NSDictionary *from, std::map<std::string,std::string>* to)
{
    for (auto item:from) {    // replace auto with id, to stop clang from crashing
        std::string key = NSString2String(item);
        std::string value = NSString2String(from[item]);
        (*to)[key] = value;
    }
}

The "auto" type declaration that crashes clang is a new C++11 feature, but clang seems to crash when compiling for C++98 too (instead of reporting an error).

So is this some gremlin in my machine or some actual clang bug?

Jean-Denis


 _______________________________________________
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: Hard clang crash in Xcode 4.6
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Re: llvm-gcc and clang's assembly language
  • Next by Date: Re: Hard clang crash in Xcode 4.6
  • Previous by thread: Re: Getting code completion to work for external build project?
  • Next by thread: Re: Hard clang crash in Xcode 4.6
  • Index(es):
    • Date
    • Thread