Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Kyle Jessup via swift-dev
> Ok I will test with swift 3, but just to avoid any confusion I am not a > developer on PerfectLib. I am! Admittedly, that dictionary contains many obsolete mime type mappings which could be pruned (anyone serving Lotus 1-2-3 files?). However, 816 items is not an absurdly large number so it’s

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
The root cause seems to be the program's stack was simply too small, and not an infinite loop in the type checker. On Linux the default stack size is 8192kb, but at least on my system, I needed to use a minimum of 11884kb. On 03/22/2016 03:35 PM, Rafkind, Jon wrote: FWIW when I compile the swift

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
FWIW when I compile the swift/llvm 2.2 codebase with RelWithDebInfo there is no crash, but in Debug mode there is a crash. I can live with this for now since I will release my tool in RelWithDebInfo anyway. If I have time I will try to find the root cause behind the crash with Debug. On 03/22/2

Re: [swift-dev] Building swift-llvm fails when using build-script to cross compile due to multiple -isysroot arguments being in CFLAGS

2016-03-22 Thread Argyrios Kyrtzidis via swift-dev
> On Mar 22, 2016, at 9:52 AM, Vedant Kumar wrote: > > + swift-dev, Argyrios > > >> On Mar 21, 2016, at 8:06 PM, Andrew Hyatt wrote: >> >> swift-dev, >> >> 5e342aa fixed the CFLAGS issue for swift-llvm and it now compiles fine for >> iOS. >> >> A remnant of the issue persists while build

Re: [swift-dev] Build Error: Relocation R_X86_64_PC32

2016-03-22 Thread William Dillon via swift-dev
WOW! That is fantastic! Thanks for sharing. - Will > On Mar 22, 2016, at 1:36 PM, Ryan Lovelett wrote: > > On Tue, Mar 22, 2016, at 01:26 PM, William Dillon wrote: >> >>> >>> Phew. Well I finally got everything ready to where I could bisect >>> binutils. I won't bore with the details of wha

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Joe Groff via swift-dev
> On Mar 22, 2016, at 1:41 PM, Rafkind, Jon wrote: > > Ok I will test with swift 3, but just to avoid any confusion I am not a > developer on PerfectLib. I was just using that file as a test case for my > application that is based on the swiftc code base. My application is designed > to consu

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
Ok I will test with swift 3, but just to avoid any confusion I am not a developer on PerfectLib. I was just using that file as a test case for my application that is based on the swiftc code base. My application is designed to consume arbitrary swift 2.2 code. If there is a problem with swift 3

Re: [swift-dev] Build Error: Relocation R_X86_64_PC32

2016-03-22 Thread Ryan Lovelett via swift-dev
On Tue, Mar 22, 2016, at 01:26 PM, William Dillon wrote: > >> >> Phew. Well I finally got everything ready to where I could bisect >> binutils. I won't bore with the details of what it took to actually be >> able to bisect binutils (unless someone actually wants to know). > > I would be interest

Re: [swift-dev] Returning more than two scalars from C code

2016-03-22 Thread Jordan Rose via swift-dev
> On Mar 22, 2016, at 12:06, Bryan Chan via swift-dev > wrote: > > jgr...@apple.com wrote on 2016-03-22 02:37:47 PM: > > > The runtime functions are hacked in various unsavory ways to give > > them Swift-like calling conventions. Many of them also have > > important semantics that the compil

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Dmitri Gribenko via swift-dev
On Tue, Mar 22, 2016 at 12:17 PM, Rafkind, Jon via swift-dev wrote: > I have to support swift 2.2 for the time being because I have to support the > current release of xcode. I will upgrade to swift 3 when it is released. I understand your motivation, but I would still recommend trying to update

Re: [swift-dev] Returning more than two scalars from C code

2016-03-22 Thread John McCall via swift-dev
> On Mar 22, 2016, at 12:25 PM, Joe Groff wrote: >> On Mar 22, 2016, at 12:06 PM, Bryan Chan > > wrote: >> >> jgr...@apple.com wrote on 2016-03-22 02:37:47 PM: >> >> > The runtime functions are hacked in various unsavory ways to give >> >

Re: [swift-dev] Returning more than two scalars from C code

2016-03-22 Thread Joe Groff via swift-dev
> On Mar 22, 2016, at 12:06 PM, Bryan Chan wrote: > > jgr...@apple.com wrote on 2016-03-22 02:37:47 PM: > > > The runtime functions are hacked in various unsavory ways to give > > them Swift-like calling conventions. Many of them also have > > important semantics that the compiler needs to be

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
I have to support swift 2.2 for the time being because I have to support the current release of xcode. I will upgrade to swift 3 when it is released. BTW it doesnt look like my attachment made it, so here is a link to the file: https://github.com/PerfectlySoft/Perfect/blob/master/PerfectLib/Mime

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Joe Groff via swift-dev
I'd recommend testing to see if this is improved in Swift 3, if it's practical to switch your codebase over. There are some type checker improvements there that didn't make it into Swift 2. -Joe > On Mar 22, 2016, at 12:13 PM, Rafkind, Jon via swift-dev > wrote: > > Attached is a file from a

[swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
Attached is a file from a project called PerfectLib that contains a dictionary literal with 816 entries in it. On my system with exactly 559 entries (meaning the last entry is "res") the file can be compiled, but with 560 or more it crashes. It looks like the crash is an infinite loop, I see man

Re: [swift-dev] Returning more than two scalars from C code

2016-03-22 Thread Bryan Chan via swift-dev
jgr...@apple.com wrote on 2016-03-22 02:37:47 PM: > The runtime functions are hacked in various unsavory ways to give > them Swift-like calling conventions. Many of them also have > important semantics that the compiler needs to be aware of, so if > they aren't exported as standard library API in

Re: [swift-dev] Returning more than two scalars from C code

2016-03-22 Thread Joe Groff via swift-dev
> On Mar 22, 2016, at 11:30 AM, Bryan Chan wrote: > > jgr...@apple.com wrote on 2016-03-22 12:05:06 PM: > > > On Mar 22, 2016, at 5:57 AM, Bryan Chan via swift-dev > wrote: > > > > > I tried to google for an answer but couldn't find anything. What is > > > the correct way to do the following o

Re: [swift-dev] Returning more than two scalars from C code

2016-03-22 Thread Bryan Chan via swift-dev
jgr...@apple.com wrote on 2016-03-22 12:05:06 PM: > On Mar 22, 2016, at 5:57 AM, Bryan Chan via swift-dev wrote: > > > I tried to google for an answer but couldn't find anything. What is > > the correct way to do the following on Linux? > > > > @_silgen_name("foo") > > func foo(theInt: UInt) > >

Re: [swift-dev] Build Error: Relocation R_X86_64_PC32

2016-03-22 Thread Ryan Lovelett via swift-dev
> Thank you for the hard work! It is definitely a good idea to create a > bug, I am not aware of one existing on bugs.swift.org. Great, I've reported this as: https://bugs.swift.org/browse/SR-1023. ___ swift-dev mailing list swift-dev@swift.org https://

Re: [swift-dev] Build Error: Relocation R_X86_64_PC32

2016-03-22 Thread William Dillon via swift-dev
> > Phew. Well I finally got everything ready to where I could bisect > binutils. I won't bore with the details of what it took to actually be > able to bisect binutils (unless someone actually wants to know). > I would be interested if it’s not too much trouble. I’ve been in a similar predic

Re: [swift-dev] Build Error: Relocation R_X86_64_PC32

2016-03-22 Thread Joe Groff via swift-dev
> On Mar 22, 2016, at 9:55 AM, Ryan Lovelett wrote: > > On Mon, Mar 14, 2016, at 06:42 PM, Dmitri Gribenko wrote: >> On Mon, Mar 14, 2016 at 3:38 PM, Ryan Lovelett >> wrote: >>> On Tue, Mar 1, 2016, at 12:16 AM, Dmitri Gribenko wrote: IIRC there is no issue in the bug tracker, please feel

Re: [swift-dev] Build Error: Relocation R_X86_64_PC32

2016-03-22 Thread Dmitri Gribenko via swift-dev
On Tue, Mar 22, 2016 at 9:55 AM, Ryan Lovelett wrote: > I'd like to write this up as an issue, if one has not been created in > the 8-days it took me to get this working, is that a good idea or a bad > one? Thank you for the hard work! It is definitely a good idea to create a bug, I am not aware

Re: [swift-dev] Build Error: Relocation R_X86_64_PC32

2016-03-22 Thread Ryan Lovelett via swift-dev
On Mon, Mar 14, 2016, at 06:42 PM, Dmitri Gribenko wrote: > On Mon, Mar 14, 2016 at 3:38 PM, Ryan Lovelett > wrote: > > On Tue, Mar 1, 2016, at 12:16 AM, Dmitri Gribenko wrote: > >> IIRC there is no issue in the bug tracker, please feel free to file one! > >> > >> Also, if you are familiar with bi

Re: [swift-dev] Building swift-llvm fails when using build-script to cross compile due to multiple -isysroot arguments being in CFLAGS

2016-03-22 Thread Vedant Kumar via swift-dev
+ swift-dev, Argyrios > On Mar 21, 2016, at 8:06 PM, Andrew Hyatt wrote: > > swift-dev, > > 5e342aa fixed the CFLAGS issue for swift-llvm and it now compiles fine for > iOS. > > A remnant of the issue persists while building Swift. To get to that point I > copied over two headers not prese

Re: [swift-dev] Returning more than two scalars from C code

2016-03-22 Thread Joe Groff via swift-dev
> On Mar 22, 2016, at 5:57 AM, Bryan Chan via swift-dev > wrote: > > I tried to google for an answer but couldn't find anything. What is the > correct way to do the following on Linux? > > @_silgen_name("foo") > func foo(theInt: UInt) > -> (a: UInt, b: UInt, c: UInt) > > var (d, e, f) = foo(

[swift-dev] Swift 2.2 Release functions on Ubuntu 14.04 x86

2016-03-22 Thread Piero Sabino via swift-dev
Now, Swift 2.2 functions on Ubuntu 14.04 x86 also? ___ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev

[swift-dev] Returning more than two scalars from C code

2016-03-22 Thread Bryan Chan via swift-dev
I tried to google for an answer but couldn't find anything. What is the correct way to do the following on Linux? @_silgen_name("foo") func foo(theInt: UInt) -> (a: UInt, b: UInt, c: UInt) var (d, e, f) = foo(aNum) Where foo is: typedef struct { long a; long b; long c;