[racket-dev] Output value of program changes depending on whether I pretty-print an opaque struct value

From: J. Ian Johnson (ianj at ccs.neu.edu)
Date: Tue Aug 27 14:02:50 EDT 2013

This is mostly an mflatt-only problem.

My analysis framework is now using a generic dictionary for its abstract heap, and depending on whether or not I pretty-print this heap before continuing on analyzing, the result of the analysis changes (sound versus unsound). I found the problem doing some printf debugging, and when fixed, I tried removing the print statements. The answer changed. There must be some problem in the C code somewhere, because this is just bonkers.

(Note: I've had previous bugs where rewriting a (begin (void) e) => e caused a similar value-changing bug. Updating the compiler to head fixed it at that point. I'm running yesterday's HEAD now, though.)

https://github.com/dvanhorn/oaam/tree/thocon

See the ;; mflatt: comment in code/kcfa.rkt

To see the problem,
racket code/run-benchmark.rkt --lcg benchmarks/temp-c/sort2.sch

Thanks,
-Ian

Posted on the dev mailing list.