http://llvm.org/bugs/show_bug.cgi?id=6167
Summary: Segmentation fault due to type mismatch for
build_struct_gep in OCaml bindings
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=4135)
--> (http://llvm.org/bugs/attachment.cgi?id=4135)
Proposed bug fix
Calling the build_struct_gep function in the OCaml bindings always leads to a
segmentation fault in the binding C stub code. There is a type mismatch between
the C stub (bindings/ocaml/llvm/llvm_ocaml.c:llvm_build_struct_gep), which
expects an array of indices, and the ocaml type signature
(bindings/ocaml/llvm/llvm.mli:build_struct_gep), which takes a single integer
argument. The binding as it stands attempts to use the index argument as the
address of an array, leading to a crash.
I've attached a patch that changes the C stub to match the OCaml signature.
This fixes the seg fault.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs