Skip to content

Commit

Permalink
Don't expose STKSZ on Signal
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierke committed Apr 8, 2021
1 parent 6427b47 commit 786c7d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/signal.cr
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ enum Signal : Int32
USR1 = LibC::SIGUSR1
USR2 = LibC::SIGUSR2
WINCH = LibC::SIGWINCH
STKSZ = LibC::SIGSTKSZ

{% if flag?(:linux) %}
PWR = LibC::SIGPWR
Expand Down Expand Up @@ -167,8 +166,8 @@ enum Signal : Int32
return unless @@setup_segfault_handler.test_and_set

altstack = LibC::StackT.new
altstack.ss_sp = LibC.malloc(STKSZ)
altstack.ss_size = STKSZ
altstack.ss_sp = LibC.malloc(LibC::SIGSTKSZ)
altstack.ss_size = LibC::SIGSTKSZ
altstack.ss_flags = 0
LibC.sigaltstack(pointerof(altstack), nil)

Expand Down

0 comments on commit 786c7d9

Please sign in to comment.