Inform - Support - Patches

About Patches  


DM4 Errata  

Issue C63022     [previous patch]

Missing " may crash the compiler
Submitted by: Mesmer     Appeared in: Compiler 6.30 or before     Fixed in: -

Under certain circumstances, an unterminated string with a missing double-quote can crash the compiler.

Solution (by Andrew Plotkin)

I can't find the actual cause of the error. It looks like the grammar table is built wrong, and so the backpatcher goes off the rails. Ideally, we shouldn't build an illegal grammar table. In practice, I expect the compiler has lots of bugs where it builds illegal tables after errors occur. Usually a gross source error like that causes a "Fatal error: Too many errors: giving up" before construct_storyfile is called, and so we don't see this. In this case, it got all the way to backpatching.

A trivial fix would be to put a line at the top of construct_storyfile:

  if (no_errors) return;

I don't think that breaks expected behavior for anybody. The code already skips calling output_file() if no_errors is nonzero. One side effect is that a simple (non-cascading) error in the source will suppress "overflowed RAM limit" and "overflowed game file limit" errors.

Last updated 17 April 2013. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Roger Firth.