asoffer / Icarus

An experimental general-purpose programming language
Apache License 2.0
9 stars 2 forks source link

Segfault when source file is missing #104

Closed perimosocordiae closed 2 years ago

perimosocordiae commented 2 years ago

To reproduce, run the interpreter with a path that doesn't exist. Result:

*** SIGSEGV received at time=1641820852 on cpu 7 ***
PC: @          0x11fa2bc  (unknown)  std::__cxx11::basic_string<>::_M_data()
    @          0x184e180         64  absl::WriteFailureInfo()
    @          0x184de64        224  absl::AbslFailureSignalHandler()
    @     0x7fc282ebd520  881983280  (unknown)
    @          0x1215825         32  std::__cxx11::basic_string<>::data()
    @          0x11f1579         64  std::__cxx11::basic_string<>::operator std::basic_string_view<>()
    @          0x1708c29         48  frontend::SourceBuffer::name()
    @          0x170768b        128  diagnostic::ConsoleRenderer::Add()
    @          0x11fca3a         48  diagnostic::ConsoleRenderer::AddError()
    @          0x11fc9e4         80  diagnostic::StreamingConsumer::ConsumeImpl()
    @          0x11fbf07         96  diagnostic::DiagnosticConsumer::Consume<>()
    @          0x11eff2e       2400  compiler::(anonymous namespace)::Interpret()
    @          0x11efd25        704  main
    @     0x7fc282ea4fd0  (unknown)  (unknown)
Segmentation fault (core dumped)