About some bugs

bearophile bearophileHUGS at lycos.com
Wed Jan 5 15:22:26 PST 2011


What I have written was meant for D3.

The example I've shown at the end is a bug found in the Linux kernel, they have found many similar bugs, even in old code. Notnull types are usually not enough to catch similar bugs.

The second part of my proposal was not a general typestate implementation, it's specific, hard-coded, and only two or three states are present, for just reference types, and only few built-in things change the state (if-then-else branches, nullity assetions, nullable/notnull type annotations, and little more).

In a language with gotos and asm your bit of flow analysis will produce some false positives and some false negatives. This currently doesn't go well with D Zen, but things may change.

Bye,
bearophile


More information about the Digitalmars-d mailing list