Skip to content

BUG: Constant struct initialization is not checked at module verification #64660

@mr-cheffy

Description

@mr-cheffy

Let's take a look at this code:

%"examplety" = type { ptr }
@"example" = internal global %"examplety" { ptr @"example1", ptr @"example2" }

This code will be considered as "valid" by the module verifier although it's obviously not. Instead of throwing an error, it will just abort with the following message when emitting an object file with addPassesToEmitFile:

error: <unknown>:0: invalid number of bytes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions