Skip to content

[SR-3437] RegularExpression display crashes REPL #4428

Closed
@swift-ci

Description

@swift-ci
Previous ID SR-3437
Radar None
Original Reporter mgritter (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Swift version 3.0.2 (swift-3.0.2-RELEASE)
Target: x86_64-unknown-linux-gnu
on Ubuntu 16.04.1

Additional Detail from JIRA
Votes 0
Component/s Foundation, LLDB for Swift
Labels Bug, Linux
Assignee None
Priority Medium

md5: 10a8ec46ccc5c27d5f27652532cabaaa

Issue Description:

On Linux, I tried:

import Foundation
let r = RegularExpression( pattern:"\\[.*\\]", options:.caseInsensitive )

this resulted in a crash:

r: Foundation.RegularExpression = {
  Foundation.NSObject = {}
Segmentation fault (core dumped)

Backtrace:

#0 0x00007ffff45cea37 in std::_Function_handler<std::shared_ptr<lldb_private::SyntheticChildren> (lldb_private::ValueObject&, lldb::DynamicValueType, lldb_private::FormatManager&), lldb_private::SwiftLanguage::GetHardcodedSynthetics()::$_2::operator()() const::{lambda(lldb_private::ValueObject&, lldb::DynamicValueType, lldb_private::FormatManager&)#2}>::_M_invoke(std::_Any_data const&, lldb_private::ValueObject&, lldb::DynamicValueType&&, lldb_private::FormatManager&) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#1 0x00007ffff42eeab2 in lldb_private::LanguageCategory::GetHardcoded(lldb_private::FormatManager&, lldb_private::FormattersMatchData&, std::shared_ptr<lldb_private::SyntheticChildren>&) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#2 0x00007ffff42e9875 in lldb_private::FormatManager::GetSyntheticChildren(lldb_private::ValueObject&, lldb::DynamicValueType) () from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#3 0x00007ffff42e4160 in lldb_private::DataVisualization::GetSyntheticChildren(lldb_private::ValueObject&, lldb::DynamicValueType) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#4 0x00007ffff438f418 in lldb_private::ValueObject::UpdateFormatsIfNeeded() ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#5 0x00007ffff438ec10 in lldb_private::ValueObject::UpdateValueIfNeeded(bool) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#6 0x00007ffff42fe805 in lldb_private::ValueObjectPrinter::GetMostSpecializedValue() ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#7 0x00007ffff42fe64f in lldb_private::ValueObjectPrinter::PrintValueObject() ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#8 0x00007ffff42fff9c in lldb_private::ValueObjectPrinter::PrintChild(lldb_private::SharingPtr<lldb_private::ValueObject>, lldb_private::DumpValueObjectOptions::PointerDepth const&) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#9 0x00007ffff43003e3 in lldb_private::ValueObjectPrinter::PrintChildren(bool, bool, lldb_private::DumpValueObjectOptions::PointerDepth const&) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#10 0x00007ffff42ff3b2 in lldb_private::ValueObjectPrinter::PrintChildrenIfNeeded(bool, bool) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#11 0x00007ffff42fe767 in lldb_private::ValueObjectPrinter::PrintValueObject() ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#12 0x00007ffff4397aee in lldb_private::ValueObject::Dump(lldb_private::Stream&, lldb_private::DumpValueObjectOptions const&) () from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#13 0x00007ffff4731ce9 in lldb_private::SwiftREPL::PrintOneVariable(lldb_private::Debugger&, std::shared_ptr<lldb_private::StreamFile>&, lldb_private::SharingPtr<lldb_private::ValueObject>&, lldb_private::ExpressionVariable*) () from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#14 0x00007ffff43d6ffa in lldb_private::REPL::IOHandlerInputComplete(lldb_private::IOHandler&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#15 0x00007ffff4342bf7 in lldb_private::IOHandlerEditline::Run() ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#16 0x00007ffff432c302 in lldb_private::Debugger::ExecuteIOHandlers() ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#17 0x00007ffff432fdbf in lldb_private::Debugger::IOHandlerThread(void*) ()
from /home/ubuntu/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/../lib/liblldb.so.3.9.0
#18 0x00007ffff266c6ba in start_thread (arg=0x7fffda46e700) at pthread_create.c:333
#19 0x00007ffff18e782d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions