Skip to content

Assert valid target data string in LLVMCreateTargetData #9370

Closed
@thielema

Description

@thielema
mannequin
Bugzilla Link 8998
Version 2.8
OS All
CC @thielema

Extended Description

Please add an assert to LLVMCreateTargetData (i.e. the C++ function that it calls), that checks whether the input string is correct. It seems that there is no way to find out, if an input string is actually valid. If I pass "nonsense" I get a non-NULL pointer as result (that is, the TargetDataRef does not show me, that the input was wrong), and if I pass that to LLVMAddTargetData then things go silently wrong in a very awful way.
See ticket #​6394 for an example.
http://llvm.org/bugs/show_bug.cgi?id=6394

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions