Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using constant zero-aggregate initializers results in a crash #65

Closed
sallaigy opened this issue Dec 12, 2020 · 0 comments
Closed

Using constant zero-aggregate initializers results in a crash #65

sallaigy opened this issue Dec 12, 2020 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@sallaigy
Copy link
Member

LLVM represents zero-initialized aggregate values with the ConstantAggregateZero class, for which do not have support yet in the memory models, causing a crash.

LLVM IR to reproduce:

; RUN: %bmc -skip-pipeline -bound 1 "%s" | FileCheck "%s"
; CHECK: Verification SUCCESSFUL

@a = internal unnamed_addr global [2 x double] zeroinitializer, align 16

define dso_local i32 @main() {
bb:
  %tmp = load i64, i64* bitcast ([2 x double]* @a to i64*), align 16
  store i64 %tmp, i64* bitcast (double* getelementptr inbounds ([2 x double], [2 x double]* @a, i64 0, i64 1) to i64*), align 8
  ret i32 0
}

Exhibited behavior:

Unhandled value type
UNREACHABLE executed at /home/gyula/projects/gazer/src/LLVM/Automaton/InstToExpr.cpp:898!
@sallaigy sallaigy added bug Something isn't working enhancement New feature or request labels Dec 12, 2020
@sallaigy sallaigy self-assigned this Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant