moyix / codeql_weird_minimal

Minimal example of weird CodeQL behavior

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

To reproduce:

  1. Make sure CodeQL is in your path and the CodeQL repo is available
  2. Run ./repro.sh

You can also play around with setting the OPT environment variable to see how the optimization level for some reason changes the behavior :(

$ OPT=-O0 ./repro.sh

Note: I also just tried this on a Mac and over there both files individually were missed but the two together were both flagged. Mysterious!

About

Minimal example of weird CodeQL behavior


Languages

Language:C 40.9%Language:Shell 34.8%Language:CodeQL 18.2%Language:Makefile 6.1%