Antique-team / clangml

OCaml bindings for clang
Other
24 stars 6 forks source link

problem with ocaml 4.02.3 #55

Closed UnixJunkie closed 9 years ago

UnixJunkie commented 9 years ago

The following code is enough to crash the frontend:

typedef struct {
  int is_internal:1, n:31;
} kbnode_t;

int main() {
  kbnode_t t;
}
UnixJunkie commented 9 years ago

We crash on this line of memcad's transform.ml:

    | { d = FieldDecl { fd_type = ty;
                        fd_name = name;
                        fd_bitw = bitwidth;
                        fd_init = init;
                        fd_index } } :: tl ->
      Printf.printf "case 3\n%!";
      if bitwidth <> None then Log.unimp "Bit fields not implemented";

The comparison with None gives a Segmentation fault of the ocaml program.

UnixJunkie commented 9 years ago

Finally, the logger is broken. Hence, I will just replace it by dolog.

UnixJunkie commented 9 years ago

done