From 59ae37b1e5ea9c27d3170275081219f6f83d4c16 Mon Sep 17 00:00:00 2001 From: Eric Davies Date: Tue, 3 Jan 2017 14:20:33 -0600 Subject: [PATCH] Test for #19655 --- test/stacktraces.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/stacktraces.jl b/test/stacktraces.jl index 8f2400662f0f08..5987d79e37bc93 100644 --- a/test/stacktraces.jl +++ b/test/stacktraces.jl @@ -124,3 +124,12 @@ let ctestptr = cglobal((:ctest, "libccalltest")), @test ctest[1].from_c @test ctest[1].pointer === UInt64(ctestptr) end + +# #19655 +let + # not in a `catch`, so should return an empty StackTrace + st = stacktrace(empty!(backtrace())) + println(st) + @test isempty(st) + @test isa(st, StackTrace) +end