[I6] double free or corruption bug with undeclared variable

Posting this here because inform7.com and therefore our Mantis bug tracker is currently down (see inform7.com has messed up DNS).

While tinkering with Possessive() in english.h in the Inform6 Library (for [I6] Referring to body parts with "your"), I wound up getting this error when compiling a simple test game:

$ inform +./ wave.inf 
Inform 6.34 for Unix (5th March 2016)
"./English.h", line 643: Error:  No such constant as "obj2"
*** Error in `inform': double free or corruption (!prev): 0x0000000001408d10 ***
Aborted

Here’s the modified english.h:

[ Possessive obj caps owned; ! "owned" is a new parameter
    if (obj == player) {
        if (player provides narrative_voice) switch(player.narrative_voice) {
          1:  if (caps) print "M"; else print "m"; print "y"; return;
          2:  ! Do nothing.
          3:  CDefart(player);
              print "'s"; return;
          default: RunTimeError(16, player.narrative_voice);
        }
        if (caps) print "Y"; else print "y";
        print "our"; return;
    }

! This is the new block of code
    if (owned) {
        CDefart(obj2);
!       CDefart(obj);
        print "'s";
        return;
    }

    if (caps) print "H"; else print "h";
    if (obj has male) { print "is"; return; }
    if (obj has female) { print "er"; return; }
    if (caps) print "I"; else { print "i"; print "ts"; return; }
];

The compiler correctly complained about “obj2” being undeclared, but somehow the precise way I did this caused the compiler to choke. Yes, it would abort anyway, but this is abnormal, right?

Now here’s a test game:

Constant Story "ROCKS";
Constant Headline "^An Interactive Bug Reproduction^";
Constant DEBUG;

Include "parser.h";
Include "verblib.h";

Object Start_Room "Somewhere"
  with description "You're not sure where you are.",
  has light;

Class Rock
	with name "rock" "rocks//p",
	short_name "rock",
	plural "rocks";

Rock ->;
Rock ->;
Rock ->;
Rock ->;

[ Initialise;
  location = Start_Room;
  "It is time to do some bugfixing...";
];

Include "grammar.h";

I will take a look next week. (It’s GDC currently.)

Issue reported at inform7.com/mantis/view.php?id=2000