--- layout: fc_discuss_archives title: Message 11 from Frama-C-discuss on August 2013 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Runtime problem on ARM



Greetings,

Fedora recently promoted ARM to primary architecture status, which means
that all Fedora packages are now built for i386, x86_64, and arm.  I am
having a problem with the frama-c package that I'm having some difficulty
figuring out.  I am hopeful that somebody here can give me some advice.

On i386 and x86_64, the build of Frama-C Fluorine 20130601 behaves
normally.  But on ARM, running frama-c, regardless of command line
arguments, immediately results in this:

Fatal error: exception Invalid_argument("String.sub")

With a little gdb work, I have tracked that down to this code in external/
unmarshal.ml, lines 212 to 224:

let (code_area_start, cksum) =
  let s = Marshal.to_string id [Marshal.Closures] in
  let cksum = String.sub s 0x1E 16 in
  let c0 = Char.code s.[0x1D] in
  let c1 = Char.code s.[0x1C] in
  let c2 = Char.code s.[0x1B] in
  let c3 = Char.code s.[0x1A] in
  let ofs = Int32.logor (Int32.shift_left (Int32.of_int c3) 24)
                        (Int32.of_int ((c2 lsl 16) lor (c1 lsl 8) lor c0))
  in
  let start = Obj.add_offset (Obj.field (Obj.repr id) 0) (Int32.neg ofs) in
  (start, cksum)
;;

<http://frama-c.com/download.html>
If I am reading the GDB information correctly, the variable s is a pointer
to a block of 0 bytes (a zero-length string?).

I would be grateful for any ideas on how to proceed.  Regards,
-- 
Jerry James
http://www.jamezone.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20130809/bf48f99c/attachment.html>