llvmbuildmalloc/llvmbuildarraymalloc

I can't seem to use either
LLVMBuildMalloc or LLVMBuildArrayMalloc
without getting an IMA

How am I supposed to create a global array?
I can create locals no problem and global vars
using LLVMAddGlobal
though I'm stumped on the arrays.