Skip to content

identifier __CPROVER_memory not found #197

Closed
@peterschrammel

Description

@peterschrammel

Hello,

current CBMC master crashes on the attached Java program (distilled
from production code).

Thanks,

Vladimir Klebanov


CBMC version 5.4 64-bit x86_64 linux
Parsing Driver.class
Java main class: Driver
failed to load class java.lang.String' failed to load classjava.lang.Object'
failed to load class java.lang.Class' failed to load classjava.lang.AssertionError'
Converting
Generating GOTO Program
Adding CPROVER library (x86_64)
Removal of function pointers and virtual functions
Partial Inlining
Generic Property Instrumentation
Starting Bounded Model Checking
**** WARNING: no body for function
java::java.lang.Class.desiredAssertionStatus:()Z
**** WARNING: no body for function java::java.lang.Object.:()V
**** WARNING: no body for function java::java.lang.AssertionError.:()V
file Driver.java line 50: identifier __CPROVER_memory not found

public class Driver {

    static byte[] out,in;

    public static void main(String[] argv) {

        X x = new X();
        x.y(out);

    }

}

final class X {

    private static final int DIGEST_SIZE = 20;
    private transient MyMessageDigest digest;
    private byte[] state;

    public X() {
        init(null);
    }

    private void init(byte[] seed) {
        digest = new MyMessageDigest();

        if (seed != null) {
            state = digest.digest(seed);
        }
    }

    public synchronized void y(byte[] result) {
        byte[] output = digest.digest();
    }
}


class MyMessageDigest {

    private byte[] state = null;


    public void update(byte[] input) {
        assert(input.length == 20);
        state = input;
    }


    public byte[] digest() {
        byte[] tmp = state;
        state = null;
        return tmp;
    }

    public byte[] digest(byte[] input) {
        update(input);
        return digest();
    }


}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions