apl-cornell / fabric

Distributed persistent programming language with secure information flow types
http://www.cs.cornell.edu/projects/fabric/
Other
28 stars 4 forks source link

Arrays created using initializers don't use provided label in FabIL, causing NPEs in constructor prologue #17

Open tmagrino opened 6 years ago

tmagrino commented 6 years ago

The following code in a FabIL constructor prologue:

Label lbl = LabelUtil.noComponents();
this.aFinalArray = new Object[] ~lbl { obj };

Gets compiled to:

fabric.lang.security.Label lbl = fabric.lang.security.LabelUtil._Impl.noComponents();
this.set$aFinalArray(
    fabric.lang.arrays.internal.Compat.convert(
        this.$getStore(),
        this.get$$updateLabel(),
        this.get$$updateLabel().confPolicy(),
        new fabric.lang.Object[] { obj }));

So the label lbl is dropped.