[LLVMbugs] [Bug 6167] New: Segmentation fault due to type mismatch for build_struct_gep in OCaml bindings
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Jan 28 15:26:31 PST 2010
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: unassignedbugs at nondot.org
ReportedBy: hawkinsp at cs.stanford.edu
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list