Skip to content

Commit

Permalink
DWARF: Disable GC around dl_iterate_phdr in freebsd (#10259)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian J. Cardiff authored Jan 18, 2021
1 parent 8aee002 commit ef93a80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/exception/call_stack/elf.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ struct Exception::CallStack
1
end

# GC needs to be disabled around dl_iterate_phdr in freebsd (#10084)
{% if flag?(:freebsd) %} GC.disable {% end %}
LibC.dl_iterate_phdr(phdr_callback, nil)
{% if flag?(:freebsd) %} GC.enable {% end %}
end

protected def self.read_dwarf_sections(base_address = 0)
Expand Down

0 comments on commit ef93a80

Please sign in to comment.