This is another instance where we weren't checking that the result of FileSystem::CreateDataBuffer and unconditionally accessing it, similar to the bug in SourceManager last week. In this particular case, ObjectFile was assuming that we can read the contents non-zero, which isn't true for directory nodes. Jim figured this one out yesterday. I'm just putting up the patch and adding a test. rdar://167796036
5 lines
112 B
Plaintext
5 lines
112 B
Plaintext
RUN: mkdir -p %t.dir
|
|
RUN: %lldb %t.dir 2>&1| FileCheck %s
|
|
|
|
CHECK: error: '{{.*}}.dir' is not a valid executable
|