]> granicus.if.org Git - re2c/commit
Added tests for occasionally fixed bug in code generation.
authorUlya Trofimovich <skvadrik@gmail.com>
Wed, 12 Aug 2015 12:52:57 +0000 (13:52 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Wed, 12 Aug 2015 12:52:57 +0000 (13:52 +0100)
commit79411974da8e39514ab53bad9987f878100fa795
tree5ef0e4833967eb2d988d04c1ab89c314b06cb225
parent5bbd0819e6ca208dc500ad3f2ae898ec188fff59
Added tests for occasionally fixed bug in code generation.

The bug was triggered by the following conditions: '-b'
(or any flag that implies '-b') and encoding with code units
wider than 1 byte (that is, UTF-16, UTF-32 and UCS-2).

The bug itself: re2c omitted 'goto <some state>;' when it
should have been generated. The absense of goto caused incorrect
control flow. One cas verify it in two ways using the minimal test
added by this commit:
    - manually compare the code generated before and after fix
      and ensure that newer version generates correct code;
    - run the test with --skeleton, then try to add/remove
      the goto statement, compile and run: the code without
      goto will fail, the code with goto will not;

git-bisected commit which fixed bug:
    commit e42003d80529ab53413459c41a51114c7d437822
    Author: Ulya Trofimovich <skvadrik@gmail.com>
    Date:   Wed Mar 11 12:46:58 2015 +0000

        Pass limited span instead of checking range all the time.

Also gound commit that introduced bug:
    commit d10fb601f3ba257bae0845945daf1dfa754d6146
    Author: helly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
    Date:   Fri Dec 30 16:24:07 2005 +0000

        - Allow to use -w with -b
        # Still quite some work to do but it is possible
re2c/test/php20150211_zend_ini_scanner_trimmed.icF.c [new file with mode: 0644]
re2c/test/php20150211_zend_ini_scanner_trimmed.icF.re [new file with mode: 0644]
re2c/test/php20150211_zend_ini_scanner_trimmed.icFwb.c [new file with mode: 0644]
re2c/test/php20150211_zend_ini_scanner_trimmed.icFwb.re [new file with mode: 0644]
re2c/test/php20150211_zend_ini_scanner_trimmed_minimal_wb_bug.iwb.c [new file with mode: 0644]
re2c/test/php20150211_zend_ini_scanner_trimmed_minimal_wb_bug.iwb.re [new file with mode: 0644]