Skip to content

Fix crash on accessing function parameters #3

Description

@sampsyo

We're currently hitting a segfault when trying to iterate over the arguments of a newly-constructed function. Here's a piece of the traceback, from LLDB:

 * frame #0: 0x0000000106116f88 libLLVM.dylib`llvm::LLVMContext::shouldDiscardValueNames() const + 4
   frame #1: 0x0000000106145b77 libLLVM.dylib`llvm::Value::setNameImpl(llvm::Twine const&) + 39
   frame #2: 0x0000000106145e0c libLLVM.dylib`llvm::Value::setName(llvm::Twine const&) + 14
   frame #3: 0x00000001060f5f7a libLLVM.dylib`llvm::Argument::Argument(llvm::Type*, llvm::Twine const&, llvm::Function*) + 110
   frame #4: 0x00000001060f702b libLLVM.dylib`llvm::Function::BuildLazyArguments() const + 105
   frame #5: 0x00000001060d9dd1 libLLVM.dylib`LLVMGetParam + 27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions