meme / hellscape

GIMPLE obfuscator for C, C++, Go, ... all supported GCC targets and front-ends that use GIMPLE.
GNU General Public License v3.0
390 stars 34 forks source link

FLA error: definition in block 6 does not dominate use in block 9 #13

Open ele7enxxh opened 3 years ago

ele7enxxh commented 3 years ago
$ cat bug.c
#include <stdio.h>
#include <stdint.h>

static void AddMatch(size_t distance, size_t len) {
}

int target(size_t min_length)
{
  AddMatch((min_length ? 68 : 4), min_length + 1);
  return 0;
}
$ /usr/local/bin/gcc -fPIC -fplugin=hellscape/build/hellscape.so -fplugin-arg-hellscape-seed=deadbeef -fplugin-arg-hellscape-fla bug.c -c -o test
bug.c: In function ‘target’:
bug.c:11:1: error: definition in block 6 does not dominate use in block 9
   11 | }
      | ^
for SSA_NAME: _1 in statement:
# .MEM_14 = VDEF <.MEM_8>
AddMatch (iftmp.0_2, _1);
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH                    | hellscape
during GIMPLE pass: ssa
bug.c:11:1: internal compiler error: verify_ssa failed
0x120b8e2 verify_ssa(bool, bool)
        ../../gcc/tree-ssa.c:1208
0xf06565 execute_function_todo
        ../../gcc/passes.c:1992
0xf072ac do_per_function
        ../../gcc/passes.c:1640
0xf072ac execute_todo
        ../../gcc/passes.c:2039
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ /usr/local/bin/gcc --version
gcc (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /usr/local/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/10.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --enable-checking=yes,rtl,tree
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.1.0 (GCC) 

How to fix this error?