-
Notifications
You must be signed in to change notification settings - Fork 350
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
It crashes(SIGABRT) on Release build when I use Transform closure.
I tested several versions bellow. Only v0.4.3 has this issue.
- ✅ 0.3.2
- ✅ 0.4.0
- ✅ 0.4.1
- ✅ 0.4.2
‼️ 0.4.3‼️ main branch
ArgumentParser version: 0.4.3
Swift version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) Target: x86_64-apple-darwin20.5.0
Checklist
- If possible, I've reproduced the issue using the
mainbranch of this package - I've searched for existing GitHub issues
Steps to Reproduce
Here is my sample code to reproduce this issue.
- Build sample code with Release configuration.
- Run this
sample_cal description --start-date 2021/07/18_11:22:33 --name aaa
I suspect that the crash is caused by using @Option(name: , help: , transform: ).
One more thing, It prints a blank where start: Date should be printed, if I deleted @Option() var name: String.
Expected behavior
No crash, and prints OptionGroup’s description.
Actual behavior
Crashed.
Xcode shows some logs on console, like bellow:
sample\_cal(687,0x10026fe00) malloc: Double free of object 0x105a47cc0
sample\_cal(687,0x10026fe00) malloc: \*\*\* set a breakpoint in malloc\_error\_break to debug
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working