ocaml: add fix for GC crash in 4.02.2
Upstream fix in http://caml.inria.fr/mantis/view.php?id=6919. Also add some hints on packaging as requested in Homebrew/homebrew#41432
This commit is contained in:
parent
0b900c12c2
commit
d0a8e453c0
1 changed files with 32 additions and 0 deletions
|
@ -1,9 +1,23 @@
|
|||
# OCaml does not preserve binary compatibility across compiler releases,
|
||||
# so when updating it you should ensure that all dependent packages are
|
||||
# also updated by incrementing their revisions.
|
||||
#
|
||||
# Specific packages to pay attention to include:
|
||||
# - camlp4
|
||||
# - opam
|
||||
#
|
||||
# Applications that really shouldn't break on a compiler update are:
|
||||
# - mldonkey
|
||||
# - coq
|
||||
# - coccinelle
|
||||
# - unison
|
||||
class ObjectiveCaml < Formula
|
||||
desc "General purpose programming language in the ML family"
|
||||
homepage "https://ocaml.org/"
|
||||
url "http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.2.tar.bz2"
|
||||
sha256 "b18265582b1c2fd5c1e67da3f744bf1ff474d194bb277c3a9ceb5eb16a1ea703"
|
||||
head "http://caml.inria.fr/svn/ocaml/trunk", :using => :svn
|
||||
revision 1
|
||||
|
||||
bottle do
|
||||
sha256 "b9cb85c9c8a838217699388af2ac50e6691dc7343889015c23f88c61dd4c227f" => :yosemite
|
||||
|
@ -15,6 +29,10 @@ class ObjectiveCaml < Formula
|
|||
|
||||
depends_on :x11 => :optional
|
||||
|
||||
# Upstream fix for a GC crash issue introduced in 4.02.2
|
||||
# See http://caml.inria.fr/mantis/view.php?id=6919
|
||||
patch :DATA
|
||||
|
||||
def install
|
||||
ENV.deparallelize # Builds are not parallel-safe, esp. with many cores
|
||||
|
||||
|
@ -32,3 +50,17 @@ class ObjectiveCaml < Formula
|
|||
assert_match "#{HOMEBREW_PREFIX}", shell_output("ocamlc -where")
|
||||
end
|
||||
end
|
||||
__END__
|
||||
diff --git a/byterun/minor_gc.c b/byterun/minor_gc.c
|
||||
index 4aaec96..859a72a 100644
|
||||
--- a/byterun/minor_gc.c
|
||||
+++ b/byterun/minor_gc.c
|
||||
@@ -259,6 +259,8 @@ void caml_empty_minor_heap (void)
|
||||
++ caml_stat_minor_collections;
|
||||
caml_final_empty_young ();
|
||||
if (caml_minor_gc_end_hook != NULL) (*caml_minor_gc_end_hook) ();
|
||||
+ } else {
|
||||
+ caml_final_empty_young ();
|
||||
}
|
||||
#ifdef DEBUG
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue