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

Assertion `!(pointer && arithmetics)' failed #159

Open
blizzard4591 opened this issue Jan 5, 2022 · 1 comment
Open

Assertion `!(pointer && arithmetics)' failed #159

blizzard4591 opened this issue Jan 5, 2022 · 1 comment

Comments

@blizzard4591
Copy link

It seems that 2LS does not support a pointer to an array, if the pointer is not pointing to the first element.
Attached you can find our program under test which produced this output:

./2ls --graphml-witness witness.graphml --propertyfile ../../custom-benchmarks/Wrappers/Wrapper_AP/reach.prp --32 ../../custom-benchmarks/Wrappers/Wrapper_AP/Req1_Prop1_Batch0Wrapper_AP.c

--------------------------------------------------------------------------------

./2ls: line 11:    19 Aborted                 $TOOL_BINARY --graphml-witness $LOG.witness --object-bits $OBJ_BITS $PROPERTY $LOG.bin >> $LOG.ok 2>&1
2LS version 0.9.6-sv-comp22
Reading GOTO program from file
Reading: /tmp/2LS-log.c4mm80.bin
Generating GOTO Program
Adding CPROVER library
file <built-in-additions> line 24: warning: conflicting initializers for variable "__CPROVER_max_malloc_size"
using old value in module Req1_Prop1_Batch0Wrapper_AP file <built-in-additions> line 24
8388608u
ignoring new value in module <built-in-library> file <built-in-additions> line 24
1048576u
Function Pointer Removal
Performing full inlining
Generic Property Instrumentation
2ls-binary: ssa_value_set.cpp:328: void ssa_value_domaint::assign_rhs_rec(ssa_value_domaint::valuest&, const exprt&, const namespacet&, bool, unsigned int) const: Assertion `!(pointer && arithmetics)' failed.
UNKNOWN

2LS_Issue.zip

@viktormalik
Copy link
Collaborator

Indeed, 2LS currently doesn't handle pointer arithmetics, so we only allow pointers to the beginning of a memory object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants