Edit

kc3-lang/libxkbcommon/test/data/keymaps/syntax-error2.xkb

Branch :

  • Show log

    Commit

  • Author : Ran Benita
    Date : 2014-07-27 14:24:20
    Hash : 40f109af
    Message : ast-build: make sure InterpDef is freeable With the following two rules: InterpretDecl : INTERPRET InterpretMatch OBRACE VarDeclList CBRACE SEMI { $2->def = $4; $$ = $2; } ; InterpretMatch : KeySym PLUS Expr { $$ = InterpCreate($1, $3); } | KeySym { $$ = InterpCreate($1, NULL); } ; And the fact that InterpCreate doesn't initialize ->def, if the VarDeclList fails, the %destructor tries to recursively free the uninitialized ->def VarDef. So always initialize it. That was the only problematic code in the parser for %destructor (I'm pretty sure). Signed-off-by: Ran Benita <ran234@gmail.com>

  • test/data/keymaps/syntax-error2.xkb
  • xkb_keymap {
    xkb_compatibility "complete" {
        interpret ISO_Level2_Latch+Exactly(Shift) {
            action == LatchMods(modifiers=Shift,clearLocks,latchToLock);
        };
    };
    };