Files
Jonas Devlieghere 17e226f71e [lldb] Fix crash when passing a folder in as the executable (#175181)
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
2026-01-09 11:29:31 -06:00

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