Segfault when running generator
Hi,
I'm using Cuckoo 1.1.1 with Carthage and it's causing my build to fail. When the generator runs against a specific file it causes a segfault.
I've created a demo project here that shows the issue.
Sorry for the silence up until now. I'll take a look at the demo project and get back to you.
Hey, @JackCostigan. I've just downloaded the project and I'm not well-versed in Carthage stuff, but I ran carthage update and now I've got Cuckoo cloned.
If you're saying it's the generator acting up, please, instead of a full project just separate the file that's causing the problem and instead of a complicated shell script just provide us with the command to run the generator on the problematic file.
When you're done with that, provided there are no complications in your path, I'll go over the minimal working example that you'll have left and fix the generator using that. Thank you.
Thanks for the reply.
If I run the following command from the root of the example project I get an error:
Carthage/Checkouts/Cuckoo/cuckoo_generator generate --output Modules/Cuckoo-test-project/Cuckoo-test-projectTests/TestUtilities/Mocks/GeneratedMocks.swift --testable Dependencies/ProtocolKit Dependencies/ProtocolKit/ProtocolKit/DispatchQueueType.swift
The error message I get from the generator is: 'Carthage/Checkouts/Cuckoo/cucko…' terminated by signal SIGSEGV (Address boundary error)
I believe the offending file is Dependencies/ProtocolKit/ProtocolKit/DispatchQueueType.swift.
I've been able to reproduce the issue thanks to the command you provided. I'm suspecting the @convention(block) inside the file, that's the only thing that is not seen very often. I'll try to see if I can pinpoint exactly where the problem occurs.