Skip to content

Commit

Permalink
Mitigate failing spec on musl
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Jan 28, 2020
1 parent 39cbcb4 commit c94ef8b
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions spec/std/kernel_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -232,22 +232,27 @@ describe "seg fault" do
error.should_not contain("Stack overflow")
end

it "detects stack overflow on the main stack" do
# This spec can take some time under FreeBSD where
# the default stack size is 0.5G. Setting a
# smaller stack size with `ulimit -s 8192`
# will address this.
status, _, error = build_and_run <<-'CODE'
{% if flag?(:musl) %}
# FIXME: Pending as mitigation for https://github.com/crystal-lang/crystal/issues/7482
pending "detects stack overflow on the main stack"
{% else %}
it "detects stack overflow on the main stack" do
# This spec can take some time under FreeBSD where
# the default stack size is 0.5G. Setting a
# smaller stack size with `ulimit -s 8192`
# will address this.
status, _, error = build_and_run <<-'CODE'
def foo
y = StaticArray(Int8,512).new(0)
foo
end
foo
CODE

status.success?.should be_false
error.should contain("Stack overflow")
end
status.success?.should be_false
error.should contain("Stack overflow")
end
{% end %}

it "detects stack overflow on a fiber stack" do
status, _, error = build_and_run <<-'CODE'
Expand Down

0 comments on commit c94ef8b

Please sign in to comment.