Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- os: ubuntu-latest
cc: clang
cxx: clang++
- os: macOS-latest
- os: windows-latest
runs-on: ${{ matrix.os }}

env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion Fleece/Support/Backtrace+capture-posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ namespace signal_safe {
#endif

if ( fd != -1 ) write(fd, str, n ? n : strlen(str));
write(STDERR_FILENO, str, n ? n : strlen(str));
if (getenv("CBL_BACKTRACE_TO_STDERR") != nullptr)
write(STDERR_FILENO, str, n ? n : strlen(str));

#ifdef __clang__
# pragma clang diagnostic pop
Expand Down
5 changes: 5 additions & 0 deletions Tests/SupportTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,11 @@ namespace test::backtrace {
TEST_CASE("Backtrace crash", "[.BacktraceManual]") {
// Since this test crashes the process intentionally,
// It will fail and require manual inspection of stderr
#ifdef _MSC_VER
SetEnvironmentVariable("CBL_BACKTRACE_TO_STDERR", "1");
#else
setenv("CBL_BACKTRACE_TO_STDERR", "1", 1);
#endif
test::backtrace::crashOnPurpose();
}

Expand Down
Loading