diff --git a/.gitignore b/.gitignore index e1ad3c7..6f885ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/frama-c-Nitrogen-20111001.tar.gz +/frama-c-Oxygen-20120901.tar.gz diff --git a/frama-c-fixes.patch b/frama-c-fixes.patch new file mode 100644 index 0000000..aed54f0 --- /dev/null +++ b/frama-c-fixes.patch @@ -0,0 +1,13 @@ +Index: src/pdg_types/pdgTypes.ml +=================================================================== +--- src/pdg_types/pdgTypes.ml (révision 20081) ++++ src/pdg_types/pdgTypes.ml (révision 20082) +@@ -701,7 +701,7 @@ + in (`Color color) :: attrib + in + let attrib = +- if Dpd.is_ctrl d then (`Arrowhead `Odot)::attrib else attrib ++ if Dpd.is_ctrl d then (`Arrowtail `Odot)::attrib else attrib + in + let attrib = + if Dpd.is_addr d then (`Style `Dotted)::attrib else attrib diff --git a/frama-c-ocaml4.patch b/frama-c-ocaml4.patch deleted file mode 100644 index 95b56e2..0000000 --- a/frama-c-ocaml4.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- ./cil/ocamlutil/inthash.ml.orig 2011-10-10 02:40:09.000000000 -0600 -+++ ./cil/ocamlutil/inthash.ml 2012-09-11 13:51:28.890411361 -0600 -@@ -43,7 +43,9 @@ - type key = int - type 'a t = - { mutable size: int; (* number of elements *) -- mutable data: 'a bucketlist array } (* the buckets *) -+ mutable data: 'a bucketlist array; (* the buckets *) -+ initial_size: int (* initial array size *) -+ } - - and 'a bucketlist = - Empty -@@ -53,7 +55,7 @@ let hash key = key land 0x3fffffff - - let create initial_size = - let s = min (max 1 initial_size) Sys.max_array_length in -- { size = 0; data = Array.make s Empty } -+ { size = 0; data = Array.make s Empty; initial_size = s } - - let clear h = - for i = 0 to Array.length h.data - 1 do -@@ -61,9 +63,19 @@ let clear h = - done; - h.size <- 0 - -+let reset h = -+ let len = Array.length h.data in -+ if (len = h.initial_size) then -+ clear h -+ else begin -+ h.size <- 0; -+ h.data <- Array.make h.initial_size Empty -+ end -+ - let copy h = - { size = h.size; -- data = Array.copy h.data } -+ data = Array.copy h.data; -+ initial_size = h.size } - - let copy_into src dest = - dest.size <- src.size; -@@ -197,6 +209,24 @@ let fold (f: int -> 'a -> 'b -> 'b) (h: - done; - !accu - -+let rec bucket_length accu = function -+ | Empty -> accu -+ | Cons(_, _, rest) -> bucket_length (accu + 1) rest -+ -+let stats h = -+ let mbl = -+ Array.fold_left (fun m b -> max m (bucket_length 0 b)) 0 h.data in -+ let histo = Array.make (mbl + 1) 0 in -+ Array.iter -+ (fun b -> -+ let l = bucket_length 0 b in -+ histo.(l) <- histo.(l) + 1) -+ h.data; -+ { Hashtbl.num_bindings = h.size; -+ Hashtbl.num_buckets = Array.length h.data; -+ Hashtbl.max_bucket_length = mbl; -+ Hashtbl.bucket_histogram = histo } -+ - - let memoize (h: 'a t) (key: int) (f: int -> 'a) : 'a = - let i = (hash key) mod (Array.length h.data) in ---- ./cil/ocamlutil/inthash.mli.orig 2011-10-10 02:40:09.000000000 -0600 -+++ ./cil/ocamlutil/inthash.mli 2012-09-11 13:50:55.629057606 -0600 -@@ -50,6 +50,7 @@ type 'a t - - val create: int -> 'a t - val clear: 'a t -> unit -+val reset: 'a t -> unit - val length : 'a t -> int - - val copy: 'a t -> 'a t -@@ -67,6 +68,8 @@ val find_all: 'a t -> int -> 'a list - val iter: (int -> 'a -> unit) -> 'a t -> unit - val fold: (int -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b - -+val stats: 'a t -> Hashtbl.statistics -+ - val memoize: 'a t -> int -> (int -> 'a) -> 'a - - val tolist: 'a t -> (int * 'a) list ---- ./src/type/type.ml.orig 2011-10-10 02:38:09.000000000 -0600 -+++ ./src/type/type.ml 2012-09-11 13:50:55.632057414 -0600 -@@ -460,14 +460,10 @@ end = struct - let tag = Obj.tag x in - if tag = 0 then - 0 -- else if tag = Obj.closure_tag then -- (* assumes that the first word of a closure does not change in -- any way (even by Gc.compact invokation). *) -- Obj.magic (Obj.field x 0) - else - Hashtbl.hash x -- else -- 0 -+ else -+ 0 - end) - - type 'a t = 'a O.t Tbl.t diff --git a/frama-c-ocamlgraph.patch b/frama-c-ocamlgraph.patch deleted file mode 100644 index 695b428..0000000 --- a/frama-c-ocamlgraph.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- ./src/semantic_callgraph/register.ml.orig 2011-10-10 02:38:07.000000000 -0600 -+++ ./src/semantic_callgraph/register.ml 2012-08-01 14:11:13.636345972 -0600 -@@ -107,6 +107,7 @@ module Service = - (if Kernel_function.is_definition v then `Bold - else `Dotted) ] - let equal = Kernel_function.equal -+ let compare v1 v2 = Datatype.Int.compare (id v1) (id v2) - let hash = Kernel_function.hash - let entry_point () = - try Some (fst (Globals.entry_point ())) ---- ./src/syntactic_callgraph/register.ml.orig 2011-10-10 02:38:30.000000000 -0600 -+++ ./src/syntactic_callgraph/register.ml 2012-08-01 14:11:49.985347173 -0600 -@@ -41,6 +41,7 @@ module Service = - | NIVar (_,b) when not !b -> `Style `Dotted - | _ -> `Style `Bold ] - let equal v1 v2 = id v1 = id v2 -+ let compare v1 v2 = Datatype.Int.compare (id v1) (id v2) - let hash = id - let entry_point () = !entry_point_ref - end ---- ./src/misc/service_graph.mli.orig 2011-10-10 02:38:28.000000000 -0600 -+++ ./src/misc/service_graph.mli 2012-08-01 14:10:29.025344420 -0600 -@@ -28,7 +28,7 @@ module Make - (G: sig - type t - module V: sig -- include Graph.Sig.HASHABLE -+ include Graph.Sig.COMPARABLE - val id: t -> int - (** assume is >= 0 and unique for each vertices of the graph *) - val name: t -> string ---- ./src/misc/service_graph.ml.orig 2011-10-10 02:38:28.000000000 -0600 -+++ ./src/misc/service_graph.ml 2012-08-01 14:10:09.873343768 -0600 -@@ -24,7 +24,7 @@ module Make - (G: sig - type t - module V: sig -- include Graph.Sig.HASHABLE -+ include Graph.Sig.COMPARABLE - val id: t -> int - val name: t -> string - val attributes: t -> Graph.Graphviz.DotAttributes.vertex list diff --git a/frama-c.spec b/frama-c.spec index 8fc04e9..3deb9dc 100644 --- a/frama-c.spec +++ b/frama-c.spec @@ -16,11 +16,11 @@ %global ocamlbest byte %endif -%global pkgversion Nitrogen-20111001 +%global pkgversion Oxygen-20120901 Name: frama-c -Version: 1.7 -Release: 9%{?dist} +Version: 1.8 +Release: 1%{?dist} Summary: Framework for source code analysis of C software Group: Development/Libraries @@ -31,11 +31,8 @@ Source0: http://frama-c.com/download/%{name}-%{pkgversion}.tar.gz Source1: frama-c-1.6.licensing Source2: %{name}-gui.desktop Source3: acsl.el -# Adapt to changes in Hashtbl signature in OCaml 4.00.0. Disable dangerous -# code that leads to segfaults in OCaml 4.00.0. -Patch0: frama-c-ocaml4.patch -# Adapt to changes in ocaml-ocamlgraph. Submitted upstream. -Patch1: frama-c-ocamlgraph.patch +# Post-release fixes from upstream +Patch0: %{name}-fixes.patch BuildRequires: alt-ergo BuildRequires: coq @@ -140,19 +137,14 @@ support. %prep %setup -q -n %{name}-%pkgversion %patch0 -%patch1 # Fix encodings iconv -f iso-8859-1 -t utf8 man/frama-c.1 > man/frama-c.1.conv touch -r man/frama-c.1 man/frama-c.1.conv mv -f man/frama-c.1.conv man/frama-c.1 -# Version 1.8 of ocamlgraph is good, therefore 1.8.X is good, too. -# Also adapt to OCaml 4.00.0 and alt-ergo 0.94 -sed -e 's|1\.8)|1.8*)|' \ - -e 's/3\.1\*/3.1*|4*/' \ - -e 's/0\.92\.2/0.94/' \ - -i configure +# Allow use of alt-ergo 0.94 +sed -i 's/0\.92\.2/0.94/' configure sed -i 's/0\.92\.2/0.94/' src/wp/configure %build @@ -255,6 +247,9 @@ xargs chmod a-x %{buildroot}%{_libdir}/frama-c/*.cmx \ %{_xemacs_sitelispdir}/acsl.el %changelog +* Fri Oct 19 2012 Jerry James - 1.8-1 +- Update to Oxygen version + * Tue Sep 11 2012 Jerry James - 1.7-9 - Disable dangerous code in src/type/type.ml that leads to segfaults. diff --git a/sources b/sources index 74ccd35..592ca6b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -09bf25ed3d1b54e2d523166aa4499edd frama-c-Nitrogen-20111001.tar.gz +f8f22501761fc67fcac5daceac82bb31 frama-c-Oxygen-20120901.tar.gz