Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom functions broken on Linux #1071

Open
jberkel opened this issue Aug 25, 2021 · 0 comments
Open

Custom functions broken on Linux #1071

jberkel opened this issue Aug 25, 2021 · 0 comments

Comments

@jberkel
Copy link
Collaborator

jberkel commented Aug 25, 2021

Caused by this bug in Swift:

apple/swift#47006

Not much we can do at this point, except avoiding this construct.

* thread #1, name = 'SQLite.swiftPac', stop reason = signal SIGSEGV: invalid address (fault address: 0x50)
  * frame #0: 0x00007ffff7e1945c libswiftCore.so`swift::MetadataCacheEntryBase<(anonymous namespace)::TupleCacheEntry, swift::TargetTupleTypeMetadata<swift::InProcess>::Element>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) + 380
    frame #1: 0x00007ffff7e0ad4d libswiftCore.so`std::pair<(anonymous namespace)::TupleCacheEntry*, swift::MetadataResponse> swift::LockingConcurrentMap<(anonymous namespace)::TupleCacheEntry, (anonymous namespace)::TupleCacheStorage>::getOrInsert<(anonymous namespace)::TupleCacheEntry::Key, swift::MetadataRequest&, swift::TargetValueWitnessTable<swift::InProcess> const*&>((anonymous namespace)::TupleCacheEntry::Key, swift::MetadataRequest&, swift::TargetValueWitnessTable<swift::InProcess> const*&) + 3373
    frame #2: 0x00007ffff7e09c7a libswiftCore.so`swift_getTupleTypeMetadata + 250
    frame #3: 0x00007ffff7e270b9 libswiftCore.so`swift::Demangle::__runtime::TypeDecoder<(anonymous namespace)::DecodedMetadataBuilder>::decodeMangledType(swift::Demangle::__runtime::Node*) + 9945
    frame #4: 0x00007ffff7e25467 libswiftCore.so`swift::Demangle::__runtime::TypeDecoder<(anonymous namespace)::DecodedMetadataBuilder>::decodeMangledType(swift::Demangle::__runtime::Node*) + 2695
    frame #5: 0x00007ffff7e24115 libswiftCore.so`swift_getTypeByMangledNodeImpl(swift::MetadataRequest, swift::Demangle::__runtime::Demangler&, swift::Demangle::__runtime::Node*, void const* const*, std::function<swift::TargetMetadata<swift::InProcess> const* (unsigned int, unsigned int)>, std::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 437
    frame #6: 0x00007ffff7e23f10 libswiftCore.so`swift::swift_getTypeByMangledNode(swift::MetadataRequest, swift::Demangle::__runtime::Demangler&, swift::Demangle::__runtime::Node*, void const* const*, std::function<swift::TargetMetadata<swift::InProcess> const* (unsigned int, unsigned int)>, std::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 384
    frame #7: 0x00007ffff7e24636 libswiftCore.so`swift_getTypeByMangledNameImpl(swift::MetadataRequest, __swift::__runtime::llvm::StringRef, void const* const*, std::function<swift::TargetMetadata<swift::InProcess> const* (unsigned int, unsigned int)>, std::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 1046
    frame #8: 0x00007ffff7e21ec0 libswiftCore.so`swift::swift_getTypeByMangledName(swift::MetadataRequest, __swift::__runtime::llvm::StringRef, void const* const*, std::function<swift::TargetMetadata<swift::InProcess> const* (unsigned int, unsigned int)>, std::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 384
    frame #9: 0x00007ffff7e220fa libswiftCore.so`swift_getTypeByMangledNameInContext + 170
    frame #10: 0x000055555557a7dd SQLite.swiftPackageTests.xctest`__swift_instantiateConcreteTypeFromMangledName at <compiler-generated>:0
    frame #11: 0x000055555558214f SQLite.swiftPackageTests.xctest`Connection.createFunction(function="test", argumentCount=2, deterministic=true, block=0x00005555555b8a80 SQLite.swiftPackageTests.xctest`partial apply forwarder for closure #1 (Swift.Array<Swift.Optional<SQLite.Binding>>) -> Swift.Optional<SQLite.Binding> in SQLite.Connection.createFunction<A where A: SQLite.Value>(Swift.String, Swift.UInt, Swift.Bool, (Swift.Array<Swift.Optional<SQLite.Binding>>) -> Swift.Optional<A>) throws -> (Swift.Array<SQLite.Expressible>) -> SQLite.Expression<Swift.Optional<A>> at <compiler-generated>, self=0x0000555555a01050) at Connection.swift:643:35
    frame #12: 0x00005555555afb75 SQLite.swiftPackageTests.xctest`Connection.createFunction<Z>(function="test", argumentCount=2, deterministic=true, block=0x5555555b5100, self=0x0000555555a01050) at CustomFunctions.swift:154:9
    frame #13: 0x00005555555b4c3c SQLite.swiftPackageTests.xctest`Connection.createFunction<Z, A, B>(function="test", deterministic=true, block=0x555555645470, self=0x0000555555a01050) at CustomFunctions.swift:120:22
    frame #14: 0x0000555555644b6e SQLite.swiftPackageTests.xctest`CustomFunctionWithTwoArgsTests.testFunctionLeftResultOptional(self=0x0000555555867d20) at CustomFunctionsTests.swift:115:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant