When I compiled a C source code directly into a Wasm binary using clang, a-Shell crashed in a destructor of PrettyStackTraceEntry.
Specifically, the following line's assert fails after it is called some times.
| import Logging | |
| LoggingSystem.bootstrap { label in | |
| var handler = PlaygroundHandler(label: label) | |
| handler.logLevel = .trace | |
| return handler | |
| } | |
| let logger = Logger(label: "hoge") |
| extension Result { | |
| func expect(_ message: String) -> Success { | |
| switch self { | |
| case let .success(value): | |
| return value | |
| case let .failure(error): | |
| preconditionFailure("\(message): \(error.localizedDescription)") | |
| } | |
| } |
| extension Optional { | |
| func expect(_ message: String) -> Wrapped { | |
| guard let value = self else { | |
| preconditionFailure(message) | |
| } | |
| return value | |
| } | |
| } |
| import PlaygroundSupport | |
| import SwiftUI | |
| struct ContentView { | |
| @State var rows = ["hoge", "fuga", "piyo"] | |
| } | |
| extension ContentView: View { | |
| var body: some View { | |
| Form { |
| import XMLCoder | |
| struct Root: Equatable { | |
| let elements: [Choice] | |
| let name: String | |
| let description: String? | |
| } | |
| extension Root: Codable { | |
| enum CodingKeys: String, CodingKey { |
| import PlaygroundSupport | |
| import SwiftUI | |
| final class ContentViewModel { | |
| @Published var text = "" | |
| } | |
| extension ContentViewModel: ObservableObject {} | |
| struct ContentView { |
| [Unit] | |
| Description=Run usb0.sh | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/root/usb0.sh | |
| [Install] | |
| WantedBy=multi-user.target |
| #!/bin/bash | |
| set -e | |
| modprobe libcomposite | |
| cd /sys/kernel/config/usb_gadget/ | |
| mkdir -p pi4 | |
| cd pi4 | |
| echo 0x1d6b > idVendor # Linux Foundation | |
| echo 0x0104 > idProduct # Multifunction Composite Gadget |
When I compiled a C source code directly into a Wasm binary using clang, a-Shell crashed in a destructor of PrettyStackTraceEntry.
Specifically, the following line's assert fails after it is called some times.
| import AVFoundation | |
| import UIKit | |
| import PlaygroundSupport | |
| class ViewController: UIViewController { | |
| lazy var session: AVCaptureSession = { | |
| let deviceResult = getDefaultDevice() | |
| var device: AVCaptureDevice | |
| switch deviceResult { | |
| case let .success(value): |