diff --git a/.gitattributes b/.gitattributes index 1c344d3c035..0acd2cdd533 100644 --- a/.gitattributes +++ b/.gitattributes @@ -74,3 +74,8 @@ # auto-generated bazel lock file /ruby/extractor/cargo-bazel-lock.json linguist-generated=true /ruby/extractor/cargo-bazel-lock.json -merge + +# auto-generated files for the C# build +/csharp/paket.lock linguist-generated=true +# needs eol=crlf, as `paket` touches this file and saves it as crlf +/csharp/.paket/Paket.Restore.targets linguist-generated=true eol=crlf diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d34d40dd8fa..fbe5338e4ca 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -56,7 +56,9 @@ jobs: # uses a compiled language - run: | - dotnet build csharp + cd csharp + dotnet tool restore + dotnet build . - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@main diff --git a/.github/workflows/csharp-qltest.yml b/.github/workflows/csharp-qltest.yml index 557354e96de..2075e10a77a 100644 --- a/.github/workflows/csharp-qltest.yml +++ b/.github/workflows/csharp-qltest.yml @@ -81,10 +81,11 @@ jobs: dotnet-version: 8.0.101 - name: Extractor unit tests run: | + dotnet tool restore dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Util.Tests dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Extraction.Tests dotnet test -p:RuntimeFrameworkVersion=8.0.1 autobuilder/Semmle.Autobuild.CSharp.Tests - dotnet test -p:RuntimeFrameworkVersion=8.0.1 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests" + dotnet test -p:RuntimeFrameworkVersion=8.0.1 autobuilder/Semmle.Autobuild.Cpp.Tests shell: bash stubgentest: runs-on: ubuntu-latest diff --git a/.github/workflows/go-tests-other-os.yml b/.github/workflows/go-tests-other-os.yml index ded53f868b7..9915b0869db 100644 --- a/.github/workflows/go-tests-other-os.yml +++ b/.github/workflows/go-tests-other-os.yml @@ -7,8 +7,6 @@ on: - .github/workflows/go-tests-other-os.yml - .github/actions/** - codeql-workspace.yml -env: - GO_VERSION: '~1.22.0' permissions: contents: read @@ -18,72 +16,17 @@ jobs: name: Test MacOS runs-on: macos-latest steps: - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - cache: false - id: go - - name: Check out code uses: actions/checkout@v4 - - - name: Set up CodeQL CLI - uses: ./.github/actions/fetch-codeql - - - name: Enable problem matchers in repository - shell: bash - run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;' - - - name: Build - run: | - cd go - make - - - name: Cache compilation cache - id: query-cache - uses: ./.github/actions/cache-query-compilation - with: - key: go-qltest - - name: Test - run: | - cd go - make test cache="${{ steps.query-cache.outputs.cache-dir }}" + - name: Run tests + uses: ./go/actions/test test-win: if: github.repository_owner == 'github' name: Test Windows runs-on: windows-latest-xl steps: - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - cache: false - id: go - - name: Check out code uses: actions/checkout@v4 - - - name: Set up CodeQL CLI - uses: ./.github/actions/fetch-codeql - - - name: Enable problem matchers in repository - shell: bash - run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;' - - - name: Build - run: | - cd go - make - - - name: Cache compilation cache - id: query-cache - uses: ./.github/actions/cache-query-compilation - with: - key: go-qltest - - - name: Test - run: | - cd go - make test cache="${{ steps.query-cache.outputs.cache-dir }}" + - name: Run tests + uses: ./go/actions/test diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 6d9cac5dae9..63e2b7c4974 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -16,9 +16,6 @@ on: - .github/actions/** - codeql-workspace.yml -env: - GO_VERSION: '~1.22.0' - permissions: contents: read @@ -28,51 +25,9 @@ jobs: name: Test Linux (Ubuntu) runs-on: ubuntu-latest-xl steps: - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - cache: false - id: go - - name: Check out code uses: actions/checkout@v4 - - - name: Set up CodeQL CLI - uses: ./.github/actions/fetch-codeql - - - name: Enable problem matchers in repository - shell: bash - run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;' - - - name: Build - run: | - cd go - make - - - name: Check that all Go code is autoformatted - run: | - cd go - make check-formatting - - - name: Compile qhelp files to markdown - run: | - cd go - env QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown - - - name: Upload qhelp markdown - uses: actions/upload-artifact@v3 + - name: Run tests + uses: ./go/actions/test with: - name: qhelp-markdown - path: go/qhelp-out/**/*.md - - - name: Cache compilation cache - id: query-cache - uses: ./.github/actions/cache-query-compilation - with: - key: go-qltest - - - name: Test - run: | - cd go - make test cache="${{ steps.query-cache.outputs.cache-dir }}" + run-code-checks: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 05104490468..62ac0d95779 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,12 +29,13 @@ repos: entry: bazel run //misc/bazel:buildifier pass_filenames: false - - id: go-gen - name: Check checked in generated files in go - files: ^go/.* - language: system - entry: bazel run //go:gen - pass_filenames: false +# DISABLED: can be enabled by copying this config and installing `pre-commit` with `--config` on the copy +# - id: go-gen +# name: Check checked in generated files in go +# files: ^go/.* +# language: system +# entry: bazel run //go:gen +# pass_filenames: false - id: codeql-format name: Fix QL file formatting diff --git a/CODEOWNERS b/CODEOWNERS index d8539332467..992acbda4ff 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,6 +1,7 @@ /cpp/ @github/codeql-c-analysis -/cpp/autobuilder/ @github/codeql-c-extractor /csharp/ @github/codeql-csharp +/csharp/autobuilder/Semmle.Autobuild.Cpp @github/codeql-c-extractor +/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests @github/codeql-c-extractor /go/ @github/codeql-go /java/ @github/codeql-java /javascript/ @github/codeql-javascript diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5324ac8f301..a0efca6dec9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,8 @@ We welcome contributions to our CodeQL libraries and queries. Got an idea for a There is lots of useful documentation to help you write queries, ranging from information about query file structure to tutorials for specific target languages. For more information on the documentation available, see [CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/codeql-queries) on [codeql.github.com](https://codeql.github.com). +Note that the CodeQL for Visual Studio Code documentation has been migrated to https://docs.github.com/en/code-security/codeql-for-vs-code/, but you can still contribute to it via a different repository. For more information, see [Contributing to GitHub Docs documentation](https://docs.github.com/en/contributing)." + ## Change notes Any nontrivial user-visible change to a query pack or library pack should have a change note. For details on how to add a change note for your change, see [this guide](docs/change-notes.md). @@ -43,7 +45,7 @@ If you have an idea for a query that you would like to share with other CodeQL u 3. **Formatting** - - The queries and libraries must be autoformatted, for example using the "Format Document" command in [CodeQL for Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code). + - The queries and libraries must be autoformatted, for example using the "Format Document" command in [CodeQL for Visual Studio Code](https://docs.github.com/en/code-security/codeql-for-vs-code/). If you prefer, you can either: 1. install the [pre-commit framework](https://pre-commit.com/) and install the configured hooks on this repo via `pre-commit install`, or diff --git a/README.md b/README.md index 57ecf54486c..99433b8ca49 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This open source repository contains the standard CodeQL libraries and queries t ## How do I learn CodeQL and run queries? -There is [extensive documentation](https://codeql.github.com/docs/) on getting started with writing CodeQL using the [CodeQL extension for Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/) and the [CodeQL CLI](https://codeql.github.com/docs/codeql-cli/). +There is extensive documentation about the [CodeQL language](https://codeql.github.com/docs/), writing CodeQL using the [CodeQL extension for Visual Studio Code](https://docs.github.com/en/code-security/codeql-for-vs-code/) and using the [CodeQL CLI](https://docs.github.com/en/code-security/codeql-cli). ## Contributing diff --git a/cpp/autobuilder/.gitignore b/cpp/autobuilder/.gitignore deleted file mode 100644 index f81ecc73dff..00000000000 --- a/cpp/autobuilder/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -obj/ -TestResults/ -*.manifest -*.pdb -*.suo -*.mdb -*.vsmdi -csharp.log -**/bin/Debug -**/bin/Release -*.tlog -.vs -*.user \ No newline at end of file diff --git a/cpp/autobuilder/README.md b/cpp/autobuilder/README.md new file mode 100644 index 00000000000..a6f213e2bd5 --- /dev/null +++ b/cpp/autobuilder/README.md @@ -0,0 +1 @@ +The Windows autobuilder that used to live in this directory moved to `csharp/autobuilder/Semmle.Autobuild.Cpp`. \ No newline at end of file diff --git a/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/Semmle.Autobuild.Cpp.Tests.csproj b/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/Semmle.Autobuild.Cpp.Tests.csproj deleted file mode 100644 index 1fe010dc3fc..00000000000 --- a/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/Semmle.Autobuild.Cpp.Tests.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - Exe - net8.0 - false - win-x64;linux-x64;osx-x64 - enable - - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - - diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index bcb7d30a2ed..63aa64f6f77 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.13.1 + +No user-facing changes. + ## 0.13.0 ### Breaking Changes diff --git a/cpp/ql/lib/change-notes/released/0.13.1.md b/cpp/ql/lib/change-notes/released/0.13.1.md new file mode 100644 index 00000000000..ec58ef441c1 --- /dev/null +++ b/cpp/ql/lib/change-notes/released/0.13.1.md @@ -0,0 +1,3 @@ +## 0.13.1 + +No user-facing changes. diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml index 5a1b274ee58..92a33894b0b 100644 --- a/cpp/ql/lib/codeql-pack.release.yml +++ b/cpp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.13.0 +lastReleaseVersion: 0.13.1 diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index b87cf42fb6f..f0ef22f89d6 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 0.13.1-dev +version: 0.13.2-dev groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll index 924f68ef807..30511ba1285 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll @@ -9,6 +9,7 @@ private import semmle.code.cpp.models.interfaces.PartialFlow as PartialFlow private import semmle.code.cpp.models.interfaces.FunctionInputsAndOutputs as FIO private import semmle.code.cpp.ir.internal.IRCppLanguage private import semmle.code.cpp.ir.dataflow.internal.ModelUtil +private import semmle.code.cpp.ir.implementation.raw.internal.TranslatedInitialization private import DataFlowPrivate import SsaInternalsCommon @@ -104,8 +105,8 @@ predicate hasRawIndirectInstruction(Instruction instr, int indirectionIndex) { cached private newtype TDefImpl = TDefAddressImpl(BaseIRVariable v) or - TDirectDefImpl(BaseSourceVariableInstruction base, Operand address, int indirectionIndex) { - isDef(_, _, address, base, _, indirectionIndex) + TDirectDefImpl(Operand address, int indirectionIndex) { + isDef(_, _, address, _, _, indirectionIndex) } or TGlobalDefImpl(GlobalLikeVariable v, IRFunction f, int indirectionIndex) { // Represents the initial "definition" of a global variable when entering @@ -115,8 +116,8 @@ private newtype TDefImpl = cached private newtype TUseImpl = - TDirectUseImpl(BaseSourceVariableInstruction base, Operand operand, int indirectionIndex) { - isUse(_, operand, base, _, indirectionIndex) and + TDirectUseImpl(Operand operand, int indirectionIndex) { + isUse(_, operand, _, _, indirectionIndex) and not isDef(true, _, operand, _, _, _) } or TGlobalUse(GlobalLikeVariable v, IRFunction f, int indirectionIndex) { @@ -210,19 +211,11 @@ abstract class DefImpl extends TDefImpl { */ abstract int getIndirection(); - /** - * Gets the instruction that computes the base of this definition or use. - * This is always a `VariableAddressInstruction` or an `CallInstruction`. - */ - abstract BaseSourceVariableInstruction getBase(); - /** * Gets the base source variable (i.e., the variable without * any indirection) of this definition or use. */ - final BaseSourceVariable getBaseSourceVariable() { - this.getBase().getBaseSourceVariable() = result - } + abstract BaseSourceVariable getBaseSourceVariable(); /** Gets the variable that is defined or used. */ SourceVariable getSourceVariable() { @@ -282,19 +275,11 @@ abstract class UseImpl extends TUseImpl { /** Gets the indirection index of this use. */ final int getIndirectionIndex() { result = indirectionIndex } - /** - * Gets the instruction that computes the base of this definition or use. - * This is always a `VariableAddressInstruction` or an `CallInstruction`. - */ - abstract BaseSourceVariableInstruction getBase(); - /** * Gets the base source variable (i.e., the variable without * any indirection) of this definition or use. */ - final BaseSourceVariable getBaseSourceVariable() { - this.getBase().getBaseSourceVariable() = result - } + abstract BaseSourceVariable getBaseSourceVariable(); /** Gets the variable that is defined or used. */ SourceVariable getSourceVariable() { @@ -329,6 +314,17 @@ private predicate sourceVariableHasBaseAndIndex(SourceVariable v, BaseSourceVari v.getIndirection() = ind } +/** + * Gets the instruction that computes the address that's used to + * initialize `v`. + */ +private Instruction getInitializationTargetAddress(IRVariable v) { + exists(TranslatedVariableInitialization init | + init.getIRVariable() = v and + result = init.getTargetAddress() + ) +} + /** An initial definition of an `IRVariable`'s address. */ private class DefAddressImpl extends DefImpl, TDefAddressImpl { BaseIRVariable v; @@ -347,8 +343,15 @@ private class DefAddressImpl extends DefImpl, TDefAddressImpl { final override Node0Impl getValue() { none() } final override predicate hasIndexInBlock(IRBlock block, int index) { - block = v.getIRVariable().getEnclosingIRFunction().getEntryBlock() and - index = 0 + exists(IRVariable var | var = v.getIRVariable() | + block.getInstruction(index) = getInitializationTargetAddress(var) + or + // If there is no translatated element that does initialization of the + // variable we place the SSA definition at the entry block of the function. + not exists(getInitializationTargetAddress(var)) and + block = var.getEnclosingIRFunction().getEntryBlock() and + index = 0 + ) } override Cpp::Location getLocation() { result = v.getIRVariable().getLocation() } @@ -358,14 +361,13 @@ private class DefAddressImpl extends DefImpl, TDefAddressImpl { result.getIndirection() = 0 } - final override BaseSourceVariableInstruction getBase() { none() } + final override BaseSourceVariable getBaseSourceVariable() { result = v } } private class DirectDef extends DefImpl, TDirectDefImpl { Operand address; - BaseSourceVariableInstruction base; - DirectDef() { this = TDirectDefImpl(base, address, indirectionIndex) } + DirectDef() { this = TDirectDefImpl(address, indirectionIndex) } override Cpp::Location getLocation() { result = this.getAddressOperand().getUse().getLocation() } @@ -377,30 +379,36 @@ private class DirectDef extends DefImpl, TDirectDefImpl { override Operand getAddressOperand() { result = address } - override BaseSourceVariableInstruction getBase() { result = base } + private BaseSourceVariableInstruction getBase() { + isDef(_, _, address, result, _, indirectionIndex) + } - override int getIndirection() { isDef(_, _, address, base, result, indirectionIndex) } + override BaseSourceVariable getBaseSourceVariable() { + result = this.getBase().getBaseSourceVariable() + } - override Node0Impl getValue() { isDef(_, result, address, base, _, _) } + override int getIndirection() { isDef(_, _, address, _, result, indirectionIndex) } - override predicate isCertain() { isDef(true, _, address, base, _, indirectionIndex) } + override Node0Impl getValue() { isDef(_, result, address, _, _, _) } + + override predicate isCertain() { isDef(true, _, address, _, _, indirectionIndex) } } private class DirectUseImpl extends UseImpl, TDirectUseImpl { Operand operand; - BaseSourceVariableInstruction base; - DirectUseImpl() { this = TDirectUseImpl(base, operand, indirectionIndex) } + DirectUseImpl() { this = TDirectUseImpl(operand, indirectionIndex) } override string toString() { result = "Use of " + this.getSourceVariable() } final override predicate hasIndexInBlock(IRBlock block, int index) { // See the comment in `ssa0`'s `OperandBasedUse` for an explanation of this // predicate's implementation. - if base.getAst() = any(Cpp::PostfixCrementOperation c).getOperand() + if this.getBase().getAst() = any(Cpp::PostfixCrementOperation c).getOperand() then - exists(Operand op, int indirection | + exists(Operand op, int indirection, Instruction base | indirection = this.getIndirection() and + base = this.getBase() and op = min(Operand cand, int i | isUse(_, cand, base, indirection, indirectionIndex) and @@ -413,15 +421,19 @@ private class DirectUseImpl extends UseImpl, TDirectUseImpl { else operand.getUse() = block.getInstruction(index) } - final override BaseSourceVariableInstruction getBase() { result = base } + private BaseSourceVariableInstruction getBase() { isUse(_, operand, result, _, indirectionIndex) } + + override BaseSourceVariable getBaseSourceVariable() { + result = this.getBase().getBaseSourceVariable() + } final Operand getOperand() { result = operand } final override Cpp::Location getLocation() { result = operand.getLocation() } - override int getIndirection() { isUse(_, operand, base, result, indirectionIndex) } + override int getIndirection() { isUse(_, operand, _, result, indirectionIndex) } - override predicate isCertain() { isUse(true, operand, base, _, indirectionIndex) } + override predicate isCertain() { isUse(true, operand, _, _, indirectionIndex) } override Node getNode() { nodeHasOperand(result, operand, indirectionIndex) } } @@ -480,13 +492,7 @@ class FinalParameterUse extends UseImpl, TFinalParameterUse { result instanceof UnknownDefaultLocation } - override BaseSourceVariableInstruction getBase() { - exists(InitializeParameterInstruction init | - init.getParameter() = p and - // This is always a `VariableAddressInstruction` - result = init.getAnOperand().getDef() - ) - } + override BaseIRVariable getBaseSourceVariable() { result.getIRVariable().getAst() = p } } /** @@ -572,8 +578,8 @@ class GlobalUse extends UseImpl, TGlobalUse { ) } - override SourceVariable getSourceVariable() { - sourceVariableIsGlobal(result, global, f, this.getIndirection()) + override BaseSourceVariable getBaseSourceVariable() { + baseSourceVariableIsGlobal(result, global, f) } final override Cpp::Location getLocation() { result = f.getLocation() } @@ -590,8 +596,6 @@ class GlobalUse extends UseImpl, TGlobalUse { Type getUnderlyingType() { result = global.getUnderlyingType() } override predicate isCertain() { any() } - - override BaseSourceVariableInstruction getBase() { none() } } /** @@ -621,8 +625,8 @@ class GlobalDefImpl extends DefImpl, TGlobalDefImpl { } /** Gets the global variable associated with this definition. */ - override SourceVariable getSourceVariable() { - sourceVariableIsGlobal(result, global, f, this.getIndirection()) + override BaseSourceVariable getBaseSourceVariable() { + baseSourceVariableIsGlobal(result, global, f) } override int getIndirection() { result = indirectionIndex } @@ -645,8 +649,6 @@ class GlobalDefImpl extends DefImpl, TGlobalDefImpl { override string toString() { result = "Def of " + this.getSourceVariable() } override Location getLocation() { result = f.getLocation() } - - override BaseSourceVariableInstruction getBase() { none() } } /** @@ -959,11 +961,10 @@ predicate fromPhiNode(SsaPhiNode nodeFrom, Node nodeTo) { ) } -private predicate sourceVariableIsGlobal( - SourceVariable sv, GlobalLikeVariable global, IRFunction func, int indirectionIndex +private predicate baseSourceVariableIsGlobal( + BaseIRVariable base, GlobalLikeVariable global, IRFunction func ) { - exists(IRVariable irVar, BaseIRVariable base | - sourceVariableHasBaseAndIndex(sv, base, indirectionIndex) and + exists(IRVariable irVar | irVar = base.getIRVariable() and irVar.getEnclosingIRFunction() = func and global = irVar.getAst() and diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll index 7024911a420..4d2b1a95d31 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll @@ -830,6 +830,12 @@ newtype TTranslatedElement = not ignoreExpr(dc) ) } or + // The set of destructors to invoke after a handler for a `try` statement. These + // need to be special cased because the destructors need to run following an + // `ExceptionEdge`, but not following a `GotoEdge` edge. + TTranslatedDestructorsAfterHandler(Handler handler) { + exists(handler.getAnImplicitDestructorCall()) + } or // A precise side effect of an argument to a `Call` TTranslatedArgumentExprSideEffect(Call call, Expr expr, int n, SideEffectOpcode opcode) { not ignoreExpr(expr) and diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll index a43595b08e0..ef7251e8e8a 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll @@ -1844,9 +1844,6 @@ class TranslatedAssignExpr extends TranslatedNonConstantExpr { child = this.getRightOperand() and result = this.getLeftOperand().getFirstInstruction(kind) or - child = this.getRightOperand() and - result = this.getLeftOperand().getFirstInstruction(kind) - or kind instanceof GotoEdge and child = this.getLeftOperand() and result = this.getInstruction(AssignmentStoreTag()) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll index 3f77a2b0b45..ad17722477f 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll @@ -777,6 +777,72 @@ abstract class TranslatedHandler extends TranslatedStmt { TranslatedStmt getBlock() { result = getTranslatedStmt(stmt.getBlock()) } } +/** + * The IR translation of the destructor calls of the parent `TranslatedCatchByTypeHandler`. + * + * This object does not itself generate the destructor calls. Instead, its + * children provide the actual calls. + */ +class TranslatedDestructorsAfterHandler extends TranslatedElement, + TTranslatedDestructorsAfterHandler +{ + Handler handler; + + TranslatedDestructorsAfterHandler() { this = TTranslatedDestructorsAfterHandler(handler) } + + override string toString() { result = "Destructor calls after handler: " + handler } + + private TranslatedCall getTranslatedImplicitDestructorCall(int id) { + result.getExpr() = handler.getImplicitDestructorCall(id) + } + + override Instruction getFirstInstruction(EdgeKind kind) { + result = this.getChild(0).getFirstInstruction(kind) + } + + override Handler getAst() { result = handler } + + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } + + override TranslatedElement getChild(int id) { + result = this.getTranslatedImplicitDestructorCall(id) + } + + override predicate handlesDestructorsExplicitly() { any() } + + override Declaration getFunction() { result = handler.getEnclosingFunction() } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + exists(int id | child = this.getChild(id) | + // Transition to the next child, if any. + result = this.getChild(id + 1).getFirstInstruction(kind) + or + // And otherwise go to the next handler, if any. + not exists(this.getChild(id + 1)) and + result = + getTranslatedStmt(handler) + .getParent() + .(TranslatedTryStmt) + .getNextHandler(getTranslatedStmt(handler), kind) + ) + } + + override TranslatedElement getLastChild() { + result = + this.getTranslatedImplicitDestructorCall(max(int id | + exists(handler.getImplicitDestructorCall(id)) + )) + } + + override Instruction getALastInstructionInternal() { + result = this.getLastChild().getALastInstruction() + } + + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { + none() + } +} + /** * The IR translation of a C++ `catch` block that catches an exception with a * specific type (e.g. `catch (const std::exception&)`). @@ -790,10 +856,14 @@ class TranslatedCatchByTypeHandler extends TranslatedHandler { resultType = getVoidType() } + override predicate handlesDestructorsExplicitly() { any() } + override TranslatedElement getChildInternal(int id) { result = super.getChildInternal(id) or id = 0 and result = this.getParameter() + or + id = 1 and result = this.getDestructors() } override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { @@ -810,7 +880,9 @@ class TranslatedCatchByTypeHandler extends TranslatedHandler { result = this.getParameter().getFirstInstruction(kind) or kind instanceof ExceptionEdge and - result = this.getParent().(TranslatedTryStmt).getNextHandler(this, any(GotoEdge edge)) + if exists(this.getDestructors()) + then result = this.getDestructors().getFirstInstruction(any(GotoEdge edge)) + else result = this.getParent().(TranslatedTryStmt).getNextHandler(this, any(GotoEdge edge)) ) } @@ -822,6 +894,8 @@ class TranslatedCatchByTypeHandler extends TranslatedHandler { private TranslatedParameter getParameter() { result = getTranslatedParameter(stmt.getParameter()) } + + private TranslatedDestructorsAfterHandler getDestructors() { result.getAst() = stmt } } /** @@ -842,9 +916,7 @@ class TranslatedCatchAnyHandler extends TranslatedHandler { } } -class TranslatedIfStmt extends TranslatedStmt, ConditionContext { - override IfStmt stmt; - +abstract class TranslatedIfLikeStmt extends TranslatedStmt, ConditionContext { override Instruction getFirstInstruction(EdgeKind kind) { if this.hasInitialization() then result = this.getInitialization().getFirstInstruction(kind) @@ -857,6 +929,8 @@ class TranslatedIfStmt extends TranslatedStmt, ConditionContext { override TranslatedElement getLastChild() { result = this.getElse() or result = this.getThen() } + override predicate handlesDestructorsExplicitly() { any() } + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getInitialization() or @@ -867,25 +941,21 @@ class TranslatedIfStmt extends TranslatedStmt, ConditionContext { id = 3 and result = this.getElse() } - private predicate hasInitialization() { exists(stmt.getInitialization()) } + abstract predicate hasInitialization(); - private TranslatedStmt getInitialization() { - result = getTranslatedStmt(stmt.getInitialization()) - } + abstract TranslatedStmt getInitialization(); - private TranslatedCondition getCondition() { - result = getTranslatedCondition(stmt.getCondition().getFullyConverted()) - } + abstract TranslatedCondition getCondition(); private Instruction getFirstConditionInstruction(EdgeKind kind) { result = this.getCondition().getFirstInstruction(kind) } - private TranslatedStmt getThen() { result = getTranslatedStmt(stmt.getThen()) } + abstract TranslatedStmt getThen(); - private TranslatedStmt getElse() { result = getTranslatedStmt(stmt.getElse()) } + abstract TranslatedStmt getElse(); - private predicate hasElse() { exists(stmt.getElse()) } + abstract predicate hasElse(); override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } @@ -898,7 +968,11 @@ class TranslatedIfStmt extends TranslatedStmt, ConditionContext { child = this.getCondition() and if this.hasElse() then result = this.getElse().getFirstInstruction(kind) - else result = this.getParent().getChildSuccessor(this, kind) + else ( + if this.hasAnImplicitDestructorCall() + then result = this.getChild(this.getFirstDestructorCallIndex()).getFirstInstruction(kind) + else result = this.getParent().getChildSuccessor(this, kind) + ) } override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { @@ -906,7 +980,24 @@ class TranslatedIfStmt extends TranslatedStmt, ConditionContext { result = this.getFirstConditionInstruction(kind) or (child = this.getThen() or child = this.getElse()) and - result = this.getParent().getChildSuccessor(this, kind) + ( + if this.hasAnImplicitDestructorCall() + then result = this.getChild(this.getFirstDestructorCallIndex()).getFirstInstruction(kind) + else result = this.getParent().getChildSuccessor(this, kind) + ) + or + exists(int destructorId | + destructorId >= this.getFirstDestructorCallIndex() and + child = this.getChild(destructorId) and + result = this.getChild(destructorId + 1).getFirstInstruction(kind) + ) + or + exists(int lastDestructorIndex | + lastDestructorIndex = + max(int n | exists(this.getChild(n)) and n >= this.getFirstDestructorCallIndex()) and + child = this.getChild(lastDestructorIndex) and + result = this.getParent().getChildSuccessor(this, kind) + ) } override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { @@ -914,76 +1005,44 @@ class TranslatedIfStmt extends TranslatedStmt, ConditionContext { } } -class TranslatedConstExprIfStmt extends TranslatedStmt, ConditionContext { - override ConstexprIfStmt stmt; +class TranslatedIfStmt extends TranslatedIfLikeStmt { + override IfStmt stmt; - override Instruction getFirstInstruction(EdgeKind kind) { - if this.hasInitialization() - then result = this.getInitialization().getFirstInstruction(kind) - else result = this.getFirstConditionInstruction(kind) - } + override predicate hasInitialization() { exists(stmt.getInitialization()) } - override TranslatedElement getChildInternal(int id) { - id = 0 and result = this.getInitialization() - or - id = 1 and result = this.getCondition() - or - id = 2 and result = this.getThen() - or - id = 3 and result = this.getElse() - } - - private predicate hasInitialization() { exists(stmt.getInitialization()) } - - private TranslatedStmt getInitialization() { + override TranslatedStmt getInitialization() { result = getTranslatedStmt(stmt.getInitialization()) } - private TranslatedCondition getCondition() { + override TranslatedCondition getCondition() { result = getTranslatedCondition(stmt.getCondition().getFullyConverted()) } - private Instruction getFirstConditionInstruction(EdgeKind kind) { - result = this.getCondition().getFirstInstruction(kind) + override TranslatedStmt getThen() { result = getTranslatedStmt(stmt.getThen()) } + + override TranslatedStmt getElse() { result = getTranslatedStmt(stmt.getElse()) } + + override predicate hasElse() { exists(stmt.getElse()) } +} + +class TranslatedConstExprIfStmt extends TranslatedIfLikeStmt { + override ConstexprIfStmt stmt; + + override predicate hasInitialization() { exists(stmt.getInitialization()) } + + override TranslatedStmt getInitialization() { + result = getTranslatedStmt(stmt.getInitialization()) } - private TranslatedStmt getThen() { result = getTranslatedStmt(stmt.getThen()) } - - private TranslatedStmt getElse() { result = getTranslatedStmt(stmt.getElse()) } - - private predicate hasElse() { exists(stmt.getElse()) } - - override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildTrueSuccessor(TranslatedCondition child, EdgeKind kind) { - child = this.getCondition() and - result = this.getThen().getFirstInstruction(kind) + override TranslatedCondition getCondition() { + result = getTranslatedCondition(stmt.getCondition().getFullyConverted()) } - override Instruction getChildFalseSuccessor(TranslatedCondition child, EdgeKind kind) { - child = this.getCondition() and - if this.hasElse() - then result = this.getElse().getFirstInstruction(kind) - else result = this.getParent().getChildSuccessor(this, kind) - } + override TranslatedStmt getThen() { result = getTranslatedStmt(stmt.getThen()) } - override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { - child = this.getInitialization() and - result = this.getFirstConditionInstruction(kind) - or - (child = this.getThen() or child = this.getElse()) and - result = this.getParent().getChildSuccessor(this, kind) - } + override TranslatedStmt getElse() { result = getTranslatedStmt(stmt.getElse()) } - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { - none() - } - - override Instruction getALastInstructionInternal() { - result = this.getThen().getALastInstruction() - or - result = this.getElse().getALastInstruction() - } + override predicate hasElse() { exists(stmt.getElse()) } } abstract class TranslatedLoop extends TranslatedStmt, ConditionContext { diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md index 52ce33161a7..9bc62270b7e 100644 --- a/cpp/ql/src/CHANGELOG.md +++ b/cpp/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.9.12 + +### New Queries + +* Added a new query, `cpp/iterator-to-expired-container`, to detect the creation of iterators owned by a temporary objects that are about to be destroyed. + ## 0.9.11 ### Minor Analysis Improvements diff --git a/cpp/ql/src/Critical/DoubleFree.qhelp b/cpp/ql/src/Critical/DoubleFree.qhelp index 0b38858eae4..b8c817617f7 100644 --- a/cpp/ql/src/Critical/DoubleFree.qhelp +++ b/cpp/ql/src/Critical/DoubleFree.qhelp @@ -14,13 +14,32 @@ the program, or security vulnerabilities, by allowing an attacker to overwrite a

-Ensure that all execution paths deallocate the allocated memory at most once. If possible, reassign -the pointer to a null value after deallocating it. This will prevent double-free vulnerabilities since -most deallocation functions will perform a null-pointer check before attempting to deallocate the memory. +Ensure that all execution paths deallocate the allocated memory at most once. In complex cases it may +help to reassign a pointer to a null value after deallocating it. This will prevent double-free vulnerabilities +since most deallocation functions will perform a null-pointer check before attempting to deallocate memory.

- + +

+In the following example, buff is allocated and then freed twice: +

+ +

+Reviewing the code above, the issue can be fixed by simply deleting the additional call to +free(buff). +

+ +

+In the next example, task may be deleted twice, if an exception occurs inside the try +block after the first delete: +

+ +

+The problem can be solved by assigning a null value to the pointer after the first delete, as +calling delete a second time on the null pointer is harmless. +

+
diff --git a/cpp/ql/src/Critical/DoubleFree.cpp b/cpp/ql/src/Critical/DoubleFreeBad.cpp similarity index 100% rename from cpp/ql/src/Critical/DoubleFree.cpp rename to cpp/ql/src/Critical/DoubleFreeBad.cpp diff --git a/cpp/ql/src/Critical/DoubleFreeBad2.cpp b/cpp/ql/src/Critical/DoubleFreeBad2.cpp new file mode 100644 index 00000000000..b63e100434d --- /dev/null +++ b/cpp/ql/src/Critical/DoubleFreeBad2.cpp @@ -0,0 +1,16 @@ +void g() { + MyTask *task = nullptr; + + try + { + task = new MyTask; + + ... + + delete task; + + ... + } catch (...) { + delete task; // BAD: potential double-free + } +} diff --git a/cpp/ql/src/Critical/DoubleFreeGood.cpp b/cpp/ql/src/Critical/DoubleFreeGood.cpp new file mode 100644 index 00000000000..024c7aea493 --- /dev/null +++ b/cpp/ql/src/Critical/DoubleFreeGood.cpp @@ -0,0 +1,7 @@ +int* f() { + int *buff = malloc(SIZE*sizeof(int)); + do_stuff(buff); + free(buff); // GOOD: buff is only freed once. + int *new_buffer = malloc(SIZE*sizeof(int)); + return new_buffer; +} diff --git a/cpp/ql/src/Critical/DoubleFreeGood2.cpp b/cpp/ql/src/Critical/DoubleFreeGood2.cpp new file mode 100644 index 00000000000..f1abdd01688 --- /dev/null +++ b/cpp/ql/src/Critical/DoubleFreeGood2.cpp @@ -0,0 +1,17 @@ +void g() { + MyTask *task = nullptr; + + try + { + task = new MyTask; + + ... + + delete task; + task = nullptr; + + ... + } catch (...) { + delete task; // GOOD: harmless if task is NULL + } +} diff --git a/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.qhelp b/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.qhelp index bbd64254d54..b4df60cbac7 100644 --- a/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.qhelp +++ b/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.qhelp @@ -22,10 +22,8 @@ function.
-
  • cplusplus.com: C++ Functions.
  • +
  • CERT C Coding Standard: FIO47-C. Use valid format strings.
  • Microsoft C Runtime Library Reference: printf, wprintf.
  • - -
    diff --git a/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.qhelp b/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.qhelp index 66344e93f22..bb4687b2d9a 100644 --- a/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.qhelp +++ b/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.qhelp @@ -19,8 +19,8 @@ contents. -

    Review the format and arguments expected by the highlighted function calls. Update either -the format or the arguments so that the expected number of arguments are passed to the +

    Review the format and arguments expected by the highlighted function calls. Update either +the format or the arguments so that the expected number of arguments are passed to the function.

    @@ -30,11 +30,8 @@ function. -
  • CERT C Coding -Standard: FIO30-C. Exclude user input from format strings.
  • -
  • cplusplus.com: C++ Functions.
  • +
  • CERT C Coding Standard: FIO47-C. Use valid format strings.
  • Microsoft C Runtime Library Reference: printf, wprintf.
  • -
    diff --git a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.cpp b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.cpp deleted file mode 100644 index c3dd09c3071..00000000000 --- a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.cpp +++ /dev/null @@ -1,4 +0,0 @@ -int main() { - printf("%s\n", 42); //printf will treat 42 as a char*, will most likely segfault - return 0; -} diff --git a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.qhelp b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.qhelp index 02bfd391a33..055adeb741f 100644 --- a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.qhelp +++ b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.qhelp @@ -4,29 +4,33 @@

    Each call to the printf function or a related function should include -the type and sequence of arguments defined by the format. If the function is passed arguments +the type and sequence of arguments defined by the format. If the function is passed arguments of a different type or in a different sequence then the arguments are reinterpreted to fit the type and sequence expected, resulting in unpredictable behavior.

    -

    Review the format and arguments expected by the highlighted function calls. Update either -the format or the arguments so that the expected type and sequence of arguments are passed to +

    Review the format and arguments expected by the highlighted function calls. Update either +the format or the arguments so that the expected type and sequence of arguments are passed to the function.

    - + + +

    In the following example, the wrong format specifier is given for an integer format argument:

    + + + +

    The corrected version uses %i as the format specifier for the integer format argument:

    + +
    -
  • CERT C Coding -Standard: FIO30-C. Exclude user input from format strings.
  • -
  • cplusplus.com: C++ Functions.
  • -
  • CRT Alphabetical Function Reference: printf, _printf_l, wprintf, _wprintf_l.
  • - - - +
  • Microsoft Learn: Format specification syntax: printf and wprintf functions.
  • +
  • cplusplus.com:printf
  • +
  • CERT C Coding Standard: FIO47-C. Use valid format strings.
  • diff --git a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArgumentsBad.cpp b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArgumentsBad.cpp new file mode 100644 index 00000000000..046233af1b0 --- /dev/null +++ b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArgumentsBad.cpp @@ -0,0 +1,4 @@ +int main() { + printf("%s\n", 42); // BAD: printf will treat 42 as a char*, will most likely segfault + return 0; +} diff --git a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArgumentsGood.cpp b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArgumentsGood.cpp new file mode 100644 index 00000000000..0bd3fb5c439 --- /dev/null +++ b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArgumentsGood.cpp @@ -0,0 +1,4 @@ +int main() { + printf("%i\n", 42); // GOOD: printf will treat 42 as an int + return 0; +} diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.cpp b/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.cpp index c3640a66ab6..29eef7c2b1f 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.cpp +++ b/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.cpp @@ -2,19 +2,18 @@ void f_warning(int i) { - // The usage of the logical not operator in this case is unlikely to be correct + // BAD: the usage of the logical not operator in this case is unlikely to be correct // as the output is being used as an operator for a bit-wise and operation - if (i & !FLAGS) + if (i & !FLAGS) { // code } } - void f_fixed(int i) { - if (i & ~FLAGS) // Changing the logical not operator for the bit-wise not operator would fix this logic + if (i & ~FLAGS) // GOOD: Changing the logical not operator for the bit-wise not operator would fix this logic { // code } -} \ No newline at end of file +} diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.qhelp b/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.qhelp index bac09fe9cf1..3b5824c314a 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.qhelp +++ b/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.qhelp @@ -16,7 +16,13 @@

    Carefully inspect the flagged expressions. Consider the intent in the code logic, and decide whether it is necessary to change the not operator.

    - + +

    Here is an example of this issue and how it can be fixed:

    + + + +

    In other cases, particularly when the expressions have bool type, the fix may instead be of the form a && !b.

    +
  • diff --git a/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.cpp b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.cpp deleted file mode 100644 index 07acc91cd5a..00000000000 --- a/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.cpp +++ /dev/null @@ -1,2 +0,0 @@ -strncpy(dest, src, sizeof(src)); //wrong: size of dest should be used -strncpy(dest, src, strlen(src)); //wrong: size of dest should be used diff --git a/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.qhelp b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.qhelp index 2e297116710..201b9057499 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.qhelp +++ b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.qhelp @@ -3,7 +3,7 @@ "qhelp.dtd"> -

    The standard library function strncpy copies a source string to a destination buffer. The third argument defines the maximum number of characters to copy and should be less than +

    The standard library function strncpy copies a source string to a destination buffer. The third argument defines the maximum number of characters to copy and should be less than or equal to the size of the destination buffer. Calls of the form strncpy(dest, src, strlen(src)) or strncpy(dest, src, sizeof(src)) incorrectly set the third argument to the size of the source buffer. Executing a call of this type may cause a buffer overflow. Buffer overflows can lead to anything from a segmentation fault to a security vulnerability.

    @@ -12,14 +12,20 @@ or equal to the size of the destination buffer. Calls of the form strncpy( not the source buffer.

    - + +

    In the following examples, the size of the source buffer is incorrectly used as a parameter to strncpy:

    + +

    The corrected version uses the size of the destination buffer, or a variable containing the size of the destination buffer as the size parameter to strncpy:

    + +
    + -
  • cplusplus.com: strncpy.
  • +
  • cplusplus.com: strncpy.
  • I. Gerg. An Overview and Example of the Buffer-Overflow Exploit. IANewsletter vol 7 no 4. 2005.
  • diff --git a/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgsBad.cpp b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgsBad.cpp new file mode 100644 index 00000000000..952550b2638 --- /dev/null +++ b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgsBad.cpp @@ -0,0 +1,9 @@ +char src[256]; +char dest1[128]; + +... + +strncpy(dest1, src, sizeof(src)); // wrong: size of dest should be used + +char *dest2 = (char *)malloc(sz1 + sz2 + sz3); +strncpy(dest2, src, strlen(src)); // wrong: size of dest should be used diff --git a/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgsGood.cpp b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgsGood.cpp new file mode 100644 index 00000000000..22fc4ebd222 --- /dev/null +++ b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgsGood.cpp @@ -0,0 +1,10 @@ +char src[256]; +char dest1[128]; + +... + +strncpy(dest1, src, sizeof(dest1)); // correct + +size_t destSize = sz1 + sz2 + sz3; +char *dest2 = (char *)malloc(destSize); +strncpy(dest2, src, destSize); // correct diff --git a/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.c b/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.c deleted file mode 100644 index 63856888ebb..00000000000 --- a/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.c +++ /dev/null @@ -1,22 +0,0 @@ -int main(int argc, char** argv) { - char *userAndFile = argv[2]; - - { - char fileBuffer[FILENAME_MAX] = "/home/"; - char *fileName = fileBuffer; - size_t len = strlen(fileName); - strncat(fileName+len, userAndFile, FILENAME_MAX-len-1); - // BAD: a string from the user is used in a filename - fopen(fileName, "wb+"); - } - - { - char fileBuffer[FILENAME_MAX] = "/home/"; - char *fileName = fileBuffer; - size_t len = strlen(fileName); - // GOOD: use a fixed file - char* fixed = "jim/file.txt"; - strncat(fileName+len, fixed, FILENAME_MAX-len-1); - fopen(fileName, "wb+"); - } -} diff --git a/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp b/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp index eba2ede58f5..4d6238ac335 100644 --- a/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp +++ b/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp @@ -3,36 +3,57 @@ "qhelp.dtd"> -

    Accessing paths controlled by users can allow an attacker to access unexpected resources. This +

    Accessing paths controlled by users can allow an attacker to access unexpected resources. This can result in sensitive information being revealed or deleted, or an attacker being able to influence behavior by modifying unexpected files.

    -

    Paths that are naively constructed from data controlled by a user may contain unexpected special characters, -such as "..". Such a path may potentially point to any directory on the filesystem.

    +

    Paths that are naively constructed from data controlled by a user may be absolute paths, or may contain +unexpected special characters such as "..". Such a path could point anywhere on the file system.

    -

    Validate user input before using it to construct a filepath. Ideally, follow these rules:

    +

    Validate user input before using it to construct a file path.

    -
      -
    • Do not allow more than a single "." character.
    • -
    • Do not allow directory separators such as "/" or "\" (depending on the filesystem).
    • -
    • Do not rely on simply replacing problematic sequences such as "../". For example, after applying this filter to -".../...//" the resulting string would still be "../".
    • -
    • Ideally use a whitelist of known good patterns.
    • -
    +

    Common validation methods include checking that the normalized path is relative and does not contain +any ".." components, or checking that the path is contained within a safe folder. The method you should use depends +on how the path is used in the application, and whether the path should be a single path component. +

    + +

    If the path should be a single path component (such as a file name), you can check for the existence +of any path separators ("/" or "\"), or ".." sequences in the input, and reject the input if any are found. +

    + +

    +Note that removing "../" sequences is not sufficient, since the input could still contain a path separator +followed by "..". For example, the input ".../...//" would still result in the string "../" if only "../" sequences +are removed. +

    + +

    Finally, the simplest (but most restrictive) option is to use an allow list of safe patterns and make sure that +the user input matches one of these patterns.

    -

    In this example, a username and file are read from the arguments to main and then used to access a file in the -user's home directory. However, a malicious user could enter a filename which contains special -characters. For example, the string "../../etc/passwd" will result in the code reading the file located at -"/home/[user]/../../etc/passwd", which is the system's password file. This could potentially allow them to -access all the system's passwords.

    +

    In this example, a file name is read from a user and then used to access a file. +However, a malicious user could enter a file name anywhere on the file system, +such as "/etc/passwd" or "../../../etc/passwd".

    - + + +

    +If the input should only be a file name, you can check that it doesn't contain any path separators or ".." sequences. +

    + + + +

    +If the input should be within a specific directory, you can check that the resolved path +is still contained within that directory. +

    + +
    @@ -41,6 +62,7 @@ access all the system's passwords.

    OWASP: Path Traversal. +
  • Linux man pages: realpath(3).
  • diff --git a/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPath.c b/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPath.c new file mode 100644 index 00000000000..ff309d7d9d8 --- /dev/null +++ b/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPath.c @@ -0,0 +1,10 @@ +int main(int argc, char** argv) { + char *userAndFile = argv[2]; + + { + char fileBuffer[PATH_MAX]; + snprintf(fileBuffer, sizeof(fileBuffer), "/home/%s", userAndFile); + // BAD: a string from the user is used in a filename + fopen(fileBuffer, "wb+"); + } +} diff --git a/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPathFolder.c b/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPathFolder.c new file mode 100644 index 00000000000..1970e515d02 --- /dev/null +++ b/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPathFolder.c @@ -0,0 +1,28 @@ +#include +#include + +int main(int argc, char** argv) { + char *userAndFile = argv[2]; + const char *baseDir = "/home/user/public/"; + char fullPath[PATH_MAX]; + + // Attempt to concatenate the base directory and the user-supplied path + snprintf(fullPath, sizeof(fullPath), "%s%s", baseDir, userAndFile); + + // Resolve the absolute path, normalizing any ".." or "." + char *resolvedPath = realpath(fullPath, NULL); + if (resolvedPath == NULL) { + perror("Error resolving path"); + return 1; + } + + // Check if the resolved path starts with the base directory + if (strncmp(baseDir, resolvedPath, strlen(baseDir)) != 0) { + free(resolvedPath); + return 1; + } + + // GOOD: Path is within the intended directory + FILE *file = fopen(resolvedPath, "wb+"); + free(resolvedPath); +} \ No newline at end of file diff --git a/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPathNormalize.c b/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPathNormalize.c new file mode 100644 index 00000000000..ab7607cdd3d --- /dev/null +++ b/cpp/ql/src/Security/CWE/CWE-022/examples/TaintedPathNormalize.c @@ -0,0 +1,16 @@ +#include +#include + +int main(int argc, char** argv) { + char *fileName = argv[2]; + // Check for invalid sequences in the user input + if (strstr(fileName , "..") || strchr(fileName , '/') || strchr(fileName , '\\')) { + printf("Invalid filename.\n"); + return 1; + } + + char fileBuffer[PATH_MAX]; + snprintf(fileBuffer, sizeof(fileBuffer), "/home/user/files/%s", fileName); + // GOOD: We know that the filename is safe and stays within the public folder + FILE *file = fopen(fileBuffer, "wb+"); +} \ No newline at end of file diff --git a/cpp/ql/src/change-notes/2024-04-29-iterator-to-expired-container.md b/cpp/ql/src/change-notes/released/0.9.12.md similarity index 84% rename from cpp/ql/src/change-notes/2024-04-29-iterator-to-expired-container.md rename to cpp/ql/src/change-notes/released/0.9.12.md index ce06805a8f3..0a66e72ed44 100644 --- a/cpp/ql/src/change-notes/2024-04-29-iterator-to-expired-container.md +++ b/cpp/ql/src/change-notes/released/0.9.12.md @@ -1,4 +1,5 @@ ---- -category: newQuery ---- +## 0.9.12 + +### New Queries + * Added a new query, `cpp/iterator-to-expired-container`, to detect the creation of iterators owned by a temporary objects that are about to be destroyed. diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml index 47eb8b55bab..12f1a311eca 100644 --- a/cpp/ql/src/codeql-pack.release.yml +++ b/cpp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.9.11 +lastReleaseVersion: 0.9.12 diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml index e3f87e5a635..e6cfba5e9da 100644 --- a/cpp/ql/src/qlpack.yml +++ b/cpp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-queries -version: 0.9.12-dev +version: 0.9.13-dev groups: - cpp - queries diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected index cf5125b1ccf..d7b240c8949 100644 --- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected +++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected @@ -12159,8 +12159,12 @@ ir.cpp: # 1109| Type = [IntType] int # 1110| [Destructor] void std::vector::~vector() # 1110| : +# 1110| [Destructor] void std::vector::~vector() +# 1110| : # 1110| [Destructor] void std::vector::~vector() # 1110| : +# 1110| [Destructor] void std::vector::~vector() +# 1110| : # 1110| [Destructor] void std::vector::~vector() # 1110| : # 1115| [ConstMemberFunction] std::vector::iterator std::vector::begin() const @@ -19307,193 +19311,195 @@ ir.cpp: # 2193| getQualifier(): [ThisExpr] this # 2193| Type = [PointerType] ClassWithDestructor * # 2193| ValueCategory = prvalue(load) -# 2196| [GlobalVariable] bool initialization_with_destructor_bool -# 2196| getInitializer(): [Initializer] initializer for initialization_with_destructor_bool -# 2196| getExpr(): [Literal] 1 -# 2196| Type = [BoolType] bool -# 2196| Value = [Literal] 1 -# 2196| ValueCategory = prvalue -# 2198| [TopLevelFunction] void initialization_with_destructor(bool, char) -# 2198| : -# 2198| getParameter(0): [Parameter] b -# 2198| Type = [BoolType] bool -# 2198| getParameter(1): [Parameter] c -# 2198| Type = [PlainCharType] char -# 2198| getEntryPoint(): [BlockStmt] { ... } -# 2199| getStmt(0): [IfStmt] if (...) ... -# 2199| getInitialization(): [DeclStmt] declaration -# 2199| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2199| Type = [Class] ClassWithDestructor -# 2199| getVariable().getInitializer(): [Initializer] initializer for x -# 2199| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2199| Type = [VoidType] void -# 2199| ValueCategory = prvalue -# 2199| getCondition(): [VariableAccess] b -# 2199| Type = [BoolType] bool -# 2199| ValueCategory = prvalue(load) -# 2200| getThen(): [ExprStmt] ExprStmt -# 2200| getExpr(): [FunctionCall] call to set_x -# 2200| Type = [VoidType] void -# 2200| ValueCategory = prvalue -# 2200| getQualifier(): [VariableAccess] x -# 2200| Type = [Class] ClassWithDestructor -# 2200| ValueCategory = lvalue -# 2200| getArgument(0): [CharLiteral] 97 -# 2200| Type = [PlainCharType] char -# 2200| Value = [CharLiteral] 97 -# 2200| ValueCategory = prvalue -# 2200| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2200| Type = [VoidType] void -# 2200| ValueCategory = prvalue -# 2200| getQualifier(): [VariableAccess] x +# 2194| [ConstMemberFunction,ConversionOperator] bool ClassWithDestructor::operator bool() const +# 2194| : +# 2197| [GlobalVariable] bool initialization_with_destructor_bool +# 2197| getInitializer(): [Initializer] initializer for initialization_with_destructor_bool +# 2197| getExpr(): [Literal] 1 +# 2197| Type = [BoolType] bool +# 2197| Value = [Literal] 1 +# 2197| ValueCategory = prvalue +# 2199| [TopLevelFunction] void initialization_with_destructor(bool, char) +# 2199| : +# 2199| getParameter(0): [Parameter] b +# 2199| Type = [BoolType] bool +# 2199| getParameter(1): [Parameter] c +# 2199| Type = [PlainCharType] char +# 2199| getEntryPoint(): [BlockStmt] { ... } +# 2200| getStmt(0): [IfStmt] if (...) ... +# 2200| getInitialization(): [DeclStmt] declaration +# 2200| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x # 2200| Type = [Class] ClassWithDestructor -# 2200| ValueCategory = lvalue -# 2202| getStmt(1): [ConstexprIfStmt] if constexpr (...) ... -# 2202| getInitialization(): [DeclStmt] declaration -# 2202| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2202| Type = [Class] ClassWithDestructor -# 2202| getVariable().getInitializer(): [Initializer] initializer for x -# 2202| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2202| Type = [VoidType] void -# 2202| ValueCategory = prvalue -# 2202| getCondition(): [VariableAccess] initialization_with_destructor_bool -# 2202| Type = [BoolType] bool -# 2202| Value = [VariableAccess] 1 -# 2202| ValueCategory = prvalue(load) -# 2203| getThen(): [ExprStmt] ExprStmt -# 2203| getExpr(): [FunctionCall] call to set_x -# 2203| Type = [VoidType] void -# 2203| ValueCategory = prvalue -# 2203| getQualifier(): [VariableAccess] x -# 2203| Type = [Class] ClassWithDestructor -# 2203| ValueCategory = lvalue -# 2203| getArgument(0): [CharLiteral] 97 -# 2203| Type = [PlainCharType] char -# 2203| Value = [CharLiteral] 97 -# 2203| ValueCategory = prvalue -# 2203| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2203| Type = [VoidType] void -# 2203| ValueCategory = prvalue -# 2203| getQualifier(): [VariableAccess] x +# 2200| getVariable().getInitializer(): [Initializer] initializer for x +# 2200| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2200| Type = [VoidType] void +# 2200| ValueCategory = prvalue +# 2200| getCondition(): [VariableAccess] b +# 2200| Type = [BoolType] bool +# 2200| ValueCategory = prvalue(load) +# 2201| getThen(): [ExprStmt] ExprStmt +# 2201| getExpr(): [FunctionCall] call to set_x +# 2201| Type = [VoidType] void +# 2201| ValueCategory = prvalue +# 2201| getQualifier(): [VariableAccess] x +# 2201| Type = [Class] ClassWithDestructor +# 2201| ValueCategory = lvalue +# 2201| getArgument(0): [CharLiteral] 97 +# 2201| Type = [PlainCharType] char +# 2201| Value = [CharLiteral] 97 +# 2201| ValueCategory = prvalue +# 2201| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2201| Type = [VoidType] void +# 2201| ValueCategory = prvalue +# 2201| getQualifier(): [VariableAccess] x +# 2201| Type = [Class] ClassWithDestructor +# 2201| ValueCategory = lvalue +# 2203| getStmt(1): [ConstexprIfStmt] if constexpr (...) ... +# 2203| getInitialization(): [DeclStmt] declaration +# 2203| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x # 2203| Type = [Class] ClassWithDestructor -# 2203| ValueCategory = lvalue -# 2205| getStmt(2): [SwitchStmt] switch (...) ... -# 2205| getInitialization(): [DeclStmt] declaration -# 2205| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2205| Type = [Class] ClassWithDestructor -# 2205| getVariable().getInitializer(): [Initializer] initializer for x -# 2205| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2205| Type = [VoidType] void -# 2205| ValueCategory = prvalue -# 2205| getExpr(): [VariableAccess] c -# 2205| Type = [PlainCharType] char -# 2205| ValueCategory = prvalue(load) -# 2205| getStmt(): [BlockStmt] { ... } -# 2206| getStmt(0): [SwitchCase] case ...: -# 2206| getExpr(): [CharLiteral] 97 -# 2206| Type = [PlainCharType] char -# 2206| Value = [CharLiteral] 97 -# 2206| ValueCategory = prvalue -# 2206| getExpr().getFullyConverted(): [CStyleCast] (int)... -# 2206| Conversion = [IntegralConversion] integral conversion -# 2206| Type = [IntType] int -# 2206| Value = [CStyleCast] 97 -# 2206| ValueCategory = prvalue -# 2207| getStmt(1): [ExprStmt] ExprStmt -# 2207| getExpr(): [FunctionCall] call to set_x -# 2207| Type = [VoidType] void +# 2203| getVariable().getInitializer(): [Initializer] initializer for x +# 2203| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2203| Type = [VoidType] void +# 2203| ValueCategory = prvalue +# 2203| getCondition(): [VariableAccess] initialization_with_destructor_bool +# 2203| Type = [BoolType] bool +# 2203| Value = [VariableAccess] 1 +# 2203| ValueCategory = prvalue(load) +# 2204| getThen(): [ExprStmt] ExprStmt +# 2204| getExpr(): [FunctionCall] call to set_x +# 2204| Type = [VoidType] void +# 2204| ValueCategory = prvalue +# 2204| getQualifier(): [VariableAccess] x +# 2204| Type = [Class] ClassWithDestructor +# 2204| ValueCategory = lvalue +# 2204| getArgument(0): [CharLiteral] 97 +# 2204| Type = [PlainCharType] char +# 2204| Value = [CharLiteral] 97 +# 2204| ValueCategory = prvalue +# 2204| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2204| Type = [VoidType] void +# 2204| ValueCategory = prvalue +# 2204| getQualifier(): [VariableAccess] x +# 2204| Type = [Class] ClassWithDestructor +# 2204| ValueCategory = lvalue +# 2206| getStmt(2): [SwitchStmt] switch (...) ... +# 2206| getInitialization(): [DeclStmt] declaration +# 2206| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2206| Type = [Class] ClassWithDestructor +# 2206| getVariable().getInitializer(): [Initializer] initializer for x +# 2206| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2206| Type = [VoidType] void +# 2206| ValueCategory = prvalue +# 2206| getExpr(): [VariableAccess] c +# 2206| Type = [PlainCharType] char +# 2206| ValueCategory = prvalue(load) +# 2206| getStmt(): [BlockStmt] { ... } +# 2207| getStmt(0): [SwitchCase] case ...: +# 2207| getExpr(): [CharLiteral] 97 +# 2207| Type = [PlainCharType] char +# 2207| Value = [CharLiteral] 97 # 2207| ValueCategory = prvalue -# 2207| getQualifier(): [VariableAccess] x -# 2207| Type = [Class] ClassWithDestructor -# 2207| ValueCategory = lvalue -# 2207| getArgument(0): [CharLiteral] 97 -# 2207| Type = [PlainCharType] char -# 2207| Value = [CharLiteral] 97 -# 2207| ValueCategory = prvalue -# 2208| getStmt(2): [BreakStmt] break; -# 2212| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2212| Type = [VoidType] void -# 2212| ValueCategory = prvalue -# 2212| getQualifier(): [VariableAccess] x -# 2212| Type = [Class] ClassWithDestructor -# 2212| ValueCategory = lvalue -# 2209| getStmt(3): [SwitchCase] default: -# 2210| getStmt(4): [ExprStmt] ExprStmt -# 2210| getExpr(): [FunctionCall] call to set_x -# 2210| Type = [VoidType] void -# 2210| ValueCategory = prvalue -# 2210| getQualifier(): [VariableAccess] x -# 2210| Type = [Class] ClassWithDestructor -# 2210| ValueCategory = lvalue -# 2210| getArgument(0): [CharLiteral] 98 -# 2210| Type = [PlainCharType] char -# 2210| Value = [CharLiteral] 98 -# 2210| ValueCategory = prvalue -# 2211| getStmt(5): [BreakStmt] break; -# 2212| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2212| Type = [VoidType] void -# 2212| ValueCategory = prvalue -# 2212| getQualifier(): [VariableAccess] x -# 2212| Type = [Class] ClassWithDestructor -# 2212| ValueCategory = lvalue -# 2212| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2212| Type = [VoidType] void -# 2212| ValueCategory = prvalue -# 2212| getQualifier(): [VariableAccess] x -# 2212| Type = [Class] ClassWithDestructor -# 2212| ValueCategory = lvalue -# 2205| getExpr().getFullyConverted(): [CStyleCast] (int)... -# 2205| Conversion = [IntegralConversion] integral conversion -# 2205| Type = [IntType] int -# 2205| ValueCategory = prvalue -# 2212| getStmt(3): [LabelStmt] label ...: -# 2214| getStmt(4): [DeclStmt] declaration -# 2214| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2214| Type = [Class] ClassWithDestructor -# 2214| getVariable().getInitializer(): [Initializer] initializer for x -# 2214| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2214| Type = [VoidType] void -# 2214| ValueCategory = prvalue -# 2215| getStmt(5): [RangeBasedForStmt] for(...:...) ... -# 2215| getInitialization(): [DeclStmt] declaration -# 2215| getDeclarationEntry(0): [VariableDeclarationEntry] definition of ys -# 2215| Type = [ClassTemplateInstantiation,Struct] vector -# 2215| getVariable().getInitializer(): [Initializer] initializer for ys -# 2215| getExpr(): [ConstructorCall] call to vector -# 2215| Type = [VoidType] void -# 2215| ValueCategory = prvalue -# 2215| getArgument(0): [VariableAccess] x -# 2215| Type = [Class] ClassWithDestructor -# 2215| ValueCategory = prvalue(load) -# 2215| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2215| Type = [VoidType] void -# 2215| ValueCategory = prvalue -# 2215| getQualifier(): [ReuseExpr] reuse of temporary object -# 2215| Type = [Class] ClassWithDestructor -# 2215| ValueCategory = xvalue -# 2215| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2215| Type = [Class] ClassWithDestructor -# 2215| ValueCategory = lvalue -# 2215| getChild(1): [DeclStmt] declaration -# 2215| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) -# 2215| Type = [LValueReferenceType] vector & +# 2207| getExpr().getFullyConverted(): [CStyleCast] (int)... +# 2207| Conversion = [IntegralConversion] integral conversion +# 2207| Type = [IntType] int +# 2207| Value = [CStyleCast] 97 +# 2207| ValueCategory = prvalue +# 2208| getStmt(1): [ExprStmt] ExprStmt +# 2208| getExpr(): [FunctionCall] call to set_x +# 2208| Type = [VoidType] void +# 2208| ValueCategory = prvalue +# 2208| getQualifier(): [VariableAccess] x +# 2208| Type = [Class] ClassWithDestructor +# 2208| ValueCategory = lvalue +# 2208| getArgument(0): [CharLiteral] 97 +# 2208| Type = [PlainCharType] char +# 2208| Value = [CharLiteral] 97 +# 2208| ValueCategory = prvalue +# 2209| getStmt(2): [BreakStmt] break; +# 2213| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2213| Type = [VoidType] void +# 2213| ValueCategory = prvalue +# 2213| getQualifier(): [VariableAccess] x +# 2213| Type = [Class] ClassWithDestructor +# 2213| ValueCategory = lvalue +# 2210| getStmt(3): [SwitchCase] default: +# 2211| getStmt(4): [ExprStmt] ExprStmt +# 2211| getExpr(): [FunctionCall] call to set_x +# 2211| Type = [VoidType] void +# 2211| ValueCategory = prvalue +# 2211| getQualifier(): [VariableAccess] x +# 2211| Type = [Class] ClassWithDestructor +# 2211| ValueCategory = lvalue +# 2211| getArgument(0): [CharLiteral] 98 +# 2211| Type = [PlainCharType] char +# 2211| Value = [CharLiteral] 98 +# 2211| ValueCategory = prvalue +# 2212| getStmt(5): [BreakStmt] break; +# 2213| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2213| Type = [VoidType] void +# 2213| ValueCategory = prvalue +# 2213| getQualifier(): [VariableAccess] x +# 2213| Type = [Class] ClassWithDestructor +# 2213| ValueCategory = lvalue +# 2213| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2213| Type = [VoidType] void +# 2213| ValueCategory = prvalue +# 2213| getQualifier(): [VariableAccess] x +# 2213| Type = [Class] ClassWithDestructor +# 2213| ValueCategory = lvalue +# 2206| getExpr().getFullyConverted(): [CStyleCast] (int)... +# 2206| Conversion = [IntegralConversion] integral conversion +# 2206| Type = [IntType] int +# 2206| ValueCategory = prvalue +# 2213| getStmt(3): [LabelStmt] label ...: +# 2215| getStmt(4): [DeclStmt] declaration +# 2215| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2215| Type = [Class] ClassWithDestructor +# 2215| getVariable().getInitializer(): [Initializer] initializer for x +# 2215| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2215| Type = [VoidType] void +# 2215| ValueCategory = prvalue +# 2216| getStmt(5): [RangeBasedForStmt] for(...:...) ... +# 2216| getInitialization(): [DeclStmt] declaration +# 2216| getDeclarationEntry(0): [VariableDeclarationEntry] definition of ys +# 2216| Type = [ClassTemplateInstantiation,Struct] vector +# 2216| getVariable().getInitializer(): [Initializer] initializer for ys +# 2216| getExpr(): [ConstructorCall] call to vector +# 2216| Type = [VoidType] void +# 2216| ValueCategory = prvalue +# 2216| getArgument(0): [VariableAccess] x +# 2216| Type = [Class] ClassWithDestructor +# 2216| ValueCategory = prvalue(load) +# 2216| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2216| Type = [VoidType] void +# 2216| ValueCategory = prvalue +# 2216| getQualifier(): [ReuseExpr] reuse of temporary object +# 2216| Type = [Class] ClassWithDestructor +# 2216| ValueCategory = xvalue +# 2216| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2216| Type = [Class] ClassWithDestructor +# 2216| ValueCategory = lvalue +# 2216| getChild(1): [DeclStmt] declaration +# 2216| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) +# 2216| Type = [LValueReferenceType] vector & #-----| getVariable().getInitializer(): [Initializer] initializer for (__range) -# 2215| getExpr(): [VariableAccess] ys -# 2215| Type = [ClassTemplateInstantiation,Struct] vector -# 2215| ValueCategory = lvalue -# 2215| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) -# 2215| Type = [LValueReferenceType] vector & -# 2215| ValueCategory = prvalue -# 2215| getBeginEndDeclaration(): [DeclStmt] declaration -# 2215| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) -# 2215| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2216| getExpr(): [VariableAccess] ys +# 2216| Type = [ClassTemplateInstantiation,Struct] vector +# 2216| ValueCategory = lvalue +# 2216| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2216| Type = [LValueReferenceType] vector & +# 2216| ValueCategory = prvalue +# 2216| getBeginEndDeclaration(): [DeclStmt] declaration +# 2216| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) +# 2216| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__begin) -# 2215| getExpr(): [FunctionCall] call to begin -# 2215| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2215| ValueCategory = prvalue -# 2215| getQualifier(): [VariableAccess] (__range) -# 2215| Type = [LValueReferenceType] vector & -# 2215| ValueCategory = prvalue(load) +# 2216| getExpr(): [FunctionCall] call to begin +# 2216| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2216| ValueCategory = prvalue +# 2216| getQualifier(): [VariableAccess] (__range) +# 2216| Type = [LValueReferenceType] vector & +# 2216| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -19501,15 +19507,15 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2215| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) -# 2215| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2216| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) +# 2216| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__end) -# 2215| getExpr(): [FunctionCall] call to end -# 2215| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2215| ValueCategory = prvalue -# 2215| getQualifier(): [VariableAccess] (__range) -# 2215| Type = [LValueReferenceType] vector & -# 2215| ValueCategory = prvalue(load) +# 2216| getExpr(): [FunctionCall] call to end +# 2216| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2216| ValueCategory = prvalue +# 2216| getQualifier(): [VariableAccess] (__range) +# 2216| Type = [LValueReferenceType] vector & +# 2216| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -19517,18 +19523,18 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2215| getCondition(): [FunctionCall] call to operator!= -# 2215| Type = [BoolType] bool -# 2215| ValueCategory = prvalue -# 2215| getQualifier(): [VariableAccess] (__begin) -# 2215| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2215| ValueCategory = lvalue -# 2215| getArgument(0): [ConstructorCall] call to iterator -# 2215| Type = [VoidType] void -# 2215| ValueCategory = prvalue -# 2215| getArgument(0): [VariableAccess] (__end) -# 2215| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2215| ValueCategory = lvalue +# 2216| getCondition(): [FunctionCall] call to operator!= +# 2216| Type = [BoolType] bool +# 2216| ValueCategory = prvalue +# 2216| getQualifier(): [VariableAccess] (__begin) +# 2216| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2216| ValueCategory = lvalue +# 2216| getArgument(0): [ConstructorCall] call to iterator +# 2216| Type = [VoidType] void +# 2216| ValueCategory = prvalue +# 2216| getArgument(0): [VariableAccess] (__end) +# 2216| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2216| ValueCategory = lvalue #-----| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) #-----| Type = [LValueReferenceType] const iterator & #-----| ValueCategory = prvalue @@ -19543,95 +19549,95 @@ ir.cpp: #-----| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object #-----| Type = [ClassTemplateInstantiation,Struct] iterator #-----| ValueCategory = lvalue -# 2215| getUpdate(): [FunctionCall] call to operator++ -# 2215| Type = [LValueReferenceType] iterator & -# 2215| ValueCategory = prvalue -# 2215| getQualifier(): [VariableAccess] (__begin) -# 2215| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2215| ValueCategory = lvalue -# 2215| getChild(5): [DeclStmt] declaration -# 2215| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y -# 2215| Type = [Class] ClassWithDestructor -# 2215| getVariable().getInitializer(): [Initializer] initializer for y -# 2215| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* -# 2215| Type = [LValueReferenceType] ClassWithDestructor & -# 2215| ValueCategory = prvalue -# 2215| getQualifier(): [VariableAccess] (__begin) -# 2215| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2215| ValueCategory = lvalue +# 2216| getUpdate(): [FunctionCall] call to operator++ +# 2216| Type = [LValueReferenceType] iterator & +# 2216| ValueCategory = prvalue +# 2216| getQualifier(): [VariableAccess] (__begin) +# 2216| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2216| ValueCategory = lvalue +# 2216| getChild(5): [DeclStmt] declaration +# 2216| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2216| Type = [Class] ClassWithDestructor +# 2216| getVariable().getInitializer(): [Initializer] initializer for y +# 2216| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* +# 2216| Type = [LValueReferenceType] ClassWithDestructor & +# 2216| ValueCategory = prvalue +# 2216| getQualifier(): [VariableAccess] (__begin) +# 2216| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2216| ValueCategory = lvalue #-----| getQualifier().getFullyConverted(): [CStyleCast] (const iterator)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const iterator #-----| ValueCategory = lvalue -# 2215| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2215| Type = [Class] ClassWithDestructor -# 2215| ValueCategory = prvalue(load) -# 2216| getStmt(): [ExprStmt] ExprStmt -# 2216| getExpr(): [FunctionCall] call to set_x +# 2216| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2216| Type = [Class] ClassWithDestructor +# 2216| ValueCategory = prvalue(load) +# 2217| getStmt(): [ExprStmt] ExprStmt +# 2217| getExpr(): [FunctionCall] call to set_x +# 2217| Type = [VoidType] void +# 2217| ValueCategory = prvalue +# 2217| getQualifier(): [VariableAccess] y +# 2217| Type = [Class] ClassWithDestructor +# 2217| ValueCategory = lvalue +# 2217| getArgument(0): [CharLiteral] 97 +# 2217| Type = [PlainCharType] char +# 2217| Value = [CharLiteral] 97 +# 2217| ValueCategory = prvalue +# 2216| getImplicitDestructorCall(0): [DestructorCall] call to ~vector +# 2216| Type = [VoidType] void +# 2216| ValueCategory = prvalue +# 2216| getQualifier(): [VariableAccess] ys +# 2216| Type = [ClassTemplateInstantiation,Struct] vector +# 2216| ValueCategory = lvalue +# 2216| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2216| Type = [ClassTemplateInstantiation,Struct] iterator +# 2216| ValueCategory = lvalue +# 2216| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor # 2216| Type = [VoidType] void # 2216| ValueCategory = prvalue # 2216| getQualifier(): [VariableAccess] y # 2216| Type = [Class] ClassWithDestructor # 2216| ValueCategory = lvalue -# 2216| getArgument(0): [CharLiteral] 97 -# 2216| Type = [PlainCharType] char -# 2216| Value = [CharLiteral] 97 -# 2216| ValueCategory = prvalue -# 2215| getImplicitDestructorCall(0): [DestructorCall] call to ~vector -# 2215| Type = [VoidType] void -# 2215| ValueCategory = prvalue -# 2215| getQualifier(): [VariableAccess] ys -# 2215| Type = [ClassTemplateInstantiation,Struct] vector -# 2215| ValueCategory = lvalue -# 2215| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2215| Type = [ClassTemplateInstantiation,Struct] iterator -# 2215| ValueCategory = lvalue -# 2215| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2215| Type = [VoidType] void -# 2215| ValueCategory = prvalue -# 2215| getQualifier(): [VariableAccess] y -# 2215| Type = [Class] ClassWithDestructor -# 2215| ValueCategory = lvalue -# 2218| getStmt(6): [RangeBasedForStmt] for(...:...) ... -# 2218| getInitialization(): [DeclStmt] declaration -# 2218| getDeclarationEntry(0): [VariableDeclarationEntry] definition of ys -# 2218| Type = [ClassTemplateInstantiation,Struct] vector -# 2218| getVariable().getInitializer(): [Initializer] initializer for ys -# 2218| getExpr(): [ConstructorCall] call to vector -# 2218| Type = [VoidType] void -# 2218| ValueCategory = prvalue -# 2218| getArgument(0): [VariableAccess] x -# 2218| Type = [Class] ClassWithDestructor -# 2218| ValueCategory = prvalue(load) -# 2218| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2218| Type = [VoidType] void -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [ReuseExpr] reuse of temporary object -# 2218| Type = [Class] ClassWithDestructor -# 2218| ValueCategory = xvalue -# 2218| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2218| Type = [Class] ClassWithDestructor -# 2218| ValueCategory = lvalue -# 2218| getChild(1): [DeclStmt] declaration -# 2218| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) -# 2218| Type = [LValueReferenceType] vector & +# 2219| getStmt(6): [RangeBasedForStmt] for(...:...) ... +# 2219| getInitialization(): [DeclStmt] declaration +# 2219| getDeclarationEntry(0): [VariableDeclarationEntry] definition of ys +# 2219| Type = [ClassTemplateInstantiation,Struct] vector +# 2219| getVariable().getInitializer(): [Initializer] initializer for ys +# 2219| getExpr(): [ConstructorCall] call to vector +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getArgument(0): [VariableAccess] x +# 2219| Type = [Class] ClassWithDestructor +# 2219| ValueCategory = prvalue(load) +# 2219| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [ReuseExpr] reuse of temporary object +# 2219| Type = [Class] ClassWithDestructor +# 2219| ValueCategory = xvalue +# 2219| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2219| Type = [Class] ClassWithDestructor +# 2219| ValueCategory = lvalue +# 2219| getChild(1): [DeclStmt] declaration +# 2219| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) +# 2219| Type = [LValueReferenceType] vector & #-----| getVariable().getInitializer(): [Initializer] initializer for (__range) -# 2218| getExpr(): [VariableAccess] ys -# 2218| Type = [ClassTemplateInstantiation,Struct] vector -# 2218| ValueCategory = lvalue -# 2218| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) -# 2218| Type = [LValueReferenceType] vector & -# 2218| ValueCategory = prvalue -# 2218| getBeginEndDeclaration(): [DeclStmt] declaration -# 2218| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) -# 2218| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2219| getExpr(): [VariableAccess] ys +# 2219| Type = [ClassTemplateInstantiation,Struct] vector +# 2219| ValueCategory = lvalue +# 2219| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2219| Type = [LValueReferenceType] vector & +# 2219| ValueCategory = prvalue +# 2219| getBeginEndDeclaration(): [DeclStmt] declaration +# 2219| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) +# 2219| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__begin) -# 2218| getExpr(): [FunctionCall] call to begin -# 2218| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] (__range) -# 2218| Type = [LValueReferenceType] vector & -# 2218| ValueCategory = prvalue(load) +# 2219| getExpr(): [FunctionCall] call to begin +# 2219| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] (__range) +# 2219| Type = [LValueReferenceType] vector & +# 2219| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -19639,15 +19645,15 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2218| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) -# 2218| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2219| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) +# 2219| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__end) -# 2218| getExpr(): [FunctionCall] call to end -# 2218| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] (__range) -# 2218| Type = [LValueReferenceType] vector & -# 2218| ValueCategory = prvalue(load) +# 2219| getExpr(): [FunctionCall] call to end +# 2219| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] (__range) +# 2219| Type = [LValueReferenceType] vector & +# 2219| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -19655,18 +19661,18 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2218| getCondition(): [FunctionCall] call to operator!= -# 2218| Type = [BoolType] bool -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] (__begin) -# 2218| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2218| ValueCategory = lvalue -# 2218| getArgument(0): [ConstructorCall] call to iterator -# 2218| Type = [VoidType] void -# 2218| ValueCategory = prvalue -# 2218| getArgument(0): [VariableAccess] (__end) -# 2218| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2218| ValueCategory = lvalue +# 2219| getCondition(): [FunctionCall] call to operator!= +# 2219| Type = [BoolType] bool +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] (__begin) +# 2219| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2219| ValueCategory = lvalue +# 2219| getArgument(0): [ConstructorCall] call to iterator +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getArgument(0): [VariableAccess] (__end) +# 2219| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2219| ValueCategory = lvalue #-----| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) #-----| Type = [LValueReferenceType] const iterator & #-----| ValueCategory = prvalue @@ -19681,130 +19687,130 @@ ir.cpp: #-----| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object #-----| Type = [ClassTemplateInstantiation,Struct] iterator #-----| ValueCategory = lvalue -# 2218| getUpdate(): [FunctionCall] call to operator++ -# 2218| Type = [LValueReferenceType] iterator & -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] (__begin) -# 2218| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2218| ValueCategory = lvalue -# 2218| getChild(5): [DeclStmt] declaration -# 2218| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y -# 2218| Type = [Class] ClassWithDestructor -# 2218| getVariable().getInitializer(): [Initializer] initializer for y -# 2218| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* -# 2218| Type = [LValueReferenceType] ClassWithDestructor & -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] (__begin) -# 2218| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2218| ValueCategory = lvalue +# 2219| getUpdate(): [FunctionCall] call to operator++ +# 2219| Type = [LValueReferenceType] iterator & +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] (__begin) +# 2219| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2219| ValueCategory = lvalue +# 2219| getChild(5): [DeclStmt] declaration +# 2219| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2219| Type = [Class] ClassWithDestructor +# 2219| getVariable().getInitializer(): [Initializer] initializer for y +# 2219| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* +# 2219| Type = [LValueReferenceType] ClassWithDestructor & +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] (__begin) +# 2219| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2219| ValueCategory = lvalue #-----| getQualifier().getFullyConverted(): [CStyleCast] (const iterator)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const iterator #-----| ValueCategory = lvalue -# 2218| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2218| Type = [Class] ClassWithDestructor -# 2218| ValueCategory = prvalue(load) -# 2218| getStmt(): [BlockStmt] { ... } -# 2219| getStmt(0): [ExprStmt] ExprStmt -# 2219| getExpr(): [FunctionCall] call to set_x -# 2219| Type = [VoidType] void -# 2219| ValueCategory = prvalue -# 2219| getQualifier(): [VariableAccess] y +# 2219| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) # 2219| Type = [Class] ClassWithDestructor -# 2219| ValueCategory = lvalue -# 2219| getArgument(0): [CharLiteral] 97 -# 2219| Type = [PlainCharType] char -# 2219| Value = [CharLiteral] 97 -# 2219| ValueCategory = prvalue -# 2220| getStmt(1): [IfStmt] if (...) ... -# 2220| getCondition(): [EQExpr] ... == ... -# 2220| Type = [BoolType] bool +# 2219| ValueCategory = prvalue(load) +# 2219| getStmt(): [BlockStmt] { ... } +# 2220| getStmt(0): [ExprStmt] ExprStmt +# 2220| getExpr(): [FunctionCall] call to set_x +# 2220| Type = [VoidType] void # 2220| ValueCategory = prvalue -# 2220| getLeftOperand(): [FunctionCall] call to get_x +# 2220| getQualifier(): [VariableAccess] y +# 2220| Type = [Class] ClassWithDestructor +# 2220| ValueCategory = lvalue +# 2220| getArgument(0): [CharLiteral] 97 # 2220| Type = [PlainCharType] char +# 2220| Value = [CharLiteral] 97 # 2220| ValueCategory = prvalue -# 2220| getQualifier(): [VariableAccess] y -# 2220| Type = [Class] ClassWithDestructor -# 2220| ValueCategory = lvalue -# 2220| getRightOperand(): [CharLiteral] 98 -# 2220| Type = [PlainCharType] char -# 2220| Value = [CharLiteral] 98 -# 2220| ValueCategory = prvalue -# 2220| getLeftOperand().getFullyConverted(): [CStyleCast] (int)... -# 2220| Conversion = [IntegralConversion] integral conversion -# 2220| Type = [IntType] int -# 2220| ValueCategory = prvalue -# 2220| getRightOperand().getFullyConverted(): [CStyleCast] (int)... -# 2220| Conversion = [IntegralConversion] integral conversion -# 2220| Type = [IntType] int -# 2220| Value = [CStyleCast] 98 -# 2220| ValueCategory = prvalue -# 2221| getThen(): [ReturnStmt] return ... -# 2218| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2218| Type = [VoidType] void -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] y -# 2218| Type = [Class] ClassWithDestructor -# 2218| ValueCategory = lvalue -# 2218| getImplicitDestructorCall(1): [DestructorCall] call to ~vector -# 2218| Type = [VoidType] void -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] ys -# 2218| Type = [ClassTemplateInstantiation,Struct] vector -# 2218| ValueCategory = lvalue -# 2233| getImplicitDestructorCall(2): [DestructorCall] call to ~ClassWithDestructor -# 2233| Type = [VoidType] void -# 2233| ValueCategory = prvalue -# 2233| getQualifier(): [VariableAccess] x -# 2233| Type = [Class] ClassWithDestructor -# 2233| ValueCategory = lvalue -# 2218| getImplicitDestructorCall(0): [DestructorCall] call to ~vector -# 2218| Type = [VoidType] void -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] ys -# 2218| Type = [ClassTemplateInstantiation,Struct] vector -# 2218| ValueCategory = lvalue -# 2218| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2218| Type = [ClassTemplateInstantiation,Struct] iterator -# 2218| ValueCategory = lvalue -# 2218| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2218| Type = [VoidType] void -# 2218| ValueCategory = prvalue -# 2218| getQualifier(): [VariableAccess] y -# 2218| Type = [Class] ClassWithDestructor -# 2218| ValueCategory = lvalue -# 2224| getStmt(7): [RangeBasedForStmt] for(...:...) ... -# 2224| getInitialization(): [DeclStmt] declaration -# 2224| getDeclarationEntry(0): [VariableDeclarationEntry] definition of ys -# 2224| Type = [ClassTemplateInstantiation,Struct] vector -# 2224| getVariable().getInitializer(): [Initializer] initializer for ys -# 2224| getExpr(): [ConstructorCall] call to vector -# 2224| Type = [VoidType] void -# 2224| ValueCategory = prvalue -# 2224| getArgument(0): [Literal] 1 -# 2224| Type = [IntType] int -# 2224| Value = [Literal] 1 -# 2224| ValueCategory = prvalue -# 2224| getChild(1): [DeclStmt] declaration -# 2224| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) -# 2224| Type = [LValueReferenceType] vector & +# 2221| getStmt(1): [IfStmt] if (...) ... +# 2221| getCondition(): [EQExpr] ... == ... +# 2221| Type = [BoolType] bool +# 2221| ValueCategory = prvalue +# 2221| getLeftOperand(): [FunctionCall] call to get_x +# 2221| Type = [PlainCharType] char +# 2221| ValueCategory = prvalue +# 2221| getQualifier(): [VariableAccess] y +# 2221| Type = [Class] ClassWithDestructor +# 2221| ValueCategory = lvalue +# 2221| getRightOperand(): [CharLiteral] 98 +# 2221| Type = [PlainCharType] char +# 2221| Value = [CharLiteral] 98 +# 2221| ValueCategory = prvalue +# 2221| getLeftOperand().getFullyConverted(): [CStyleCast] (int)... +# 2221| Conversion = [IntegralConversion] integral conversion +# 2221| Type = [IntType] int +# 2221| ValueCategory = prvalue +# 2221| getRightOperand().getFullyConverted(): [CStyleCast] (int)... +# 2221| Conversion = [IntegralConversion] integral conversion +# 2221| Type = [IntType] int +# 2221| Value = [CStyleCast] 98 +# 2221| ValueCategory = prvalue +# 2222| getThen(): [ReturnStmt] return ... +# 2219| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] y +# 2219| Type = [Class] ClassWithDestructor +# 2219| ValueCategory = lvalue +# 2219| getImplicitDestructorCall(1): [DestructorCall] call to ~vector +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] ys +# 2219| Type = [ClassTemplateInstantiation,Struct] vector +# 2219| ValueCategory = lvalue +# 2234| getImplicitDestructorCall(2): [DestructorCall] call to ~ClassWithDestructor +# 2234| Type = [VoidType] void +# 2234| ValueCategory = prvalue +# 2234| getQualifier(): [VariableAccess] x +# 2234| Type = [Class] ClassWithDestructor +# 2234| ValueCategory = lvalue +# 2219| getImplicitDestructorCall(0): [DestructorCall] call to ~vector +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] ys +# 2219| Type = [ClassTemplateInstantiation,Struct] vector +# 2219| ValueCategory = lvalue +# 2219| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2219| Type = [ClassTemplateInstantiation,Struct] iterator +# 2219| ValueCategory = lvalue +# 2219| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] y +# 2219| Type = [Class] ClassWithDestructor +# 2219| ValueCategory = lvalue +# 2225| getStmt(7): [RangeBasedForStmt] for(...:...) ... +# 2225| getInitialization(): [DeclStmt] declaration +# 2225| getDeclarationEntry(0): [VariableDeclarationEntry] definition of ys +# 2225| Type = [ClassTemplateInstantiation,Struct] vector +# 2225| getVariable().getInitializer(): [Initializer] initializer for ys +# 2225| getExpr(): [ConstructorCall] call to vector +# 2225| Type = [VoidType] void +# 2225| ValueCategory = prvalue +# 2225| getArgument(0): [Literal] 1 +# 2225| Type = [IntType] int +# 2225| Value = [Literal] 1 +# 2225| ValueCategory = prvalue +# 2225| getChild(1): [DeclStmt] declaration +# 2225| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) +# 2225| Type = [LValueReferenceType] vector & #-----| getVariable().getInitializer(): [Initializer] initializer for (__range) -# 2224| getExpr(): [VariableAccess] ys -# 2224| Type = [ClassTemplateInstantiation,Struct] vector -# 2224| ValueCategory = lvalue -# 2224| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) -# 2224| Type = [LValueReferenceType] vector & -# 2224| ValueCategory = prvalue -# 2224| getBeginEndDeclaration(): [DeclStmt] declaration -# 2224| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) -# 2224| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2225| getExpr(): [VariableAccess] ys +# 2225| Type = [ClassTemplateInstantiation,Struct] vector +# 2225| ValueCategory = lvalue +# 2225| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2225| Type = [LValueReferenceType] vector & +# 2225| ValueCategory = prvalue +# 2225| getBeginEndDeclaration(): [DeclStmt] declaration +# 2225| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) +# 2225| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__begin) -# 2224| getExpr(): [FunctionCall] call to begin -# 2224| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2224| ValueCategory = prvalue -# 2224| getQualifier(): [VariableAccess] (__range) -# 2224| Type = [LValueReferenceType] vector & -# 2224| ValueCategory = prvalue(load) +# 2225| getExpr(): [FunctionCall] call to begin +# 2225| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2225| ValueCategory = prvalue +# 2225| getQualifier(): [VariableAccess] (__range) +# 2225| Type = [LValueReferenceType] vector & +# 2225| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -19812,15 +19818,15 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2224| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) -# 2224| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2225| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) +# 2225| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__end) -# 2224| getExpr(): [FunctionCall] call to end -# 2224| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2224| ValueCategory = prvalue -# 2224| getQualifier(): [VariableAccess] (__range) -# 2224| Type = [LValueReferenceType] vector & -# 2224| ValueCategory = prvalue(load) +# 2225| getExpr(): [FunctionCall] call to end +# 2225| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2225| ValueCategory = prvalue +# 2225| getQualifier(): [VariableAccess] (__range) +# 2225| Type = [LValueReferenceType] vector & +# 2225| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -19828,18 +19834,18 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2224| getCondition(): [FunctionCall] call to operator!= -# 2224| Type = [BoolType] bool -# 2224| ValueCategory = prvalue -# 2224| getQualifier(): [VariableAccess] (__begin) -# 2224| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2224| ValueCategory = lvalue -# 2224| getArgument(0): [ConstructorCall] call to iterator -# 2224| Type = [VoidType] void -# 2224| ValueCategory = prvalue -# 2224| getArgument(0): [VariableAccess] (__end) -# 2224| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2224| ValueCategory = lvalue +# 2225| getCondition(): [FunctionCall] call to operator!= +# 2225| Type = [BoolType] bool +# 2225| ValueCategory = prvalue +# 2225| getQualifier(): [VariableAccess] (__begin) +# 2225| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2225| ValueCategory = lvalue +# 2225| getArgument(0): [ConstructorCall] call to iterator +# 2225| Type = [VoidType] void +# 2225| ValueCategory = prvalue +# 2225| getArgument(0): [VariableAccess] (__end) +# 2225| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2225| ValueCategory = lvalue #-----| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) #-----| Type = [LValueReferenceType] const iterator & #-----| ValueCategory = prvalue @@ -19854,103 +19860,103 @@ ir.cpp: #-----| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object #-----| Type = [ClassTemplateInstantiation,Struct] iterator #-----| ValueCategory = lvalue -# 2224| getUpdate(): [FunctionCall] call to operator++ -# 2224| Type = [LValueReferenceType] iterator & -# 2224| ValueCategory = prvalue -# 2224| getQualifier(): [VariableAccess] (__begin) -# 2224| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2224| ValueCategory = lvalue -# 2224| getChild(5): [DeclStmt] declaration -# 2224| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y -# 2224| Type = [IntType] int -# 2224| getVariable().getInitializer(): [Initializer] initializer for y -# 2224| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* -# 2224| Type = [LValueReferenceType] int & -# 2224| ValueCategory = prvalue -# 2224| getQualifier(): [VariableAccess] (__begin) -# 2224| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2224| ValueCategory = lvalue +# 2225| getUpdate(): [FunctionCall] call to operator++ +# 2225| Type = [LValueReferenceType] iterator & +# 2225| ValueCategory = prvalue +# 2225| getQualifier(): [VariableAccess] (__begin) +# 2225| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2225| ValueCategory = lvalue +# 2225| getChild(5): [DeclStmt] declaration +# 2225| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2225| Type = [IntType] int +# 2225| getVariable().getInitializer(): [Initializer] initializer for y +# 2225| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* +# 2225| Type = [LValueReferenceType] int & +# 2225| ValueCategory = prvalue +# 2225| getQualifier(): [VariableAccess] (__begin) +# 2225| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2225| ValueCategory = lvalue #-----| getQualifier().getFullyConverted(): [CStyleCast] (const iterator)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const iterator #-----| ValueCategory = lvalue -# 2224| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2224| Type = [IntType] int -# 2224| ValueCategory = prvalue(load) -# 2224| getStmt(): [BlockStmt] { ... } -# 2225| getStmt(0): [IfStmt] if (...) ... -# 2225| getCondition(): [EQExpr] ... == ... -# 2225| Type = [BoolType] bool -# 2225| ValueCategory = prvalue -# 2225| getLeftOperand(): [VariableAccess] y +# 2225| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) # 2225| Type = [IntType] int # 2225| ValueCategory = prvalue(load) -# 2225| getRightOperand(): [Literal] 1 -# 2225| Type = [IntType] int -# 2225| Value = [Literal] 1 +# 2225| getStmt(): [BlockStmt] { ... } +# 2226| getStmt(0): [IfStmt] if (...) ... +# 2226| getCondition(): [EQExpr] ... == ... +# 2226| Type = [BoolType] bool +# 2226| ValueCategory = prvalue +# 2226| getLeftOperand(): [VariableAccess] y +# 2226| Type = [IntType] int +# 2226| ValueCategory = prvalue(load) +# 2226| getRightOperand(): [Literal] 1 +# 2226| Type = [IntType] int +# 2226| Value = [Literal] 1 +# 2226| ValueCategory = prvalue +# 2227| getThen(): [ReturnStmt] return ... +# 2225| getImplicitDestructorCall(0): [DestructorCall] call to ~vector +# 2225| Type = [VoidType] void # 2225| ValueCategory = prvalue -# 2226| getThen(): [ReturnStmt] return ... -# 2224| getImplicitDestructorCall(0): [DestructorCall] call to ~vector -# 2224| Type = [VoidType] void -# 2224| ValueCategory = prvalue -# 2224| getQualifier(): [VariableAccess] ys -# 2224| Type = [ClassTemplateInstantiation,Struct] vector -# 2224| ValueCategory = lvalue -# 2233| getImplicitDestructorCall(1): [DestructorCall] call to ~ClassWithDestructor -# 2233| Type = [VoidType] void -# 2233| ValueCategory = prvalue -# 2233| getQualifier(): [VariableAccess] x -# 2233| Type = [Class] ClassWithDestructor -# 2233| ValueCategory = lvalue -# 2224| getImplicitDestructorCall(0): [DestructorCall] call to ~vector -# 2224| Type = [VoidType] void -# 2224| ValueCategory = prvalue -# 2224| getQualifier(): [VariableAccess] ys -# 2224| Type = [ClassTemplateInstantiation,Struct] vector -# 2224| ValueCategory = lvalue -# 2224| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2224| Type = [ClassTemplateInstantiation,Struct] iterator -# 2224| ValueCategory = lvalue -# 2229| getStmt(8): [RangeBasedForStmt] for(...:...) ... -# 2229| getInitialization(): [DeclStmt] declaration -# 2229| getDeclarationEntry(0): [VariableDeclarationEntry] definition of ys -# 2229| Type = [ClassTemplateInstantiation,Struct] vector -# 2229| getVariable().getInitializer(): [Initializer] initializer for ys -# 2229| getExpr(): [ConstructorCall] call to vector -# 2229| Type = [VoidType] void -# 2229| ValueCategory = prvalue -# 2229| getArgument(0): [VariableAccess] x -# 2229| Type = [Class] ClassWithDestructor -# 2229| ValueCategory = prvalue(load) -# 2229| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2229| Type = [VoidType] void -# 2229| ValueCategory = prvalue -# 2229| getQualifier(): [ReuseExpr] reuse of temporary object -# 2229| Type = [Class] ClassWithDestructor -# 2229| ValueCategory = xvalue -# 2229| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2229| Type = [Class] ClassWithDestructor -# 2229| ValueCategory = lvalue -# 2229| getChild(1): [DeclStmt] declaration -# 2229| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) -# 2229| Type = [LValueReferenceType] vector & +# 2225| getQualifier(): [VariableAccess] ys +# 2225| Type = [ClassTemplateInstantiation,Struct] vector +# 2225| ValueCategory = lvalue +# 2234| getImplicitDestructorCall(1): [DestructorCall] call to ~ClassWithDestructor +# 2234| Type = [VoidType] void +# 2234| ValueCategory = prvalue +# 2234| getQualifier(): [VariableAccess] x +# 2234| Type = [Class] ClassWithDestructor +# 2234| ValueCategory = lvalue +# 2225| getImplicitDestructorCall(0): [DestructorCall] call to ~vector +# 2225| Type = [VoidType] void +# 2225| ValueCategory = prvalue +# 2225| getQualifier(): [VariableAccess] ys +# 2225| Type = [ClassTemplateInstantiation,Struct] vector +# 2225| ValueCategory = lvalue +# 2225| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2225| Type = [ClassTemplateInstantiation,Struct] iterator +# 2225| ValueCategory = lvalue +# 2230| getStmt(8): [RangeBasedForStmt] for(...:...) ... +# 2230| getInitialization(): [DeclStmt] declaration +# 2230| getDeclarationEntry(0): [VariableDeclarationEntry] definition of ys +# 2230| Type = [ClassTemplateInstantiation,Struct] vector +# 2230| getVariable().getInitializer(): [Initializer] initializer for ys +# 2230| getExpr(): [ConstructorCall] call to vector +# 2230| Type = [VoidType] void +# 2230| ValueCategory = prvalue +# 2230| getArgument(0): [VariableAccess] x +# 2230| Type = [Class] ClassWithDestructor +# 2230| ValueCategory = prvalue(load) +# 2230| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2230| Type = [VoidType] void +# 2230| ValueCategory = prvalue +# 2230| getQualifier(): [ReuseExpr] reuse of temporary object +# 2230| Type = [Class] ClassWithDestructor +# 2230| ValueCategory = xvalue +# 2230| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2230| Type = [Class] ClassWithDestructor +# 2230| ValueCategory = lvalue +# 2230| getChild(1): [DeclStmt] declaration +# 2230| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) +# 2230| Type = [LValueReferenceType] vector & #-----| getVariable().getInitializer(): [Initializer] initializer for (__range) -# 2229| getExpr(): [VariableAccess] ys -# 2229| Type = [ClassTemplateInstantiation,Struct] vector -# 2229| ValueCategory = lvalue -# 2229| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) -# 2229| Type = [LValueReferenceType] vector & -# 2229| ValueCategory = prvalue -# 2229| getBeginEndDeclaration(): [DeclStmt] declaration -# 2229| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) -# 2229| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2230| getExpr(): [VariableAccess] ys +# 2230| Type = [ClassTemplateInstantiation,Struct] vector +# 2230| ValueCategory = lvalue +# 2230| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2230| Type = [LValueReferenceType] vector & +# 2230| ValueCategory = prvalue +# 2230| getBeginEndDeclaration(): [DeclStmt] declaration +# 2230| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) +# 2230| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__begin) -# 2229| getExpr(): [FunctionCall] call to begin -# 2229| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2229| ValueCategory = prvalue -# 2229| getQualifier(): [VariableAccess] (__range) -# 2229| Type = [LValueReferenceType] vector & -# 2229| ValueCategory = prvalue(load) +# 2230| getExpr(): [FunctionCall] call to begin +# 2230| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2230| ValueCategory = prvalue +# 2230| getQualifier(): [VariableAccess] (__range) +# 2230| Type = [LValueReferenceType] vector & +# 2230| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -19958,15 +19964,15 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2229| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) -# 2229| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2230| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) +# 2230| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__end) -# 2229| getExpr(): [FunctionCall] call to end -# 2229| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2229| ValueCategory = prvalue -# 2229| getQualifier(): [VariableAccess] (__range) -# 2229| Type = [LValueReferenceType] vector & -# 2229| ValueCategory = prvalue(load) +# 2230| getExpr(): [FunctionCall] call to end +# 2230| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2230| ValueCategory = prvalue +# 2230| getQualifier(): [VariableAccess] (__range) +# 2230| Type = [LValueReferenceType] vector & +# 2230| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -19974,18 +19980,18 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2229| getCondition(): [FunctionCall] call to operator!= -# 2229| Type = [BoolType] bool -# 2229| ValueCategory = prvalue -# 2229| getQualifier(): [VariableAccess] (__begin) -# 2229| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2229| ValueCategory = lvalue -# 2229| getArgument(0): [ConstructorCall] call to iterator -# 2229| Type = [VoidType] void -# 2229| ValueCategory = prvalue -# 2229| getArgument(0): [VariableAccess] (__end) -# 2229| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2229| ValueCategory = lvalue +# 2230| getCondition(): [FunctionCall] call to operator!= +# 2230| Type = [BoolType] bool +# 2230| ValueCategory = prvalue +# 2230| getQualifier(): [VariableAccess] (__begin) +# 2230| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2230| ValueCategory = lvalue +# 2230| getArgument(0): [ConstructorCall] call to iterator +# 2230| Type = [VoidType] void +# 2230| ValueCategory = prvalue +# 2230| getArgument(0): [VariableAccess] (__end) +# 2230| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2230| ValueCategory = lvalue #-----| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) #-----| Type = [LValueReferenceType] const iterator & #-----| ValueCategory = prvalue @@ -20000,584 +20006,584 @@ ir.cpp: #-----| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object #-----| Type = [ClassTemplateInstantiation,Struct] iterator #-----| ValueCategory = lvalue -# 2229| getUpdate(): [FunctionCall] call to operator++ -# 2229| Type = [LValueReferenceType] iterator & -# 2229| ValueCategory = prvalue -# 2229| getQualifier(): [VariableAccess] (__begin) -# 2229| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2229| ValueCategory = lvalue -# 2229| getChild(5): [DeclStmt] declaration -# 2229| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y -# 2229| Type = [Class] ClassWithDestructor -# 2229| getVariable().getInitializer(): [Initializer] initializer for y -# 2229| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* -# 2229| Type = [LValueReferenceType] ClassWithDestructor & -# 2229| ValueCategory = prvalue -# 2229| getQualifier(): [VariableAccess] (__begin) -# 2229| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2229| ValueCategory = lvalue +# 2230| getUpdate(): [FunctionCall] call to operator++ +# 2230| Type = [LValueReferenceType] iterator & +# 2230| ValueCategory = prvalue +# 2230| getQualifier(): [VariableAccess] (__begin) +# 2230| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2230| ValueCategory = lvalue +# 2230| getChild(5): [DeclStmt] declaration +# 2230| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2230| Type = [Class] ClassWithDestructor +# 2230| getVariable().getInitializer(): [Initializer] initializer for y +# 2230| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* +# 2230| Type = [LValueReferenceType] ClassWithDestructor & +# 2230| ValueCategory = prvalue +# 2230| getQualifier(): [VariableAccess] (__begin) +# 2230| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2230| ValueCategory = lvalue #-----| getQualifier().getFullyConverted(): [CStyleCast] (const iterator)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const iterator #-----| ValueCategory = lvalue -# 2229| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2229| Type = [Class] ClassWithDestructor -# 2229| ValueCategory = prvalue(load) -# 2229| getStmt(): [BlockStmt] { ... } -# 2230| getStmt(0): [DeclStmt] declaration -# 2230| getDeclarationEntry(0): [VariableDeclarationEntry] definition of z1 -# 2230| Type = [Class] ClassWithDestructor -# 2230| getVariable().getInitializer(): [Initializer] initializer for z1 -# 2230| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2230| Type = [VoidType] void -# 2230| ValueCategory = prvalue -# 2231| getStmt(1): [DeclStmt] declaration -# 2231| getDeclarationEntry(0): [VariableDeclarationEntry] definition of z2 +# 2230| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2230| Type = [Class] ClassWithDestructor +# 2230| ValueCategory = prvalue(load) +# 2230| getStmt(): [BlockStmt] { ... } +# 2231| getStmt(0): [DeclStmt] declaration +# 2231| getDeclarationEntry(0): [VariableDeclarationEntry] definition of z1 # 2231| Type = [Class] ClassWithDestructor -# 2231| getVariable().getInitializer(): [Initializer] initializer for z2 +# 2231| getVariable().getInitializer(): [Initializer] initializer for z1 # 2231| getExpr(): [ConstructorCall] call to ClassWithDestructor # 2231| Type = [VoidType] void # 2231| ValueCategory = prvalue -# 2232| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2232| Type = [VoidType] void -# 2232| ValueCategory = prvalue -# 2232| getQualifier(): [VariableAccess] z2 +# 2232| getStmt(1): [DeclStmt] declaration +# 2232| getDeclarationEntry(0): [VariableDeclarationEntry] definition of z2 # 2232| Type = [Class] ClassWithDestructor -# 2232| ValueCategory = lvalue -# 2232| getImplicitDestructorCall(1): [DestructorCall] call to ~ClassWithDestructor -# 2232| Type = [VoidType] void -# 2232| ValueCategory = prvalue -# 2232| getQualifier(): [VariableAccess] z1 -# 2232| Type = [Class] ClassWithDestructor -# 2232| ValueCategory = lvalue -# 2229| getImplicitDestructorCall(0): [DestructorCall] call to ~vector -# 2229| Type = [VoidType] void -# 2229| ValueCategory = prvalue -# 2229| getQualifier(): [VariableAccess] ys -# 2229| Type = [ClassTemplateInstantiation,Struct] vector -# 2229| ValueCategory = lvalue -# 2229| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2229| Type = [ClassTemplateInstantiation,Struct] iterator -# 2229| ValueCategory = lvalue -# 2229| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2229| Type = [VoidType] void -# 2229| ValueCategory = prvalue -# 2229| getQualifier(): [VariableAccess] y -# 2229| Type = [Class] ClassWithDestructor -# 2229| ValueCategory = lvalue -# 2233| getStmt(9): [ReturnStmt] return ... -# 2233| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2233| Type = [VoidType] void -# 2233| ValueCategory = prvalue -# 2233| getQualifier(): [VariableAccess] x -# 2233| Type = [Class] ClassWithDestructor -# 2233| ValueCategory = lvalue -# 2235| [TopLevelFunction] void static_variable_with_destructor_1() -# 2235| : -# 2235| getEntryPoint(): [BlockStmt] { ... } -# 2236| getStmt(0): [DeclStmt] declaration -# 2236| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a -# 2236| Type = [Class] ClassWithDestructor -# 2236| getVariable().getInitializer(): [Initializer] initializer for a -# 2236| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2236| Type = [VoidType] void -# 2236| ValueCategory = prvalue -# 2237| getStmt(1): [DeclStmt] declaration -# 2237| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b +# 2232| getVariable().getInitializer(): [Initializer] initializer for z2 +# 2232| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2232| Type = [VoidType] void +# 2232| ValueCategory = prvalue +# 2233| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2233| Type = [VoidType] void +# 2233| ValueCategory = prvalue +# 2233| getQualifier(): [VariableAccess] z2 +# 2233| Type = [Class] ClassWithDestructor +# 2233| ValueCategory = lvalue +# 2233| getImplicitDestructorCall(1): [DestructorCall] call to ~ClassWithDestructor +# 2233| Type = [VoidType] void +# 2233| ValueCategory = prvalue +# 2233| getQualifier(): [VariableAccess] z1 +# 2233| Type = [Class] ClassWithDestructor +# 2233| ValueCategory = lvalue +# 2230| getImplicitDestructorCall(0): [DestructorCall] call to ~vector +# 2230| Type = [VoidType] void +# 2230| ValueCategory = prvalue +# 2230| getQualifier(): [VariableAccess] ys +# 2230| Type = [ClassTemplateInstantiation,Struct] vector +# 2230| ValueCategory = lvalue +# 2230| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2230| Type = [ClassTemplateInstantiation,Struct] iterator +# 2230| ValueCategory = lvalue +# 2230| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2230| Type = [VoidType] void +# 2230| ValueCategory = prvalue +# 2230| getQualifier(): [VariableAccess] y +# 2230| Type = [Class] ClassWithDestructor +# 2230| ValueCategory = lvalue +# 2234| getStmt(9): [ReturnStmt] return ... +# 2234| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2234| Type = [VoidType] void +# 2234| ValueCategory = prvalue +# 2234| getQualifier(): [VariableAccess] x +# 2234| Type = [Class] ClassWithDestructor +# 2234| ValueCategory = lvalue +# 2236| [TopLevelFunction] void static_variable_with_destructor_1() +# 2236| : +# 2236| getEntryPoint(): [BlockStmt] { ... } +# 2237| getStmt(0): [DeclStmt] declaration +# 2237| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a # 2237| Type = [Class] ClassWithDestructor +# 2237| getVariable().getInitializer(): [Initializer] initializer for a +# 2237| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2237| Type = [VoidType] void +# 2237| ValueCategory = prvalue +# 2238| getStmt(1): [DeclStmt] declaration +# 2238| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b +# 2238| Type = [Class] ClassWithDestructor #-----| getVariable().getInitializer(): [Initializer] initializer for b #-----| getExpr(): [ConstructorCall] call to ClassWithDestructor #-----| Type = [VoidType] void #-----| ValueCategory = prvalue -# 2238| getStmt(2): [ReturnStmt] return ... -# 2238| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2238| Type = [VoidType] void -# 2238| ValueCategory = prvalue -# 2238| getQualifier(): [VariableAccess] a -# 2238| Type = [Class] ClassWithDestructor -# 2238| ValueCategory = lvalue -# 2240| [TopLevelFunction] void static_variable_with_destructor_2() -# 2240| : -# 2240| getEntryPoint(): [BlockStmt] { ... } -# 2241| getStmt(0): [DeclStmt] declaration -# 2241| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a -# 2241| Type = [Class] ClassWithDestructor +# 2239| getStmt(2): [ReturnStmt] return ... +# 2239| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2239| Type = [VoidType] void +# 2239| ValueCategory = prvalue +# 2239| getQualifier(): [VariableAccess] a +# 2239| Type = [Class] ClassWithDestructor +# 2239| ValueCategory = lvalue +# 2241| [TopLevelFunction] void static_variable_with_destructor_2() +# 2241| : +# 2241| getEntryPoint(): [BlockStmt] { ... } +# 2242| getStmt(0): [DeclStmt] declaration +# 2242| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a +# 2242| Type = [Class] ClassWithDestructor #-----| getVariable().getInitializer(): [Initializer] initializer for a #-----| getExpr(): [ConstructorCall] call to ClassWithDestructor #-----| Type = [VoidType] void #-----| ValueCategory = prvalue -# 2242| getStmt(1): [DeclStmt] declaration -# 2242| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b -# 2242| Type = [Class] ClassWithDestructor -# 2242| getVariable().getInitializer(): [Initializer] initializer for b -# 2242| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2242| Type = [VoidType] void -# 2242| ValueCategory = prvalue -# 2243| getStmt(2): [ReturnStmt] return ... -# 2243| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2243| Type = [VoidType] void -# 2243| ValueCategory = prvalue -# 2243| getQualifier(): [VariableAccess] b -# 2243| Type = [Class] ClassWithDestructor -# 2243| ValueCategory = lvalue -# 2245| [TopLevelFunction] void static_variable_with_destructor_3() -# 2245| : -# 2245| getEntryPoint(): [BlockStmt] { ... } -# 2246| getStmt(0): [DeclStmt] declaration -# 2246| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a -# 2246| Type = [Class] ClassWithDestructor -# 2246| getVariable().getInitializer(): [Initializer] initializer for a -# 2246| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2246| Type = [VoidType] void -# 2246| ValueCategory = prvalue -# 2247| getStmt(1): [DeclStmt] declaration -# 2247| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b +# 2243| getStmt(1): [DeclStmt] declaration +# 2243| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b +# 2243| Type = [Class] ClassWithDestructor +# 2243| getVariable().getInitializer(): [Initializer] initializer for b +# 2243| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2243| Type = [VoidType] void +# 2243| ValueCategory = prvalue +# 2244| getStmt(2): [ReturnStmt] return ... +# 2244| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2244| Type = [VoidType] void +# 2244| ValueCategory = prvalue +# 2244| getQualifier(): [VariableAccess] b +# 2244| Type = [Class] ClassWithDestructor +# 2244| ValueCategory = lvalue +# 2246| [TopLevelFunction] void static_variable_with_destructor_3() +# 2246| : +# 2246| getEntryPoint(): [BlockStmt] { ... } +# 2247| getStmt(0): [DeclStmt] declaration +# 2247| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a # 2247| Type = [Class] ClassWithDestructor -# 2247| getVariable().getInitializer(): [Initializer] initializer for b +# 2247| getVariable().getInitializer(): [Initializer] initializer for a # 2247| getExpr(): [ConstructorCall] call to ClassWithDestructor # 2247| Type = [VoidType] void # 2247| ValueCategory = prvalue -# 2248| getStmt(2): [DeclStmt] declaration -# 2248| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c +# 2248| getStmt(1): [DeclStmt] declaration +# 2248| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b # 2248| Type = [Class] ClassWithDestructor +# 2248| getVariable().getInitializer(): [Initializer] initializer for b +# 2248| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2248| Type = [VoidType] void +# 2248| ValueCategory = prvalue +# 2249| getStmt(2): [DeclStmt] declaration +# 2249| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c +# 2249| Type = [Class] ClassWithDestructor #-----| getVariable().getInitializer(): [Initializer] initializer for c #-----| getExpr(): [ConstructorCall] call to ClassWithDestructor #-----| Type = [VoidType] void #-----| ValueCategory = prvalue -# 2249| getStmt(3): [ReturnStmt] return ... -# 2249| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2249| Type = [VoidType] void -# 2249| ValueCategory = prvalue -# 2249| getQualifier(): [VariableAccess] b -# 2249| Type = [Class] ClassWithDestructor -# 2249| ValueCategory = lvalue -# 2249| getImplicitDestructorCall(1): [DestructorCall] call to ~ClassWithDestructor -# 2249| Type = [VoidType] void -# 2249| ValueCategory = prvalue -# 2249| getQualifier(): [VariableAccess] a -# 2249| Type = [Class] ClassWithDestructor -# 2249| ValueCategory = lvalue -# 2251| [GlobalVariable] ClassWithDestructor global_class_with_destructor -# 2251| getInitializer(): [Initializer] initializer for global_class_with_destructor -# 2251| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2251| Type = [VoidType] void -# 2251| ValueCategory = prvalue -# 2255| [FunctionTemplateInstantiation,TopLevelFunction] ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) -# 2255| : -# 2255| getParameter(0): [Parameter] t -# 2255| Type = [LValueReferenceType] ClassWithDestructor & -# 2255| getEntryPoint(): [BlockStmt] { ... } -# 2255| getStmt(0): [ReturnStmt] return ... -# 2255| getExpr(): [VariableAccess] t -# 2255| Type = [LValueReferenceType] ClassWithDestructor & -# 2255| ValueCategory = prvalue(load) -# 2255| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) -# 2255| Type = [LValueReferenceType] ClassWithDestructor & -# 2255| ValueCategory = prvalue -# 2255| getExpr(): [ReferenceDereferenceExpr] (reference dereference) -# 2255| Type = [Class] ClassWithDestructor -# 2255| ValueCategory = lvalue -# 2255| [TemplateFunction,TopLevelFunction] T& vacuous_destructor_call::get(T&) -# 2255| : -# 2255| getParameter(0): [Parameter] t -# 2255| Type = [LValueReferenceType] T & -# 2255| getEntryPoint(): [BlockStmt] { ... } -# 2255| getStmt(0): [ReturnStmt] return ... -# 2255| getExpr(): [VariableAccess] t -# 2255| Type = [LValueReferenceType] T & -# 2255| ValueCategory = prvalue(load) -# 2255| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2255| Type = [TemplateParameter] T -# 2255| ValueCategory = lvalue -# 2255| [FunctionTemplateInstantiation,TopLevelFunction] int& vacuous_destructor_call::get(int&) -# 2255| : -# 2255| getParameter(0): [Parameter] t -# 2255| Type = [LValueReferenceType] int & -# 2255| getEntryPoint(): [BlockStmt] { ... } -# 2255| getStmt(0): [ReturnStmt] return ... -# 2255| getExpr(): [VariableAccess] t -# 2255| Type = [LValueReferenceType] int & -# 2255| ValueCategory = prvalue(load) -# 2255| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) -# 2255| Type = [LValueReferenceType] int & -# 2255| ValueCategory = prvalue -# 2255| getExpr(): [ReferenceDereferenceExpr] (reference dereference) -# 2255| Type = [IntType] int -# 2255| ValueCategory = lvalue -# 2258| [FunctionTemplateInstantiation,TopLevelFunction] void vacuous_destructor_call::call_destructor(ClassWithDestructor&) -# 2258| : -# 2258| getParameter(0): [Parameter] t -# 2258| Type = [LValueReferenceType] ClassWithDestructor & -# 2258| getEntryPoint(): [BlockStmt] { ... } -# 2259| getStmt(0): [ExprStmt] ExprStmt -# 2259| getExpr(): [DestructorCall] call to ~ClassWithDestructor -# 2259| Type = [VoidType] void -# 2259| ValueCategory = prvalue -# 2259| getQualifier(): [FunctionCall] call to get -# 2259| Type = [LValueReferenceType] ClassWithDestructor & -# 2259| ValueCategory = prvalue -# 2259| getArgument(0): [VariableAccess] t -# 2259| Type = [LValueReferenceType] ClassWithDestructor & -# 2259| ValueCategory = prvalue(load) -# 2259| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) -# 2259| Type = [LValueReferenceType] ClassWithDestructor & -# 2259| ValueCategory = prvalue -# 2259| getExpr(): [ReferenceDereferenceExpr] (reference dereference) -# 2259| Type = [Class] ClassWithDestructor -# 2259| ValueCategory = lvalue -# 2259| getQualifier().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2259| Type = [Class] ClassWithDestructor -# 2259| ValueCategory = lvalue -# 2260| getStmt(1): [ReturnStmt] return ... -# 2258| [TemplateFunction,TopLevelFunction] void vacuous_destructor_call::call_destructor(T&) -# 2258| : -# 2258| getParameter(0): [Parameter] t -# 2258| Type = [LValueReferenceType] T & -# 2258| getEntryPoint(): [BlockStmt] { ... } -# 2259| getStmt(0): [ExprStmt] ExprStmt -# 2259| getExpr(): [ExprCall] call to expression -# 2259| Type = [UnknownType] unknown -# 2259| ValueCategory = prvalue -# 2259| getExpr(): [Literal] Unknown literal -# 2259| Type = [UnknownType] unknown -# 2259| ValueCategory = prvalue -# 2259| getChild(-1): [ExprCall] call to expression -# 2259| Type = [UnknownType] unknown -# 2259| ValueCategory = prvalue -# 2259| getExpr(): [Literal] Unknown literal -# 2259| Type = [UnknownType] unknown -# 2259| ValueCategory = prvalue -# 2259| getArgument(0): [VariableAccess] t -# 2259| Type = [LValueReferenceType] T & -# 2259| ValueCategory = prvalue(load) -# 2259| getArgument(0).getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2259| Type = [TemplateParameter] T -# 2259| ValueCategory = lvalue -# 2260| getStmt(1): [ReturnStmt] return ... -# 2258| [FunctionTemplateInstantiation,TopLevelFunction] void vacuous_destructor_call::call_destructor(int&) -# 2258| : -# 2258| getParameter(0): [Parameter] t -# 2258| Type = [LValueReferenceType] int & -# 2258| getEntryPoint(): [BlockStmt] { ... } -# 2259| getStmt(0): [ExprStmt] ExprStmt -# 2259| getExpr(): [VacuousDestructorCall] (vacuous destructor call) -# 2259| Type = [VoidType] void -# 2259| ValueCategory = prvalue -# 2259| getChild(0): [FunctionCall] call to get -# 2259| Type = [LValueReferenceType] int & -# 2259| ValueCategory = prvalue -# 2259| getArgument(0): [VariableAccess] t -# 2259| Type = [LValueReferenceType] int & -# 2259| ValueCategory = prvalue(load) -# 2259| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) -# 2259| Type = [LValueReferenceType] int & -# 2259| ValueCategory = prvalue -# 2259| getExpr(): [ReferenceDereferenceExpr] (reference dereference) -# 2259| Type = [IntType] int -# 2259| ValueCategory = lvalue -# 2259| getChild(0).getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2259| Type = [IntType] int -# 2259| ValueCategory = lvalue -# 2260| getStmt(1): [ReturnStmt] return ... -# 2262| [TopLevelFunction] void vacuous_destructor_call::non_vacuous_destructor_call() -# 2262| : -# 2262| getEntryPoint(): [BlockStmt] { ... } -# 2263| getStmt(0): [DeclStmt] declaration -# 2263| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c -# 2263| Type = [Class] ClassWithDestructor -# 2263| getVariable().getInitializer(): [Initializer] initializer for c -# 2263| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2263| Type = [VoidType] void -# 2263| ValueCategory = prvalue -# 2264| getStmt(1): [ExprStmt] ExprStmt -# 2264| getExpr(): [FunctionCall] call to call_destructor -# 2264| Type = [VoidType] void -# 2264| ValueCategory = prvalue -# 2264| getArgument(0): [VariableAccess] c -# 2264| Type = [Class] ClassWithDestructor -# 2264| ValueCategory = lvalue -# 2264| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) -# 2264| Type = [LValueReferenceType] ClassWithDestructor & -# 2264| ValueCategory = prvalue -# 2265| getStmt(2): [ReturnStmt] return ... -# 2265| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2250| getStmt(3): [ReturnStmt] return ... +# 2250| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2250| Type = [VoidType] void +# 2250| ValueCategory = prvalue +# 2250| getQualifier(): [VariableAccess] b +# 2250| Type = [Class] ClassWithDestructor +# 2250| ValueCategory = lvalue +# 2250| getImplicitDestructorCall(1): [DestructorCall] call to ~ClassWithDestructor +# 2250| Type = [VoidType] void +# 2250| ValueCategory = prvalue +# 2250| getQualifier(): [VariableAccess] a +# 2250| Type = [Class] ClassWithDestructor +# 2250| ValueCategory = lvalue +# 2252| [GlobalVariable] ClassWithDestructor global_class_with_destructor +# 2252| getInitializer(): [Initializer] initializer for global_class_with_destructor +# 2252| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2252| Type = [VoidType] void +# 2252| ValueCategory = prvalue +# 2256| [FunctionTemplateInstantiation,TopLevelFunction] ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) +# 2256| : +# 2256| getParameter(0): [Parameter] t +# 2256| Type = [LValueReferenceType] ClassWithDestructor & +# 2256| getEntryPoint(): [BlockStmt] { ... } +# 2256| getStmt(0): [ReturnStmt] return ... +# 2256| getExpr(): [VariableAccess] t +# 2256| Type = [LValueReferenceType] ClassWithDestructor & +# 2256| ValueCategory = prvalue(load) +# 2256| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2256| Type = [LValueReferenceType] ClassWithDestructor & +# 2256| ValueCategory = prvalue +# 2256| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2256| Type = [Class] ClassWithDestructor +# 2256| ValueCategory = lvalue +# 2256| [TemplateFunction,TopLevelFunction] T& vacuous_destructor_call::get(T&) +# 2256| : +# 2256| getParameter(0): [Parameter] t +# 2256| Type = [LValueReferenceType] T & +# 2256| getEntryPoint(): [BlockStmt] { ... } +# 2256| getStmt(0): [ReturnStmt] return ... +# 2256| getExpr(): [VariableAccess] t +# 2256| Type = [LValueReferenceType] T & +# 2256| ValueCategory = prvalue(load) +# 2256| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2256| Type = [TemplateParameter] T +# 2256| ValueCategory = lvalue +# 2256| [FunctionTemplateInstantiation,TopLevelFunction] int& vacuous_destructor_call::get(int&) +# 2256| : +# 2256| getParameter(0): [Parameter] t +# 2256| Type = [LValueReferenceType] int & +# 2256| getEntryPoint(): [BlockStmt] { ... } +# 2256| getStmt(0): [ReturnStmt] return ... +# 2256| getExpr(): [VariableAccess] t +# 2256| Type = [LValueReferenceType] int & +# 2256| ValueCategory = prvalue(load) +# 2256| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2256| Type = [LValueReferenceType] int & +# 2256| ValueCategory = prvalue +# 2256| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2256| Type = [IntType] int +# 2256| ValueCategory = lvalue +# 2259| [FunctionTemplateInstantiation,TopLevelFunction] void vacuous_destructor_call::call_destructor(ClassWithDestructor&) +# 2259| : +# 2259| getParameter(0): [Parameter] t +# 2259| Type = [LValueReferenceType] ClassWithDestructor & +# 2259| getEntryPoint(): [BlockStmt] { ... } +# 2260| getStmt(0): [ExprStmt] ExprStmt +# 2260| getExpr(): [DestructorCall] call to ~ClassWithDestructor +# 2260| Type = [VoidType] void +# 2260| ValueCategory = prvalue +# 2260| getQualifier(): [FunctionCall] call to get +# 2260| Type = [LValueReferenceType] ClassWithDestructor & +# 2260| ValueCategory = prvalue +# 2260| getArgument(0): [VariableAccess] t +# 2260| Type = [LValueReferenceType] ClassWithDestructor & +# 2260| ValueCategory = prvalue(load) +# 2260| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2260| Type = [LValueReferenceType] ClassWithDestructor & +# 2260| ValueCategory = prvalue +# 2260| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2260| Type = [Class] ClassWithDestructor +# 2260| ValueCategory = lvalue +# 2260| getQualifier().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2260| Type = [Class] ClassWithDestructor +# 2260| ValueCategory = lvalue +# 2261| getStmt(1): [ReturnStmt] return ... +# 2259| [TemplateFunction,TopLevelFunction] void vacuous_destructor_call::call_destructor(T&) +# 2259| : +# 2259| getParameter(0): [Parameter] t +# 2259| Type = [LValueReferenceType] T & +# 2259| getEntryPoint(): [BlockStmt] { ... } +# 2260| getStmt(0): [ExprStmt] ExprStmt +# 2260| getExpr(): [ExprCall] call to expression +# 2260| Type = [UnknownType] unknown +# 2260| ValueCategory = prvalue +# 2260| getExpr(): [Literal] Unknown literal +# 2260| Type = [UnknownType] unknown +# 2260| ValueCategory = prvalue +# 2260| getChild(-1): [ExprCall] call to expression +# 2260| Type = [UnknownType] unknown +# 2260| ValueCategory = prvalue +# 2260| getExpr(): [Literal] Unknown literal +# 2260| Type = [UnknownType] unknown +# 2260| ValueCategory = prvalue +# 2260| getArgument(0): [VariableAccess] t +# 2260| Type = [LValueReferenceType] T & +# 2260| ValueCategory = prvalue(load) +# 2260| getArgument(0).getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2260| Type = [TemplateParameter] T +# 2260| ValueCategory = lvalue +# 2261| getStmt(1): [ReturnStmt] return ... +# 2259| [FunctionTemplateInstantiation,TopLevelFunction] void vacuous_destructor_call::call_destructor(int&) +# 2259| : +# 2259| getParameter(0): [Parameter] t +# 2259| Type = [LValueReferenceType] int & +# 2259| getEntryPoint(): [BlockStmt] { ... } +# 2260| getStmt(0): [ExprStmt] ExprStmt +# 2260| getExpr(): [VacuousDestructorCall] (vacuous destructor call) +# 2260| Type = [VoidType] void +# 2260| ValueCategory = prvalue +# 2260| getChild(0): [FunctionCall] call to get +# 2260| Type = [LValueReferenceType] int & +# 2260| ValueCategory = prvalue +# 2260| getArgument(0): [VariableAccess] t +# 2260| Type = [LValueReferenceType] int & +# 2260| ValueCategory = prvalue(load) +# 2260| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2260| Type = [LValueReferenceType] int & +# 2260| ValueCategory = prvalue +# 2260| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2260| Type = [IntType] int +# 2260| ValueCategory = lvalue +# 2260| getChild(0).getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2260| Type = [IntType] int +# 2260| ValueCategory = lvalue +# 2261| getStmt(1): [ReturnStmt] return ... +# 2263| [TopLevelFunction] void vacuous_destructor_call::non_vacuous_destructor_call() +# 2263| : +# 2263| getEntryPoint(): [BlockStmt] { ... } +# 2264| getStmt(0): [DeclStmt] declaration +# 2264| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c +# 2264| Type = [Class] ClassWithDestructor +# 2264| getVariable().getInitializer(): [Initializer] initializer for c +# 2264| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2264| Type = [VoidType] void +# 2264| ValueCategory = prvalue +# 2265| getStmt(1): [ExprStmt] ExprStmt +# 2265| getExpr(): [FunctionCall] call to call_destructor # 2265| Type = [VoidType] void # 2265| ValueCategory = prvalue -# 2265| getQualifier(): [VariableAccess] c +# 2265| getArgument(0): [VariableAccess] c # 2265| Type = [Class] ClassWithDestructor # 2265| ValueCategory = lvalue -# 2267| [TopLevelFunction] void vacuous_destructor_call::vacuous_destructor_call() -# 2267| : -# 2267| getEntryPoint(): [BlockStmt] { ... } -# 2268| getStmt(0): [DeclStmt] declaration -# 2268| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i -# 2268| Type = [IntType] int -# 2269| getStmt(1): [ExprStmt] ExprStmt -# 2269| getExpr(): [FunctionCall] call to call_destructor -# 2269| Type = [VoidType] void -# 2269| ValueCategory = prvalue -# 2269| getArgument(0): [VariableAccess] i -# 2269| Type = [IntType] int -# 2269| ValueCategory = lvalue -# 2269| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) -# 2269| Type = [LValueReferenceType] int & -# 2269| ValueCategory = prvalue -# 2270| getStmt(2): [ReturnStmt] return ... -# 2273| [TopLevelFunction] void TryCatchDestructors(bool) -# 2273| : -# 2273| getParameter(0): [Parameter] b -# 2273| Type = [BoolType] bool -# 2273| getEntryPoint(): [BlockStmt] { ... } -# 2274| getStmt(0): [TryStmt] try { ... } -# 2274| getStmt(): [BlockStmt] { ... } -# 2275| getStmt(0): [DeclStmt] declaration -# 2275| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2275| Type = [Struct] String -# 2275| getVariable().getInitializer(): [Initializer] initializer for s -# 2275| getExpr(): [ConstructorCall] call to String -# 2275| Type = [VoidType] void -# 2275| ValueCategory = prvalue -# 2276| getStmt(1): [IfStmt] if (...) ... -# 2276| getCondition(): [VariableAccess] b -# 2276| Type = [BoolType] bool -# 2276| ValueCategory = prvalue(load) -# 2276| getThen(): [BlockStmt] { ... } -# 2277| getStmt(0): [ExprStmt] ExprStmt -# 2277| getExpr(): [ThrowExpr] throw ... -# 2277| Type = [PointerType] const char * -# 2277| ValueCategory = prvalue -# 2277| getExpr(): string literal -# 2277| Type = [ArrayType] const char[15] -# 2277| Value = [StringLiteral] "string literal" -# 2277| ValueCategory = lvalue -# 2280| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2280| Type = [VoidType] void -# 2280| ValueCategory = prvalue -# 2280| getQualifier(): [VariableAccess] s -# 2280| Type = [Struct] String -# 2280| ValueCategory = lvalue -# 2277| getExpr().getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion -# 2277| Type = [PointerType] const char * -# 2277| ValueCategory = prvalue -# 2279| getStmt(2): [DeclStmt] declaration -# 2279| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 -# 2279| Type = [Struct] String -# 2279| getVariable().getInitializer(): [Initializer] initializer for s2 -# 2279| getExpr(): [ConstructorCall] call to String -# 2279| Type = [VoidType] void -# 2279| ValueCategory = prvalue -# 2280| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2280| Type = [VoidType] void -# 2280| ValueCategory = prvalue -# 2280| getQualifier(): [VariableAccess] s2 +# 2265| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2265| Type = [LValueReferenceType] ClassWithDestructor & +# 2265| ValueCategory = prvalue +# 2266| getStmt(2): [ReturnStmt] return ... +# 2266| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2266| Type = [VoidType] void +# 2266| ValueCategory = prvalue +# 2266| getQualifier(): [VariableAccess] c +# 2266| Type = [Class] ClassWithDestructor +# 2266| ValueCategory = lvalue +# 2268| [TopLevelFunction] void vacuous_destructor_call::vacuous_destructor_call() +# 2268| : +# 2268| getEntryPoint(): [BlockStmt] { ... } +# 2269| getStmt(0): [DeclStmt] declaration +# 2269| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i +# 2269| Type = [IntType] int +# 2270| getStmt(1): [ExprStmt] ExprStmt +# 2270| getExpr(): [FunctionCall] call to call_destructor +# 2270| Type = [VoidType] void +# 2270| ValueCategory = prvalue +# 2270| getArgument(0): [VariableAccess] i +# 2270| Type = [IntType] int +# 2270| ValueCategory = lvalue +# 2270| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2270| Type = [LValueReferenceType] int & +# 2270| ValueCategory = prvalue +# 2271| getStmt(2): [ReturnStmt] return ... +# 2274| [TopLevelFunction] void TryCatchDestructors(bool) +# 2274| : +# 2274| getParameter(0): [Parameter] b +# 2274| Type = [BoolType] bool +# 2274| getEntryPoint(): [BlockStmt] { ... } +# 2275| getStmt(0): [TryStmt] try { ... } +# 2275| getStmt(): [BlockStmt] { ... } +# 2276| getStmt(0): [DeclStmt] declaration +# 2276| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2276| Type = [Struct] String +# 2276| getVariable().getInitializer(): [Initializer] initializer for s +# 2276| getExpr(): [ConstructorCall] call to String +# 2276| Type = [VoidType] void +# 2276| ValueCategory = prvalue +# 2277| getStmt(1): [IfStmt] if (...) ... +# 2277| getCondition(): [VariableAccess] b +# 2277| Type = [BoolType] bool +# 2277| ValueCategory = prvalue(load) +# 2277| getThen(): [BlockStmt] { ... } +# 2278| getStmt(0): [ExprStmt] ExprStmt +# 2278| getExpr(): [ThrowExpr] throw ... +# 2278| Type = [PointerType] const char * +# 2278| ValueCategory = prvalue +# 2278| getExpr(): string literal +# 2278| Type = [ArrayType] const char[15] +# 2278| Value = [StringLiteral] "string literal" +# 2278| ValueCategory = lvalue +# 2281| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2281| Type = [VoidType] void +# 2281| ValueCategory = prvalue +# 2281| getQualifier(): [VariableAccess] s +# 2281| Type = [Struct] String +# 2281| ValueCategory = lvalue +# 2278| getExpr().getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2278| Type = [PointerType] const char * +# 2278| ValueCategory = prvalue +# 2280| getStmt(2): [DeclStmt] declaration +# 2280| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 # 2280| Type = [Struct] String -# 2280| ValueCategory = lvalue -# 2280| getImplicitDestructorCall(1): [DestructorCall] call to ~String -# 2280| Type = [VoidType] void -# 2280| ValueCategory = prvalue -# 2280| getQualifier(): [VariableAccess] s -# 2280| Type = [Struct] String -# 2280| ValueCategory = lvalue -# 2281| getChild(1): [Handler] -# 2281| getBlock(): [CatchBlock] { ... } -# 2282| getStmt(0): [ExprStmt] ExprStmt -# 2282| getExpr(): [ThrowExpr] throw ... -# 2282| Type = [Struct] String -# 2282| ValueCategory = prvalue -# 2282| getExpr(): [ConstructorCall] call to String -# 2282| Type = [VoidType] void -# 2282| ValueCategory = prvalue -# 2282| getArgument(0): [VariableAccess] s -# 2282| Type = [PointerType] const char * -# 2282| ValueCategory = prvalue(load) -# 2284| getChild(2): [Handler] -# 2284| getBlock(): [CatchBlock] { ... } -# 2286| getChild(3): [Handler] -# 2286| getBlock(): [CatchAnyBlock] { ... } -# 2287| getStmt(0): [ExprStmt] ExprStmt -# 2287| getExpr(): [ReThrowExpr] re-throw exception -# 2287| Type = [VoidType] void -# 2287| ValueCategory = prvalue -# 2289| getStmt(1): [ReturnStmt] return ... -# 2291| [TopLevelFunction] void IfDestructors(bool) -# 2291| : -# 2291| getParameter(0): [Parameter] b -# 2291| Type = [BoolType] bool -# 2291| getEntryPoint(): [BlockStmt] { ... } -# 2292| getStmt(0): [DeclStmt] declaration -# 2292| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s1 -# 2292| Type = [Struct] String -# 2292| getVariable().getInitializer(): [Initializer] initializer for s1 -# 2292| getExpr(): [ConstructorCall] call to String -# 2292| Type = [VoidType] void -# 2292| ValueCategory = prvalue -# 2293| getStmt(1): [IfStmt] if (...) ... -# 2293| getCondition(): [VariableAccess] b -# 2293| Type = [BoolType] bool -# 2293| ValueCategory = prvalue(load) -# 2293| getThen(): [BlockStmt] { ... } -# 2294| getStmt(0): [DeclStmt] declaration -# 2294| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 -# 2294| Type = [Struct] String -# 2294| getVariable().getInitializer(): [Initializer] initializer for s2 -# 2294| getExpr(): [ConstructorCall] call to String -# 2294| Type = [VoidType] void -# 2294| ValueCategory = prvalue -# 2295| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2295| Type = [VoidType] void -# 2295| ValueCategory = prvalue -# 2295| getQualifier(): [VariableAccess] s2 +# 2280| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2280| getExpr(): [ConstructorCall] call to String +# 2280| Type = [VoidType] void +# 2280| ValueCategory = prvalue +# 2281| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2281| Type = [VoidType] void +# 2281| ValueCategory = prvalue +# 2281| getQualifier(): [VariableAccess] s2 +# 2281| Type = [Struct] String +# 2281| ValueCategory = lvalue +# 2281| getImplicitDestructorCall(1): [DestructorCall] call to ~String +# 2281| Type = [VoidType] void +# 2281| ValueCategory = prvalue +# 2281| getQualifier(): [VariableAccess] s +# 2281| Type = [Struct] String +# 2281| ValueCategory = lvalue +# 2282| getChild(1): [Handler] +# 2282| getBlock(): [CatchBlock] { ... } +# 2283| getStmt(0): [ExprStmt] ExprStmt +# 2283| getExpr(): [ThrowExpr] throw ... +# 2283| Type = [Struct] String +# 2283| ValueCategory = prvalue +# 2283| getExpr(): [ConstructorCall] call to String +# 2283| Type = [VoidType] void +# 2283| ValueCategory = prvalue +# 2283| getArgument(0): [VariableAccess] s +# 2283| Type = [PointerType] const char * +# 2283| ValueCategory = prvalue(load) +# 2285| getChild(2): [Handler] +# 2285| getBlock(): [CatchBlock] { ... } +# 2287| getChild(3): [Handler] +# 2287| getBlock(): [CatchAnyBlock] { ... } +# 2288| getStmt(0): [ExprStmt] ExprStmt +# 2288| getExpr(): [ReThrowExpr] re-throw exception +# 2288| Type = [VoidType] void +# 2288| ValueCategory = prvalue +# 2290| getStmt(1): [ReturnStmt] return ... +# 2292| [TopLevelFunction] void IfDestructors(bool) +# 2292| : +# 2292| getParameter(0): [Parameter] b +# 2292| Type = [BoolType] bool +# 2292| getEntryPoint(): [BlockStmt] { ... } +# 2293| getStmt(0): [DeclStmt] declaration +# 2293| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s1 +# 2293| Type = [Struct] String +# 2293| getVariable().getInitializer(): [Initializer] initializer for s1 +# 2293| getExpr(): [ConstructorCall] call to String +# 2293| Type = [VoidType] void +# 2293| ValueCategory = prvalue +# 2294| getStmt(1): [IfStmt] if (...) ... +# 2294| getCondition(): [VariableAccess] b +# 2294| Type = [BoolType] bool +# 2294| ValueCategory = prvalue(load) +# 2294| getThen(): [BlockStmt] { ... } +# 2295| getStmt(0): [DeclStmt] declaration +# 2295| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 # 2295| Type = [Struct] String -# 2295| ValueCategory = lvalue -# 2295| getElse(): [BlockStmt] { ... } -# 2296| getStmt(0): [DeclStmt] declaration -# 2296| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s3 +# 2295| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2295| getExpr(): [ConstructorCall] call to String +# 2295| Type = [VoidType] void +# 2295| ValueCategory = prvalue +# 2296| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2296| Type = [VoidType] void +# 2296| ValueCategory = prvalue +# 2296| getQualifier(): [VariableAccess] s2 # 2296| Type = [Struct] String -# 2296| getVariable().getInitializer(): [Initializer] initializer for s3 -# 2296| getExpr(): [ConstructorCall] call to String -# 2296| Type = [VoidType] void -# 2296| ValueCategory = prvalue -# 2297| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2297| Type = [VoidType] void -# 2297| ValueCategory = prvalue -# 2297| getQualifier(): [VariableAccess] s3 +# 2296| ValueCategory = lvalue +# 2296| getElse(): [BlockStmt] { ... } +# 2297| getStmt(0): [DeclStmt] declaration +# 2297| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s3 # 2297| Type = [Struct] String -# 2297| ValueCategory = lvalue -# 2298| getStmt(2): [DeclStmt] declaration -# 2298| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s4 -# 2298| Type = [Struct] String -# 2298| getVariable().getInitializer(): [Initializer] initializer for s4 -# 2298| getExpr(): [ConstructorCall] call to String -# 2298| Type = [VoidType] void -# 2298| ValueCategory = prvalue -# 2299| getStmt(3): [ReturnStmt] return ... -# 2299| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2299| Type = [VoidType] void -# 2299| ValueCategory = prvalue -# 2299| getQualifier(): [VariableAccess] s4 -# 2299| Type = [Struct] String -# 2299| ValueCategory = lvalue -# 2299| getImplicitDestructorCall(1): [DestructorCall] call to ~String -# 2299| Type = [VoidType] void -# 2299| ValueCategory = prvalue -# 2299| getQualifier(): [VariableAccess] s1 -# 2299| Type = [Struct] String -# 2299| ValueCategory = lvalue -# 2301| [TopLevelFunction] void ForDestructors() -# 2301| : -# 2301| getEntryPoint(): [BlockStmt] { ... } -# 2302| getStmt(0): [DeclStmt] declaration -# 2302| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c -# 2302| Type = [PlainCharType] char -# 2302| getVariable().getInitializer(): [Initializer] initializer for c -# 2302| getExpr(): [CharLiteral] 97 -# 2302| Type = [PlainCharType] char -# 2302| Value = [CharLiteral] 97 -# 2302| ValueCategory = prvalue -# 2303| getStmt(1): [ForStmt] for(...;...;...) ... -# 2303| getInitialization(): [DeclStmt] declaration -# 2303| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2303| Type = [Struct] String -# 2303| getVariable().getInitializer(): [Initializer] initializer for s -# 2303| getExpr(): [ConstructorCall] call to String -# 2303| Type = [VoidType] void -# 2303| ValueCategory = prvalue -# 2303| getArgument(0): hello -# 2303| Type = [ArrayType] const char[6] -# 2303| Value = [StringLiteral] "hello" -# 2303| ValueCategory = lvalue -# 2303| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion -# 2303| Type = [PointerType] const char * -# 2303| ValueCategory = prvalue -# 2303| getCondition(): [NEExpr] ... != ... -# 2303| Type = [BoolType] bool -# 2303| ValueCategory = prvalue -# 2303| getLeftOperand(): [VariableAccess] c -# 2303| Type = [PlainCharType] char -# 2303| ValueCategory = prvalue(load) -# 2303| getRightOperand(): [Literal] 0 -# 2303| Type = [IntType] int -# 2303| Value = [Literal] 0 -# 2303| ValueCategory = prvalue -# 2303| getLeftOperand().getFullyConverted(): [CStyleCast] (int)... -# 2303| Conversion = [IntegralConversion] integral conversion -# 2303| Type = [IntType] int -# 2303| ValueCategory = prvalue -# 2303| getUpdate(): [AssignExpr] ... = ... +# 2297| getVariable().getInitializer(): [Initializer] initializer for s3 +# 2297| getExpr(): [ConstructorCall] call to String +# 2297| Type = [VoidType] void +# 2297| ValueCategory = prvalue +# 2298| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2298| Type = [VoidType] void +# 2298| ValueCategory = prvalue +# 2298| getQualifier(): [VariableAccess] s3 +# 2298| Type = [Struct] String +# 2298| ValueCategory = lvalue +# 2299| getStmt(2): [DeclStmt] declaration +# 2299| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s4 +# 2299| Type = [Struct] String +# 2299| getVariable().getInitializer(): [Initializer] initializer for s4 +# 2299| getExpr(): [ConstructorCall] call to String +# 2299| Type = [VoidType] void +# 2299| ValueCategory = prvalue +# 2300| getStmt(3): [ReturnStmt] return ... +# 2300| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2300| Type = [VoidType] void +# 2300| ValueCategory = prvalue +# 2300| getQualifier(): [VariableAccess] s4 +# 2300| Type = [Struct] String +# 2300| ValueCategory = lvalue +# 2300| getImplicitDestructorCall(1): [DestructorCall] call to ~String +# 2300| Type = [VoidType] void +# 2300| ValueCategory = prvalue +# 2300| getQualifier(): [VariableAccess] s1 +# 2300| Type = [Struct] String +# 2300| ValueCategory = lvalue +# 2302| [TopLevelFunction] void ForDestructors() +# 2302| : +# 2302| getEntryPoint(): [BlockStmt] { ... } +# 2303| getStmt(0): [DeclStmt] declaration +# 2303| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c # 2303| Type = [PlainCharType] char -# 2303| ValueCategory = lvalue -# 2303| getLValue(): [VariableAccess] c -# 2303| Type = [PlainCharType] char -# 2303| ValueCategory = lvalue -# 2303| getRValue(): [FunctionCall] call to pop_back -# 2303| Type = [PlainCharType] char -# 2303| ValueCategory = prvalue -# 2303| getQualifier(): [VariableAccess] s -# 2303| Type = [Struct] String -# 2303| ValueCategory = lvalue -# 2303| getStmt(): [BlockStmt] { ... } -# 2304| getStmt(0): [DeclStmt] declaration -# 2304| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 -# 2304| Type = [Struct] String -# 2304| getVariable().getInitializer(): [Initializer] initializer for s2 -# 2304| getExpr(): [ConstructorCall] call to String -# 2304| Type = [VoidType] void +# 2303| getVariable().getInitializer(): [Initializer] initializer for c +# 2303| getExpr(): [CharLiteral] 97 +# 2303| Type = [PlainCharType] char +# 2303| Value = [CharLiteral] 97 +# 2303| ValueCategory = prvalue +# 2304| getStmt(1): [ForStmt] for(...;...;...) ... +# 2304| getInitialization(): [DeclStmt] declaration +# 2304| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2304| Type = [Struct] String +# 2304| getVariable().getInitializer(): [Initializer] initializer for s +# 2304| getExpr(): [ConstructorCall] call to String +# 2304| Type = [VoidType] void +# 2304| ValueCategory = prvalue +# 2304| getArgument(0): hello +# 2304| Type = [ArrayType] const char[6] +# 2304| Value = [StringLiteral] "hello" +# 2304| ValueCategory = lvalue +# 2304| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2304| Type = [PointerType] const char * # 2304| ValueCategory = prvalue -# 2305| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2305| Type = [VoidType] void -# 2305| ValueCategory = prvalue -# 2305| getQualifier(): [VariableAccess] s2 +# 2304| getCondition(): [NEExpr] ... != ... +# 2304| Type = [BoolType] bool +# 2304| ValueCategory = prvalue +# 2304| getLeftOperand(): [VariableAccess] c +# 2304| Type = [PlainCharType] char +# 2304| ValueCategory = prvalue(load) +# 2304| getRightOperand(): [Literal] 0 +# 2304| Type = [IntType] int +# 2304| Value = [Literal] 0 +# 2304| ValueCategory = prvalue +# 2304| getLeftOperand().getFullyConverted(): [CStyleCast] (int)... +# 2304| Conversion = [IntegralConversion] integral conversion +# 2304| Type = [IntType] int +# 2304| ValueCategory = prvalue +# 2304| getUpdate(): [AssignExpr] ... = ... +# 2304| Type = [PlainCharType] char +# 2304| ValueCategory = lvalue +# 2304| getLValue(): [VariableAccess] c +# 2304| Type = [PlainCharType] char +# 2304| ValueCategory = lvalue +# 2304| getRValue(): [FunctionCall] call to pop_back +# 2304| Type = [PlainCharType] char +# 2304| ValueCategory = prvalue +# 2304| getQualifier(): [VariableAccess] s +# 2304| Type = [Struct] String +# 2304| ValueCategory = lvalue +# 2304| getStmt(): [BlockStmt] { ... } +# 2305| getStmt(0): [DeclStmt] declaration +# 2305| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 # 2305| Type = [Struct] String -# 2305| ValueCategory = lvalue -# 2303| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2303| Type = [VoidType] void -# 2303| ValueCategory = prvalue -# 2303| getQualifier(): [VariableAccess] s -# 2303| Type = [Struct] String -# 2303| ValueCategory = lvalue -# 2307| getStmt(2): [RangeBasedForStmt] for(...:...) ... -# 2307| getChild(1): [DeclStmt] declaration -# 2307| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) -# 2307| Type = [RValueReferenceType] vector && +# 2305| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2305| getExpr(): [ConstructorCall] call to String +# 2305| Type = [VoidType] void +# 2305| ValueCategory = prvalue +# 2306| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2306| Type = [VoidType] void +# 2306| ValueCategory = prvalue +# 2306| getQualifier(): [VariableAccess] s2 +# 2306| Type = [Struct] String +# 2306| ValueCategory = lvalue +# 2304| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2304| Type = [VoidType] void +# 2304| ValueCategory = prvalue +# 2304| getQualifier(): [VariableAccess] s +# 2304| Type = [Struct] String +# 2304| ValueCategory = lvalue +# 2308| getStmt(2): [RangeBasedForStmt] for(...:...) ... +# 2308| getChild(1): [DeclStmt] declaration +# 2308| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) +# 2308| Type = [RValueReferenceType] vector && #-----| getVariable().getInitializer(): [Initializer] initializer for (__range) -# 2307| getExpr(): [ConstructorCall] call to vector -# 2307| Type = [VoidType] void -# 2307| ValueCategory = prvalue -# 2307| getArgument(0): [ConstructorCall] call to String -# 2307| Type = [VoidType] void -# 2307| ValueCategory = prvalue -# 2307| getArgument(0): hello -# 2307| Type = [ArrayType] const char[6] -# 2307| Value = [StringLiteral] "hello" -# 2307| ValueCategory = lvalue -# 2307| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion -# 2307| Type = [PointerType] const char * -# 2307| ValueCategory = prvalue -# 2307| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2307| Type = [Struct] String -# 2307| ValueCategory = lvalue -# 2307| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) -# 2307| Type = [LValueReferenceType] vector & -# 2307| ValueCategory = prvalue -# 2307| getExpr(): [TemporaryObjectExpr] temporary object -# 2307| Type = [ClassTemplateInstantiation,Struct] vector -# 2307| ValueCategory = xvalue -# 2307| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2307| Type = [VoidType] void -# 2307| ValueCategory = prvalue -# 2307| getQualifier(): [ReuseExpr] reuse of temporary object -# 2307| Type = [Struct] String -# 2307| ValueCategory = xvalue -# 2307| getBeginEndDeclaration(): [DeclStmt] declaration -# 2307| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) -# 2307| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2308| getExpr(): [ConstructorCall] call to vector +# 2308| Type = [VoidType] void +# 2308| ValueCategory = prvalue +# 2308| getArgument(0): [ConstructorCall] call to String +# 2308| Type = [VoidType] void +# 2308| ValueCategory = prvalue +# 2308| getArgument(0): hello +# 2308| Type = [ArrayType] const char[6] +# 2308| Value = [StringLiteral] "hello" +# 2308| ValueCategory = lvalue +# 2308| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2308| Type = [PointerType] const char * +# 2308| ValueCategory = prvalue +# 2308| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2308| Type = [Struct] String +# 2308| ValueCategory = lvalue +# 2308| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2308| Type = [LValueReferenceType] vector & +# 2308| ValueCategory = prvalue +# 2308| getExpr(): [TemporaryObjectExpr] temporary object +# 2308| Type = [ClassTemplateInstantiation,Struct] vector +# 2308| ValueCategory = xvalue +# 2308| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2308| Type = [VoidType] void +# 2308| ValueCategory = prvalue +# 2308| getQualifier(): [ReuseExpr] reuse of temporary object +# 2308| Type = [Struct] String +# 2308| ValueCategory = xvalue +# 2308| getBeginEndDeclaration(): [DeclStmt] declaration +# 2308| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) +# 2308| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__begin) -# 2307| getExpr(): [FunctionCall] call to begin -# 2307| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2307| ValueCategory = prvalue -# 2307| getQualifier(): [VariableAccess] (__range) -# 2307| Type = [RValueReferenceType] vector && -# 2307| ValueCategory = prvalue(load) +# 2308| getExpr(): [FunctionCall] call to begin +# 2308| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2308| ValueCategory = prvalue +# 2308| getQualifier(): [VariableAccess] (__range) +# 2308| Type = [RValueReferenceType] vector && +# 2308| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -20585,15 +20591,15 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2307| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) -# 2307| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2308| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) +# 2308| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__end) -# 2307| getExpr(): [FunctionCall] call to end -# 2307| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2307| ValueCategory = prvalue -# 2307| getQualifier(): [VariableAccess] (__range) -# 2307| Type = [RValueReferenceType] vector && -# 2307| ValueCategory = prvalue(load) +# 2308| getExpr(): [FunctionCall] call to end +# 2308| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2308| ValueCategory = prvalue +# 2308| getQualifier(): [VariableAccess] (__range) +# 2308| Type = [RValueReferenceType] vector && +# 2308| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -20601,18 +20607,18 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2307| getCondition(): [FunctionCall] call to operator!= -# 2307| Type = [BoolType] bool -# 2307| ValueCategory = prvalue -# 2307| getQualifier(): [VariableAccess] (__begin) -# 2307| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2307| ValueCategory = lvalue -# 2307| getArgument(0): [ConstructorCall] call to iterator -# 2307| Type = [VoidType] void -# 2307| ValueCategory = prvalue -# 2307| getArgument(0): [VariableAccess] (__end) -# 2307| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2307| ValueCategory = lvalue +# 2308| getCondition(): [FunctionCall] call to operator!= +# 2308| Type = [BoolType] bool +# 2308| ValueCategory = prvalue +# 2308| getQualifier(): [VariableAccess] (__begin) +# 2308| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2308| ValueCategory = lvalue +# 2308| getArgument(0): [ConstructorCall] call to iterator +# 2308| Type = [VoidType] void +# 2308| ValueCategory = prvalue +# 2308| getArgument(0): [VariableAccess] (__end) +# 2308| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2308| ValueCategory = lvalue #-----| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) #-----| Type = [LValueReferenceType] const iterator & #-----| ValueCategory = prvalue @@ -20627,1491 +20633,1497 @@ ir.cpp: #-----| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object #-----| Type = [ClassTemplateInstantiation,Struct] iterator #-----| ValueCategory = lvalue -# 2307| getUpdate(): [FunctionCall] call to operator++ -# 2307| Type = [LValueReferenceType] iterator & -# 2307| ValueCategory = prvalue -# 2307| getQualifier(): [VariableAccess] (__begin) -# 2307| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2307| ValueCategory = lvalue -# 2307| getChild(5): [DeclStmt] declaration -# 2307| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2307| Type = [Struct] String -# 2307| getVariable().getInitializer(): [Initializer] initializer for s -# 2307| getExpr(): [ConstructorCall] call to String -# 2307| Type = [VoidType] void -# 2307| ValueCategory = prvalue -# 2307| getArgument(0): [OverloadedPointerDereferenceExpr] call to operator* -# 2307| Type = [LValueReferenceType] String & -# 2307| ValueCategory = prvalue -# 2307| getQualifier(): [VariableAccess] (__begin) -# 2307| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2307| ValueCategory = lvalue +# 2308| getUpdate(): [FunctionCall] call to operator++ +# 2308| Type = [LValueReferenceType] iterator & +# 2308| ValueCategory = prvalue +# 2308| getQualifier(): [VariableAccess] (__begin) +# 2308| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2308| ValueCategory = lvalue +# 2308| getChild(5): [DeclStmt] declaration +# 2308| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2308| Type = [Struct] String +# 2308| getVariable().getInitializer(): [Initializer] initializer for s +# 2308| getExpr(): [ConstructorCall] call to String +# 2308| Type = [VoidType] void +# 2308| ValueCategory = prvalue +# 2308| getArgument(0): [OverloadedPointerDereferenceExpr] call to operator* +# 2308| Type = [LValueReferenceType] String & +# 2308| ValueCategory = prvalue +# 2308| getQualifier(): [VariableAccess] (__begin) +# 2308| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2308| ValueCategory = lvalue #-----| getQualifier().getFullyConverted(): [CStyleCast] (const iterator)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const iterator #-----| ValueCategory = lvalue -# 2307| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) -# 2307| Type = [LValueReferenceType] const String & -# 2307| ValueCategory = prvalue -# 2307| getExpr(): [CStyleCast] (const String)... -# 2307| Conversion = [GlvalueConversion] glvalue conversion -# 2307| Type = [SpecifiedType] const String -# 2307| ValueCategory = lvalue -# 2307| getExpr(): [ReferenceDereferenceExpr] (reference dereference) -# 2307| Type = [Struct] String -# 2307| ValueCategory = lvalue -# 2307| getStmt(): [BlockStmt] { ... } -# 2308| getStmt(0): [DeclStmt] declaration -# 2308| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 -# 2308| Type = [Struct] String -# 2308| getVariable().getInitializer(): [Initializer] initializer for s2 -# 2308| getExpr(): [ConstructorCall] call to String -# 2308| Type = [VoidType] void +# 2308| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2308| Type = [LValueReferenceType] const String & # 2308| ValueCategory = prvalue -# 2309| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2309| Type = [VoidType] void -# 2309| ValueCategory = prvalue -# 2309| getQualifier(): [VariableAccess] s2 +# 2308| getExpr(): [CStyleCast] (const String)... +# 2308| Conversion = [GlvalueConversion] glvalue conversion +# 2308| Type = [SpecifiedType] const String +# 2308| ValueCategory = lvalue +# 2308| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2308| Type = [Struct] String +# 2308| ValueCategory = lvalue +# 2308| getStmt(): [BlockStmt] { ... } +# 2309| getStmt(0): [DeclStmt] declaration +# 2309| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 # 2309| Type = [Struct] String -# 2309| ValueCategory = lvalue -# 2307| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2307| Type = [ClassTemplateInstantiation,Struct] iterator -# 2307| ValueCategory = lvalue -# 2307| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2307| Type = [VoidType] void -# 2307| ValueCategory = prvalue -# 2307| getQualifier(): [VariableAccess] s -# 2307| Type = [Struct] String -# 2307| ValueCategory = lvalue -# 2311| getStmt(3): [ForStmt] for(...;...;...) ... -# 2311| getInitialization(): [DeclStmt] declaration -# 2311| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2311| Type = [Struct] String -# 2311| getVariable().getInitializer(): [Initializer] initializer for s -# 2311| getExpr(): [ConstructorCall] call to String -# 2311| Type = [VoidType] void -# 2311| ValueCategory = prvalue -# 2311| getArgument(0): hello -# 2311| Type = [ArrayType] const char[6] -# 2311| Value = [StringLiteral] "hello" -# 2311| ValueCategory = lvalue -# 2311| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion -# 2311| Type = [PointerType] const char * -# 2311| ValueCategory = prvalue -# 2311| getDeclarationEntry(1): [VariableDeclarationEntry] definition of s2 -# 2311| Type = [Struct] String -# 2311| getVariable().getInitializer(): [Initializer] initializer for s2 -# 2311| getExpr(): [ConstructorCall] call to String -# 2311| Type = [VoidType] void -# 2311| ValueCategory = prvalue -# 2311| getArgument(0): world -# 2311| Type = [ArrayType] const char[6] -# 2311| Value = [StringLiteral] "world" -# 2311| ValueCategory = lvalue -# 2311| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion -# 2311| Type = [PointerType] const char * -# 2311| ValueCategory = prvalue -# 2311| getCondition(): [NEExpr] ... != ... -# 2311| Type = [BoolType] bool -# 2311| ValueCategory = prvalue -# 2311| getLeftOperand(): [VariableAccess] c -# 2311| Type = [PlainCharType] char -# 2311| ValueCategory = prvalue(load) -# 2311| getRightOperand(): [Literal] 0 -# 2311| Type = [IntType] int -# 2311| Value = [Literal] 0 -# 2311| ValueCategory = prvalue -# 2311| getLeftOperand().getFullyConverted(): [CStyleCast] (int)... -# 2311| Conversion = [IntegralConversion] integral conversion -# 2311| Type = [IntType] int -# 2311| ValueCategory = prvalue -# 2311| getUpdate(): [AssignExpr] ... = ... -# 2311| Type = [PlainCharType] char -# 2311| ValueCategory = lvalue -# 2311| getLValue(): [VariableAccess] c -# 2311| Type = [PlainCharType] char -# 2311| ValueCategory = lvalue -# 2311| getRValue(): [FunctionCall] call to pop_back -# 2311| Type = [PlainCharType] char -# 2311| ValueCategory = prvalue -# 2311| getQualifier(): [VariableAccess] s -# 2311| Type = [Struct] String -# 2311| ValueCategory = lvalue -# 2311| getStmt(): [BlockStmt] { ... } -# 2312| getStmt(0): [ExprStmt] ExprStmt -# 2312| getExpr(): [AssignExpr] ... = ... -# 2312| Type = [PlainCharType] char +# 2309| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2309| getExpr(): [ConstructorCall] call to String +# 2309| Type = [VoidType] void +# 2309| ValueCategory = prvalue +# 2310| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2310| Type = [VoidType] void +# 2310| ValueCategory = prvalue +# 2310| getQualifier(): [VariableAccess] s2 +# 2310| Type = [Struct] String +# 2310| ValueCategory = lvalue +# 2308| getImplicitDestructorCall(0): [DestructorCall] call to ~vector +# 2308| Type = [VoidType] void +# 2308| ValueCategory = prvalue +# 2308| getQualifier(): [ReuseExpr] reuse of temporary object +# 2308| Type = [ClassTemplateInstantiation,Struct] vector +# 2308| ValueCategory = xvalue +# 2308| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2308| Type = [ClassTemplateInstantiation,Struct] iterator +# 2308| ValueCategory = lvalue +# 2308| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2308| Type = [VoidType] void +# 2308| ValueCategory = prvalue +# 2308| getQualifier(): [VariableAccess] s +# 2308| Type = [Struct] String +# 2308| ValueCategory = lvalue +# 2312| getStmt(3): [ForStmt] for(...;...;...) ... +# 2312| getInitialization(): [DeclStmt] declaration +# 2312| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2312| Type = [Struct] String +# 2312| getVariable().getInitializer(): [Initializer] initializer for s +# 2312| getExpr(): [ConstructorCall] call to String +# 2312| Type = [VoidType] void +# 2312| ValueCategory = prvalue +# 2312| getArgument(0): hello +# 2312| Type = [ArrayType] const char[6] +# 2312| Value = [StringLiteral] "hello" +# 2312| ValueCategory = lvalue +# 2312| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2312| Type = [PointerType] const char * +# 2312| ValueCategory = prvalue +# 2312| getDeclarationEntry(1): [VariableDeclarationEntry] definition of s2 +# 2312| Type = [Struct] String +# 2312| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2312| getExpr(): [ConstructorCall] call to String +# 2312| Type = [VoidType] void +# 2312| ValueCategory = prvalue +# 2312| getArgument(0): world +# 2312| Type = [ArrayType] const char[6] +# 2312| Value = [StringLiteral] "world" +# 2312| ValueCategory = lvalue +# 2312| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2312| Type = [PointerType] const char * +# 2312| ValueCategory = prvalue +# 2312| getCondition(): [NEExpr] ... != ... +# 2312| Type = [BoolType] bool +# 2312| ValueCategory = prvalue +# 2312| getLeftOperand(): [VariableAccess] c +# 2312| Type = [PlainCharType] char +# 2312| ValueCategory = prvalue(load) +# 2312| getRightOperand(): [Literal] 0 +# 2312| Type = [IntType] int +# 2312| Value = [Literal] 0 +# 2312| ValueCategory = prvalue +# 2312| getLeftOperand().getFullyConverted(): [CStyleCast] (int)... +# 2312| Conversion = [IntegralConversion] integral conversion +# 2312| Type = [IntType] int +# 2312| ValueCategory = prvalue +# 2312| getUpdate(): [AssignExpr] ... = ... +# 2312| Type = [PlainCharType] char +# 2312| ValueCategory = lvalue +# 2312| getLValue(): [VariableAccess] c +# 2312| Type = [PlainCharType] char +# 2312| ValueCategory = lvalue +# 2312| getRValue(): [FunctionCall] call to pop_back +# 2312| Type = [PlainCharType] char +# 2312| ValueCategory = prvalue +# 2312| getQualifier(): [VariableAccess] s +# 2312| Type = [Struct] String # 2312| ValueCategory = lvalue -# 2312| getLValue(): [VariableAccess] c -# 2312| Type = [PlainCharType] char -# 2312| ValueCategory = lvalue -# 2312| getRValue(): [Literal] 0 -# 2312| Type = [IntType] int -# 2312| Value = [Literal] 0 -# 2312| ValueCategory = prvalue -# 2312| getRValue().getFullyConverted(): [CStyleCast] (char)... -# 2312| Conversion = [IntegralConversion] integral conversion -# 2312| Type = [PlainCharType] char -# 2312| Value = [CStyleCast] 0 -# 2312| ValueCategory = prvalue -# 2311| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2311| Type = [VoidType] void -# 2311| ValueCategory = prvalue -# 2311| getQualifier(): [VariableAccess] s2 -# 2311| Type = [Struct] String -# 2311| ValueCategory = lvalue -# 2311| getImplicitDestructorCall(1): [DestructorCall] call to ~String -# 2311| Type = [VoidType] void -# 2311| ValueCategory = prvalue -# 2311| getQualifier(): [VariableAccess] s -# 2311| Type = [Struct] String -# 2311| ValueCategory = lvalue -# 2314| getStmt(4): [ReturnStmt] return ... -# 2316| [TopLevelFunction] void IfDestructors2(bool) -# 2316| : -# 2316| getParameter(0): [Parameter] b -# 2316| Type = [BoolType] bool -# 2316| getEntryPoint(): [BlockStmt] { ... } -# 2317| getStmt(0): [IfStmt] if (...) ... -# 2317| getInitialization(): [DeclStmt] declaration -# 2317| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2317| Type = [Struct] String -# 2317| getVariable().getInitializer(): [Initializer] initializer for s -# 2317| getExpr(): [ConstructorCall] call to String -# 2317| Type = [VoidType] void -# 2317| ValueCategory = prvalue -# 2317| getArgument(0): hello -# 2317| Type = [ArrayType] const char[6] -# 2317| Value = [StringLiteral] "hello" -# 2317| ValueCategory = lvalue -# 2317| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion -# 2317| Type = [PointerType] const char * -# 2317| ValueCategory = prvalue -# 2317| getCondition(): [VariableAccess] b -# 2317| Type = [BoolType] bool -# 2317| ValueCategory = prvalue(load) -# 2317| getThen(): [BlockStmt] { ... } -# 2318| getStmt(0): [DeclStmt] declaration -# 2318| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2318| Type = [IntType] int -# 2318| getVariable().getInitializer(): [Initializer] initializer for x -# 2318| getExpr(): [Literal] 0 -# 2318| Type = [IntType] int -# 2318| Value = [Literal] 0 +# 2312| getStmt(): [BlockStmt] { ... } +# 2313| getStmt(0): [ExprStmt] ExprStmt +# 2313| getExpr(): [AssignExpr] ... = ... +# 2313| Type = [PlainCharType] char +# 2313| ValueCategory = lvalue +# 2313| getLValue(): [VariableAccess] c +# 2313| Type = [PlainCharType] char +# 2313| ValueCategory = lvalue +# 2313| getRValue(): [Literal] 0 +# 2313| Type = [IntType] int +# 2313| Value = [Literal] 0 +# 2313| ValueCategory = prvalue +# 2313| getRValue().getFullyConverted(): [CStyleCast] (char)... +# 2313| Conversion = [IntegralConversion] integral conversion +# 2313| Type = [PlainCharType] char +# 2313| Value = [CStyleCast] 0 +# 2313| ValueCategory = prvalue +# 2312| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2312| Type = [VoidType] void +# 2312| ValueCategory = prvalue +# 2312| getQualifier(): [VariableAccess] s2 +# 2312| Type = [Struct] String +# 2312| ValueCategory = lvalue +# 2312| getImplicitDestructorCall(1): [DestructorCall] call to ~String +# 2312| Type = [VoidType] void +# 2312| ValueCategory = prvalue +# 2312| getQualifier(): [VariableAccess] s +# 2312| Type = [Struct] String +# 2312| ValueCategory = lvalue +# 2315| getStmt(4): [ReturnStmt] return ... +# 2317| [TopLevelFunction] void IfDestructors2(bool) +# 2317| : +# 2317| getParameter(0): [Parameter] b +# 2317| Type = [BoolType] bool +# 2317| getEntryPoint(): [BlockStmt] { ... } +# 2318| getStmt(0): [IfStmt] if (...) ... +# 2318| getInitialization(): [DeclStmt] declaration +# 2318| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2318| Type = [Struct] String +# 2318| getVariable().getInitializer(): [Initializer] initializer for s +# 2318| getExpr(): [ConstructorCall] call to String +# 2318| Type = [VoidType] void +# 2318| ValueCategory = prvalue +# 2318| getArgument(0): hello +# 2318| Type = [ArrayType] const char[6] +# 2318| Value = [StringLiteral] "hello" +# 2318| ValueCategory = lvalue +# 2318| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2318| Type = [PointerType] const char * # 2318| ValueCategory = prvalue -# 2319| getElse(): [BlockStmt] { ... } -# 2320| getStmt(0): [DeclStmt] declaration -# 2320| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y -# 2320| Type = [IntType] int -# 2320| getVariable().getInitializer(): [Initializer] initializer for y -# 2320| getExpr(): [Literal] 0 -# 2320| Type = [IntType] int -# 2320| Value = [Literal] 0 -# 2320| ValueCategory = prvalue -# 2321| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2321| Type = [VoidType] void -# 2321| ValueCategory = prvalue -# 2321| getQualifier(): [VariableAccess] s -# 2321| Type = [Struct] String -# 2321| ValueCategory = lvalue -# 2322| getStmt(1): [ReturnStmt] return ... -# 2324| [CopyAssignmentOperator] Bool& Bool::operator=(Bool const&) -# 2324| : +# 2318| getCondition(): [VariableAccess] b +# 2318| Type = [BoolType] bool +# 2318| ValueCategory = prvalue(load) +# 2318| getThen(): [BlockStmt] { ... } +# 2319| getStmt(0): [DeclStmt] declaration +# 2319| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2319| Type = [IntType] int +# 2319| getVariable().getInitializer(): [Initializer] initializer for x +# 2319| getExpr(): [Literal] 0 +# 2319| Type = [IntType] int +# 2319| Value = [Literal] 0 +# 2319| ValueCategory = prvalue +# 2320| getElse(): [BlockStmt] { ... } +# 2321| getStmt(0): [DeclStmt] declaration +# 2321| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2321| Type = [IntType] int +# 2321| getVariable().getInitializer(): [Initializer] initializer for y +# 2321| getExpr(): [Literal] 0 +# 2321| Type = [IntType] int +# 2321| Value = [Literal] 0 +# 2321| ValueCategory = prvalue +# 2322| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2322| Type = [VoidType] void +# 2322| ValueCategory = prvalue +# 2322| getQualifier(): [VariableAccess] s +# 2322| Type = [Struct] String +# 2322| ValueCategory = lvalue +# 2323| getStmt(1): [ReturnStmt] return ... +# 2325| [CopyAssignmentOperator] Bool& Bool::operator=(Bool const&) +# 2325| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [LValueReferenceType] const Bool & -# 2324| [CopyConstructor] void Bool::Bool(Bool const&) -# 2324| : +# 2325| [CopyConstructor] void Bool::Bool(Bool const&) +# 2325| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [LValueReferenceType] const Bool & -# 2326| [Constructor] void Bool::Bool(bool) -# 2326| : -# 2326| getParameter(0): [Parameter] b_ -# 2326| Type = [BoolType] bool -# 2327| [ConversionOperator] bool Bool::operator bool() +# 2327| [Constructor] void Bool::Bool(bool) # 2327| : -# 2328| [Destructor] void Bool::~Bool() +# 2327| getParameter(0): [Parameter] b_ +# 2327| Type = [BoolType] bool +# 2328| [ConversionOperator] bool Bool::operator bool() # 2328| : -# 2331| [TopLevelFunction] void IfDestructors3(bool) -# 2331| : -# 2331| getParameter(0): [Parameter] b -# 2331| Type = [BoolType] bool -# 2331| getEntryPoint(): [BlockStmt] { ... } -# 2332| getStmt(0): [IfStmt] if (...) ... -# 2332| getCondition(): [ConditionDeclExpr] (condition decl) -# 2332| Type = [BoolType] bool -# 2332| ValueCategory = prvalue -# 2332| getChild(0): [FunctionCall] call to operator bool -# 2332| Type = [BoolType] bool -# 2332| ValueCategory = prvalue -# 2332| getQualifier(): [VariableAccess] B -# 2332| Type = [Class] Bool -# 2332| ValueCategory = prvalue(load) -# 2332| getInitializingExpr(): [ConstructorCall] call to Bool -# 2332| Type = [VoidType] void -# 2332| ValueCategory = prvalue -# 2332| getArgument(0): [VariableAccess] b -# 2332| Type = [BoolType] bool -# 2332| ValueCategory = prvalue(load) -# 2332| getThen(): [BlockStmt] { ... } -# 2333| getStmt(0): [DeclStmt] declaration -# 2333| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s1 -# 2333| Type = [Struct] String -# 2333| getVariable().getInitializer(): [Initializer] initializer for s1 -# 2333| getExpr(): [ConstructorCall] call to String -# 2333| Type = [VoidType] void -# 2333| ValueCategory = prvalue -# 2334| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2334| Type = [VoidType] void -# 2334| ValueCategory = prvalue -# 2334| getQualifier(): [VariableAccess] s1 +# 2329| [Destructor] void Bool::~Bool() +# 2329| : +# 2332| [TopLevelFunction] void IfDestructors3(bool) +# 2332| : +# 2332| getParameter(0): [Parameter] b +# 2332| Type = [BoolType] bool +# 2332| getEntryPoint(): [BlockStmt] { ... } +# 2333| getStmt(0): [IfStmt] if (...) ... +# 2333| getCondition(): [ConditionDeclExpr] (condition decl) +# 2333| Type = [BoolType] bool +# 2333| ValueCategory = prvalue +# 2333| getChild(0): [FunctionCall] call to operator bool +# 2333| Type = [BoolType] bool +# 2333| ValueCategory = prvalue +# 2333| getQualifier(): [VariableAccess] B +# 2333| Type = [Class] Bool +# 2333| ValueCategory = prvalue(load) +# 2333| getInitializingExpr(): [ConstructorCall] call to Bool +# 2333| Type = [VoidType] void +# 2333| ValueCategory = prvalue +# 2333| getArgument(0): [VariableAccess] b +# 2333| Type = [BoolType] bool +# 2333| ValueCategory = prvalue(load) +# 2333| getThen(): [BlockStmt] { ... } +# 2334| getStmt(0): [DeclStmt] declaration +# 2334| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s1 # 2334| Type = [Struct] String -# 2334| ValueCategory = lvalue -# 2334| getElse(): [BlockStmt] { ... } -# 2335| getStmt(0): [DeclStmt] declaration -# 2335| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 +# 2334| getVariable().getInitializer(): [Initializer] initializer for s1 +# 2334| getExpr(): [ConstructorCall] call to String +# 2334| Type = [VoidType] void +# 2334| ValueCategory = prvalue +# 2335| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2335| Type = [VoidType] void +# 2335| ValueCategory = prvalue +# 2335| getQualifier(): [VariableAccess] s1 # 2335| Type = [Struct] String -# 2335| getVariable().getInitializer(): [Initializer] initializer for s2 -# 2335| getExpr(): [ConstructorCall] call to String -# 2335| Type = [VoidType] void -# 2335| ValueCategory = prvalue -# 2336| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2336| Type = [VoidType] void -# 2336| ValueCategory = prvalue -# 2336| getQualifier(): [VariableAccess] s2 +# 2335| ValueCategory = lvalue +# 2335| getElse(): [BlockStmt] { ... } +# 2336| getStmt(0): [DeclStmt] declaration +# 2336| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 # 2336| Type = [Struct] String -# 2336| ValueCategory = lvalue -# 2336| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool -# 2336| Type = [VoidType] void -# 2336| ValueCategory = prvalue -# 2336| getQualifier(): [VariableAccess] B -# 2336| Type = [Class] Bool -# 2336| ValueCategory = lvalue -# 2337| getStmt(1): [ReturnStmt] return ... -# 2339| [TopLevelFunction] void WhileLoopDestructors(bool) -# 2339| : -# 2339| getParameter(0): [Parameter] b -# 2339| Type = [BoolType] bool -# 2339| getEntryPoint(): [BlockStmt] { ... } -# 2340| getStmt(0): [BlockStmt] { ... } -# 2341| getStmt(0): [DeclStmt] declaration -# 2341| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2341| Type = [Struct] String -# 2341| getVariable().getInitializer(): [Initializer] initializer for s -# 2341| getExpr(): [ConstructorCall] call to String -# 2341| Type = [VoidType] void -# 2341| ValueCategory = prvalue -# 2342| getStmt(1): [WhileStmt] while (...) ... -# 2342| getCondition(): [VariableAccess] b -# 2342| Type = [BoolType] bool -# 2342| ValueCategory = prvalue(load) -# 2342| getStmt(): [BlockStmt] { ... } -# 2343| getStmt(0): [ExprStmt] ExprStmt -# 2343| getExpr(): [AssignExpr] ... = ... -# 2343| Type = [BoolType] bool -# 2343| ValueCategory = lvalue -# 2343| getLValue(): [VariableAccess] b -# 2343| Type = [BoolType] bool -# 2343| ValueCategory = lvalue -# 2343| getRValue(): [Literal] 0 -# 2343| Type = [BoolType] bool -# 2343| Value = [Literal] 0 -# 2343| ValueCategory = prvalue -# 2345| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2345| Type = [VoidType] void -# 2345| ValueCategory = prvalue -# 2345| getQualifier(): [VariableAccess] s -# 2345| Type = [Struct] String -# 2345| ValueCategory = lvalue -# 2347| getStmt(1): [BlockStmt] { ... } -# 2348| getStmt(0): [WhileStmt] while (...) ... -# 2348| getCondition(): [ConditionDeclExpr] (condition decl) -# 2348| Type = [BoolType] bool -# 2348| ValueCategory = prvalue -# 2348| getChild(0): [FunctionCall] call to operator bool -# 2348| Type = [BoolType] bool -# 2348| ValueCategory = prvalue -# 2348| getQualifier(): [VariableAccess] B -# 2348| Type = [Class] Bool -# 2348| ValueCategory = prvalue(load) -# 2348| getInitializingExpr(): [ConstructorCall] call to Bool -# 2348| Type = [VoidType] void -# 2348| ValueCategory = prvalue -# 2348| getArgument(0): [VariableAccess] b -# 2348| Type = [BoolType] bool -# 2348| ValueCategory = prvalue(load) -# 2348| getStmt(): [BlockStmt] { ... } -# 2349| getStmt(0): [ExprStmt] ExprStmt -# 2349| getExpr(): [AssignExpr] ... = ... +# 2336| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2336| getExpr(): [ConstructorCall] call to String +# 2336| Type = [VoidType] void +# 2336| ValueCategory = prvalue +# 2337| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2337| Type = [VoidType] void +# 2337| ValueCategory = prvalue +# 2337| getQualifier(): [VariableAccess] s2 +# 2337| Type = [Struct] String +# 2337| ValueCategory = lvalue +# 2337| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool +# 2337| Type = [VoidType] void +# 2337| ValueCategory = prvalue +# 2337| getQualifier(): [VariableAccess] B +# 2337| Type = [Class] Bool +# 2337| ValueCategory = lvalue +# 2338| getStmt(1): [ReturnStmt] return ... +# 2340| [TopLevelFunction] void WhileLoopDestructors(bool) +# 2340| : +# 2340| getParameter(0): [Parameter] b +# 2340| Type = [BoolType] bool +# 2340| getEntryPoint(): [BlockStmt] { ... } +# 2341| getStmt(0): [BlockStmt] { ... } +# 2342| getStmt(0): [DeclStmt] declaration +# 2342| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2342| Type = [Struct] String +# 2342| getVariable().getInitializer(): [Initializer] initializer for s +# 2342| getExpr(): [ConstructorCall] call to String +# 2342| Type = [VoidType] void +# 2342| ValueCategory = prvalue +# 2343| getStmt(1): [WhileStmt] while (...) ... +# 2343| getCondition(): [VariableAccess] b +# 2343| Type = [BoolType] bool +# 2343| ValueCategory = prvalue(load) +# 2343| getStmt(): [BlockStmt] { ... } +# 2344| getStmt(0): [ExprStmt] ExprStmt +# 2344| getExpr(): [AssignExpr] ... = ... +# 2344| Type = [BoolType] bool +# 2344| ValueCategory = lvalue +# 2344| getLValue(): [VariableAccess] b +# 2344| Type = [BoolType] bool +# 2344| ValueCategory = lvalue +# 2344| getRValue(): [Literal] 0 +# 2344| Type = [BoolType] bool +# 2344| Value = [Literal] 0 +# 2344| ValueCategory = prvalue +# 2346| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2346| Type = [VoidType] void +# 2346| ValueCategory = prvalue +# 2346| getQualifier(): [VariableAccess] s +# 2346| Type = [Struct] String +# 2346| ValueCategory = lvalue +# 2348| getStmt(1): [BlockStmt] { ... } +# 2349| getStmt(0): [WhileStmt] while (...) ... +# 2349| getCondition(): [ConditionDeclExpr] (condition decl) +# 2349| Type = [BoolType] bool +# 2349| ValueCategory = prvalue +# 2349| getChild(0): [FunctionCall] call to operator bool +# 2349| Type = [BoolType] bool +# 2349| ValueCategory = prvalue +# 2349| getQualifier(): [VariableAccess] B +# 2349| Type = [Class] Bool +# 2349| ValueCategory = prvalue(load) +# 2349| getInitializingExpr(): [ConstructorCall] call to Bool +# 2349| Type = [VoidType] void +# 2349| ValueCategory = prvalue +# 2349| getArgument(0): [VariableAccess] b # 2349| Type = [BoolType] bool -# 2349| ValueCategory = lvalue -# 2349| getLValue(): [VariableAccess] b -# 2349| Type = [BoolType] bool -# 2349| ValueCategory = lvalue -# 2349| getRValue(): [Literal] 0 -# 2349| Type = [BoolType] bool -# 2349| Value = [Literal] 0 -# 2349| ValueCategory = prvalue -# 2350| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool -# 2350| Type = [VoidType] void -# 2350| ValueCategory = prvalue -# 2350| getQualifier(): [VariableAccess] B -# 2350| Type = [Class] Bool +# 2349| ValueCategory = prvalue(load) +# 2349| getStmt(): [BlockStmt] { ... } +# 2350| getStmt(0): [ExprStmt] ExprStmt +# 2350| getExpr(): [AssignExpr] ... = ... +# 2350| Type = [BoolType] bool # 2350| ValueCategory = lvalue -# 2350| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool -# 2350| Type = [VoidType] void -# 2350| ValueCategory = prvalue -# 2350| getQualifier(): [VariableAccess] B -# 2350| Type = [Class] Bool -# 2350| ValueCategory = lvalue -# 2352| getStmt(2): [ReturnStmt] return ... -# 2354| [TopLevelFunction] void VoidFunc() -# 2354| : -# 2354| getEntryPoint(): [BlockStmt] { ... } -# 2354| getStmt(0): [ReturnStmt] return ... -# 2356| [TopLevelFunction] void IfReturnDestructors(bool) -# 2356| : -# 2356| getParameter(0): [Parameter] b -# 2356| Type = [BoolType] bool -# 2356| getEntryPoint(): [BlockStmt] { ... } -# 2357| getStmt(0): [DeclStmt] declaration -# 2357| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2357| Type = [Struct] String -# 2357| getVariable().getInitializer(): [Initializer] initializer for s -# 2357| getExpr(): [ConstructorCall] call to String -# 2357| Type = [VoidType] void -# 2357| ValueCategory = prvalue -# 2358| getStmt(1): [IfStmt] if (...) ... -# 2358| getCondition(): [VariableAccess] b -# 2358| Type = [BoolType] bool -# 2358| ValueCategory = prvalue(load) -# 2358| getThen(): [BlockStmt] { ... } -# 2359| getStmt(0): [ReturnStmt] return ... -# 2365| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2365| Type = [VoidType] void -# 2365| ValueCategory = prvalue -# 2365| getQualifier(): [VariableAccess] s -# 2365| Type = [Struct] String -# 2365| ValueCategory = lvalue -# 2361| getStmt(2): [IfStmt] if (...) ... -# 2361| getCondition(): [VariableAccess] b -# 2361| Type = [BoolType] bool -# 2361| ValueCategory = prvalue(load) -# 2361| getThen(): [BlockStmt] { ... } -# 2362| getStmt(0): [ReturnStmt] return ... -# 2362| getExpr(): [FunctionCall] call to VoidFunc -# 2362| Type = [VoidType] void -# 2362| ValueCategory = prvalue -# 2365| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2365| Type = [VoidType] void -# 2365| ValueCategory = prvalue -# 2365| getQualifier(): [VariableAccess] s -# 2365| Type = [Struct] String -# 2365| ValueCategory = lvalue -# 2364| getStmt(3): [ExprStmt] ExprStmt -# 2364| getExpr(): [VariableAccess] s -# 2364| Type = [Struct] String -# 2364| ValueCategory = lvalue -# 2365| getStmt(4): [ReturnStmt] return ... -# 2365| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2365| Type = [VoidType] void -# 2365| ValueCategory = prvalue -# 2365| getQualifier(): [VariableAccess] s -# 2365| Type = [Struct] String -# 2365| ValueCategory = lvalue -# 2367| [TopLevelFunction] int IfReturnDestructors3(bool) -# 2367| : -# 2367| getParameter(0): [Parameter] b -# 2367| Type = [BoolType] bool -# 2367| getEntryPoint(): [BlockStmt] { ... } -# 2368| getStmt(0): [DeclStmt] declaration -# 2368| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2368| Type = [Struct] String -# 2368| getVariable().getInitializer(): [Initializer] initializer for s -# 2368| getExpr(): [ConstructorCall] call to String -# 2368| Type = [VoidType] void -# 2368| ValueCategory = prvalue -# 2369| getStmt(1): [IfStmt] if (...) ... -# 2369| getCondition(): [VariableAccess] b -# 2369| Type = [BoolType] bool -# 2369| ValueCategory = prvalue(load) -# 2369| getThen(): [BlockStmt] { ... } -# 2370| getStmt(0): [ReturnStmt] return ... -# 2370| getExpr(): [Literal] 1 -# 2370| Type = [IntType] int -# 2370| Value = [Literal] 1 -# 2370| ValueCategory = prvalue -# 2373| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2373| Type = [VoidType] void -# 2373| ValueCategory = prvalue -# 2373| getQualifier(): [VariableAccess] s -# 2373| Type = [Struct] String -# 2373| ValueCategory = lvalue -# 2372| getStmt(2): [ReturnStmt] return ... -# 2372| getExpr(): [Literal] 0 -# 2372| Type = [IntType] int -# 2372| Value = [Literal] 0 -# 2372| ValueCategory = prvalue -# 2373| getImplicitDestructorCall(0): [DestructorCall] call to ~String -# 2373| Type = [VoidType] void +# 2350| getLValue(): [VariableAccess] b +# 2350| Type = [BoolType] bool +# 2350| ValueCategory = lvalue +# 2350| getRValue(): [Literal] 0 +# 2350| Type = [BoolType] bool +# 2350| Value = [Literal] 0 +# 2350| ValueCategory = prvalue +# 2351| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool +# 2351| Type = [VoidType] void +# 2351| ValueCategory = prvalue +# 2351| getQualifier(): [VariableAccess] B +# 2351| Type = [Class] Bool +# 2351| ValueCategory = lvalue +# 2351| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool +# 2351| Type = [VoidType] void +# 2351| ValueCategory = prvalue +# 2351| getQualifier(): [VariableAccess] B +# 2351| Type = [Class] Bool +# 2351| ValueCategory = lvalue +# 2353| getStmt(2): [ReturnStmt] return ... +# 2355| [TopLevelFunction] void VoidFunc() +# 2355| : +# 2355| getEntryPoint(): [BlockStmt] { ... } +# 2355| getStmt(0): [ReturnStmt] return ... +# 2357| [TopLevelFunction] void IfReturnDestructors(bool) +# 2357| : +# 2357| getParameter(0): [Parameter] b +# 2357| Type = [BoolType] bool +# 2357| getEntryPoint(): [BlockStmt] { ... } +# 2358| getStmt(0): [DeclStmt] declaration +# 2358| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2358| Type = [Struct] String +# 2358| getVariable().getInitializer(): [Initializer] initializer for s +# 2358| getExpr(): [ConstructorCall] call to String +# 2358| Type = [VoidType] void +# 2358| ValueCategory = prvalue +# 2359| getStmt(1): [IfStmt] if (...) ... +# 2359| getCondition(): [VariableAccess] b +# 2359| Type = [BoolType] bool +# 2359| ValueCategory = prvalue(load) +# 2359| getThen(): [BlockStmt] { ... } +# 2360| getStmt(0): [ReturnStmt] return ... +# 2366| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2366| Type = [VoidType] void +# 2366| ValueCategory = prvalue +# 2366| getQualifier(): [VariableAccess] s +# 2366| Type = [Struct] String +# 2366| ValueCategory = lvalue +# 2362| getStmt(2): [IfStmt] if (...) ... +# 2362| getCondition(): [VariableAccess] b +# 2362| Type = [BoolType] bool +# 2362| ValueCategory = prvalue(load) +# 2362| getThen(): [BlockStmt] { ... } +# 2363| getStmt(0): [ReturnStmt] return ... +# 2363| getExpr(): [FunctionCall] call to VoidFunc +# 2363| Type = [VoidType] void +# 2363| ValueCategory = prvalue +# 2366| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2366| Type = [VoidType] void +# 2366| ValueCategory = prvalue +# 2366| getQualifier(): [VariableAccess] s +# 2366| Type = [Struct] String +# 2366| ValueCategory = lvalue +# 2365| getStmt(3): [ExprStmt] ExprStmt +# 2365| getExpr(): [VariableAccess] s +# 2365| Type = [Struct] String +# 2365| ValueCategory = lvalue +# 2366| getStmt(4): [ReturnStmt] return ... +# 2366| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2366| Type = [VoidType] void +# 2366| ValueCategory = prvalue +# 2366| getQualifier(): [VariableAccess] s +# 2366| Type = [Struct] String +# 2366| ValueCategory = lvalue +# 2368| [TopLevelFunction] int IfReturnDestructors3(bool) +# 2368| : +# 2368| getParameter(0): [Parameter] b +# 2368| Type = [BoolType] bool +# 2368| getEntryPoint(): [BlockStmt] { ... } +# 2369| getStmt(0): [DeclStmt] declaration +# 2369| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2369| Type = [Struct] String +# 2369| getVariable().getInitializer(): [Initializer] initializer for s +# 2369| getExpr(): [ConstructorCall] call to String +# 2369| Type = [VoidType] void +# 2369| ValueCategory = prvalue +# 2370| getStmt(1): [IfStmt] if (...) ... +# 2370| getCondition(): [VariableAccess] b +# 2370| Type = [BoolType] bool +# 2370| ValueCategory = prvalue(load) +# 2370| getThen(): [BlockStmt] { ... } +# 2371| getStmt(0): [ReturnStmt] return ... +# 2371| getExpr(): [Literal] 1 +# 2371| Type = [IntType] int +# 2371| Value = [Literal] 1 +# 2371| ValueCategory = prvalue +# 2374| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2374| Type = [VoidType] void +# 2374| ValueCategory = prvalue +# 2374| getQualifier(): [VariableAccess] s +# 2374| Type = [Struct] String +# 2374| ValueCategory = lvalue +# 2373| getStmt(2): [ReturnStmt] return ... +# 2373| getExpr(): [Literal] 0 +# 2373| Type = [IntType] int +# 2373| Value = [Literal] 0 # 2373| ValueCategory = prvalue -# 2373| getQualifier(): [VariableAccess] s -# 2373| Type = [Struct] String -# 2373| ValueCategory = lvalue -# 2375| [TopLevelFunction] void VoidReturnDestructors() -# 2375| : -# 2375| getEntryPoint(): [BlockStmt] { ... } -# 2376| getStmt(0): [DeclStmt] declaration -# 2376| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s -# 2376| Type = [Struct] String -# 2376| getVariable().getInitializer(): [Initializer] initializer for s -# 2376| getExpr(): [ConstructorCall] call to String -# 2376| Type = [VoidType] void -# 2376| ValueCategory = prvalue -# 2377| getStmt(1): [ReturnStmt] return ... -# 2377| getExpr(): [FunctionCall] call to VoidFunc -# 2377| Type = [VoidType] void -# 2377| ValueCategory = prvalue -# 2378| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2374| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2374| Type = [VoidType] void +# 2374| ValueCategory = prvalue +# 2374| getQualifier(): [VariableAccess] s +# 2374| Type = [Struct] String +# 2374| ValueCategory = lvalue +# 2376| [TopLevelFunction] void VoidReturnDestructors() +# 2376| : +# 2376| getEntryPoint(): [BlockStmt] { ... } +# 2377| getStmt(0): [DeclStmt] declaration +# 2377| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2377| Type = [Struct] String +# 2377| getVariable().getInitializer(): [Initializer] initializer for s +# 2377| getExpr(): [ConstructorCall] call to String +# 2377| Type = [VoidType] void +# 2377| ValueCategory = prvalue +# 2378| getStmt(1): [ReturnStmt] return ... +# 2378| getExpr(): [FunctionCall] call to VoidFunc # 2378| Type = [VoidType] void # 2378| ValueCategory = prvalue -# 2378| getQualifier(): [VariableAccess] s -# 2378| Type = [Struct] String -# 2378| ValueCategory = lvalue -# 2381| [CopyAssignmentOperator] return_routine_type::HasVoidToIntFunc& return_routine_type::HasVoidToIntFunc::operator=(return_routine_type::HasVoidToIntFunc const&) -# 2381| : +# 2379| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2379| Type = [VoidType] void +# 2379| ValueCategory = prvalue +# 2379| getQualifier(): [VariableAccess] s +# 2379| Type = [Struct] String +# 2379| ValueCategory = lvalue +# 2382| [CopyAssignmentOperator] return_routine_type::HasVoidToIntFunc& return_routine_type::HasVoidToIntFunc::operator=(return_routine_type::HasVoidToIntFunc const&) +# 2382| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [LValueReferenceType] const HasVoidToIntFunc & -# 2381| [MoveAssignmentOperator] return_routine_type::HasVoidToIntFunc& return_routine_type::HasVoidToIntFunc::operator=(return_routine_type::HasVoidToIntFunc&&) -# 2381| : +# 2382| [MoveAssignmentOperator] return_routine_type::HasVoidToIntFunc& return_routine_type::HasVoidToIntFunc::operator=(return_routine_type::HasVoidToIntFunc&&) +# 2382| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [RValueReferenceType] HasVoidToIntFunc && -# 2383| [MemberFunction] void return_routine_type::HasVoidToIntFunc::VoidToInt(int) -# 2383| : -# 2383| getParameter(0): [Parameter] (unnamed parameter 0) -# 2383| Type = [IntType] int -# 2388| [TopLevelFunction] return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() -# 2388| : -# 2389| getEntryPoint(): [BlockStmt] { ... } -# 2390| getStmt(0): [ReturnStmt] return ... -# 2390| getExpr(): [FunctionAccess] VoidToInt -# 2390| Type = [RoutineType] ..()(..) -# 2390| ValueCategory = prvalue -# 2395| [TopLevelFunction] int small_operation_should_not_be_constant_folded() -# 2395| : -# 2395| getEntryPoint(): [BlockStmt] { ... } -# 2396| getStmt(0): [ReturnStmt] return ... -# 2396| getExpr(): [BitwiseXorExpr] ... ^ ... -# 2396| Type = [IntType] int -# 2396| Value = [BitwiseXorExpr] 3 -# 2396| ValueCategory = prvalue -# 2396| getLeftOperand(): [Literal] 1 -# 2396| Type = [IntType] int -# 2396| Value = [Literal] 1 -# 2396| ValueCategory = prvalue -# 2396| getRightOperand(): [Literal] 2 -# 2396| Type = [IntType] int -# 2396| Value = [Literal] 2 -# 2396| ValueCategory = prvalue -# 2406| [TopLevelFunction] int large_operation_should_be_constant_folded() -# 2406| : -# 2406| getEntryPoint(): [BlockStmt] { ... } -# 2407| getStmt(0): [ReturnStmt] return ... -# 2407| getExpr(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [BitwiseXorExpr] ... ^ ... -# 2407| Type = [IntType] int -# 2407| Value = [BitwiseXorExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand(): [Literal] 1 -# 2407| Type = [IntType] int -# 2407| Value = [Literal] 1 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2407| getExpr().getFullyConverted(): [ParenthesisExpr] (...) -# 2407| Type = [IntType] int -# 2407| Value = [ParenthesisExpr] 0 -# 2407| ValueCategory = prvalue -# 2410| [TopLevelFunction] void initialization_with_temp_destructor() -# 2410| : -# 2410| getEntryPoint(): [BlockStmt] { ... } -# 2411| getStmt(0): [IfStmt] if (...) ... -# 2411| getCondition(): [ConditionDeclExpr] (condition decl) -# 2411| Type = [BoolType] bool -# 2411| ValueCategory = prvalue -# 2411| getVariableAccess(): [VariableAccess] x -# 2411| Type = [PlainCharType] char -# 2411| ValueCategory = prvalue(load) -# 2411| getInitializingExpr(): [FunctionCall] call to get_x -# 2411| Type = [PlainCharType] char -# 2411| ValueCategory = prvalue -# 2411| getQualifier(): [ConstructorCall] call to ClassWithDestructor -# 2411| Type = [VoidType] void -# 2411| ValueCategory = prvalue -# 2411| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2411| Type = [VoidType] void -# 2411| ValueCategory = prvalue -# 2411| getQualifier(): [ReuseExpr] reuse of temporary object -# 2411| Type = [Class] ClassWithDestructor -# 2411| ValueCategory = xvalue -# 2411| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2411| Type = [Class] ClassWithDestructor -# 2411| ValueCategory = prvalue(load) -# 2411| getVariableAccess().getFullyConverted(): [CStyleCast] (bool)... -# 2411| Conversion = [BoolConversion] conversion to bool -# 2411| Type = [BoolType] bool -# 2411| ValueCategory = prvalue -# 2412| getThen(): [ExprStmt] ExprStmt -# 2412| getExpr(): [PostfixIncrExpr] ... ++ +# 2384| [MemberFunction] void return_routine_type::HasVoidToIntFunc::VoidToInt(int) +# 2384| : +# 2384| getParameter(0): [Parameter] (unnamed parameter 0) +# 2384| Type = [IntType] int +# 2389| [TopLevelFunction] return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() +# 2389| : +# 2390| getEntryPoint(): [BlockStmt] { ... } +# 2391| getStmt(0): [ReturnStmt] return ... +# 2391| getExpr(): [FunctionAccess] VoidToInt +# 2391| Type = [RoutineType] ..()(..) +# 2391| ValueCategory = prvalue +# 2396| [TopLevelFunction] int small_operation_should_not_be_constant_folded() +# 2396| : +# 2396| getEntryPoint(): [BlockStmt] { ... } +# 2397| getStmt(0): [ReturnStmt] return ... +# 2397| getExpr(): [BitwiseXorExpr] ... ^ ... +# 2397| Type = [IntType] int +# 2397| Value = [BitwiseXorExpr] 3 +# 2397| ValueCategory = prvalue +# 2397| getLeftOperand(): [Literal] 1 +# 2397| Type = [IntType] int +# 2397| Value = [Literal] 1 +# 2397| ValueCategory = prvalue +# 2397| getRightOperand(): [Literal] 2 +# 2397| Type = [IntType] int +# 2397| Value = [Literal] 2 +# 2397| ValueCategory = prvalue +# 2407| [TopLevelFunction] int large_operation_should_be_constant_folded() +# 2407| : +# 2407| getEntryPoint(): [BlockStmt] { ... } +# 2408| getStmt(0): [ReturnStmt] return ... +# 2408| getExpr(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [BitwiseXorExpr] ... ^ ... +# 2408| Type = [IntType] int +# 2408| Value = [BitwiseXorExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand(): [Literal] 1 +# 2408| Type = [IntType] int +# 2408| Value = [Literal] 1 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getLeftOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2408| getExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 2408| Type = [IntType] int +# 2408| Value = [ParenthesisExpr] 0 +# 2408| ValueCategory = prvalue +# 2411| [TopLevelFunction] void initialization_with_temp_destructor() +# 2411| : +# 2411| getEntryPoint(): [BlockStmt] { ... } +# 2412| getStmt(0): [IfStmt] if (...) ... +# 2412| getCondition(): [ConditionDeclExpr] (condition decl) +# 2412| Type = [BoolType] bool +# 2412| ValueCategory = prvalue +# 2412| getVariableAccess(): [VariableAccess] x +# 2412| Type = [PlainCharType] char +# 2412| ValueCategory = prvalue(load) +# 2412| getInitializingExpr(): [FunctionCall] call to get_x # 2412| Type = [PlainCharType] char # 2412| ValueCategory = prvalue -# 2412| getOperand(): [VariableAccess] x -# 2412| Type = [PlainCharType] char -# 2412| ValueCategory = lvalue -# 2414| getStmt(1): [IfStmt] if (...) ... -# 2414| getInitialization(): [DeclStmt] declaration -# 2414| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2414| Type = [PlainCharType] char -# 2414| getVariable().getInitializer(): [Initializer] initializer for x -# 2414| getExpr(): [FunctionCall] call to get_x -# 2414| Type = [PlainCharType] char -# 2414| ValueCategory = prvalue -# 2414| getQualifier(): [ConstructorCall] call to ClassWithDestructor -# 2414| Type = [VoidType] void -# 2414| ValueCategory = prvalue -# 2414| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2414| Type = [VoidType] void -# 2414| ValueCategory = prvalue -# 2414| getQualifier(): [ReuseExpr] reuse of temporary object -# 2414| Type = [Class] ClassWithDestructor -# 2414| ValueCategory = xvalue -# 2414| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2414| Type = [Class] ClassWithDestructor -# 2414| ValueCategory = prvalue(load) -# 2414| getCondition(): [VariableAccess] x -# 2414| Type = [PlainCharType] char -# 2414| ValueCategory = prvalue(load) -# 2415| getThen(): [ExprStmt] ExprStmt -# 2415| getExpr(): [PostfixIncrExpr] ... ++ +# 2412| getQualifier(): [ConstructorCall] call to ClassWithDestructor +# 2412| Type = [VoidType] void +# 2412| ValueCategory = prvalue +# 2412| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2412| Type = [VoidType] void +# 2412| ValueCategory = prvalue +# 2412| getQualifier(): [ReuseExpr] reuse of temporary object +# 2412| Type = [Class] ClassWithDestructor +# 2412| ValueCategory = xvalue +# 2412| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2412| Type = [Class] ClassWithDestructor +# 2412| ValueCategory = prvalue(load) +# 2412| getVariableAccess().getFullyConverted(): [CStyleCast] (bool)... +# 2412| Conversion = [BoolConversion] conversion to bool +# 2412| Type = [BoolType] bool +# 2412| ValueCategory = prvalue +# 2413| getThen(): [ExprStmt] ExprStmt +# 2413| getExpr(): [PostfixIncrExpr] ... ++ +# 2413| Type = [PlainCharType] char +# 2413| ValueCategory = prvalue +# 2413| getOperand(): [VariableAccess] x +# 2413| Type = [PlainCharType] char +# 2413| ValueCategory = lvalue +# 2415| getStmt(1): [IfStmt] if (...) ... +# 2415| getInitialization(): [DeclStmt] declaration +# 2415| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x # 2415| Type = [PlainCharType] char -# 2415| ValueCategory = prvalue -# 2415| getOperand(): [VariableAccess] x -# 2415| Type = [PlainCharType] char -# 2415| ValueCategory = lvalue -# 2414| getCondition().getFullyConverted(): [CStyleCast] (bool)... -# 2414| Conversion = [BoolConversion] conversion to bool -# 2414| Type = [BoolType] bool -# 2414| ValueCategory = prvalue -# 2417| getStmt(2): [ConstexprIfStmt] if constexpr (...) ... -# 2417| getInitialization(): [DeclStmt] declaration -# 2417| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2417| Type = [PlainCharType] char -# 2417| getVariable().getInitializer(): [Initializer] initializer for x -# 2417| getExpr(): [FunctionCall] call to get_x -# 2417| Type = [PlainCharType] char -# 2417| ValueCategory = prvalue -# 2417| getQualifier(): [ConstructorCall] call to ClassWithDestructor -# 2417| Type = [VoidType] void -# 2417| ValueCategory = prvalue -# 2417| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2417| Type = [VoidType] void -# 2417| ValueCategory = prvalue -# 2417| getQualifier(): [ReuseExpr] reuse of temporary object -# 2417| Type = [Class] ClassWithDestructor -# 2417| ValueCategory = xvalue -# 2417| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2417| Type = [Class] ClassWithDestructor -# 2417| ValueCategory = prvalue(load) -# 2417| getCondition(): [VariableAccess] initialization_with_destructor_bool -# 2417| Type = [BoolType] bool -# 2417| Value = [VariableAccess] 1 -# 2417| ValueCategory = prvalue(load) -# 2418| getThen(): [ExprStmt] ExprStmt -# 2418| getExpr(): [PostfixIncrExpr] ... ++ +# 2415| getVariable().getInitializer(): [Initializer] initializer for x +# 2415| getExpr(): [FunctionCall] call to get_x +# 2415| Type = [PlainCharType] char +# 2415| ValueCategory = prvalue +# 2415| getQualifier(): [ConstructorCall] call to ClassWithDestructor +# 2415| Type = [VoidType] void +# 2415| ValueCategory = prvalue +# 2415| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2415| Type = [VoidType] void +# 2415| ValueCategory = prvalue +# 2415| getQualifier(): [ReuseExpr] reuse of temporary object +# 2415| Type = [Class] ClassWithDestructor +# 2415| ValueCategory = xvalue +# 2415| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2415| Type = [Class] ClassWithDestructor +# 2415| ValueCategory = prvalue(load) +# 2415| getCondition(): [VariableAccess] x +# 2415| Type = [PlainCharType] char +# 2415| ValueCategory = prvalue(load) +# 2416| getThen(): [ExprStmt] ExprStmt +# 2416| getExpr(): [PostfixIncrExpr] ... ++ +# 2416| Type = [PlainCharType] char +# 2416| ValueCategory = prvalue +# 2416| getOperand(): [VariableAccess] x +# 2416| Type = [PlainCharType] char +# 2416| ValueCategory = lvalue +# 2415| getCondition().getFullyConverted(): [CStyleCast] (bool)... +# 2415| Conversion = [BoolConversion] conversion to bool +# 2415| Type = [BoolType] bool +# 2415| ValueCategory = prvalue +# 2418| getStmt(2): [ConstexprIfStmt] if constexpr (...) ... +# 2418| getInitialization(): [DeclStmt] declaration +# 2418| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x # 2418| Type = [PlainCharType] char -# 2418| ValueCategory = prvalue -# 2418| getOperand(): [VariableAccess] x -# 2418| Type = [PlainCharType] char -# 2418| ValueCategory = lvalue -# 2420| getStmt(3): [SwitchStmt] switch (...) ... -# 2420| getExpr(): [ConditionDeclExpr] (condition decl) -# 2420| Type = [IntType] int -# 2420| ValueCategory = prvalue -# 2420| getVariableAccess(): [VariableAccess] x -# 2420| Type = [PlainCharType] char -# 2420| ValueCategory = prvalue(load) -# 2420| getInitializingExpr(): [FunctionCall] call to get_x -# 2420| Type = [PlainCharType] char -# 2420| ValueCategory = prvalue -# 2420| getQualifier(): [ConstructorCall] call to ClassWithDestructor -# 2420| Type = [VoidType] void -# 2420| ValueCategory = prvalue -# 2420| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2420| Type = [VoidType] void -# 2420| ValueCategory = prvalue -# 2420| getQualifier(): [ReuseExpr] reuse of temporary object -# 2420| Type = [Class] ClassWithDestructor -# 2420| ValueCategory = xvalue -# 2420| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2420| Type = [Class] ClassWithDestructor -# 2420| ValueCategory = prvalue(load) -# 2420| getVariableAccess().getFullyConverted(): [CStyleCast] (int)... -# 2420| Conversion = [IntegralConversion] integral conversion -# 2420| Type = [IntType] int -# 2420| ValueCategory = prvalue -# 2420| getStmt(): [BlockStmt] { ... } -# 2421| getStmt(0): [SwitchCase] case ...: -# 2421| getExpr(): [CharLiteral] 97 -# 2421| Type = [PlainCharType] char -# 2421| Value = [CharLiteral] 97 +# 2418| getVariable().getInitializer(): [Initializer] initializer for x +# 2418| getExpr(): [FunctionCall] call to get_x +# 2418| Type = [PlainCharType] char +# 2418| ValueCategory = prvalue +# 2418| getQualifier(): [ConstructorCall] call to ClassWithDestructor +# 2418| Type = [VoidType] void +# 2418| ValueCategory = prvalue +# 2418| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2418| Type = [VoidType] void +# 2418| ValueCategory = prvalue +# 2418| getQualifier(): [ReuseExpr] reuse of temporary object +# 2418| Type = [Class] ClassWithDestructor +# 2418| ValueCategory = xvalue +# 2418| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2418| Type = [Class] ClassWithDestructor +# 2418| ValueCategory = prvalue(load) +# 2418| getCondition(): [VariableAccess] initialization_with_destructor_bool +# 2418| Type = [BoolType] bool +# 2418| Value = [VariableAccess] 1 +# 2418| ValueCategory = prvalue(load) +# 2419| getThen(): [ExprStmt] ExprStmt +# 2419| getExpr(): [PostfixIncrExpr] ... ++ +# 2419| Type = [PlainCharType] char +# 2419| ValueCategory = prvalue +# 2419| getOperand(): [VariableAccess] x +# 2419| Type = [PlainCharType] char +# 2419| ValueCategory = lvalue +# 2421| getStmt(3): [SwitchStmt] switch (...) ... +# 2421| getExpr(): [ConditionDeclExpr] (condition decl) +# 2421| Type = [IntType] int +# 2421| ValueCategory = prvalue +# 2421| getVariableAccess(): [VariableAccess] x +# 2421| Type = [PlainCharType] char +# 2421| ValueCategory = prvalue(load) +# 2421| getInitializingExpr(): [FunctionCall] call to get_x +# 2421| Type = [PlainCharType] char +# 2421| ValueCategory = prvalue +# 2421| getQualifier(): [ConstructorCall] call to ClassWithDestructor +# 2421| Type = [VoidType] void # 2421| ValueCategory = prvalue -# 2421| getExpr().getFullyConverted(): [CStyleCast] (int)... -# 2421| Conversion = [IntegralConversion] integral conversion -# 2421| Type = [IntType] int -# 2421| Value = [CStyleCast] 97 +# 2421| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2421| Type = [VoidType] void # 2421| ValueCategory = prvalue -# 2422| getStmt(1): [ExprStmt] ExprStmt -# 2422| getExpr(): [PostfixIncrExpr] ... ++ +# 2421| getQualifier(): [ReuseExpr] reuse of temporary object +# 2421| Type = [Class] ClassWithDestructor +# 2421| ValueCategory = xvalue +# 2421| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2421| Type = [Class] ClassWithDestructor +# 2421| ValueCategory = prvalue(load) +# 2421| getVariableAccess().getFullyConverted(): [CStyleCast] (int)... +# 2421| Conversion = [IntegralConversion] integral conversion +# 2421| Type = [IntType] int +# 2421| ValueCategory = prvalue +# 2421| getStmt(): [BlockStmt] { ... } +# 2422| getStmt(0): [SwitchCase] case ...: +# 2422| getExpr(): [CharLiteral] 97 # 2422| Type = [PlainCharType] char +# 2422| Value = [CharLiteral] 97 # 2422| ValueCategory = prvalue -# 2422| getOperand(): [VariableAccess] x -# 2422| Type = [PlainCharType] char -# 2422| ValueCategory = lvalue -# 2425| getStmt(4): [SwitchStmt] switch (...) ... -# 2425| getInitialization(): [DeclStmt] declaration -# 2425| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2425| Type = [PlainCharType] char -# 2425| getVariable().getInitializer(): [Initializer] initializer for x -# 2425| getExpr(): [FunctionCall] call to get_x -# 2425| Type = [PlainCharType] char -# 2425| ValueCategory = prvalue -# 2425| getQualifier(): [ConstructorCall] call to ClassWithDestructor -# 2425| Type = [VoidType] void -# 2425| ValueCategory = prvalue -# 2425| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2425| Type = [VoidType] void -# 2425| ValueCategory = prvalue -# 2425| getQualifier(): [ReuseExpr] reuse of temporary object -# 2425| Type = [Class] ClassWithDestructor -# 2425| ValueCategory = xvalue -# 2425| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2425| Type = [Class] ClassWithDestructor -# 2425| ValueCategory = prvalue(load) -# 2425| getExpr(): [VariableAccess] x -# 2425| Type = [PlainCharType] char -# 2425| ValueCategory = prvalue(load) -# 2425| getStmt(): [BlockStmt] { ... } -# 2426| getStmt(0): [SwitchCase] case ...: -# 2426| getExpr(): [CharLiteral] 97 -# 2426| Type = [PlainCharType] char -# 2426| Value = [CharLiteral] 97 -# 2426| ValueCategory = prvalue -# 2426| getExpr().getFullyConverted(): [CStyleCast] (int)... -# 2426| Conversion = [IntegralConversion] integral conversion -# 2426| Type = [IntType] int -# 2426| Value = [CStyleCast] 97 -# 2426| ValueCategory = prvalue -# 2427| getStmt(1): [ExprStmt] ExprStmt -# 2427| getExpr(): [PostfixIncrExpr] ... ++ +# 2422| getExpr().getFullyConverted(): [CStyleCast] (int)... +# 2422| Conversion = [IntegralConversion] integral conversion +# 2422| Type = [IntType] int +# 2422| Value = [CStyleCast] 97 +# 2422| ValueCategory = prvalue +# 2423| getStmt(1): [ExprStmt] ExprStmt +# 2423| getExpr(): [PostfixIncrExpr] ... ++ +# 2423| Type = [PlainCharType] char +# 2423| ValueCategory = prvalue +# 2423| getOperand(): [VariableAccess] x +# 2423| Type = [PlainCharType] char +# 2423| ValueCategory = lvalue +# 2426| getStmt(4): [SwitchStmt] switch (...) ... +# 2426| getInitialization(): [DeclStmt] declaration +# 2426| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2426| Type = [PlainCharType] char +# 2426| getVariable().getInitializer(): [Initializer] initializer for x +# 2426| getExpr(): [FunctionCall] call to get_x +# 2426| Type = [PlainCharType] char +# 2426| ValueCategory = prvalue +# 2426| getQualifier(): [ConstructorCall] call to ClassWithDestructor +# 2426| Type = [VoidType] void +# 2426| ValueCategory = prvalue +# 2426| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2426| Type = [VoidType] void +# 2426| ValueCategory = prvalue +# 2426| getQualifier(): [ReuseExpr] reuse of temporary object +# 2426| Type = [Class] ClassWithDestructor +# 2426| ValueCategory = xvalue +# 2426| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2426| Type = [Class] ClassWithDestructor +# 2426| ValueCategory = prvalue(load) +# 2426| getExpr(): [VariableAccess] x +# 2426| Type = [PlainCharType] char +# 2426| ValueCategory = prvalue(load) +# 2426| getStmt(): [BlockStmt] { ... } +# 2427| getStmt(0): [SwitchCase] case ...: +# 2427| getExpr(): [CharLiteral] 97 # 2427| Type = [PlainCharType] char +# 2427| Value = [CharLiteral] 97 # 2427| ValueCategory = prvalue -# 2427| getOperand(): [VariableAccess] x -# 2427| Type = [PlainCharType] char -# 2427| ValueCategory = lvalue -# 2425| getExpr().getFullyConverted(): [CStyleCast] (int)... -# 2425| Conversion = [IntegralConversion] integral conversion -# 2425| Type = [IntType] int -# 2425| ValueCategory = prvalue -# 2430| getStmt(5): [RangeBasedForStmt] for(...:...) ... -# 2430| getInitialization(): [DeclStmt] declaration -# 2430| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2430| Type = [PlainCharType] char -# 2430| getVariable().getInitializer(): [Initializer] initializer for x -# 2430| getExpr(): [FunctionCall] call to get_x -# 2430| Type = [PlainCharType] char -# 2430| ValueCategory = prvalue -# 2430| getQualifier(): [ConstructorCall] call to ClassWithDestructor -# 2430| Type = [VoidType] void -# 2430| ValueCategory = prvalue -# 2430| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2430| Type = [VoidType] void -# 2430| ValueCategory = prvalue -# 2430| getQualifier(): [ReuseExpr] reuse of temporary object -# 2430| Type = [Class] ClassWithDestructor -# 2430| ValueCategory = xvalue -# 2430| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2430| Type = [Class] ClassWithDestructor -# 2430| ValueCategory = prvalue(load) -# 2430| getChild(1): [DeclStmt] declaration -# 2430| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) -# 2430| Type = [RValueReferenceType] vector && +# 2427| getExpr().getFullyConverted(): [CStyleCast] (int)... +# 2427| Conversion = [IntegralConversion] integral conversion +# 2427| Type = [IntType] int +# 2427| Value = [CStyleCast] 97 +# 2427| ValueCategory = prvalue +# 2428| getStmt(1): [ExprStmt] ExprStmt +# 2428| getExpr(): [PostfixIncrExpr] ... ++ +# 2428| Type = [PlainCharType] char +# 2428| ValueCategory = prvalue +# 2428| getOperand(): [VariableAccess] x +# 2428| Type = [PlainCharType] char +# 2428| ValueCategory = lvalue +# 2426| getExpr().getFullyConverted(): [CStyleCast] (int)... +# 2426| Conversion = [IntegralConversion] integral conversion +# 2426| Type = [IntType] int +# 2426| ValueCategory = prvalue +# 2431| getStmt(5): [RangeBasedForStmt] for(...:...) ... +# 2431| getInitialization(): [DeclStmt] declaration +# 2431| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2431| Type = [PlainCharType] char +# 2431| getVariable().getInitializer(): [Initializer] initializer for x +# 2431| getExpr(): [FunctionCall] call to get_x +# 2431| Type = [PlainCharType] char +# 2431| ValueCategory = prvalue +# 2431| getQualifier(): [ConstructorCall] call to ClassWithDestructor +# 2431| Type = [VoidType] void +# 2431| ValueCategory = prvalue +# 2431| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2431| Type = [VoidType] void +# 2431| ValueCategory = prvalue +# 2431| getQualifier(): [ReuseExpr] reuse of temporary object +# 2431| Type = [Class] ClassWithDestructor +# 2431| ValueCategory = xvalue +# 2431| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2431| Type = [Class] ClassWithDestructor +# 2431| ValueCategory = prvalue(load) +# 2431| getChild(1): [DeclStmt] declaration +# 2431| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) +# 2431| Type = [RValueReferenceType] vector && #-----| getVariable().getInitializer(): [Initializer] initializer for (__range) -# 2430| getExpr(): [ConstructorCall] call to vector -# 2430| Type = [VoidType] void -# 2430| ValueCategory = prvalue -# 2430| getArgument(0): [VariableAccess] x -# 2430| Type = [PlainCharType] char -# 2430| ValueCategory = prvalue(load) -# 2430| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) -# 2430| Type = [LValueReferenceType] vector & -# 2430| ValueCategory = prvalue -# 2430| getExpr(): [TemporaryObjectExpr] temporary object -# 2430| Type = [ClassTemplateInstantiation,Struct] vector -# 2430| ValueCategory = xvalue -# 2430| getBeginEndDeclaration(): [DeclStmt] declaration -# 2430| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) -# 2430| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2431| getExpr(): [ConstructorCall] call to vector +# 2431| Type = [VoidType] void +# 2431| ValueCategory = prvalue +# 2431| getArgument(0): [VariableAccess] x +# 2431| Type = [PlainCharType] char +# 2431| ValueCategory = prvalue(load) +# 2431| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2431| Type = [LValueReferenceType] vector & +# 2431| ValueCategory = prvalue +# 2431| getExpr(): [TemporaryObjectExpr] temporary object +# 2431| Type = [ClassTemplateInstantiation,Struct] vector +# 2431| ValueCategory = xvalue +# 2431| getBeginEndDeclaration(): [DeclStmt] declaration +# 2431| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) +# 2431| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__begin) -# 2430| getExpr(): [FunctionCall] call to begin -# 2430| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2430| ValueCategory = prvalue -# 2430| getQualifier(): [VariableAccess] (__range) -# 2430| Type = [RValueReferenceType] vector && -# 2430| ValueCategory = prvalue(load) +# 2431| getExpr(): [FunctionCall] call to begin +# 2431| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2431| ValueCategory = prvalue +# 2431| getQualifier(): [VariableAccess] (__range) +# 2431| Type = [RValueReferenceType] vector && +# 2431| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -22119,15 +22131,15 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2430| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) -# 2430| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2431| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) +# 2431| Type = [NestedTypedefType,UsingAliasTypedefType] iterator #-----| getVariable().getInitializer(): [Initializer] initializer for (__end) -# 2430| getExpr(): [FunctionCall] call to end -# 2430| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2430| ValueCategory = prvalue -# 2430| getQualifier(): [VariableAccess] (__range) -# 2430| Type = [RValueReferenceType] vector && -# 2430| ValueCategory = prvalue(load) +# 2431| getExpr(): [FunctionCall] call to end +# 2431| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2431| ValueCategory = prvalue +# 2431| getQualifier(): [VariableAccess] (__range) +# 2431| Type = [RValueReferenceType] vector && +# 2431| ValueCategory = prvalue(load) #-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const vector @@ -22135,18 +22147,18 @@ ir.cpp: #-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) #-----| Type = [ClassTemplateInstantiation,Struct] vector #-----| ValueCategory = lvalue -# 2430| getCondition(): [FunctionCall] call to operator!= -# 2430| Type = [BoolType] bool -# 2430| ValueCategory = prvalue -# 2430| getQualifier(): [VariableAccess] (__begin) -# 2430| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2430| ValueCategory = lvalue -# 2430| getArgument(0): [ConstructorCall] call to iterator -# 2430| Type = [VoidType] void -# 2430| ValueCategory = prvalue -# 2430| getArgument(0): [VariableAccess] (__end) -# 2430| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2430| ValueCategory = lvalue +# 2431| getCondition(): [FunctionCall] call to operator!= +# 2431| Type = [BoolType] bool +# 2431| ValueCategory = prvalue +# 2431| getQualifier(): [VariableAccess] (__begin) +# 2431| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2431| ValueCategory = lvalue +# 2431| getArgument(0): [ConstructorCall] call to iterator +# 2431| Type = [VoidType] void +# 2431| ValueCategory = prvalue +# 2431| getArgument(0): [VariableAccess] (__end) +# 2431| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2431| ValueCategory = lvalue #-----| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) #-----| Type = [LValueReferenceType] const iterator & #-----| ValueCategory = prvalue @@ -22161,450 +22173,567 @@ ir.cpp: #-----| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object #-----| Type = [ClassTemplateInstantiation,Struct] iterator #-----| ValueCategory = lvalue -# 2430| getUpdate(): [FunctionCall] call to operator++ -# 2430| Type = [LValueReferenceType] iterator & -# 2430| ValueCategory = prvalue -# 2430| getQualifier(): [VariableAccess] (__begin) -# 2430| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2430| ValueCategory = lvalue -# 2430| getChild(5): [DeclStmt] declaration -# 2430| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y -# 2430| Type = [PlainCharType] char -# 2430| getVariable().getInitializer(): [Initializer] initializer for y -# 2430| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* -# 2430| Type = [LValueReferenceType] char & -# 2430| ValueCategory = prvalue -# 2430| getQualifier(): [VariableAccess] (__begin) -# 2430| Type = [NestedTypedefType,UsingAliasTypedefType] iterator -# 2430| ValueCategory = lvalue +# 2431| getUpdate(): [FunctionCall] call to operator++ +# 2431| Type = [LValueReferenceType] iterator & +# 2431| ValueCategory = prvalue +# 2431| getQualifier(): [VariableAccess] (__begin) +# 2431| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2431| ValueCategory = lvalue +# 2431| getChild(5): [DeclStmt] declaration +# 2431| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2431| Type = [PlainCharType] char +# 2431| getVariable().getInitializer(): [Initializer] initializer for y +# 2431| getExpr(): [OverloadedPointerDereferenceExpr] call to operator* +# 2431| Type = [LValueReferenceType] char & +# 2431| ValueCategory = prvalue +# 2431| getQualifier(): [VariableAccess] (__begin) +# 2431| Type = [NestedTypedefType,UsingAliasTypedefType] iterator +# 2431| ValueCategory = lvalue #-----| getQualifier().getFullyConverted(): [CStyleCast] (const iterator)... #-----| Conversion = [GlvalueConversion] glvalue conversion #-----| Type = [SpecifiedType] const iterator #-----| ValueCategory = lvalue -# 2430| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2430| Type = [PlainCharType] char -# 2430| ValueCategory = prvalue(load) -# 2431| getStmt(): [ExprStmt] ExprStmt -# 2431| getExpr(): [AssignAddExpr] ... += ... -# 2431| Type = [PlainCharType] char -# 2431| ValueCategory = lvalue -# 2431| getLValue(): [VariableAccess] y -# 2431| Type = [PlainCharType] char -# 2431| ValueCategory = lvalue -# 2431| getRValue(): [VariableAccess] x -# 2431| Type = [PlainCharType] char -# 2431| ValueCategory = prvalue(load) -# 2431| getRValue().getFullyConverted(): [CStyleCast] (int)... -# 2431| Conversion = [IntegralConversion] integral conversion -# 2431| Type = [IntType] int -# 2431| ValueCategory = prvalue -# 2430| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) -# 2430| Type = [ClassTemplateInstantiation,Struct] iterator -# 2430| ValueCategory = lvalue -# 2432| getStmt(6): [ReturnStmt] return ... -# 2434| [TopLevelFunction] void param_with_destructor_by_value(ClassWithDestructor) -# 2434| : -# 2434| getParameter(0): [Parameter] c -# 2434| Type = [Class] ClassWithDestructor -# 2434| getEntryPoint(): [BlockStmt] { ... } -# 2436| getStmt(0): [ReturnStmt] return ... -# 2438| [TopLevelFunction] void param_with_destructor_by_pointer(ClassWithDestructor*) -# 2438| : -# 2438| getParameter(0): [Parameter] c -# 2438| Type = [PointerType] ClassWithDestructor * -# 2438| getEntryPoint(): [BlockStmt] { ... } -# 2440| getStmt(0): [ReturnStmt] return ... -# 2442| [TopLevelFunction] void param_with_destructor_by_ref(ClassWithDestructor&) -# 2442| : -# 2442| getParameter(0): [Parameter] c -# 2442| Type = [LValueReferenceType] ClassWithDestructor & -# 2442| getEntryPoint(): [BlockStmt] { ... } -# 2444| getStmt(0): [ReturnStmt] return ... -# 2446| [TopLevelFunction] void param_with_destructor_by_rref(ClassWithDestructor&&) -# 2446| : -# 2446| getParameter(0): [Parameter] c -# 2446| Type = [RValueReferenceType] ClassWithDestructor && -# 2446| getEntryPoint(): [BlockStmt] { ... } -# 2448| getStmt(0): [ReturnStmt] return ... -# 2450| [TopLevelFunction] void rethrow_with_destruction(int) -# 2450| : -# 2450| getParameter(0): [Parameter] x -# 2450| Type = [IntType] int -# 2450| getEntryPoint(): [BlockStmt] { ... } -# 2451| getStmt(0): [DeclStmt] declaration -# 2451| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c -# 2451| Type = [Class] ClassWithDestructor -# 2451| getVariable().getInitializer(): [Initializer] initializer for c -# 2451| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2451| Type = [VoidType] void -# 2451| ValueCategory = prvalue -# 2452| getStmt(1): [ExprStmt] ExprStmt -# 2452| getExpr(): [ReThrowExpr] re-throw exception -# 2452| Type = [VoidType] void -# 2452| ValueCategory = prvalue -# 2453| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2453| Type = [VoidType] void -# 2453| ValueCategory = prvalue -# 2453| getQualifier(): [VariableAccess] c -# 2453| Type = [Class] ClassWithDestructor -# 2453| ValueCategory = lvalue -# 2455| [CopyAssignmentOperator] ByValueConstructor& ByValueConstructor::operator=(ByValueConstructor const&) -# 2455| : -#-----| getParameter(0): [Parameter] (unnamed parameter 0) -#-----| Type = [LValueReferenceType] const ByValueConstructor & -# 2455| [MoveAssignmentOperator] ByValueConstructor& ByValueConstructor::operator=(ByValueConstructor&&) -# 2455| : -#-----| getParameter(0): [Parameter] (unnamed parameter 0) -#-----| Type = [RValueReferenceType] ByValueConstructor && -# 2455| [CopyConstructor] void ByValueConstructor::ByValueConstructor(ByValueConstructor const&) -# 2455| : -#-----| getParameter(0): [Parameter] (unnamed parameter 0) -#-----| Type = [LValueReferenceType] const ByValueConstructor & -# 2455| [MoveConstructor] void ByValueConstructor::ByValueConstructor(ByValueConstructor&&) -# 2455| : -#-----| getParameter(0): [Parameter] (unnamed parameter 0) -#-----| Type = [RValueReferenceType] ByValueConstructor && -# 2456| [Constructor] void ByValueConstructor::ByValueConstructor(ClassWithDestructor) +# 2431| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2431| Type = [PlainCharType] char +# 2431| ValueCategory = prvalue(load) +# 2432| getStmt(): [ExprStmt] ExprStmt +# 2432| getExpr(): [AssignAddExpr] ... += ... +# 2432| Type = [PlainCharType] char +# 2432| ValueCategory = lvalue +# 2432| getLValue(): [VariableAccess] y +# 2432| Type = [PlainCharType] char +# 2432| ValueCategory = lvalue +# 2432| getRValue(): [VariableAccess] x +# 2432| Type = [PlainCharType] char +# 2432| ValueCategory = prvalue(load) +# 2432| getRValue().getFullyConverted(): [CStyleCast] (int)... +# 2432| Conversion = [IntegralConversion] integral conversion +# 2432| Type = [IntType] int +# 2432| ValueCategory = prvalue +# 2431| getImplicitDestructorCall(0): [DestructorCall] call to ~vector +# 2431| Type = [VoidType] void +# 2431| ValueCategory = prvalue +# 2431| getQualifier(): [ReuseExpr] reuse of temporary object +# 2431| Type = [ClassTemplateInstantiation,Struct] vector +# 2431| ValueCategory = xvalue +# 2431| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2431| Type = [ClassTemplateInstantiation,Struct] iterator +# 2431| ValueCategory = lvalue +# 2433| getStmt(6): [ReturnStmt] return ... +# 2435| [TopLevelFunction] void param_with_destructor_by_value(ClassWithDestructor) +# 2435| : +# 2435| getParameter(0): [Parameter] c +# 2435| Type = [Class] ClassWithDestructor +# 2435| getEntryPoint(): [BlockStmt] { ... } +# 2437| getStmt(0): [ReturnStmt] return ... +# 2439| [TopLevelFunction] void param_with_destructor_by_pointer(ClassWithDestructor*) +# 2439| : +# 2439| getParameter(0): [Parameter] c +# 2439| Type = [PointerType] ClassWithDestructor * +# 2439| getEntryPoint(): [BlockStmt] { ... } +# 2441| getStmt(0): [ReturnStmt] return ... +# 2443| [TopLevelFunction] void param_with_destructor_by_ref(ClassWithDestructor&) +# 2443| : +# 2443| getParameter(0): [Parameter] c +# 2443| Type = [LValueReferenceType] ClassWithDestructor & +# 2443| getEntryPoint(): [BlockStmt] { ... } +# 2445| getStmt(0): [ReturnStmt] return ... +# 2447| [TopLevelFunction] void param_with_destructor_by_rref(ClassWithDestructor&&) +# 2447| : +# 2447| getParameter(0): [Parameter] c +# 2447| Type = [RValueReferenceType] ClassWithDestructor && +# 2447| getEntryPoint(): [BlockStmt] { ... } +# 2449| getStmt(0): [ReturnStmt] return ... +# 2451| [TopLevelFunction] void rethrow_with_destruction(int) +# 2451| : +# 2451| getParameter(0): [Parameter] x +# 2451| Type = [IntType] int +# 2451| getEntryPoint(): [BlockStmt] { ... } +# 2452| getStmt(0): [DeclStmt] declaration +# 2452| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c +# 2452| Type = [Class] ClassWithDestructor +# 2452| getVariable().getInitializer(): [Initializer] initializer for c +# 2452| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2452| Type = [VoidType] void +# 2452| ValueCategory = prvalue +# 2453| getStmt(1): [ExprStmt] ExprStmt +# 2453| getExpr(): [ReThrowExpr] re-throw exception +# 2453| Type = [VoidType] void +# 2453| ValueCategory = prvalue +# 2454| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2454| Type = [VoidType] void +# 2454| ValueCategory = prvalue +# 2454| getQualifier(): [VariableAccess] c +# 2454| Type = [Class] ClassWithDestructor +# 2454| ValueCategory = lvalue +# 2456| [CopyAssignmentOperator] ByValueConstructor& ByValueConstructor::operator=(ByValueConstructor const&) # 2456| : -# 2456| getParameter(0): [Parameter] (unnamed parameter 0) -# 2456| Type = [Class] ClassWithDestructor -# 2459| [TopLevelFunction] void new_with_destructor(ClassWithDestructor) -# 2459| : -# 2459| getParameter(0): [Parameter] a -# 2459| Type = [Class] ClassWithDestructor -# 2460| getEntryPoint(): [BlockStmt] { ... } -# 2461| getStmt(0): [DeclStmt] declaration -# 2461| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b -# 2461| Type = [PointerType] ByValueConstructor * -# 2461| getVariable().getInitializer(): [Initializer] initializer for b -# 2461| getExpr(): [NewExpr] new -# 2461| Type = [PointerType] ByValueConstructor * -# 2461| ValueCategory = prvalue -# 2461| getInitializer(): [ConstructorCall] call to ByValueConstructor -# 2461| Type = [VoidType] void -# 2461| ValueCategory = prvalue -# 2461| getArgument(0): [VariableAccess] a -# 2461| Type = [Class] ClassWithDestructor -# 2461| ValueCategory = prvalue(load) -# 2461| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object -# 2461| Type = [Class] ClassWithDestructor -# 2461| ValueCategory = lvalue -# 2461| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2461| Type = [VoidType] void -# 2461| ValueCategory = prvalue -# 2461| getQualifier(): [ReuseExpr] reuse of temporary object -# 2461| Type = [Class] ClassWithDestructor -# 2461| ValueCategory = xvalue -# 2462| getStmt(1): [ReturnStmt] return ... -# 2465| [CopyAssignmentOperator] rvalue_conversion_with_destructor::A& rvalue_conversion_with_destructor::A::operator=(rvalue_conversion_with_destructor::A const&) -# 2465| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const ByValueConstructor & +# 2456| [MoveAssignmentOperator] ByValueConstructor& ByValueConstructor::operator=(ByValueConstructor&&) +# 2456| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [RValueReferenceType] ByValueConstructor && +# 2456| [CopyConstructor] void ByValueConstructor::ByValueConstructor(ByValueConstructor const&) +# 2456| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const ByValueConstructor & +# 2456| [MoveConstructor] void ByValueConstructor::ByValueConstructor(ByValueConstructor&&) +# 2456| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [RValueReferenceType] ByValueConstructor && +# 2457| [Constructor] void ByValueConstructor::ByValueConstructor(ClassWithDestructor) +# 2457| : +# 2457| getParameter(0): [Parameter] (unnamed parameter 0) +# 2457| Type = [Class] ClassWithDestructor +# 2460| [TopLevelFunction] void new_with_destructor(ClassWithDestructor) +# 2460| : +# 2460| getParameter(0): [Parameter] a +# 2460| Type = [Class] ClassWithDestructor +# 2461| getEntryPoint(): [BlockStmt] { ... } +# 2462| getStmt(0): [DeclStmt] declaration +# 2462| getDeclarationEntry(0): [VariableDeclarationEntry] definition of b +# 2462| Type = [PointerType] ByValueConstructor * +# 2462| getVariable().getInitializer(): [Initializer] initializer for b +# 2462| getExpr(): [NewExpr] new +# 2462| Type = [PointerType] ByValueConstructor * +# 2462| ValueCategory = prvalue +# 2462| getInitializer(): [ConstructorCall] call to ByValueConstructor +# 2462| Type = [VoidType] void +# 2462| ValueCategory = prvalue +# 2462| getArgument(0): [VariableAccess] a +# 2462| Type = [Class] ClassWithDestructor +# 2462| ValueCategory = prvalue(load) +# 2462| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2462| Type = [Class] ClassWithDestructor +# 2462| ValueCategory = lvalue +# 2462| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2462| Type = [VoidType] void +# 2462| ValueCategory = prvalue +# 2462| getQualifier(): [ReuseExpr] reuse of temporary object +# 2462| Type = [Class] ClassWithDestructor +# 2462| ValueCategory = xvalue +# 2463| getStmt(1): [ReturnStmt] return ... +# 2466| [CopyAssignmentOperator] rvalue_conversion_with_destructor::A& rvalue_conversion_with_destructor::A::operator=(rvalue_conversion_with_destructor::A const&) +# 2466| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [LValueReferenceType] const A & -# 2465| [MoveAssignmentOperator] rvalue_conversion_with_destructor::A& rvalue_conversion_with_destructor::A::operator=(rvalue_conversion_with_destructor::A&&) -# 2465| : +# 2466| [MoveAssignmentOperator] rvalue_conversion_with_destructor::A& rvalue_conversion_with_destructor::A::operator=(rvalue_conversion_with_destructor::A&&) +# 2466| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [RValueReferenceType] A && -# 2469| [CopyAssignmentOperator] rvalue_conversion_with_destructor::B& rvalue_conversion_with_destructor::B::operator=(rvalue_conversion_with_destructor::B const&) -# 2469| : +# 2470| [CopyAssignmentOperator] rvalue_conversion_with_destructor::B& rvalue_conversion_with_destructor::B::operator=(rvalue_conversion_with_destructor::B const&) +# 2470| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [LValueReferenceType] const B & -# 2469| [Constructor] void rvalue_conversion_with_destructor::B::B() -# 2469| : -# 2471| [Destructor] void rvalue_conversion_with_destructor::B::~B() -# 2471| : -# 2473| [ConstMemberFunction] rvalue_conversion_with_destructor::A* rvalue_conversion_with_destructor::B::operator->() const -# 2473| : -# 2476| [TopLevelFunction] rvalue_conversion_with_destructor::B rvalue_conversion_with_destructor::get() -# 2476| : -# 2478| [TopLevelFunction] void rvalue_conversion_with_destructor::test() -# 2478| : -# 2479| getEntryPoint(): [BlockStmt] { ... } -# 2480| getStmt(0): [DeclStmt] declaration -# 2480| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a -# 2480| Type = [IntType] unsigned int -# 2480| getVariable().getInitializer(): [Initializer] initializer for a -# 2480| getExpr(): [PointerFieldAccess] a -# 2480| Type = [IntType] unsigned int -# 2480| ValueCategory = prvalue(load) -# 2480| getQualifier(): [FunctionCall] call to operator-> -# 2480| Type = [PointerType] A * -# 2480| ValueCategory = prvalue -# 2480| getQualifier(): [FunctionCall] call to get -# 2480| Type = [Struct] B -# 2480| ValueCategory = prvalue -# 2480| getQualifier().getFullyConverted(): [CStyleCast] (const B)... -# 2480| Conversion = [PrvalueAdjustmentConversion] prvalue adjustment conversion -# 2480| Type = [SpecifiedType] const B -# 2480| ValueCategory = prvalue -# 2480| getExpr(): [TemporaryObjectExpr] temporary object -# 2480| Type = [Struct] B -# 2480| ValueCategory = prvalue(load) -# 2480| getImplicitDestructorCall(0): [DestructorCall] call to ~B -# 2480| Type = [VoidType] void -# 2480| ValueCategory = prvalue -# 2480| getQualifier(): [ReuseExpr] reuse of temporary object -# 2480| Type = [Struct] B -# 2480| ValueCategory = xvalue -# 2481| getStmt(1): [ReturnStmt] return ... -# 2484| [TopLevelFunction] void destructor_without_block(bool) -# 2484| : -# 2484| getParameter(0): [Parameter] b -# 2484| Type = [BoolType] bool -# 2485| getEntryPoint(): [BlockStmt] { ... } -# 2486| getStmt(0): [IfStmt] if (...) ... -# 2486| getCondition(): [VariableAccess] b -# 2486| Type = [BoolType] bool -# 2486| ValueCategory = prvalue(load) -# 2487| getThen(): [DeclStmt] declaration -# 2487| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c -# 2487| Type = [Class] ClassWithDestructor -# 2487| getVariable().getInitializer(): [Initializer] initializer for c -# 2487| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2487| Type = [VoidType] void -# 2487| ValueCategory = prvalue +# 2470| [Constructor] void rvalue_conversion_with_destructor::B::B() +# 2470| : +# 2472| [Destructor] void rvalue_conversion_with_destructor::B::~B() +# 2472| : +# 2474| [ConstMemberFunction] rvalue_conversion_with_destructor::A* rvalue_conversion_with_destructor::B::operator->() const +# 2474| : +# 2477| [TopLevelFunction] rvalue_conversion_with_destructor::B rvalue_conversion_with_destructor::get() +# 2477| : +# 2479| [TopLevelFunction] void rvalue_conversion_with_destructor::test() +# 2479| : +# 2480| getEntryPoint(): [BlockStmt] { ... } +# 2481| getStmt(0): [DeclStmt] declaration +# 2481| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a +# 2481| Type = [IntType] unsigned int +# 2481| getVariable().getInitializer(): [Initializer] initializer for a +# 2481| getExpr(): [PointerFieldAccess] a +# 2481| Type = [IntType] unsigned int +# 2481| ValueCategory = prvalue(load) +# 2481| getQualifier(): [FunctionCall] call to operator-> +# 2481| Type = [PointerType] A * +# 2481| ValueCategory = prvalue +# 2481| getQualifier(): [FunctionCall] call to get +# 2481| Type = [Struct] B +# 2481| ValueCategory = prvalue +# 2481| getQualifier().getFullyConverted(): [CStyleCast] (const B)... +# 2481| Conversion = [PrvalueAdjustmentConversion] prvalue adjustment conversion +# 2481| Type = [SpecifiedType] const B +# 2481| ValueCategory = prvalue +# 2481| getExpr(): [TemporaryObjectExpr] temporary object +# 2481| Type = [Struct] B +# 2481| ValueCategory = prvalue(load) +# 2481| getImplicitDestructorCall(0): [DestructorCall] call to ~B +# 2481| Type = [VoidType] void +# 2481| ValueCategory = prvalue +# 2481| getQualifier(): [ReuseExpr] reuse of temporary object +# 2481| Type = [Struct] B +# 2481| ValueCategory = xvalue +# 2482| getStmt(1): [ReturnStmt] return ... +# 2485| [TopLevelFunction] void destructor_without_block(bool) +# 2485| : +# 2485| getParameter(0): [Parameter] b +# 2485| Type = [BoolType] bool +# 2486| getEntryPoint(): [BlockStmt] { ... } +# 2487| getStmt(0): [IfStmt] if (...) ... +# 2487| getCondition(): [VariableAccess] b +# 2487| Type = [BoolType] bool +# 2487| ValueCategory = prvalue(load) +# 2488| getThen(): [DeclStmt] declaration +# 2488| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c +# 2488| Type = [Class] ClassWithDestructor +# 2488| getVariable().getInitializer(): [Initializer] initializer for c +# 2488| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2488| Type = [VoidType] void +# 2488| ValueCategory = prvalue #-----| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor #-----| Type = [VoidType] void #-----| ValueCategory = prvalue #-----| getQualifier(): [VariableAccess] c #-----| Type = [Class] ClassWithDestructor #-----| ValueCategory = lvalue -# 2489| getStmt(1): [IfStmt] if (...) ... -# 2489| getCondition(): [VariableAccess] b -# 2489| Type = [BoolType] bool -# 2489| ValueCategory = prvalue(load) -# 2490| getThen(): [DeclStmt] declaration -# 2490| getDeclarationEntry(0): [VariableDeclarationEntry] definition of d -# 2490| Type = [Class] ClassWithDestructor -# 2490| getVariable().getInitializer(): [Initializer] initializer for d -# 2490| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2490| Type = [VoidType] void -# 2490| ValueCategory = prvalue +# 2490| getStmt(1): [IfStmt] if (...) ... +# 2490| getCondition(): [VariableAccess] b +# 2490| Type = [BoolType] bool +# 2490| ValueCategory = prvalue(load) +# 2491| getThen(): [DeclStmt] declaration +# 2491| getDeclarationEntry(0): [VariableDeclarationEntry] definition of d +# 2491| Type = [Class] ClassWithDestructor +# 2491| getVariable().getInitializer(): [Initializer] initializer for d +# 2491| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2491| Type = [VoidType] void +# 2491| ValueCategory = prvalue #-----| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor #-----| Type = [VoidType] void #-----| ValueCategory = prvalue #-----| getQualifier(): [VariableAccess] d #-----| Type = [Class] ClassWithDestructor #-----| ValueCategory = lvalue -# 2492| getElse(): [DeclStmt] declaration -# 2492| getDeclarationEntry(0): [VariableDeclarationEntry] definition of e -# 2492| Type = [Class] ClassWithDestructor -# 2492| getVariable().getInitializer(): [Initializer] initializer for e -# 2492| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2492| Type = [VoidType] void -# 2492| ValueCategory = prvalue +# 2493| getElse(): [DeclStmt] declaration +# 2493| getDeclarationEntry(0): [VariableDeclarationEntry] definition of e +# 2493| Type = [Class] ClassWithDestructor +# 2493| getVariable().getInitializer(): [Initializer] initializer for e +# 2493| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2493| Type = [VoidType] void +# 2493| ValueCategory = prvalue #-----| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor #-----| Type = [VoidType] void #-----| ValueCategory = prvalue #-----| getQualifier(): [VariableAccess] e #-----| Type = [Class] ClassWithDestructor #-----| ValueCategory = lvalue -# 2494| getStmt(2): [WhileStmt] while (...) ... -# 2494| getCondition(): [VariableAccess] b -# 2494| Type = [BoolType] bool -# 2494| ValueCategory = prvalue(load) -# 2495| getStmt(): [DeclStmt] declaration -# 2495| getDeclarationEntry(0): [VariableDeclarationEntry] definition of f -# 2495| Type = [Class] ClassWithDestructor -# 2495| getVariable().getInitializer(): [Initializer] initializer for f -# 2495| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2495| Type = [VoidType] void -# 2495| ValueCategory = prvalue +# 2495| getStmt(2): [WhileStmt] while (...) ... +# 2495| getCondition(): [VariableAccess] b +# 2495| Type = [BoolType] bool +# 2495| ValueCategory = prvalue(load) +# 2496| getStmt(): [DeclStmt] declaration +# 2496| getDeclarationEntry(0): [VariableDeclarationEntry] definition of f +# 2496| Type = [Class] ClassWithDestructor +# 2496| getVariable().getInitializer(): [Initializer] initializer for f +# 2496| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2496| Type = [VoidType] void +# 2496| ValueCategory = prvalue #-----| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor #-----| Type = [VoidType] void #-----| ValueCategory = prvalue #-----| getQualifier(): [VariableAccess] f #-----| Type = [Class] ClassWithDestructor #-----| ValueCategory = lvalue -# 2497| getStmt(3): [ForStmt] for(...;...;...) ... -# 2497| getInitialization(): [DeclStmt] declaration -# 2497| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i -# 2497| Type = [IntType] int -# 2497| getVariable().getInitializer(): [Initializer] initializer for i -# 2497| getExpr(): [Literal] 0 -# 2497| Type = [IntType] int -# 2497| Value = [Literal] 0 -# 2497| ValueCategory = prvalue -# 2497| getCondition(): [LTExpr] ... < ... -# 2497| Type = [BoolType] bool -# 2497| ValueCategory = prvalue -# 2497| getLesserOperand(): [VariableAccess] i -# 2497| Type = [IntType] int -# 2497| ValueCategory = prvalue(load) -# 2497| getGreaterOperand(): [Literal] 42 -# 2497| Type = [IntType] int -# 2497| Value = [Literal] 42 -# 2497| ValueCategory = prvalue -# 2497| getUpdate(): [PrefixIncrExpr] ++ ... -# 2497| Type = [IntType] int -# 2497| ValueCategory = lvalue -# 2497| getOperand(): [VariableAccess] i -# 2497| Type = [IntType] int -# 2497| ValueCategory = lvalue -# 2498| getStmt(): [DeclStmt] declaration -# 2498| getDeclarationEntry(0): [VariableDeclarationEntry] definition of g -# 2498| Type = [Class] ClassWithDestructor -# 2498| getVariable().getInitializer(): [Initializer] initializer for g -# 2498| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2498| Type = [VoidType] void +# 2498| getStmt(3): [ForStmt] for(...;...;...) ... +# 2498| getInitialization(): [DeclStmt] declaration +# 2498| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i +# 2498| Type = [IntType] int +# 2498| getVariable().getInitializer(): [Initializer] initializer for i +# 2498| getExpr(): [Literal] 0 +# 2498| Type = [IntType] int +# 2498| Value = [Literal] 0 # 2498| ValueCategory = prvalue +# 2498| getCondition(): [LTExpr] ... < ... +# 2498| Type = [BoolType] bool +# 2498| ValueCategory = prvalue +# 2498| getLesserOperand(): [VariableAccess] i +# 2498| Type = [IntType] int +# 2498| ValueCategory = prvalue(load) +# 2498| getGreaterOperand(): [Literal] 42 +# 2498| Type = [IntType] int +# 2498| Value = [Literal] 42 +# 2498| ValueCategory = prvalue +# 2498| getUpdate(): [PrefixIncrExpr] ++ ... +# 2498| Type = [IntType] int +# 2498| ValueCategory = lvalue +# 2498| getOperand(): [VariableAccess] i +# 2498| Type = [IntType] int +# 2498| ValueCategory = lvalue +# 2499| getStmt(): [DeclStmt] declaration +# 2499| getDeclarationEntry(0): [VariableDeclarationEntry] definition of g +# 2499| Type = [Class] ClassWithDestructor +# 2499| getVariable().getInitializer(): [Initializer] initializer for g +# 2499| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2499| Type = [VoidType] void +# 2499| ValueCategory = prvalue #-----| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor #-----| Type = [VoidType] void #-----| ValueCategory = prvalue #-----| getQualifier(): [VariableAccess] g #-----| Type = [Class] ClassWithDestructor #-----| ValueCategory = lvalue -# 2499| getStmt(4): [ReturnStmt] return ... -# 2501| [TopLevelFunction] void destruction_in_switch_1(int) -# 2501| : -# 2501| getParameter(0): [Parameter] c -# 2501| Type = [IntType] int -# 2501| getEntryPoint(): [BlockStmt] { ... } -# 2502| getStmt(0): [SwitchStmt] switch (...) ... -# 2502| getExpr(): [VariableAccess] c -# 2502| Type = [IntType] int -# 2502| ValueCategory = prvalue(load) -# 2502| getStmt(): [BlockStmt] { ... } -# 2503| getStmt(0): [SwitchCase] case ...: -# 2503| getExpr(): [Literal] 0 -# 2503| Type = [IntType] int -# 2503| Value = [Literal] 0 -# 2503| ValueCategory = prvalue -# 2503| getStmt(1): [BlockStmt] { ... } -# 2504| getStmt(0): [DeclStmt] declaration -# 2504| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2504| Type = [Class] ClassWithDestructor -# 2504| getVariable().getInitializer(): [Initializer] initializer for x -# 2504| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2504| Type = [VoidType] void -# 2504| ValueCategory = prvalue -# 2505| getStmt(1): [BreakStmt] break; -# 2506| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2506| Type = [VoidType] void -# 2506| ValueCategory = prvalue -# 2506| getQualifier(): [VariableAccess] x -# 2506| Type = [Class] ClassWithDestructor -# 2506| ValueCategory = lvalue -# 2506| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2506| Type = [VoidType] void -# 2506| ValueCategory = prvalue -# 2506| getQualifier(): [VariableAccess] x -# 2506| Type = [Class] ClassWithDestructor -# 2506| ValueCategory = lvalue -# 2507| getStmt(1): [LabelStmt] label ...: -# 2508| getStmt(2): [ReturnStmt] return ... -# 2510| [TopLevelFunction] void destruction_in_switch_2(int) -# 2510| : -# 2510| getParameter(0): [Parameter] c -# 2510| Type = [IntType] int -# 2510| getEntryPoint(): [BlockStmt] { ... } -# 2511| getStmt(0): [SwitchStmt] switch (...) ... -# 2511| getInitialization(): [DeclStmt] declaration -# 2511| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y -# 2511| Type = [Class] ClassWithDestructor -# 2511| getVariable().getInitializer(): [Initializer] initializer for y -# 2511| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2511| Type = [VoidType] void -# 2511| ValueCategory = prvalue -# 2511| getExpr(): [VariableAccess] c -# 2511| Type = [IntType] int -# 2511| ValueCategory = prvalue(load) -# 2511| getStmt(): [BlockStmt] { ... } -# 2512| getStmt(0): [SwitchCase] case ...: -# 2512| getExpr(): [Literal] 0 -# 2512| Type = [IntType] int -# 2512| Value = [Literal] 0 -# 2512| ValueCategory = prvalue -# 2512| getStmt(1): [BlockStmt] { ... } -# 2513| getStmt(0): [BreakStmt] break; -# 2518| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2518| Type = [VoidType] void -# 2518| ValueCategory = prvalue -# 2518| getQualifier(): [VariableAccess] y -# 2518| Type = [Class] ClassWithDestructor -# 2518| ValueCategory = lvalue -# 2515| getStmt(2): [SwitchCase] default: -# 2515| getStmt(3): [BlockStmt] { ... } -# 2516| getStmt(0): [BreakStmt] break; -# 2518| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2518| Type = [VoidType] void -# 2518| ValueCategory = prvalue -# 2518| getQualifier(): [VariableAccess] y -# 2518| Type = [Class] ClassWithDestructor -# 2518| ValueCategory = lvalue -# 2518| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2518| Type = [VoidType] void -# 2518| ValueCategory = prvalue -# 2518| getQualifier(): [VariableAccess] y -# 2518| Type = [Class] ClassWithDestructor -# 2518| ValueCategory = lvalue -# 2518| getStmt(1): [LabelStmt] label ...: -# 2519| getStmt(2): [ReturnStmt] return ... -# 2521| [TopLevelFunction] void destruction_in_switch_3(int) -# 2521| : -# 2521| getParameter(0): [Parameter] c -# 2521| Type = [IntType] int -# 2521| getEntryPoint(): [BlockStmt] { ... } -# 2522| getStmt(0): [SwitchStmt] switch (...) ... -# 2522| getInitialization(): [DeclStmt] declaration -# 2522| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y -# 2522| Type = [Class] ClassWithDestructor -# 2522| getVariable().getInitializer(): [Initializer] initializer for y -# 2522| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2522| Type = [VoidType] void -# 2522| ValueCategory = prvalue -# 2522| getExpr(): [VariableAccess] c -# 2522| Type = [IntType] int -# 2522| ValueCategory = prvalue(load) -# 2522| getStmt(): [BlockStmt] { ... } -# 2523| getStmt(0): [SwitchCase] case ...: -# 2523| getExpr(): [Literal] 0 -# 2523| Type = [IntType] int -# 2523| Value = [Literal] 0 -# 2523| ValueCategory = prvalue -# 2523| getStmt(1): [BlockStmt] { ... } -# 2524| getStmt(0): [DeclStmt] declaration -# 2524| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x -# 2524| Type = [Class] ClassWithDestructor -# 2524| getVariable().getInitializer(): [Initializer] initializer for x -# 2524| getExpr(): [ConstructorCall] call to ClassWithDestructor -# 2524| Type = [VoidType] void -# 2524| ValueCategory = prvalue -# 2525| getStmt(1): [BreakStmt] break; -# 2526| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2526| Type = [VoidType] void -# 2526| ValueCategory = prvalue -# 2526| getQualifier(): [VariableAccess] x -# 2526| Type = [Class] ClassWithDestructor -# 2526| ValueCategory = lvalue -# 2530| getImplicitDestructorCall(1): [DestructorCall] call to ~ClassWithDestructor -# 2530| Type = [VoidType] void -# 2530| ValueCategory = prvalue -# 2530| getQualifier(): [VariableAccess] y -# 2530| Type = [Class] ClassWithDestructor -# 2530| ValueCategory = lvalue -# 2526| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2526| Type = [VoidType] void -# 2526| ValueCategory = prvalue -# 2526| getQualifier(): [VariableAccess] x -# 2526| Type = [Class] ClassWithDestructor -# 2526| ValueCategory = lvalue -# 2527| getStmt(2): [SwitchCase] default: -# 2527| getStmt(3): [BlockStmt] { ... } -# 2528| getStmt(0): [BreakStmt] break; -# 2530| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2530| Type = [VoidType] void -# 2530| ValueCategory = prvalue -# 2530| getQualifier(): [VariableAccess] y -# 2530| Type = [Class] ClassWithDestructor -# 2530| ValueCategory = lvalue -# 2530| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor -# 2530| Type = [VoidType] void -# 2530| ValueCategory = prvalue -# 2530| getQualifier(): [VariableAccess] y -# 2530| Type = [Class] ClassWithDestructor -# 2530| ValueCategory = lvalue -# 2530| getStmt(1): [LabelStmt] label ...: -# 2531| getStmt(2): [ReturnStmt] return ... +# 2500| getStmt(4): [ReturnStmt] return ... +# 2502| [TopLevelFunction] void destruction_in_switch_1(int) +# 2502| : +# 2502| getParameter(0): [Parameter] c +# 2502| Type = [IntType] int +# 2502| getEntryPoint(): [BlockStmt] { ... } +# 2503| getStmt(0): [SwitchStmt] switch (...) ... +# 2503| getExpr(): [VariableAccess] c +# 2503| Type = [IntType] int +# 2503| ValueCategory = prvalue(load) +# 2503| getStmt(): [BlockStmt] { ... } +# 2504| getStmt(0): [SwitchCase] case ...: +# 2504| getExpr(): [Literal] 0 +# 2504| Type = [IntType] int +# 2504| Value = [Literal] 0 +# 2504| ValueCategory = prvalue +# 2504| getStmt(1): [BlockStmt] { ... } +# 2505| getStmt(0): [DeclStmt] declaration +# 2505| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2505| Type = [Class] ClassWithDestructor +# 2505| getVariable().getInitializer(): [Initializer] initializer for x +# 2505| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2505| Type = [VoidType] void +# 2505| ValueCategory = prvalue +# 2506| getStmt(1): [BreakStmt] break; +# 2507| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2507| Type = [VoidType] void +# 2507| ValueCategory = prvalue +# 2507| getQualifier(): [VariableAccess] x +# 2507| Type = [Class] ClassWithDestructor +# 2507| ValueCategory = lvalue +# 2507| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2507| Type = [VoidType] void +# 2507| ValueCategory = prvalue +# 2507| getQualifier(): [VariableAccess] x +# 2507| Type = [Class] ClassWithDestructor +# 2507| ValueCategory = lvalue +# 2508| getStmt(1): [LabelStmt] label ...: +# 2509| getStmt(2): [ReturnStmt] return ... +# 2511| [TopLevelFunction] void destruction_in_switch_2(int) +# 2511| : +# 2511| getParameter(0): [Parameter] c +# 2511| Type = [IntType] int +# 2511| getEntryPoint(): [BlockStmt] { ... } +# 2512| getStmt(0): [SwitchStmt] switch (...) ... +# 2512| getInitialization(): [DeclStmt] declaration +# 2512| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2512| Type = [Class] ClassWithDestructor +# 2512| getVariable().getInitializer(): [Initializer] initializer for y +# 2512| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2512| Type = [VoidType] void +# 2512| ValueCategory = prvalue +# 2512| getExpr(): [VariableAccess] c +# 2512| Type = [IntType] int +# 2512| ValueCategory = prvalue(load) +# 2512| getStmt(): [BlockStmt] { ... } +# 2513| getStmt(0): [SwitchCase] case ...: +# 2513| getExpr(): [Literal] 0 +# 2513| Type = [IntType] int +# 2513| Value = [Literal] 0 +# 2513| ValueCategory = prvalue +# 2513| getStmt(1): [BlockStmt] { ... } +# 2514| getStmt(0): [BreakStmt] break; +# 2519| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2519| Type = [VoidType] void +# 2519| ValueCategory = prvalue +# 2519| getQualifier(): [VariableAccess] y +# 2519| Type = [Class] ClassWithDestructor +# 2519| ValueCategory = lvalue +# 2516| getStmt(2): [SwitchCase] default: +# 2516| getStmt(3): [BlockStmt] { ... } +# 2517| getStmt(0): [BreakStmt] break; +# 2519| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2519| Type = [VoidType] void +# 2519| ValueCategory = prvalue +# 2519| getQualifier(): [VariableAccess] y +# 2519| Type = [Class] ClassWithDestructor +# 2519| ValueCategory = lvalue +# 2519| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2519| Type = [VoidType] void +# 2519| ValueCategory = prvalue +# 2519| getQualifier(): [VariableAccess] y +# 2519| Type = [Class] ClassWithDestructor +# 2519| ValueCategory = lvalue +# 2519| getStmt(1): [LabelStmt] label ...: +# 2520| getStmt(2): [ReturnStmt] return ... +# 2522| [TopLevelFunction] void destruction_in_switch_3(int) +# 2522| : +# 2522| getParameter(0): [Parameter] c +# 2522| Type = [IntType] int +# 2522| getEntryPoint(): [BlockStmt] { ... } +# 2523| getStmt(0): [SwitchStmt] switch (...) ... +# 2523| getInitialization(): [DeclStmt] declaration +# 2523| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2523| Type = [Class] ClassWithDestructor +# 2523| getVariable().getInitializer(): [Initializer] initializer for y +# 2523| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2523| Type = [VoidType] void +# 2523| ValueCategory = prvalue +# 2523| getExpr(): [VariableAccess] c +# 2523| Type = [IntType] int +# 2523| ValueCategory = prvalue(load) +# 2523| getStmt(): [BlockStmt] { ... } +# 2524| getStmt(0): [SwitchCase] case ...: +# 2524| getExpr(): [Literal] 0 +# 2524| Type = [IntType] int +# 2524| Value = [Literal] 0 +# 2524| ValueCategory = prvalue +# 2524| getStmt(1): [BlockStmt] { ... } +# 2525| getStmt(0): [DeclStmt] declaration +# 2525| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2525| Type = [Class] ClassWithDestructor +# 2525| getVariable().getInitializer(): [Initializer] initializer for x +# 2525| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2525| Type = [VoidType] void +# 2525| ValueCategory = prvalue +# 2526| getStmt(1): [BreakStmt] break; +# 2527| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2527| Type = [VoidType] void +# 2527| ValueCategory = prvalue +# 2527| getQualifier(): [VariableAccess] x +# 2527| Type = [Class] ClassWithDestructor +# 2527| ValueCategory = lvalue +# 2531| getImplicitDestructorCall(1): [DestructorCall] call to ~ClassWithDestructor +# 2531| Type = [VoidType] void +# 2531| ValueCategory = prvalue +# 2531| getQualifier(): [VariableAccess] y +# 2531| Type = [Class] ClassWithDestructor +# 2531| ValueCategory = lvalue +# 2527| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2527| Type = [VoidType] void +# 2527| ValueCategory = prvalue +# 2527| getQualifier(): [VariableAccess] x +# 2527| Type = [Class] ClassWithDestructor +# 2527| ValueCategory = lvalue +# 2528| getStmt(2): [SwitchCase] default: +# 2528| getStmt(3): [BlockStmt] { ... } +# 2529| getStmt(0): [BreakStmt] break; +# 2531| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2531| Type = [VoidType] void +# 2531| ValueCategory = prvalue +# 2531| getQualifier(): [VariableAccess] y +# 2531| Type = [Class] ClassWithDestructor +# 2531| ValueCategory = lvalue +# 2531| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2531| Type = [VoidType] void +# 2531| ValueCategory = prvalue +# 2531| getQualifier(): [VariableAccess] y +# 2531| Type = [Class] ClassWithDestructor +# 2531| ValueCategory = lvalue +# 2531| getStmt(1): [LabelStmt] label ...: +# 2532| getStmt(2): [ReturnStmt] return ... +# 2534| [TopLevelFunction] void destructor_possibly_not_handled() +# 2534| : +# 2534| getEntryPoint(): [BlockStmt] { ... } +# 2535| getStmt(0): [DeclStmt] declaration +# 2535| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2535| Type = [Class] ClassWithDestructor +# 2535| getVariable().getInitializer(): [Initializer] initializer for x +# 2535| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2535| Type = [VoidType] void +# 2535| ValueCategory = prvalue +# 2536| getStmt(1): [TryStmt] try { ... } +# 2536| getStmt(): [BlockStmt] { ... } +# 2537| getStmt(0): [ExprStmt] ExprStmt +# 2537| getExpr(): [ThrowExpr] throw ... +# 2537| Type = [IntType] int +# 2537| ValueCategory = prvalue +# 2537| getExpr(): [Literal] 42 +# 2537| Type = [IntType] int +# 2537| Value = [Literal] 42 +# 2537| ValueCategory = prvalue +# 2539| getChild(1): [Handler] +# 2539| getBlock(): [CatchBlock] { ... } +# 2541| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2541| Type = [VoidType] void +# 2541| ValueCategory = prvalue +# 2541| getQualifier(): [VariableAccess] x +# 2541| Type = [Class] ClassWithDestructor +# 2541| ValueCategory = lvalue +# 2541| getStmt(2): [ReturnStmt] return ... +# 2541| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2541| Type = [VoidType] void +# 2541| ValueCategory = prvalue +# 2541| getQualifier(): [VariableAccess] x +# 2541| Type = [Class] ClassWithDestructor +# 2541| ValueCategory = lvalue +# 2543| [TopLevelFunction] ClassWithDestructor getClassWithDestructor() +# 2543| : +# 2545| [TopLevelFunction] void this_inconsistency(bool) +# 2545| : +# 2545| getParameter(0): [Parameter] b +# 2545| Type = [BoolType] bool +# 2545| getEntryPoint(): [BlockStmt] { ... } +# 2546| getStmt(0): [IfStmt] if (...) ... +# 2546| getCondition(): [ConditionDeclExpr] (condition decl) +# 2546| Type = [BoolType] bool +# 2546| ValueCategory = prvalue +# 2546| getChild(0): [FunctionCall] call to operator bool +# 2546| Type = [BoolType] bool +# 2546| ValueCategory = prvalue +# 2546| getQualifier(): [VariableAccess] a +# 2546| Type = [LValueReferenceType] const ClassWithDestructor & +# 2546| ValueCategory = prvalue(load) +# 2546| getQualifier().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2546| Type = [SpecifiedType] const ClassWithDestructor +# 2546| ValueCategory = prvalue(load) +# 2546| getInitializingExpr(): [FunctionCall] call to getClassWithDestructor +# 2546| Type = [Class] ClassWithDestructor +# 2546| ValueCategory = prvalue +# 2546| getInitializingExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2546| Type = [LValueReferenceType] const ClassWithDestructor & +# 2546| ValueCategory = prvalue +# 2546| getExpr(): [CStyleCast] (const ClassWithDestructor)... +# 2546| Conversion = [GlvalueConversion] glvalue conversion +# 2546| Type = [SpecifiedType] const ClassWithDestructor +# 2546| ValueCategory = lvalue +# 2546| getExpr(): [TemporaryObjectExpr] temporary object +# 2546| Type = [Class] ClassWithDestructor +# 2546| ValueCategory = lvalue +# 2547| getThen(): [EmptyStmt] ; +# 2547| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2547| Type = [VoidType] void +# 2547| ValueCategory = prvalue +# 2547| getQualifier(): [ReuseExpr] reuse of temporary object +# 2547| Type = [Class] ClassWithDestructor +# 2547| ValueCategory = xvalue +# 2548| getStmt(1): [ReturnStmt] return ... +# 2550| [TopLevelFunction] void constexpr_inconsistency(bool) +# 2550| : +# 2550| getParameter(0): [Parameter] b +# 2550| Type = [BoolType] bool +# 2550| getEntryPoint(): [BlockStmt] { ... } +# 2551| getStmt(0): [ConstexprIfStmt] if constexpr (...) ... +# 2551| getInitialization(): [DeclStmt] declaration +# 2551| getDeclarationEntry(0): [VariableDeclarationEntry] definition of a +# 2551| Type = [LValueReferenceType] const ClassWithDestructor & +# 2551| getVariable().getInitializer(): [Initializer] initializer for a +# 2551| getExpr(): [FunctionCall] call to getClassWithDestructor +# 2551| Type = [Class] ClassWithDestructor +# 2551| ValueCategory = prvalue +# 2551| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2551| Type = [LValueReferenceType] const ClassWithDestructor & +# 2551| ValueCategory = prvalue +# 2551| getExpr(): [CStyleCast] (const ClassWithDestructor)... +# 2551| Conversion = [GlvalueConversion] glvalue conversion +# 2551| Type = [SpecifiedType] const ClassWithDestructor +# 2551| ValueCategory = lvalue +# 2551| getExpr(): [TemporaryObjectExpr] temporary object +# 2551| Type = [Class] ClassWithDestructor +# 2551| ValueCategory = lvalue +# 2551| getCondition(): [VariableAccess] initialization_with_destructor_bool +# 2551| Type = [BoolType] bool +# 2551| Value = [VariableAccess] 1 +# 2551| ValueCategory = prvalue(load) +# 2552| getThen(): [EmptyStmt] ; +# 2552| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2552| Type = [VoidType] void +# 2552| ValueCategory = prvalue +# 2552| getQualifier(): [ReuseExpr] reuse of temporary object +# 2552| Type = [Class] ClassWithDestructor +# 2552| ValueCategory = xvalue +# 2553| getStmt(1): [ReturnStmt] return ... perf-regression.cpp: # 4| [CopyAssignmentOperator] Big& Big::operator=(Big const&) # 4| : diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected index ae73ecd8f6f..b7b9f1520bf 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -15335,2847 +15335,3021 @@ ir.cpp: # 2193| v2193_19(void) = AliasedUse : m2193_3 # 2193| v2193_20(void) = ExitFunction : -# 2196| bool initialization_with_destructor_bool -# 2196| Block 0 -# 2196| v2196_1(void) = EnterFunction : -# 2196| m2196_2(unknown) = AliasedDefinition : -# 2196| r2196_3(glval) = VariableAddress[initialization_with_destructor_bool] : -# 2196| r2196_4(bool) = Constant[1] : -# 2196| m2196_5(bool) = Store[initialization_with_destructor_bool] : &:r2196_3, r2196_4 -# 2196| m2196_6(unknown) = Chi : total:m2196_2, partial:m2196_5 -# 2196| v2196_7(void) = ReturnVoid : -# 2196| v2196_8(void) = AliasedUse : ~m2196_6 -# 2196| v2196_9(void) = ExitFunction : +# 2197| bool initialization_with_destructor_bool +# 2197| Block 0 +# 2197| v2197_1(void) = EnterFunction : +# 2197| m2197_2(unknown) = AliasedDefinition : +# 2197| r2197_3(glval) = VariableAddress[initialization_with_destructor_bool] : +# 2197| r2197_4(bool) = Constant[1] : +# 2197| m2197_5(bool) = Store[initialization_with_destructor_bool] : &:r2197_3, r2197_4 +# 2197| m2197_6(unknown) = Chi : total:m2197_2, partial:m2197_5 +# 2197| v2197_7(void) = ReturnVoid : +# 2197| v2197_8(void) = AliasedUse : ~m2197_6 +# 2197| v2197_9(void) = ExitFunction : -# 2198| void initialization_with_destructor(bool, char) -# 2198| Block 0 -# 2198| v2198_1(void) = EnterFunction : -# 2198| m2198_2(unknown) = AliasedDefinition : -# 2198| m2198_3(unknown) = InitializeNonLocal : -# 2198| m2198_4(unknown) = Chi : total:m2198_2, partial:m2198_3 -# 2198| r2198_5(glval) = VariableAddress[b] : -# 2198| m2198_6(bool) = InitializeParameter[b] : &:r2198_5 -# 2198| r2198_7(glval) = VariableAddress[c] : -# 2198| m2198_8(char) = InitializeParameter[c] : &:r2198_7 -# 2199| r2199_1(glval) = VariableAddress[x] : -# 2199| m2199_2(ClassWithDestructor) = Uninitialized[x] : &:r2199_1 -# 2199| r2199_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2199| v2199_4(void) = Call[ClassWithDestructor] : func:r2199_3, this:r2199_1 -# 2199| m2199_5(unknown) = ^CallSideEffect : ~m2198_4 -# 2199| m2199_6(unknown) = Chi : total:m2198_4, partial:m2199_5 -# 2199| m2199_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2199_1 -# 2199| m2199_8(ClassWithDestructor) = Chi : total:m2199_2, partial:m2199_7 -# 2199| r2199_9(glval) = VariableAddress[b] : -# 2199| r2199_10(bool) = Load[b] : &:r2199_9, m2198_6 -# 2199| v2199_11(void) = ConditionalBranch : r2199_10 +# 2199| void initialization_with_destructor(bool, char) +# 2199| Block 0 +# 2199| v2199_1(void) = EnterFunction : +# 2199| m2199_2(unknown) = AliasedDefinition : +# 2199| m2199_3(unknown) = InitializeNonLocal : +# 2199| m2199_4(unknown) = Chi : total:m2199_2, partial:m2199_3 +# 2199| r2199_5(glval) = VariableAddress[b] : +# 2199| m2199_6(bool) = InitializeParameter[b] : &:r2199_5 +# 2199| r2199_7(glval) = VariableAddress[c] : +# 2199| m2199_8(char) = InitializeParameter[c] : &:r2199_7 +# 2200| r2200_1(glval) = VariableAddress[x] : +# 2200| m2200_2(ClassWithDestructor) = Uninitialized[x] : &:r2200_1 +# 2200| r2200_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2200| v2200_4(void) = Call[ClassWithDestructor] : func:r2200_3, this:r2200_1 +# 2200| m2200_5(unknown) = ^CallSideEffect : ~m2199_4 +# 2200| m2200_6(unknown) = Chi : total:m2199_4, partial:m2200_5 +# 2200| m2200_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2200_1 +# 2200| m2200_8(ClassWithDestructor) = Chi : total:m2200_2, partial:m2200_7 +# 2200| r2200_9(glval) = VariableAddress[b] : +# 2200| r2200_10(bool) = Load[b] : &:r2200_9, m2199_6 +# 2200| v2200_11(void) = ConditionalBranch : r2200_10 #-----| False -> Block 3 #-----| True -> Block 2 -# 2198| Block 1 -# 2198| m2198_9(unknown) = Phi : from 14:~m2233_5, from 19:~m2233_13, from 23:~m2233_22 -# 2198| v2198_10(void) = ReturnVoid : -# 2198| v2198_11(void) = AliasedUse : ~m2198_9 -# 2198| v2198_12(void) = ExitFunction : +# 2199| Block 1 +# 2199| m2199_9(unknown) = Phi : from 14:~m2234_5, from 19:~m2234_13, from 23:~m2234_22 +# 2199| v2199_10(void) = ReturnVoid : +# 2199| v2199_11(void) = AliasedUse : ~m2199_9 +# 2199| v2199_12(void) = ExitFunction : -# 2200| Block 2 -# 2200| r2200_1(glval) = VariableAddress[x] : -# 2200| r2200_2(glval) = FunctionAddress[set_x] : -# 2200| r2200_3(char) = Constant[97] : -# 2200| v2200_4(void) = Call[set_x] : func:r2200_2, this:r2200_1, 0:r2200_3 -# 2200| m2200_5(unknown) = ^CallSideEffect : ~m2199_6 -# 2200| m2200_6(unknown) = Chi : total:m2199_6, partial:m2200_5 -# 2200| v2200_7(void) = ^IndirectReadSideEffect[-1] : &:r2200_1, m2199_8 -# 2200| m2200_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2200_1 -# 2200| m2200_9(ClassWithDestructor) = Chi : total:m2199_8, partial:m2200_8 -# 2200| r2200_10(glval) = VariableAddress[x] : -# 2200| r2200_11(glval) = FunctionAddress[~ClassWithDestructor] : -# 2200| v2200_12(void) = Call[~ClassWithDestructor] : func:r2200_11, this:r2200_10 -# 2200| m2200_13(unknown) = ^CallSideEffect : ~m2200_6 -# 2200| m2200_14(unknown) = Chi : total:m2200_6, partial:m2200_13 -# 2200| v2200_15(void) = ^IndirectReadSideEffect[-1] : &:r2200_10, m2200_9 -# 2200| m2200_16(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2200_10 -# 2200| m2200_17(ClassWithDestructor) = Chi : total:m2200_9, partial:m2200_16 +# 2201| Block 2 +# 2201| r2201_1(glval) = VariableAddress[x] : +# 2201| r2201_2(glval) = FunctionAddress[set_x] : +# 2201| r2201_3(char) = Constant[97] : +# 2201| v2201_4(void) = Call[set_x] : func:r2201_2, this:r2201_1, 0:r2201_3 +# 2201| m2201_5(unknown) = ^CallSideEffect : ~m2200_6 +# 2201| m2201_6(unknown) = Chi : total:m2200_6, partial:m2201_5 +# 2201| v2201_7(void) = ^IndirectReadSideEffect[-1] : &:r2201_1, m2200_8 +# 2201| m2201_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2201_1 +# 2201| m2201_9(ClassWithDestructor) = Chi : total:m2200_8, partial:m2201_8 #-----| Goto -> Block 3 -# 2202| Block 3 -# 2202| m2202_1(unknown) = Phi : from 0:~m2199_6, from 2:~m2200_14 -# 2202| r2202_2(glval) = VariableAddress[x] : -# 2202| m2202_3(ClassWithDestructor) = Uninitialized[x] : &:r2202_2 -# 2202| r2202_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2202| v2202_5(void) = Call[ClassWithDestructor] : func:r2202_4, this:r2202_2 -# 2202| m2202_6(unknown) = ^CallSideEffect : ~m2202_1 -# 2202| m2202_7(unknown) = Chi : total:m2202_1, partial:m2202_6 -# 2202| m2202_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2202_2 -# 2202| m2202_9(ClassWithDestructor) = Chi : total:m2202_3, partial:m2202_8 -# 2202| r2202_10(bool) = Constant[1] : -# 2202| v2202_11(void) = ConditionalBranch : r2202_10 +# 2201| Block 3 +# 2201| m2201_10(ClassWithDestructor) = Phi : from 0:m2200_8, from 2:m2201_9 +# 2201| m2201_11(unknown) = Phi : from 0:~m2200_6, from 2:~m2201_6 +# 2201| r2201_12(glval) = VariableAddress[x] : +# 2201| r2201_13(glval) = FunctionAddress[~ClassWithDestructor] : +# 2201| v2201_14(void) = Call[~ClassWithDestructor] : func:r2201_13, this:r2201_12 +# 2201| m2201_15(unknown) = ^CallSideEffect : ~m2201_11 +# 2201| m2201_16(unknown) = Chi : total:m2201_11, partial:m2201_15 +# 2201| v2201_17(void) = ^IndirectReadSideEffect[-1] : &:r2201_12, m2201_10 +# 2201| m2201_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2201_12 +# 2201| m2201_19(ClassWithDestructor) = Chi : total:m2201_10, partial:m2201_18 +# 2203| r2203_1(glval) = VariableAddress[x] : +# 2203| m2203_2(ClassWithDestructor) = Uninitialized[x] : &:r2203_1 +# 2203| r2203_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2203| v2203_4(void) = Call[ClassWithDestructor] : func:r2203_3, this:r2203_1 +# 2203| m2203_5(unknown) = ^CallSideEffect : ~m2201_16 +# 2203| m2203_6(unknown) = Chi : total:m2201_16, partial:m2203_5 +# 2203| m2203_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2203_1 +# 2203| m2203_8(ClassWithDestructor) = Chi : total:m2203_2, partial:m2203_7 +# 2203| r2203_9(bool) = Constant[1] : +# 2203| v2203_10(void) = ConditionalBranch : r2203_9 #-----| False -> Block 24 #-----| True -> Block 4 -# 2203| Block 4 -# 2203| r2203_1(glval) = VariableAddress[x] : -# 2203| r2203_2(glval) = FunctionAddress[set_x] : -# 2203| r2203_3(char) = Constant[97] : -# 2203| v2203_4(void) = Call[set_x] : func:r2203_2, this:r2203_1, 0:r2203_3 -# 2203| m2203_5(unknown) = ^CallSideEffect : ~m2202_7 -# 2203| m2203_6(unknown) = Chi : total:m2202_7, partial:m2203_5 -# 2203| v2203_7(void) = ^IndirectReadSideEffect[-1] : &:r2203_1, m2202_9 -# 2203| m2203_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2203_1 -# 2203| m2203_9(ClassWithDestructor) = Chi : total:m2202_9, partial:m2203_8 -# 2205| r2205_1(glval) = VariableAddress[x] : -# 2205| m2205_2(ClassWithDestructor) = Uninitialized[x] : &:r2205_1 -# 2205| r2205_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2205| v2205_4(void) = Call[ClassWithDestructor] : func:r2205_3, this:r2205_1 -# 2205| m2205_5(unknown) = ^CallSideEffect : ~m2203_6 -# 2205| m2205_6(unknown) = Chi : total:m2203_6, partial:m2205_5 -# 2205| m2205_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2205_1 -# 2205| m2205_8(ClassWithDestructor) = Chi : total:m2205_2, partial:m2205_7 -# 2205| r2205_9(glval) = VariableAddress[c] : -# 2205| r2205_10(char) = Load[c] : &:r2205_9, m2198_8 -# 2205| r2205_11(int) = Convert : r2205_10 -# 2205| v2205_12(void) = Switch : r2205_11 +# 2204| Block 4 +# 2204| r2204_1(glval) = VariableAddress[x] : +# 2204| r2204_2(glval) = FunctionAddress[set_x] : +# 2204| r2204_3(char) = Constant[97] : +# 2204| v2204_4(void) = Call[set_x] : func:r2204_2, this:r2204_1, 0:r2204_3 +# 2204| m2204_5(unknown) = ^CallSideEffect : ~m2203_6 +# 2204| m2204_6(unknown) = Chi : total:m2203_6, partial:m2204_5 +# 2204| v2204_7(void) = ^IndirectReadSideEffect[-1] : &:r2204_1, m2203_8 +# 2204| m2204_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2204_1 +# 2204| m2204_9(ClassWithDestructor) = Chi : total:m2203_8, partial:m2204_8 +# 2204| r2204_10(glval) = VariableAddress[x] : +# 2204| r2204_11(glval) = FunctionAddress[~ClassWithDestructor] : +# 2204| v2204_12(void) = Call[~ClassWithDestructor] : func:r2204_11, this:r2204_10 +# 2204| m2204_13(unknown) = ^CallSideEffect : ~m2204_6 +# 2204| m2204_14(unknown) = Chi : total:m2204_6, partial:m2204_13 +# 2204| v2204_15(void) = ^IndirectReadSideEffect[-1] : &:r2204_10, m2204_9 +# 2204| m2204_16(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2204_10 +# 2204| m2204_17(ClassWithDestructor) = Chi : total:m2204_9, partial:m2204_16 +# 2206| r2206_1(glval) = VariableAddress[x] : +# 2206| m2206_2(ClassWithDestructor) = Uninitialized[x] : &:r2206_1 +# 2206| r2206_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2206| v2206_4(void) = Call[ClassWithDestructor] : func:r2206_3, this:r2206_1 +# 2206| m2206_5(unknown) = ^CallSideEffect : ~m2204_14 +# 2206| m2206_6(unknown) = Chi : total:m2204_14, partial:m2206_5 +# 2206| m2206_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2206_1 +# 2206| m2206_8(ClassWithDestructor) = Chi : total:m2206_2, partial:m2206_7 +# 2206| r2206_9(glval) = VariableAddress[c] : +# 2206| r2206_10(char) = Load[c] : &:r2206_9, m2199_8 +# 2206| r2206_11(int) = Convert : r2206_10 +# 2206| v2206_12(void) = Switch : r2206_11 #-----| Case[97] -> Block 5 #-----| Default -> Block 6 -# 2206| Block 5 -# 2206| v2206_1(void) = NoOp : -# 2207| r2207_1(glval) = VariableAddress[x] : -# 2207| r2207_2(glval) = FunctionAddress[set_x] : -# 2207| r2207_3(char) = Constant[97] : -# 2207| v2207_4(void) = Call[set_x] : func:r2207_2, this:r2207_1, 0:r2207_3 -# 2207| m2207_5(unknown) = ^CallSideEffect : ~m2205_6 -# 2207| m2207_6(unknown) = Chi : total:m2205_6, partial:m2207_5 -# 2207| v2207_7(void) = ^IndirectReadSideEffect[-1] : &:r2207_1, m2205_8 -# 2207| m2207_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2207_1 -# 2207| m2207_9(ClassWithDestructor) = Chi : total:m2205_8, partial:m2207_8 -# 2212| r2212_1(glval) = VariableAddress[x] : -# 2212| r2212_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2212| v2212_3(void) = Call[~ClassWithDestructor] : func:r2212_2, this:r2212_1 -# 2212| m2212_4(unknown) = ^CallSideEffect : ~m2207_6 -# 2212| m2212_5(unknown) = Chi : total:m2207_6, partial:m2212_4 -# 2212| v2212_6(void) = ^IndirectReadSideEffect[-1] : &:r2212_1, m2207_9 -# 2212| m2212_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2212_1 -# 2212| m2212_8(ClassWithDestructor) = Chi : total:m2207_9, partial:m2212_7 -# 2208| v2208_1(void) = NoOp : -#-----| Goto -> Block 7 - -# 2209| Block 6 +# 2207| Block 5 +# 2207| v2207_1(void) = NoOp : +# 2208| r2208_1(glval) = VariableAddress[x] : +# 2208| r2208_2(glval) = FunctionAddress[set_x] : +# 2208| r2208_3(char) = Constant[97] : +# 2208| v2208_4(void) = Call[set_x] : func:r2208_2, this:r2208_1, 0:r2208_3 +# 2208| m2208_5(unknown) = ^CallSideEffect : ~m2206_6 +# 2208| m2208_6(unknown) = Chi : total:m2206_6, partial:m2208_5 +# 2208| v2208_7(void) = ^IndirectReadSideEffect[-1] : &:r2208_1, m2206_8 +# 2208| m2208_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2208_1 +# 2208| m2208_9(ClassWithDestructor) = Chi : total:m2206_8, partial:m2208_8 +# 2213| r2213_1(glval) = VariableAddress[x] : +# 2213| r2213_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2213| v2213_3(void) = Call[~ClassWithDestructor] : func:r2213_2, this:r2213_1 +# 2213| m2213_4(unknown) = ^CallSideEffect : ~m2208_6 +# 2213| m2213_5(unknown) = Chi : total:m2208_6, partial:m2213_4 +# 2213| v2213_6(void) = ^IndirectReadSideEffect[-1] : &:r2213_1, m2208_9 +# 2213| m2213_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2213_1 +# 2213| m2213_8(ClassWithDestructor) = Chi : total:m2208_9, partial:m2213_7 # 2209| v2209_1(void) = NoOp : -# 2210| r2210_1(glval) = VariableAddress[x] : -# 2210| r2210_2(glval) = FunctionAddress[set_x] : -# 2210| r2210_3(char) = Constant[98] : -# 2210| v2210_4(void) = Call[set_x] : func:r2210_2, this:r2210_1, 0:r2210_3 -# 2210| m2210_5(unknown) = ^CallSideEffect : ~m2205_6 -# 2210| m2210_6(unknown) = Chi : total:m2205_6, partial:m2210_5 -# 2210| v2210_7(void) = ^IndirectReadSideEffect[-1] : &:r2210_1, m2205_8 -# 2210| m2210_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2210_1 -# 2210| m2210_9(ClassWithDestructor) = Chi : total:m2205_8, partial:m2210_8 -# 2212| r2212_9(glval) = VariableAddress[x] : -# 2212| r2212_10(glval) = FunctionAddress[~ClassWithDestructor] : -# 2212| v2212_11(void) = Call[~ClassWithDestructor] : func:r2212_10, this:r2212_9 -# 2212| m2212_12(unknown) = ^CallSideEffect : ~m2210_6 -# 2212| m2212_13(unknown) = Chi : total:m2210_6, partial:m2212_12 -# 2212| v2212_14(void) = ^IndirectReadSideEffect[-1] : &:r2212_9, m2210_9 -# 2212| m2212_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2212_9 -# 2212| m2212_16(ClassWithDestructor) = Chi : total:m2210_9, partial:m2212_15 -# 2211| v2211_1(void) = NoOp : #-----| Goto -> Block 7 -# 2212| Block 7 -# 2212| m2212_17(unknown) = Phi : from 5:~m2212_5, from 6:~m2212_13 -# 2212| v2212_18(void) = NoOp : -# 2214| r2214_1(glval) = VariableAddress[x] : -# 2214| m2214_2(ClassWithDestructor) = Uninitialized[x] : &:r2214_1 -# 2214| r2214_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2214| v2214_4(void) = Call[ClassWithDestructor] : func:r2214_3, this:r2214_1 -# 2214| m2214_5(unknown) = ^CallSideEffect : ~m2212_17 -# 2214| m2214_6(unknown) = Chi : total:m2212_17, partial:m2214_5 -# 2214| m2214_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2214_1 -# 2214| m2214_8(ClassWithDestructor) = Chi : total:m2214_2, partial:m2214_7 -# 2215| r2215_1(glval>) = VariableAddress[ys] : -# 2215| m2215_2(vector) = Uninitialized[ys] : &:r2215_1 -# 2215| m2215_3(unknown) = Chi : total:m2214_6, partial:m2215_2 -# 2215| r2215_4(glval) = FunctionAddress[vector] : -# 2215| r2215_5(glval) = VariableAddress[#temp2215:45] : -# 2215| r2215_6(glval) = VariableAddress[x] : -# 2215| r2215_7(ClassWithDestructor) = Load[x] : &:r2215_6, m2214_8 -# 2215| m2215_8(ClassWithDestructor) = Store[#temp2215:45] : &:r2215_5, r2215_7 -# 2215| r2215_9(ClassWithDestructor) = Load[#temp2215:45] : &:r2215_5, m2215_8 -# 2215| v2215_10(void) = Call[vector] : func:r2215_4, this:r2215_1, 0:r2215_9 -# 2215| m2215_11(unknown) = ^CallSideEffect : ~m2215_3 -# 2215| m2215_12(unknown) = Chi : total:m2215_3, partial:m2215_11 -# 2215| m2215_13(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2215_1 -# 2215| m2215_14(unknown) = Chi : total:m2215_12, partial:m2215_13 -# 2215| r2215_15(glval) = CopyValue : r2215_5 -# 2215| r2215_16(glval) = FunctionAddress[~ClassWithDestructor] : -# 2215| v2215_17(void) = Call[~ClassWithDestructor] : func:r2215_16, this:r2215_15 -# 2215| m2215_18(unknown) = ^CallSideEffect : ~m2215_14 -# 2215| m2215_19(unknown) = Chi : total:m2215_14, partial:m2215_18 -# 2215| v2215_20(void) = ^IndirectReadSideEffect[-1] : &:r2215_15, m2215_8 -# 2215| m2215_21(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2215_15 -# 2215| m2215_22(ClassWithDestructor) = Chi : total:m2215_8, partial:m2215_21 -# 2215| r2215_23(glval &>) = VariableAddress[(__range)] : -# 2215| r2215_24(glval>) = VariableAddress[ys] : -# 2215| r2215_25(vector &) = CopyValue : r2215_24 -# 2215| m2215_26(vector &) = Store[(__range)] : &:r2215_23, r2215_25 -# 2215| r2215_27(glval>) = VariableAddress[(__begin)] : -# 2215| r2215_28(glval &>) = VariableAddress[(__range)] : -# 2215| r2215_29(vector &) = Load[(__range)] : &:r2215_28, m2215_26 -#-----| r0_1(glval>) = CopyValue : r2215_29 +# 2210| Block 6 +# 2210| v2210_1(void) = NoOp : +# 2211| r2211_1(glval) = VariableAddress[x] : +# 2211| r2211_2(glval) = FunctionAddress[set_x] : +# 2211| r2211_3(char) = Constant[98] : +# 2211| v2211_4(void) = Call[set_x] : func:r2211_2, this:r2211_1, 0:r2211_3 +# 2211| m2211_5(unknown) = ^CallSideEffect : ~m2206_6 +# 2211| m2211_6(unknown) = Chi : total:m2206_6, partial:m2211_5 +# 2211| v2211_7(void) = ^IndirectReadSideEffect[-1] : &:r2211_1, m2206_8 +# 2211| m2211_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2211_1 +# 2211| m2211_9(ClassWithDestructor) = Chi : total:m2206_8, partial:m2211_8 +# 2213| r2213_9(glval) = VariableAddress[x] : +# 2213| r2213_10(glval) = FunctionAddress[~ClassWithDestructor] : +# 2213| v2213_11(void) = Call[~ClassWithDestructor] : func:r2213_10, this:r2213_9 +# 2213| m2213_12(unknown) = ^CallSideEffect : ~m2211_6 +# 2213| m2213_13(unknown) = Chi : total:m2211_6, partial:m2213_12 +# 2213| v2213_14(void) = ^IndirectReadSideEffect[-1] : &:r2213_9, m2211_9 +# 2213| m2213_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2213_9 +# 2213| m2213_16(ClassWithDestructor) = Chi : total:m2211_9, partial:m2213_15 +# 2212| v2212_1(void) = NoOp : +#-----| Goto -> Block 7 + +# 2213| Block 7 +# 2213| m2213_17(unknown) = Phi : from 5:~m2213_5, from 6:~m2213_13 +# 2213| v2213_18(void) = NoOp : +# 2215| r2215_1(glval) = VariableAddress[x] : +# 2215| m2215_2(ClassWithDestructor) = Uninitialized[x] : &:r2215_1 +# 2215| r2215_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2215| v2215_4(void) = Call[ClassWithDestructor] : func:r2215_3, this:r2215_1 +# 2215| m2215_5(unknown) = ^CallSideEffect : ~m2213_17 +# 2215| m2215_6(unknown) = Chi : total:m2213_17, partial:m2215_5 +# 2215| m2215_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2215_1 +# 2215| m2215_8(ClassWithDestructor) = Chi : total:m2215_2, partial:m2215_7 +# 2216| r2216_1(glval>) = VariableAddress[ys] : +# 2216| m2216_2(vector) = Uninitialized[ys] : &:r2216_1 +# 2216| m2216_3(unknown) = Chi : total:m2215_6, partial:m2216_2 +# 2216| r2216_4(glval) = FunctionAddress[vector] : +# 2216| r2216_5(glval) = VariableAddress[#temp2216:45] : +# 2216| r2216_6(glval) = VariableAddress[x] : +# 2216| r2216_7(ClassWithDestructor) = Load[x] : &:r2216_6, m2215_8 +# 2216| m2216_8(ClassWithDestructor) = Store[#temp2216:45] : &:r2216_5, r2216_7 +# 2216| r2216_9(ClassWithDestructor) = Load[#temp2216:45] : &:r2216_5, m2216_8 +# 2216| v2216_10(void) = Call[vector] : func:r2216_4, this:r2216_1, 0:r2216_9 +# 2216| m2216_11(unknown) = ^CallSideEffect : ~m2216_3 +# 2216| m2216_12(unknown) = Chi : total:m2216_3, partial:m2216_11 +# 2216| m2216_13(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2216_1 +# 2216| m2216_14(unknown) = Chi : total:m2216_12, partial:m2216_13 +# 2216| r2216_15(glval) = CopyValue : r2216_5 +# 2216| r2216_16(glval) = FunctionAddress[~ClassWithDestructor] : +# 2216| v2216_17(void) = Call[~ClassWithDestructor] : func:r2216_16, this:r2216_15 +# 2216| m2216_18(unknown) = ^CallSideEffect : ~m2216_14 +# 2216| m2216_19(unknown) = Chi : total:m2216_14, partial:m2216_18 +# 2216| v2216_20(void) = ^IndirectReadSideEffect[-1] : &:r2216_15, m2216_8 +# 2216| m2216_21(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2216_15 +# 2216| m2216_22(ClassWithDestructor) = Chi : total:m2216_8, partial:m2216_21 +# 2216| r2216_23(glval &>) = VariableAddress[(__range)] : +# 2216| r2216_24(glval>) = VariableAddress[ys] : +# 2216| r2216_25(vector &) = CopyValue : r2216_24 +# 2216| m2216_26(vector &) = Store[(__range)] : &:r2216_23, r2216_25 +# 2216| r2216_27(glval>) = VariableAddress[(__begin)] : +# 2216| r2216_28(glval &>) = VariableAddress[(__range)] : +# 2216| r2216_29(vector &) = Load[(__range)] : &:r2216_28, m2216_26 +#-----| r0_1(glval>) = CopyValue : r2216_29 #-----| r0_2(glval>) = Convert : r0_1 -# 2215| r2215_30(glval) = FunctionAddress[begin] : -# 2215| r2215_31(iterator) = Call[begin] : func:r2215_30, this:r0_2 -#-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m2215_19 -# 2215| m2215_32(iterator) = Store[(__begin)] : &:r2215_27, r2215_31 -# 2215| r2215_33(glval>) = VariableAddress[(__end)] : -# 2215| r2215_34(glval &>) = VariableAddress[(__range)] : -# 2215| r2215_35(vector &) = Load[(__range)] : &:r2215_34, m2215_26 -#-----| r0_4(glval>) = CopyValue : r2215_35 +# 2216| r2216_30(glval) = FunctionAddress[begin] : +# 2216| r2216_31(iterator) = Call[begin] : func:r2216_30, this:r0_2 +#-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m2216_19 +# 2216| m2216_32(iterator) = Store[(__begin)] : &:r2216_27, r2216_31 +# 2216| r2216_33(glval>) = VariableAddress[(__end)] : +# 2216| r2216_34(glval &>) = VariableAddress[(__range)] : +# 2216| r2216_35(vector &) = Load[(__range)] : &:r2216_34, m2216_26 +#-----| r0_4(glval>) = CopyValue : r2216_35 #-----| r0_5(glval>) = Convert : r0_4 -# 2215| r2215_36(glval) = FunctionAddress[end] : -# 2215| r2215_37(iterator) = Call[end] : func:r2215_36, this:r0_5 -#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m2215_19 -# 2215| m2215_38(iterator) = Store[(__end)] : &:r2215_33, r2215_37 -# 2215| m2215_39(unknown) = Chi : total:m2215_19, partial:m2215_38 +# 2216| r2216_36(glval) = FunctionAddress[end] : +# 2216| r2216_37(iterator) = Call[end] : func:r2216_36, this:r0_5 +#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m2216_19 +# 2216| m2216_38(iterator) = Store[(__end)] : &:r2216_33, r2216_37 +# 2216| m2216_39(unknown) = Chi : total:m2216_19, partial:m2216_38 #-----| Goto -> Block 8 -# 2215| Block 8 -# 2215| m2215_40(iterator) = Phi : from 7:m2215_32, from 9:m2215_64 -# 2215| m2215_41(unknown) = Phi : from 7:~m2215_39, from 9:~m2215_69 -# 2215| r2215_42(glval>) = VariableAddress[(__begin)] : -#-----| r0_7(glval>) = Convert : r2215_42 -# 2215| r2215_43(glval) = FunctionAddress[operator!=] : +# 2216| Block 8 +# 2216| m2216_40(iterator) = Phi : from 7:m2216_32, from 9:m2216_64 +# 2216| m2216_41(unknown) = Phi : from 7:~m2216_39, from 9:~m2216_69 +# 2216| r2216_42(glval>) = VariableAddress[(__begin)] : +#-----| r0_7(glval>) = Convert : r2216_42 +# 2216| r2216_43(glval) = FunctionAddress[operator!=] : #-----| r0_8(glval>) = VariableAddress[#temp0:0] : #-----| m0_9(iterator) = Uninitialized[#temp0:0] : &:r0_8 -#-----| m0_10(unknown) = Chi : total:m2215_41, partial:m0_9 -# 2215| r2215_44(glval) = FunctionAddress[iterator] : -# 2215| r2215_45(glval>) = VariableAddress[(__end)] : -#-----| r0_11(glval>) = Convert : r2215_45 +#-----| m0_10(unknown) = Chi : total:m2216_41, partial:m0_9 +# 2216| r2216_44(glval) = FunctionAddress[iterator] : +# 2216| r2216_45(glval>) = VariableAddress[(__end)] : +#-----| r0_11(glval>) = Convert : r2216_45 #-----| r0_12(iterator &) = CopyValue : r0_11 -# 2215| v2215_46(void) = Call[iterator] : func:r2215_44, this:r0_8, 0:r0_12 -# 2215| m2215_47(unknown) = ^CallSideEffect : ~m0_10 -# 2215| m2215_48(unknown) = Chi : total:m0_10, partial:m2215_47 -#-----| v0_13(void) = ^BufferReadSideEffect[0] : &:r0_12, ~m2215_48 -# 2215| m2215_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 -# 2215| m2215_50(unknown) = Chi : total:m2215_48, partial:m2215_49 -#-----| r0_14(iterator) = Load[#temp0:0] : &:r0_8, ~m2215_50 -# 2215| r2215_51(bool) = Call[operator!=] : func:r2215_43, this:r0_7, 0:r0_14 -#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_7, m2215_40 -# 2215| v2215_52(void) = ConditionalBranch : r2215_51 +# 2216| v2216_46(void) = Call[iterator] : func:r2216_44, this:r0_8, 0:r0_12 +# 2216| m2216_47(unknown) = ^CallSideEffect : ~m0_10 +# 2216| m2216_48(unknown) = Chi : total:m0_10, partial:m2216_47 +#-----| v0_13(void) = ^BufferReadSideEffect[0] : &:r0_12, ~m2216_48 +# 2216| m2216_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 +# 2216| m2216_50(unknown) = Chi : total:m2216_48, partial:m2216_49 +#-----| r0_14(iterator) = Load[#temp0:0] : &:r0_8, ~m2216_50 +# 2216| r2216_51(bool) = Call[operator!=] : func:r2216_43, this:r0_7, 0:r0_14 +#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_7, m2216_40 +# 2216| v2216_52(void) = ConditionalBranch : r2216_51 #-----| False -> Block 10 #-----| True -> Block 9 -# 2215| Block 9 -# 2215| r2215_53(glval) = VariableAddress[y] : -# 2215| r2215_54(glval>) = VariableAddress[(__begin)] : -#-----| r0_16(glval>) = Convert : r2215_54 -# 2215| r2215_55(glval) = FunctionAddress[operator*] : -# 2215| r2215_56(ClassWithDestructor &) = Call[operator*] : func:r2215_55, this:r0_16 -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, m2215_40 -# 2215| r2215_57(ClassWithDestructor) = Load[?] : &:r2215_56, ~m2215_50 -# 2215| m2215_58(ClassWithDestructor) = Store[y] : &:r2215_53, r2215_57 -# 2216| r2216_1(glval) = VariableAddress[y] : -# 2216| r2216_2(glval) = FunctionAddress[set_x] : -# 2216| r2216_3(char) = Constant[97] : -# 2216| v2216_4(void) = Call[set_x] : func:r2216_2, this:r2216_1, 0:r2216_3 -# 2216| m2216_5(unknown) = ^CallSideEffect : ~m2215_50 -# 2216| m2216_6(unknown) = Chi : total:m2215_50, partial:m2216_5 -# 2216| v2216_7(void) = ^IndirectReadSideEffect[-1] : &:r2216_1, m2215_58 -# 2216| m2216_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2216_1 -# 2216| m2216_9(ClassWithDestructor) = Chi : total:m2215_58, partial:m2216_8 -# 2215| r2215_59(glval>) = VariableAddress[(__begin)] : -# 2215| r2215_60(glval) = FunctionAddress[operator++] : -# 2215| r2215_61(iterator &) = Call[operator++] : func:r2215_60, this:r2215_59 -# 2215| v2215_62(void) = ^IndirectReadSideEffect[-1] : &:r2215_59, m2215_40 -# 2215| m2215_63(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2215_59 -# 2215| m2215_64(iterator) = Chi : total:m2215_40, partial:m2215_63 -# 2215| r2215_65(glval) = VariableAddress[y] : -# 2215| r2215_66(glval) = FunctionAddress[~ClassWithDestructor] : -# 2215| v2215_67(void) = Call[~ClassWithDestructor] : func:r2215_66, this:r2215_65 -# 2215| m2215_68(unknown) = ^CallSideEffect : ~m2216_6 -# 2215| m2215_69(unknown) = Chi : total:m2216_6, partial:m2215_68 -# 2215| v2215_70(void) = ^IndirectReadSideEffect[-1] : &:r2215_65, m2216_9 -# 2215| m2215_71(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2215_65 -# 2215| m2215_72(ClassWithDestructor) = Chi : total:m2216_9, partial:m2215_71 -# 2215| r2215_73(glval>) = CopyValue : r2215_61 +# 2216| Block 9 +# 2216| r2216_53(glval) = VariableAddress[y] : +# 2216| r2216_54(glval>) = VariableAddress[(__begin)] : +#-----| r0_16(glval>) = Convert : r2216_54 +# 2216| r2216_55(glval) = FunctionAddress[operator*] : +# 2216| r2216_56(ClassWithDestructor &) = Call[operator*] : func:r2216_55, this:r0_16 +#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, m2216_40 +# 2216| r2216_57(ClassWithDestructor) = Load[?] : &:r2216_56, ~m2216_50 +# 2216| m2216_58(ClassWithDestructor) = Store[y] : &:r2216_53, r2216_57 +# 2217| r2217_1(glval) = VariableAddress[y] : +# 2217| r2217_2(glval) = FunctionAddress[set_x] : +# 2217| r2217_3(char) = Constant[97] : +# 2217| v2217_4(void) = Call[set_x] : func:r2217_2, this:r2217_1, 0:r2217_3 +# 2217| m2217_5(unknown) = ^CallSideEffect : ~m2216_50 +# 2217| m2217_6(unknown) = Chi : total:m2216_50, partial:m2217_5 +# 2217| v2217_7(void) = ^IndirectReadSideEffect[-1] : &:r2217_1, m2216_58 +# 2217| m2217_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2217_1 +# 2217| m2217_9(ClassWithDestructor) = Chi : total:m2216_58, partial:m2217_8 +# 2216| r2216_59(glval>) = VariableAddress[(__begin)] : +# 2216| r2216_60(glval) = FunctionAddress[operator++] : +# 2216| r2216_61(iterator &) = Call[operator++] : func:r2216_60, this:r2216_59 +# 2216| v2216_62(void) = ^IndirectReadSideEffect[-1] : &:r2216_59, m2216_40 +# 2216| m2216_63(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2216_59 +# 2216| m2216_64(iterator) = Chi : total:m2216_40, partial:m2216_63 +# 2216| r2216_65(glval) = VariableAddress[y] : +# 2216| r2216_66(glval) = FunctionAddress[~ClassWithDestructor] : +# 2216| v2216_67(void) = Call[~ClassWithDestructor] : func:r2216_66, this:r2216_65 +# 2216| m2216_68(unknown) = ^CallSideEffect : ~m2217_6 +# 2216| m2216_69(unknown) = Chi : total:m2217_6, partial:m2216_68 +# 2216| v2216_70(void) = ^IndirectReadSideEffect[-1] : &:r2216_65, m2217_9 +# 2216| m2216_71(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2216_65 +# 2216| m2216_72(ClassWithDestructor) = Chi : total:m2217_9, partial:m2216_71 +# 2216| r2216_73(glval>) = CopyValue : r2216_61 #-----| Goto (back edge) -> Block 8 -# 2215| Block 10 -# 2215| r2215_74(glval>) = VariableAddress[ys] : -# 2215| r2215_75(glval) = FunctionAddress[~vector] : -# 2215| v2215_76(void) = Call[~vector] : func:r2215_75, this:r2215_74 -# 2215| m2215_77(unknown) = ^CallSideEffect : ~m2215_50 -# 2215| m2215_78(unknown) = Chi : total:m2215_50, partial:m2215_77 -# 2215| v2215_79(void) = ^IndirectReadSideEffect[-1] : &:r2215_74, ~m2215_78 -# 2215| m2215_80(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2215_74 -# 2215| m2215_81(unknown) = Chi : total:m2215_78, partial:m2215_80 -# 2218| r2218_1(glval>) = VariableAddress[ys] : -# 2218| m2218_2(vector) = Uninitialized[ys] : &:r2218_1 -# 2218| m2218_3(unknown) = Chi : total:m2215_81, partial:m2218_2 -# 2218| r2218_4(glval) = FunctionAddress[vector] : -# 2218| r2218_5(glval) = VariableAddress[#temp2218:45] : -# 2218| r2218_6(glval) = VariableAddress[x] : -# 2218| r2218_7(ClassWithDestructor) = Load[x] : &:r2218_6, m2214_8 -# 2218| m2218_8(ClassWithDestructor) = Store[#temp2218:45] : &:r2218_5, r2218_7 -# 2218| r2218_9(ClassWithDestructor) = Load[#temp2218:45] : &:r2218_5, m2218_8 -# 2218| v2218_10(void) = Call[vector] : func:r2218_4, this:r2218_1, 0:r2218_9 -# 2218| m2218_11(unknown) = ^CallSideEffect : ~m2218_3 -# 2218| m2218_12(unknown) = Chi : total:m2218_3, partial:m2218_11 -# 2218| m2218_13(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2218_1 -# 2218| m2218_14(unknown) = Chi : total:m2218_12, partial:m2218_13 -# 2218| r2218_15(glval) = CopyValue : r2218_5 -# 2218| r2218_16(glval) = FunctionAddress[~ClassWithDestructor] : -# 2218| v2218_17(void) = Call[~ClassWithDestructor] : func:r2218_16, this:r2218_15 -# 2218| m2218_18(unknown) = ^CallSideEffect : ~m2218_14 -# 2218| m2218_19(unknown) = Chi : total:m2218_14, partial:m2218_18 -# 2218| v2218_20(void) = ^IndirectReadSideEffect[-1] : &:r2218_15, m2218_8 -# 2218| m2218_21(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2218_15 -# 2218| m2218_22(ClassWithDestructor) = Chi : total:m2218_8, partial:m2218_21 -# 2218| r2218_23(glval &>) = VariableAddress[(__range)] : -# 2218| r2218_24(glval>) = VariableAddress[ys] : -# 2218| r2218_25(vector &) = CopyValue : r2218_24 -# 2218| m2218_26(vector &) = Store[(__range)] : &:r2218_23, r2218_25 -# 2218| r2218_27(glval>) = VariableAddress[(__begin)] : -# 2218| r2218_28(glval &>) = VariableAddress[(__range)] : -# 2218| r2218_29(vector &) = Load[(__range)] : &:r2218_28, m2218_26 -#-----| r0_18(glval>) = CopyValue : r2218_29 +# 2216| Block 10 +# 2216| r2216_74(glval>) = VariableAddress[ys] : +# 2216| r2216_75(glval) = FunctionAddress[~vector] : +# 2216| v2216_76(void) = Call[~vector] : func:r2216_75, this:r2216_74 +# 2216| m2216_77(unknown) = ^CallSideEffect : ~m2216_50 +# 2216| m2216_78(unknown) = Chi : total:m2216_50, partial:m2216_77 +# 2216| v2216_79(void) = ^IndirectReadSideEffect[-1] : &:r2216_74, ~m2216_78 +# 2216| m2216_80(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2216_74 +# 2216| m2216_81(unknown) = Chi : total:m2216_78, partial:m2216_80 +# 2219| r2219_1(glval>) = VariableAddress[ys] : +# 2219| m2219_2(vector) = Uninitialized[ys] : &:r2219_1 +# 2219| m2219_3(unknown) = Chi : total:m2216_81, partial:m2219_2 +# 2219| r2219_4(glval) = FunctionAddress[vector] : +# 2219| r2219_5(glval) = VariableAddress[#temp2219:45] : +# 2219| r2219_6(glval) = VariableAddress[x] : +# 2219| r2219_7(ClassWithDestructor) = Load[x] : &:r2219_6, m2215_8 +# 2219| m2219_8(ClassWithDestructor) = Store[#temp2219:45] : &:r2219_5, r2219_7 +# 2219| r2219_9(ClassWithDestructor) = Load[#temp2219:45] : &:r2219_5, m2219_8 +# 2219| v2219_10(void) = Call[vector] : func:r2219_4, this:r2219_1, 0:r2219_9 +# 2219| m2219_11(unknown) = ^CallSideEffect : ~m2219_3 +# 2219| m2219_12(unknown) = Chi : total:m2219_3, partial:m2219_11 +# 2219| m2219_13(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2219_1 +# 2219| m2219_14(unknown) = Chi : total:m2219_12, partial:m2219_13 +# 2219| r2219_15(glval) = CopyValue : r2219_5 +# 2219| r2219_16(glval) = FunctionAddress[~ClassWithDestructor] : +# 2219| v2219_17(void) = Call[~ClassWithDestructor] : func:r2219_16, this:r2219_15 +# 2219| m2219_18(unknown) = ^CallSideEffect : ~m2219_14 +# 2219| m2219_19(unknown) = Chi : total:m2219_14, partial:m2219_18 +# 2219| v2219_20(void) = ^IndirectReadSideEffect[-1] : &:r2219_15, m2219_8 +# 2219| m2219_21(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2219_15 +# 2219| m2219_22(ClassWithDestructor) = Chi : total:m2219_8, partial:m2219_21 +# 2219| r2219_23(glval &>) = VariableAddress[(__range)] : +# 2219| r2219_24(glval>) = VariableAddress[ys] : +# 2219| r2219_25(vector &) = CopyValue : r2219_24 +# 2219| m2219_26(vector &) = Store[(__range)] : &:r2219_23, r2219_25 +# 2219| r2219_27(glval>) = VariableAddress[(__begin)] : +# 2219| r2219_28(glval &>) = VariableAddress[(__range)] : +# 2219| r2219_29(vector &) = Load[(__range)] : &:r2219_28, m2219_26 +#-----| r0_18(glval>) = CopyValue : r2219_29 #-----| r0_19(glval>) = Convert : r0_18 -# 2218| r2218_30(glval) = FunctionAddress[begin] : -# 2218| r2218_31(iterator) = Call[begin] : func:r2218_30, this:r0_19 -#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m2218_19 -# 2218| m2218_32(iterator) = Store[(__begin)] : &:r2218_27, r2218_31 -# 2218| r2218_33(glval>) = VariableAddress[(__end)] : -# 2218| r2218_34(glval &>) = VariableAddress[(__range)] : -# 2218| r2218_35(vector &) = Load[(__range)] : &:r2218_34, m2218_26 -#-----| r0_21(glval>) = CopyValue : r2218_35 +# 2219| r2219_30(glval) = FunctionAddress[begin] : +# 2219| r2219_31(iterator) = Call[begin] : func:r2219_30, this:r0_19 +#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m2219_19 +# 2219| m2219_32(iterator) = Store[(__begin)] : &:r2219_27, r2219_31 +# 2219| r2219_33(glval>) = VariableAddress[(__end)] : +# 2219| r2219_34(glval &>) = VariableAddress[(__range)] : +# 2219| r2219_35(vector &) = Load[(__range)] : &:r2219_34, m2219_26 +#-----| r0_21(glval>) = CopyValue : r2219_35 #-----| r0_22(glval>) = Convert : r0_21 -# 2218| r2218_36(glval) = FunctionAddress[end] : -# 2218| r2218_37(iterator) = Call[end] : func:r2218_36, this:r0_22 -#-----| v0_23(void) = ^IndirectReadSideEffect[-1] : &:r0_22, ~m2218_19 -# 2218| m2218_38(iterator) = Store[(__end)] : &:r2218_33, r2218_37 -# 2218| m2218_39(unknown) = Chi : total:m2218_19, partial:m2218_38 +# 2219| r2219_36(glval) = FunctionAddress[end] : +# 2219| r2219_37(iterator) = Call[end] : func:r2219_36, this:r0_22 +#-----| v0_23(void) = ^IndirectReadSideEffect[-1] : &:r0_22, ~m2219_19 +# 2219| m2219_38(iterator) = Store[(__end)] : &:r2219_33, r2219_37 +# 2219| m2219_39(unknown) = Chi : total:m2219_19, partial:m2219_38 #-----| Goto -> Block 11 -# 2218| Block 11 -# 2218| m2218_40(iterator) = Phi : from 10:m2218_32, from 12:m2218_58 -# 2218| m2218_41(unknown) = Phi : from 10:~m2218_39, from 12:~m2218_63 -# 2218| r2218_42(glval>) = VariableAddress[(__begin)] : -#-----| r0_24(glval>) = Convert : r2218_42 -# 2218| r2218_43(glval) = FunctionAddress[operator!=] : +# 2219| Block 11 +# 2219| m2219_40(iterator) = Phi : from 10:m2219_32, from 12:m2219_58 +# 2219| m2219_41(unknown) = Phi : from 10:~m2219_39, from 12:~m2219_63 +# 2219| r2219_42(glval>) = VariableAddress[(__begin)] : +#-----| r0_24(glval>) = Convert : r2219_42 +# 2219| r2219_43(glval) = FunctionAddress[operator!=] : #-----| r0_25(glval>) = VariableAddress[#temp0:0] : #-----| m0_26(iterator) = Uninitialized[#temp0:0] : &:r0_25 -#-----| m0_27(unknown) = Chi : total:m2218_41, partial:m0_26 -# 2218| r2218_44(glval) = FunctionAddress[iterator] : -# 2218| r2218_45(glval>) = VariableAddress[(__end)] : -#-----| r0_28(glval>) = Convert : r2218_45 +#-----| m0_27(unknown) = Chi : total:m2219_41, partial:m0_26 +# 2219| r2219_44(glval) = FunctionAddress[iterator] : +# 2219| r2219_45(glval>) = VariableAddress[(__end)] : +#-----| r0_28(glval>) = Convert : r2219_45 #-----| r0_29(iterator &) = CopyValue : r0_28 -# 2218| v2218_46(void) = Call[iterator] : func:r2218_44, this:r0_25, 0:r0_29 -# 2218| m2218_47(unknown) = ^CallSideEffect : ~m0_27 -# 2218| m2218_48(unknown) = Chi : total:m0_27, partial:m2218_47 -#-----| v0_30(void) = ^BufferReadSideEffect[0] : &:r0_29, ~m2218_48 -# 2218| m2218_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_25 -# 2218| m2218_50(unknown) = Chi : total:m2218_48, partial:m2218_49 -#-----| r0_31(iterator) = Load[#temp0:0] : &:r0_25, ~m2218_50 -# 2218| r2218_51(bool) = Call[operator!=] : func:r2218_43, this:r0_24, 0:r0_31 -#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_24, m2218_40 -# 2218| v2218_52(void) = ConditionalBranch : r2218_51 +# 2219| v2219_46(void) = Call[iterator] : func:r2219_44, this:r0_25, 0:r0_29 +# 2219| m2219_47(unknown) = ^CallSideEffect : ~m0_27 +# 2219| m2219_48(unknown) = Chi : total:m0_27, partial:m2219_47 +#-----| v0_30(void) = ^BufferReadSideEffect[0] : &:r0_29, ~m2219_48 +# 2219| m2219_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_25 +# 2219| m2219_50(unknown) = Chi : total:m2219_48, partial:m2219_49 +#-----| r0_31(iterator) = Load[#temp0:0] : &:r0_25, ~m2219_50 +# 2219| r2219_51(bool) = Call[operator!=] : func:r2219_43, this:r0_24, 0:r0_31 +#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_24, m2219_40 +# 2219| v2219_52(void) = ConditionalBranch : r2219_51 #-----| False -> Block 15 #-----| True -> Block 13 -# 2218| Block 12 -# 2218| r2218_53(glval>) = VariableAddress[(__begin)] : -# 2218| r2218_54(glval) = FunctionAddress[operator++] : -# 2218| r2218_55(iterator &) = Call[operator++] : func:r2218_54, this:r2218_53 -# 2218| v2218_56(void) = ^IndirectReadSideEffect[-1] : &:r2218_53, m2218_40 -# 2218| m2218_57(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2218_53 -# 2218| m2218_58(iterator) = Chi : total:m2218_40, partial:m2218_57 -# 2218| r2218_59(glval) = VariableAddress[y] : -# 2218| r2218_60(glval) = FunctionAddress[~ClassWithDestructor] : -# 2218| v2218_61(void) = Call[~ClassWithDestructor] : func:r2218_60, this:r2218_59 -# 2218| m2218_62(unknown) = ^CallSideEffect : ~m2220_5 -# 2218| m2218_63(unknown) = Chi : total:m2220_5, partial:m2218_62 -# 2218| v2218_64(void) = ^IndirectReadSideEffect[-1] : &:r2218_59, m2220_8 -# 2218| m2218_65(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2218_59 -# 2218| m2218_66(ClassWithDestructor) = Chi : total:m2220_8, partial:m2218_65 -# 2218| r2218_67(glval>) = CopyValue : r2218_55 +# 2219| Block 12 +# 2219| r2219_53(glval>) = VariableAddress[(__begin)] : +# 2219| r2219_54(glval) = FunctionAddress[operator++] : +# 2219| r2219_55(iterator &) = Call[operator++] : func:r2219_54, this:r2219_53 +# 2219| v2219_56(void) = ^IndirectReadSideEffect[-1] : &:r2219_53, m2219_40 +# 2219| m2219_57(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2219_53 +# 2219| m2219_58(iterator) = Chi : total:m2219_40, partial:m2219_57 +# 2219| r2219_59(glval) = VariableAddress[y] : +# 2219| r2219_60(glval) = FunctionAddress[~ClassWithDestructor] : +# 2219| v2219_61(void) = Call[~ClassWithDestructor] : func:r2219_60, this:r2219_59 +# 2219| m2219_62(unknown) = ^CallSideEffect : ~m2221_5 +# 2219| m2219_63(unknown) = Chi : total:m2221_5, partial:m2219_62 +# 2219| v2219_64(void) = ^IndirectReadSideEffect[-1] : &:r2219_59, m2221_8 +# 2219| m2219_65(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2219_59 +# 2219| m2219_66(ClassWithDestructor) = Chi : total:m2221_8, partial:m2219_65 +# 2219| r2219_67(glval>) = CopyValue : r2219_55 #-----| Goto (back edge) -> Block 11 -# 2218| Block 13 -# 2218| r2218_68(glval) = VariableAddress[y] : -# 2218| r2218_69(glval>) = VariableAddress[(__begin)] : -#-----| r0_33(glval>) = Convert : r2218_69 -# 2218| r2218_70(glval) = FunctionAddress[operator*] : -# 2218| r2218_71(ClassWithDestructor &) = Call[operator*] : func:r2218_70, this:r0_33 -#-----| v0_34(void) = ^IndirectReadSideEffect[-1] : &:r0_33, m2218_40 -# 2218| r2218_72(ClassWithDestructor) = Load[?] : &:r2218_71, ~m2218_50 -# 2218| m2218_73(ClassWithDestructor) = Store[y] : &:r2218_68, r2218_72 -# 2219| r2219_1(glval) = VariableAddress[y] : -# 2219| r2219_2(glval) = FunctionAddress[set_x] : -# 2219| r2219_3(char) = Constant[97] : -# 2219| v2219_4(void) = Call[set_x] : func:r2219_2, this:r2219_1, 0:r2219_3 -# 2219| m2219_5(unknown) = ^CallSideEffect : ~m2218_50 -# 2219| m2219_6(unknown) = Chi : total:m2218_50, partial:m2219_5 -# 2219| v2219_7(void) = ^IndirectReadSideEffect[-1] : &:r2219_1, m2218_73 -# 2219| m2219_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2219_1 -# 2219| m2219_9(ClassWithDestructor) = Chi : total:m2218_73, partial:m2219_8 +# 2219| Block 13 +# 2219| r2219_68(glval) = VariableAddress[y] : +# 2219| r2219_69(glval>) = VariableAddress[(__begin)] : +#-----| r0_33(glval>) = Convert : r2219_69 +# 2219| r2219_70(glval) = FunctionAddress[operator*] : +# 2219| r2219_71(ClassWithDestructor &) = Call[operator*] : func:r2219_70, this:r0_33 +#-----| v0_34(void) = ^IndirectReadSideEffect[-1] : &:r0_33, m2219_40 +# 2219| r2219_72(ClassWithDestructor) = Load[?] : &:r2219_71, ~m2219_50 +# 2219| m2219_73(ClassWithDestructor) = Store[y] : &:r2219_68, r2219_72 # 2220| r2220_1(glval) = VariableAddress[y] : -# 2220| r2220_2(glval) = FunctionAddress[get_x] : -# 2220| r2220_3(char) = Call[get_x] : func:r2220_2, this:r2220_1 -# 2220| m2220_4(unknown) = ^CallSideEffect : ~m2219_6 -# 2220| m2220_5(unknown) = Chi : total:m2219_6, partial:m2220_4 -# 2220| v2220_6(void) = ^IndirectReadSideEffect[-1] : &:r2220_1, m2219_9 -# 2220| m2220_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2220_1 -# 2220| m2220_8(ClassWithDestructor) = Chi : total:m2219_9, partial:m2220_7 -# 2220| r2220_9(int) = Convert : r2220_3 -# 2220| r2220_10(int) = Constant[98] : -# 2220| r2220_11(bool) = CompareEQ : r2220_9, r2220_10 -# 2220| v2220_12(void) = ConditionalBranch : r2220_11 +# 2220| r2220_2(glval) = FunctionAddress[set_x] : +# 2220| r2220_3(char) = Constant[97] : +# 2220| v2220_4(void) = Call[set_x] : func:r2220_2, this:r2220_1, 0:r2220_3 +# 2220| m2220_5(unknown) = ^CallSideEffect : ~m2219_50 +# 2220| m2220_6(unknown) = Chi : total:m2219_50, partial:m2220_5 +# 2220| v2220_7(void) = ^IndirectReadSideEffect[-1] : &:r2220_1, m2219_73 +# 2220| m2220_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2220_1 +# 2220| m2220_9(ClassWithDestructor) = Chi : total:m2219_73, partial:m2220_8 +# 2221| r2221_1(glval) = VariableAddress[y] : +# 2221| r2221_2(glval) = FunctionAddress[get_x] : +# 2221| r2221_3(char) = Call[get_x] : func:r2221_2, this:r2221_1 +# 2221| m2221_4(unknown) = ^CallSideEffect : ~m2220_6 +# 2221| m2221_5(unknown) = Chi : total:m2220_6, partial:m2221_4 +# 2221| v2221_6(void) = ^IndirectReadSideEffect[-1] : &:r2221_1, m2220_9 +# 2221| m2221_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2221_1 +# 2221| m2221_8(ClassWithDestructor) = Chi : total:m2220_9, partial:m2221_7 +# 2221| r2221_9(int) = Convert : r2221_3 +# 2221| r2221_10(int) = Constant[98] : +# 2221| r2221_11(bool) = CompareEQ : r2221_9, r2221_10 +# 2221| v2221_12(void) = ConditionalBranch : r2221_11 #-----| False -> Block 12 #-----| True -> Block 14 -# 2221| Block 14 -# 2221| v2221_1(void) = NoOp : -# 2218| r2218_74(glval) = VariableAddress[y] : -# 2218| r2218_75(glval) = FunctionAddress[~ClassWithDestructor] : -# 2218| v2218_76(void) = Call[~ClassWithDestructor] : func:r2218_75, this:r2218_74 -# 2218| m2218_77(unknown) = ^CallSideEffect : ~m2220_5 -# 2218| m2218_78(unknown) = Chi : total:m2220_5, partial:m2218_77 -# 2218| v2218_79(void) = ^IndirectReadSideEffect[-1] : &:r2218_74, m2220_8 -# 2218| m2218_80(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2218_74 -# 2218| m2218_81(ClassWithDestructor) = Chi : total:m2220_8, partial:m2218_80 -# 2218| r2218_82(glval>) = VariableAddress[ys] : -# 2218| r2218_83(glval) = FunctionAddress[~vector] : -# 2218| v2218_84(void) = Call[~vector] : func:r2218_83, this:r2218_82 -# 2218| m2218_85(unknown) = ^CallSideEffect : ~m2218_78 -# 2218| m2218_86(unknown) = Chi : total:m2218_78, partial:m2218_85 -# 2218| v2218_87(void) = ^IndirectReadSideEffect[-1] : &:r2218_82, ~m2218_86 -# 2218| m2218_88(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2218_82 -# 2218| m2218_89(unknown) = Chi : total:m2218_86, partial:m2218_88 -# 2233| r2233_1(glval) = VariableAddress[x] : -# 2233| r2233_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2233| v2233_3(void) = Call[~ClassWithDestructor] : func:r2233_2, this:r2233_1 -# 2233| m2233_4(unknown) = ^CallSideEffect : ~m2218_89 -# 2233| m2233_5(unknown) = Chi : total:m2218_89, partial:m2233_4 -# 2233| v2233_6(void) = ^IndirectReadSideEffect[-1] : &:r2233_1, m2214_8 -# 2233| m2233_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_1 -# 2233| m2233_8(ClassWithDestructor) = Chi : total:m2214_8, partial:m2233_7 +# 2222| Block 14 +# 2222| v2222_1(void) = NoOp : +# 2219| r2219_74(glval) = VariableAddress[y] : +# 2219| r2219_75(glval) = FunctionAddress[~ClassWithDestructor] : +# 2219| v2219_76(void) = Call[~ClassWithDestructor] : func:r2219_75, this:r2219_74 +# 2219| m2219_77(unknown) = ^CallSideEffect : ~m2221_5 +# 2219| m2219_78(unknown) = Chi : total:m2221_5, partial:m2219_77 +# 2219| v2219_79(void) = ^IndirectReadSideEffect[-1] : &:r2219_74, m2221_8 +# 2219| m2219_80(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2219_74 +# 2219| m2219_81(ClassWithDestructor) = Chi : total:m2221_8, partial:m2219_80 +# 2219| r2219_82(glval>) = VariableAddress[ys] : +# 2219| r2219_83(glval) = FunctionAddress[~vector] : +# 2219| v2219_84(void) = Call[~vector] : func:r2219_83, this:r2219_82 +# 2219| m2219_85(unknown) = ^CallSideEffect : ~m2219_78 +# 2219| m2219_86(unknown) = Chi : total:m2219_78, partial:m2219_85 +# 2219| v2219_87(void) = ^IndirectReadSideEffect[-1] : &:r2219_82, ~m2219_86 +# 2219| m2219_88(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2219_82 +# 2219| m2219_89(unknown) = Chi : total:m2219_86, partial:m2219_88 +# 2234| r2234_1(glval) = VariableAddress[x] : +# 2234| r2234_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2234| v2234_3(void) = Call[~ClassWithDestructor] : func:r2234_2, this:r2234_1 +# 2234| m2234_4(unknown) = ^CallSideEffect : ~m2219_89 +# 2234| m2234_5(unknown) = Chi : total:m2219_89, partial:m2234_4 +# 2234| v2234_6(void) = ^IndirectReadSideEffect[-1] : &:r2234_1, m2215_8 +# 2234| m2234_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2234_1 +# 2234| m2234_8(ClassWithDestructor) = Chi : total:m2215_8, partial:m2234_7 #-----| Goto -> Block 1 -# 2218| Block 15 -# 2218| r2218_90(glval>) = VariableAddress[ys] : -# 2218| r2218_91(glval) = FunctionAddress[~vector] : -# 2218| v2218_92(void) = Call[~vector] : func:r2218_91, this:r2218_90 -# 2218| m2218_93(unknown) = ^CallSideEffect : ~m2218_50 -# 2218| m2218_94(unknown) = Chi : total:m2218_50, partial:m2218_93 -# 2218| v2218_95(void) = ^IndirectReadSideEffect[-1] : &:r2218_90, ~m2218_94 -# 2218| m2218_96(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2218_90 -# 2218| m2218_97(unknown) = Chi : total:m2218_94, partial:m2218_96 -# 2224| r2224_1(glval>) = VariableAddress[ys] : -# 2224| m2224_2(vector) = Uninitialized[ys] : &:r2224_1 -# 2224| m2224_3(unknown) = Chi : total:m2218_97, partial:m2224_2 -# 2224| r2224_4(glval) = FunctionAddress[vector] : -# 2224| r2224_5(int) = Constant[1] : -# 2224| v2224_6(void) = Call[vector] : func:r2224_4, this:r2224_1, 0:r2224_5 -# 2224| m2224_7(unknown) = ^CallSideEffect : ~m2224_3 -# 2224| m2224_8(unknown) = Chi : total:m2224_3, partial:m2224_7 -# 2224| m2224_9(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2224_1 -# 2224| m2224_10(unknown) = Chi : total:m2224_8, partial:m2224_9 -# 2224| r2224_11(glval &>) = VariableAddress[(__range)] : -# 2224| r2224_12(glval>) = VariableAddress[ys] : -# 2224| r2224_13(vector &) = CopyValue : r2224_12 -# 2224| m2224_14(vector &) = Store[(__range)] : &:r2224_11, r2224_13 -# 2224| r2224_15(glval>) = VariableAddress[(__begin)] : -# 2224| r2224_16(glval &>) = VariableAddress[(__range)] : -# 2224| r2224_17(vector &) = Load[(__range)] : &:r2224_16, m2224_14 -#-----| r0_35(glval>) = CopyValue : r2224_17 +# 2219| Block 15 +# 2219| r2219_90(glval>) = VariableAddress[ys] : +# 2219| r2219_91(glval) = FunctionAddress[~vector] : +# 2219| v2219_92(void) = Call[~vector] : func:r2219_91, this:r2219_90 +# 2219| m2219_93(unknown) = ^CallSideEffect : ~m2219_50 +# 2219| m2219_94(unknown) = Chi : total:m2219_50, partial:m2219_93 +# 2219| v2219_95(void) = ^IndirectReadSideEffect[-1] : &:r2219_90, ~m2219_94 +# 2219| m2219_96(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2219_90 +# 2219| m2219_97(unknown) = Chi : total:m2219_94, partial:m2219_96 +# 2225| r2225_1(glval>) = VariableAddress[ys] : +# 2225| m2225_2(vector) = Uninitialized[ys] : &:r2225_1 +# 2225| m2225_3(unknown) = Chi : total:m2219_97, partial:m2225_2 +# 2225| r2225_4(glval) = FunctionAddress[vector] : +# 2225| r2225_5(int) = Constant[1] : +# 2225| v2225_6(void) = Call[vector] : func:r2225_4, this:r2225_1, 0:r2225_5 +# 2225| m2225_7(unknown) = ^CallSideEffect : ~m2225_3 +# 2225| m2225_8(unknown) = Chi : total:m2225_3, partial:m2225_7 +# 2225| m2225_9(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2225_1 +# 2225| m2225_10(unknown) = Chi : total:m2225_8, partial:m2225_9 +# 2225| r2225_11(glval &>) = VariableAddress[(__range)] : +# 2225| r2225_12(glval>) = VariableAddress[ys] : +# 2225| r2225_13(vector &) = CopyValue : r2225_12 +# 2225| m2225_14(vector &) = Store[(__range)] : &:r2225_11, r2225_13 +# 2225| r2225_15(glval>) = VariableAddress[(__begin)] : +# 2225| r2225_16(glval &>) = VariableAddress[(__range)] : +# 2225| r2225_17(vector &) = Load[(__range)] : &:r2225_16, m2225_14 +#-----| r0_35(glval>) = CopyValue : r2225_17 #-----| r0_36(glval>) = Convert : r0_35 -# 2224| r2224_18(glval) = FunctionAddress[begin] : -# 2224| r2224_19(iterator) = Call[begin] : func:r2224_18, this:r0_36 -#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m2224_10 -# 2224| m2224_20(iterator) = Store[(__begin)] : &:r2224_15, r2224_19 -# 2224| r2224_21(glval>) = VariableAddress[(__end)] : -# 2224| r2224_22(glval &>) = VariableAddress[(__range)] : -# 2224| r2224_23(vector &) = Load[(__range)] : &:r2224_22, m2224_14 -#-----| r0_38(glval>) = CopyValue : r2224_23 +# 2225| r2225_18(glval) = FunctionAddress[begin] : +# 2225| r2225_19(iterator) = Call[begin] : func:r2225_18, this:r0_36 +#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m2225_10 +# 2225| m2225_20(iterator) = Store[(__begin)] : &:r2225_15, r2225_19 +# 2225| r2225_21(glval>) = VariableAddress[(__end)] : +# 2225| r2225_22(glval &>) = VariableAddress[(__range)] : +# 2225| r2225_23(vector &) = Load[(__range)] : &:r2225_22, m2225_14 +#-----| r0_38(glval>) = CopyValue : r2225_23 #-----| r0_39(glval>) = Convert : r0_38 -# 2224| r2224_24(glval) = FunctionAddress[end] : -# 2224| r2224_25(iterator) = Call[end] : func:r2224_24, this:r0_39 -#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, ~m2224_10 -# 2224| m2224_26(iterator) = Store[(__end)] : &:r2224_21, r2224_25 -# 2224| m2224_27(unknown) = Chi : total:m2224_10, partial:m2224_26 +# 2225| r2225_24(glval) = FunctionAddress[end] : +# 2225| r2225_25(iterator) = Call[end] : func:r2225_24, this:r0_39 +#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, ~m2225_10 +# 2225| m2225_26(iterator) = Store[(__end)] : &:r2225_21, r2225_25 +# 2225| m2225_27(unknown) = Chi : total:m2225_10, partial:m2225_26 #-----| Goto -> Block 16 -# 2224| Block 16 -# 2224| m2224_28(iterator) = Phi : from 15:m2224_20, from 17:m2224_46 -# 2224| m2224_29(unknown) = Phi : from 15:~m2224_27, from 17:~m2224_38 -# 2224| r2224_30(glval>) = VariableAddress[(__begin)] : -#-----| r0_41(glval>) = Convert : r2224_30 -# 2224| r2224_31(glval) = FunctionAddress[operator!=] : +# 2225| Block 16 +# 2225| m2225_28(iterator) = Phi : from 15:m2225_20, from 17:m2225_46 +# 2225| m2225_29(unknown) = Phi : from 15:~m2225_27, from 17:~m2225_38 +# 2225| r2225_30(glval>) = VariableAddress[(__begin)] : +#-----| r0_41(glval>) = Convert : r2225_30 +# 2225| r2225_31(glval) = FunctionAddress[operator!=] : #-----| r0_42(glval>) = VariableAddress[#temp0:0] : #-----| m0_43(iterator) = Uninitialized[#temp0:0] : &:r0_42 -#-----| m0_44(unknown) = Chi : total:m2224_29, partial:m0_43 -# 2224| r2224_32(glval) = FunctionAddress[iterator] : -# 2224| r2224_33(glval>) = VariableAddress[(__end)] : -#-----| r0_45(glval>) = Convert : r2224_33 +#-----| m0_44(unknown) = Chi : total:m2225_29, partial:m0_43 +# 2225| r2225_32(glval) = FunctionAddress[iterator] : +# 2225| r2225_33(glval>) = VariableAddress[(__end)] : +#-----| r0_45(glval>) = Convert : r2225_33 #-----| r0_46(iterator &) = CopyValue : r0_45 -# 2224| v2224_34(void) = Call[iterator] : func:r2224_32, this:r0_42, 0:r0_46 -# 2224| m2224_35(unknown) = ^CallSideEffect : ~m0_44 -# 2224| m2224_36(unknown) = Chi : total:m0_44, partial:m2224_35 -#-----| v0_47(void) = ^BufferReadSideEffect[0] : &:r0_46, ~m2224_36 -# 2224| m2224_37(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_42 -# 2224| m2224_38(unknown) = Chi : total:m2224_36, partial:m2224_37 -#-----| r0_48(iterator) = Load[#temp0:0] : &:r0_42, ~m2224_38 -# 2224| r2224_39(bool) = Call[operator!=] : func:r2224_31, this:r0_41, 0:r0_48 -#-----| v0_49(void) = ^IndirectReadSideEffect[-1] : &:r0_41, m2224_28 -# 2224| v2224_40(void) = ConditionalBranch : r2224_39 +# 2225| v2225_34(void) = Call[iterator] : func:r2225_32, this:r0_42, 0:r0_46 +# 2225| m2225_35(unknown) = ^CallSideEffect : ~m0_44 +# 2225| m2225_36(unknown) = Chi : total:m0_44, partial:m2225_35 +#-----| v0_47(void) = ^BufferReadSideEffect[0] : &:r0_46, ~m2225_36 +# 2225| m2225_37(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_42 +# 2225| m2225_38(unknown) = Chi : total:m2225_36, partial:m2225_37 +#-----| r0_48(iterator) = Load[#temp0:0] : &:r0_42, ~m2225_38 +# 2225| r2225_39(bool) = Call[operator!=] : func:r2225_31, this:r0_41, 0:r0_48 +#-----| v0_49(void) = ^IndirectReadSideEffect[-1] : &:r0_41, m2225_28 +# 2225| v2225_40(void) = ConditionalBranch : r2225_39 #-----| False -> Block 20 #-----| True -> Block 18 -# 2224| Block 17 -# 2224| r2224_41(glval>) = VariableAddress[(__begin)] : -# 2224| r2224_42(glval) = FunctionAddress[operator++] : -# 2224| r2224_43(iterator &) = Call[operator++] : func:r2224_42, this:r2224_41 -# 2224| v2224_44(void) = ^IndirectReadSideEffect[-1] : &:r2224_41, m2224_28 -# 2224| m2224_45(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2224_41 -# 2224| m2224_46(iterator) = Chi : total:m2224_28, partial:m2224_45 -# 2224| r2224_47(glval>) = CopyValue : r2224_43 +# 2225| Block 17 +# 2225| r2225_41(glval>) = VariableAddress[(__begin)] : +# 2225| r2225_42(glval) = FunctionAddress[operator++] : +# 2225| r2225_43(iterator &) = Call[operator++] : func:r2225_42, this:r2225_41 +# 2225| v2225_44(void) = ^IndirectReadSideEffect[-1] : &:r2225_41, m2225_28 +# 2225| m2225_45(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2225_41 +# 2225| m2225_46(iterator) = Chi : total:m2225_28, partial:m2225_45 +# 2225| r2225_47(glval>) = CopyValue : r2225_43 #-----| Goto (back edge) -> Block 16 -# 2224| Block 18 -# 2224| r2224_48(glval) = VariableAddress[y] : -# 2224| r2224_49(glval>) = VariableAddress[(__begin)] : -#-----| r0_50(glval>) = Convert : r2224_49 -# 2224| r2224_50(glval) = FunctionAddress[operator*] : -# 2224| r2224_51(int &) = Call[operator*] : func:r2224_50, this:r0_50 -#-----| v0_51(void) = ^IndirectReadSideEffect[-1] : &:r0_50, m2224_28 -# 2224| r2224_52(int) = Load[?] : &:r2224_51, ~m2224_38 -# 2224| m2224_53(int) = Store[y] : &:r2224_48, r2224_52 -# 2225| r2225_1(glval) = VariableAddress[y] : -# 2225| r2225_2(int) = Load[y] : &:r2225_1, m2224_53 -# 2225| r2225_3(int) = Constant[1] : -# 2225| r2225_4(bool) = CompareEQ : r2225_2, r2225_3 -# 2225| v2225_5(void) = ConditionalBranch : r2225_4 +# 2225| Block 18 +# 2225| r2225_48(glval) = VariableAddress[y] : +# 2225| r2225_49(glval>) = VariableAddress[(__begin)] : +#-----| r0_50(glval>) = Convert : r2225_49 +# 2225| r2225_50(glval) = FunctionAddress[operator*] : +# 2225| r2225_51(int &) = Call[operator*] : func:r2225_50, this:r0_50 +#-----| v0_51(void) = ^IndirectReadSideEffect[-1] : &:r0_50, m2225_28 +# 2225| r2225_52(int) = Load[?] : &:r2225_51, ~m2225_38 +# 2225| m2225_53(int) = Store[y] : &:r2225_48, r2225_52 +# 2226| r2226_1(glval) = VariableAddress[y] : +# 2226| r2226_2(int) = Load[y] : &:r2226_1, m2225_53 +# 2226| r2226_3(int) = Constant[1] : +# 2226| r2226_4(bool) = CompareEQ : r2226_2, r2226_3 +# 2226| v2226_5(void) = ConditionalBranch : r2226_4 #-----| False -> Block 17 #-----| True -> Block 19 -# 2226| Block 19 -# 2226| v2226_1(void) = NoOp : -# 2224| r2224_54(glval>) = VariableAddress[ys] : -# 2224| r2224_55(glval) = FunctionAddress[~vector] : -# 2224| v2224_56(void) = Call[~vector] : func:r2224_55, this:r2224_54 -# 2224| m2224_57(unknown) = ^CallSideEffect : ~m2224_38 -# 2224| m2224_58(unknown) = Chi : total:m2224_38, partial:m2224_57 -# 2224| v2224_59(void) = ^IndirectReadSideEffect[-1] : &:r2224_54, ~m2224_58 -# 2224| m2224_60(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2224_54 -# 2224| m2224_61(unknown) = Chi : total:m2224_58, partial:m2224_60 -# 2233| r2233_9(glval) = VariableAddress[x] : -# 2233| r2233_10(glval) = FunctionAddress[~ClassWithDestructor] : -# 2233| v2233_11(void) = Call[~ClassWithDestructor] : func:r2233_10, this:r2233_9 -# 2233| m2233_12(unknown) = ^CallSideEffect : ~m2224_61 -# 2233| m2233_13(unknown) = Chi : total:m2224_61, partial:m2233_12 -# 2233| v2233_14(void) = ^IndirectReadSideEffect[-1] : &:r2233_9, m2214_8 -# 2233| m2233_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_9 -# 2233| m2233_16(ClassWithDestructor) = Chi : total:m2214_8, partial:m2233_15 +# 2227| Block 19 +# 2227| v2227_1(void) = NoOp : +# 2225| r2225_54(glval>) = VariableAddress[ys] : +# 2225| r2225_55(glval) = FunctionAddress[~vector] : +# 2225| v2225_56(void) = Call[~vector] : func:r2225_55, this:r2225_54 +# 2225| m2225_57(unknown) = ^CallSideEffect : ~m2225_38 +# 2225| m2225_58(unknown) = Chi : total:m2225_38, partial:m2225_57 +# 2225| v2225_59(void) = ^IndirectReadSideEffect[-1] : &:r2225_54, ~m2225_58 +# 2225| m2225_60(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2225_54 +# 2225| m2225_61(unknown) = Chi : total:m2225_58, partial:m2225_60 +# 2234| r2234_9(glval) = VariableAddress[x] : +# 2234| r2234_10(glval) = FunctionAddress[~ClassWithDestructor] : +# 2234| v2234_11(void) = Call[~ClassWithDestructor] : func:r2234_10, this:r2234_9 +# 2234| m2234_12(unknown) = ^CallSideEffect : ~m2225_61 +# 2234| m2234_13(unknown) = Chi : total:m2225_61, partial:m2234_12 +# 2234| v2234_14(void) = ^IndirectReadSideEffect[-1] : &:r2234_9, m2215_8 +# 2234| m2234_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2234_9 +# 2234| m2234_16(ClassWithDestructor) = Chi : total:m2215_8, partial:m2234_15 #-----| Goto -> Block 1 -# 2224| Block 20 -# 2224| r2224_62(glval>) = VariableAddress[ys] : -# 2224| r2224_63(glval) = FunctionAddress[~vector] : -# 2224| v2224_64(void) = Call[~vector] : func:r2224_63, this:r2224_62 -# 2224| m2224_65(unknown) = ^CallSideEffect : ~m2224_38 -# 2224| m2224_66(unknown) = Chi : total:m2224_38, partial:m2224_65 -# 2224| v2224_67(void) = ^IndirectReadSideEffect[-1] : &:r2224_62, ~m2224_66 -# 2224| m2224_68(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2224_62 -# 2224| m2224_69(unknown) = Chi : total:m2224_66, partial:m2224_68 -# 2229| r2229_1(glval>) = VariableAddress[ys] : -# 2229| m2229_2(vector) = Uninitialized[ys] : &:r2229_1 -# 2229| m2229_3(unknown) = Chi : total:m2224_69, partial:m2229_2 -# 2229| r2229_4(glval) = FunctionAddress[vector] : -# 2229| r2229_5(glval) = VariableAddress[#temp2229:45] : -# 2229| r2229_6(glval) = VariableAddress[x] : -# 2229| r2229_7(ClassWithDestructor) = Load[x] : &:r2229_6, m2214_8 -# 2229| m2229_8(ClassWithDestructor) = Store[#temp2229:45] : &:r2229_5, r2229_7 -# 2229| r2229_9(ClassWithDestructor) = Load[#temp2229:45] : &:r2229_5, m2229_8 -# 2229| v2229_10(void) = Call[vector] : func:r2229_4, this:r2229_1, 0:r2229_9 -# 2229| m2229_11(unknown) = ^CallSideEffect : ~m2229_3 -# 2229| m2229_12(unknown) = Chi : total:m2229_3, partial:m2229_11 -# 2229| m2229_13(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2229_1 -# 2229| m2229_14(unknown) = Chi : total:m2229_12, partial:m2229_13 -# 2229| r2229_15(glval) = CopyValue : r2229_5 -# 2229| r2229_16(glval) = FunctionAddress[~ClassWithDestructor] : -# 2229| v2229_17(void) = Call[~ClassWithDestructor] : func:r2229_16, this:r2229_15 -# 2229| m2229_18(unknown) = ^CallSideEffect : ~m2229_14 -# 2229| m2229_19(unknown) = Chi : total:m2229_14, partial:m2229_18 -# 2229| v2229_20(void) = ^IndirectReadSideEffect[-1] : &:r2229_15, m2229_8 -# 2229| m2229_21(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2229_15 -# 2229| m2229_22(ClassWithDestructor) = Chi : total:m2229_8, partial:m2229_21 -# 2229| r2229_23(glval &>) = VariableAddress[(__range)] : -# 2229| r2229_24(glval>) = VariableAddress[ys] : -# 2229| r2229_25(vector &) = CopyValue : r2229_24 -# 2229| m2229_26(vector &) = Store[(__range)] : &:r2229_23, r2229_25 -# 2229| r2229_27(glval>) = VariableAddress[(__begin)] : -# 2229| r2229_28(glval &>) = VariableAddress[(__range)] : -# 2229| r2229_29(vector &) = Load[(__range)] : &:r2229_28, m2229_26 -#-----| r0_52(glval>) = CopyValue : r2229_29 +# 2225| Block 20 +# 2225| r2225_62(glval>) = VariableAddress[ys] : +# 2225| r2225_63(glval) = FunctionAddress[~vector] : +# 2225| v2225_64(void) = Call[~vector] : func:r2225_63, this:r2225_62 +# 2225| m2225_65(unknown) = ^CallSideEffect : ~m2225_38 +# 2225| m2225_66(unknown) = Chi : total:m2225_38, partial:m2225_65 +# 2225| v2225_67(void) = ^IndirectReadSideEffect[-1] : &:r2225_62, ~m2225_66 +# 2225| m2225_68(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2225_62 +# 2225| m2225_69(unknown) = Chi : total:m2225_66, partial:m2225_68 +# 2230| r2230_1(glval>) = VariableAddress[ys] : +# 2230| m2230_2(vector) = Uninitialized[ys] : &:r2230_1 +# 2230| m2230_3(unknown) = Chi : total:m2225_69, partial:m2230_2 +# 2230| r2230_4(glval) = FunctionAddress[vector] : +# 2230| r2230_5(glval) = VariableAddress[#temp2230:45] : +# 2230| r2230_6(glval) = VariableAddress[x] : +# 2230| r2230_7(ClassWithDestructor) = Load[x] : &:r2230_6, m2215_8 +# 2230| m2230_8(ClassWithDestructor) = Store[#temp2230:45] : &:r2230_5, r2230_7 +# 2230| r2230_9(ClassWithDestructor) = Load[#temp2230:45] : &:r2230_5, m2230_8 +# 2230| v2230_10(void) = Call[vector] : func:r2230_4, this:r2230_1, 0:r2230_9 +# 2230| m2230_11(unknown) = ^CallSideEffect : ~m2230_3 +# 2230| m2230_12(unknown) = Chi : total:m2230_3, partial:m2230_11 +# 2230| m2230_13(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2230_1 +# 2230| m2230_14(unknown) = Chi : total:m2230_12, partial:m2230_13 +# 2230| r2230_15(glval) = CopyValue : r2230_5 +# 2230| r2230_16(glval) = FunctionAddress[~ClassWithDestructor] : +# 2230| v2230_17(void) = Call[~ClassWithDestructor] : func:r2230_16, this:r2230_15 +# 2230| m2230_18(unknown) = ^CallSideEffect : ~m2230_14 +# 2230| m2230_19(unknown) = Chi : total:m2230_14, partial:m2230_18 +# 2230| v2230_20(void) = ^IndirectReadSideEffect[-1] : &:r2230_15, m2230_8 +# 2230| m2230_21(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2230_15 +# 2230| m2230_22(ClassWithDestructor) = Chi : total:m2230_8, partial:m2230_21 +# 2230| r2230_23(glval &>) = VariableAddress[(__range)] : +# 2230| r2230_24(glval>) = VariableAddress[ys] : +# 2230| r2230_25(vector &) = CopyValue : r2230_24 +# 2230| m2230_26(vector &) = Store[(__range)] : &:r2230_23, r2230_25 +# 2230| r2230_27(glval>) = VariableAddress[(__begin)] : +# 2230| r2230_28(glval &>) = VariableAddress[(__range)] : +# 2230| r2230_29(vector &) = Load[(__range)] : &:r2230_28, m2230_26 +#-----| r0_52(glval>) = CopyValue : r2230_29 #-----| r0_53(glval>) = Convert : r0_52 -# 2229| r2229_30(glval) = FunctionAddress[begin] : -# 2229| r2229_31(iterator) = Call[begin] : func:r2229_30, this:r0_53 -#-----| v0_54(void) = ^IndirectReadSideEffect[-1] : &:r0_53, ~m2229_19 -# 2229| m2229_32(iterator) = Store[(__begin)] : &:r2229_27, r2229_31 -# 2229| r2229_33(glval>) = VariableAddress[(__end)] : -# 2229| r2229_34(glval &>) = VariableAddress[(__range)] : -# 2229| r2229_35(vector &) = Load[(__range)] : &:r2229_34, m2229_26 -#-----| r0_55(glval>) = CopyValue : r2229_35 +# 2230| r2230_30(glval) = FunctionAddress[begin] : +# 2230| r2230_31(iterator) = Call[begin] : func:r2230_30, this:r0_53 +#-----| v0_54(void) = ^IndirectReadSideEffect[-1] : &:r0_53, ~m2230_19 +# 2230| m2230_32(iterator) = Store[(__begin)] : &:r2230_27, r2230_31 +# 2230| r2230_33(glval>) = VariableAddress[(__end)] : +# 2230| r2230_34(glval &>) = VariableAddress[(__range)] : +# 2230| r2230_35(vector &) = Load[(__range)] : &:r2230_34, m2230_26 +#-----| r0_55(glval>) = CopyValue : r2230_35 #-----| r0_56(glval>) = Convert : r0_55 -# 2229| r2229_36(glval) = FunctionAddress[end] : -# 2229| r2229_37(iterator) = Call[end] : func:r2229_36, this:r0_56 -#-----| v0_57(void) = ^IndirectReadSideEffect[-1] : &:r0_56, ~m2229_19 -# 2229| m2229_38(iterator) = Store[(__end)] : &:r2229_33, r2229_37 -# 2229| m2229_39(unknown) = Chi : total:m2229_19, partial:m2229_38 +# 2230| r2230_36(glval) = FunctionAddress[end] : +# 2230| r2230_37(iterator) = Call[end] : func:r2230_36, this:r0_56 +#-----| v0_57(void) = ^IndirectReadSideEffect[-1] : &:r0_56, ~m2230_19 +# 2230| m2230_38(iterator) = Store[(__end)] : &:r2230_33, r2230_37 +# 2230| m2230_39(unknown) = Chi : total:m2230_19, partial:m2230_38 #-----| Goto -> Block 21 -# 2229| Block 21 -# 2229| m2229_40(iterator) = Phi : from 20:m2229_32, from 22:m2229_64 -# 2229| m2229_41(unknown) = Phi : from 20:~m2229_39, from 22:~m2229_69 -# 2229| r2229_42(glval>) = VariableAddress[(__begin)] : -#-----| r0_58(glval>) = Convert : r2229_42 -# 2229| r2229_43(glval) = FunctionAddress[operator!=] : +# 2230| Block 21 +# 2230| m2230_40(iterator) = Phi : from 20:m2230_32, from 22:m2230_64 +# 2230| m2230_41(unknown) = Phi : from 20:~m2230_39, from 22:~m2230_69 +# 2230| r2230_42(glval>) = VariableAddress[(__begin)] : +#-----| r0_58(glval>) = Convert : r2230_42 +# 2230| r2230_43(glval) = FunctionAddress[operator!=] : #-----| r0_59(glval>) = VariableAddress[#temp0:0] : #-----| m0_60(iterator) = Uninitialized[#temp0:0] : &:r0_59 -#-----| m0_61(unknown) = Chi : total:m2229_41, partial:m0_60 -# 2229| r2229_44(glval) = FunctionAddress[iterator] : -# 2229| r2229_45(glval>) = VariableAddress[(__end)] : -#-----| r0_62(glval>) = Convert : r2229_45 +#-----| m0_61(unknown) = Chi : total:m2230_41, partial:m0_60 +# 2230| r2230_44(glval) = FunctionAddress[iterator] : +# 2230| r2230_45(glval>) = VariableAddress[(__end)] : +#-----| r0_62(glval>) = Convert : r2230_45 #-----| r0_63(iterator &) = CopyValue : r0_62 -# 2229| v2229_46(void) = Call[iterator] : func:r2229_44, this:r0_59, 0:r0_63 -# 2229| m2229_47(unknown) = ^CallSideEffect : ~m0_61 -# 2229| m2229_48(unknown) = Chi : total:m0_61, partial:m2229_47 -#-----| v0_64(void) = ^BufferReadSideEffect[0] : &:r0_63, ~m2229_48 -# 2229| m2229_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_59 -# 2229| m2229_50(unknown) = Chi : total:m2229_48, partial:m2229_49 -#-----| r0_65(iterator) = Load[#temp0:0] : &:r0_59, ~m2229_50 -# 2229| r2229_51(bool) = Call[operator!=] : func:r2229_43, this:r0_58, 0:r0_65 -#-----| v0_66(void) = ^IndirectReadSideEffect[-1] : &:r0_58, m2229_40 -# 2229| v2229_52(void) = ConditionalBranch : r2229_51 +# 2230| v2230_46(void) = Call[iterator] : func:r2230_44, this:r0_59, 0:r0_63 +# 2230| m2230_47(unknown) = ^CallSideEffect : ~m0_61 +# 2230| m2230_48(unknown) = Chi : total:m0_61, partial:m2230_47 +#-----| v0_64(void) = ^BufferReadSideEffect[0] : &:r0_63, ~m2230_48 +# 2230| m2230_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_59 +# 2230| m2230_50(unknown) = Chi : total:m2230_48, partial:m2230_49 +#-----| r0_65(iterator) = Load[#temp0:0] : &:r0_59, ~m2230_50 +# 2230| r2230_51(bool) = Call[operator!=] : func:r2230_43, this:r0_58, 0:r0_65 +#-----| v0_66(void) = ^IndirectReadSideEffect[-1] : &:r0_58, m2230_40 +# 2230| v2230_52(void) = ConditionalBranch : r2230_51 #-----| False -> Block 23 #-----| True -> Block 22 -# 2229| Block 22 -# 2229| r2229_53(glval) = VariableAddress[y] : -# 2229| r2229_54(glval>) = VariableAddress[(__begin)] : -#-----| r0_67(glval>) = Convert : r2229_54 -# 2229| r2229_55(glval) = FunctionAddress[operator*] : -# 2229| r2229_56(ClassWithDestructor &) = Call[operator*] : func:r2229_55, this:r0_67 -#-----| v0_68(void) = ^IndirectReadSideEffect[-1] : &:r0_67, m2229_40 -# 2229| r2229_57(ClassWithDestructor) = Load[?] : &:r2229_56, ~m2229_50 -# 2229| m2229_58(ClassWithDestructor) = Store[y] : &:r2229_53, r2229_57 -# 2230| r2230_1(glval) = VariableAddress[z1] : -# 2230| m2230_2(ClassWithDestructor) = Uninitialized[z1] : &:r2230_1 -# 2230| r2230_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2230| v2230_4(void) = Call[ClassWithDestructor] : func:r2230_3, this:r2230_1 -# 2230| m2230_5(unknown) = ^CallSideEffect : ~m2229_50 -# 2230| m2230_6(unknown) = Chi : total:m2229_50, partial:m2230_5 -# 2230| m2230_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2230_1 -# 2230| m2230_8(ClassWithDestructor) = Chi : total:m2230_2, partial:m2230_7 -# 2231| r2231_1(glval) = VariableAddress[z2] : -# 2231| m2231_2(ClassWithDestructor) = Uninitialized[z2] : &:r2231_1 +# 2230| Block 22 +# 2230| r2230_53(glval) = VariableAddress[y] : +# 2230| r2230_54(glval>) = VariableAddress[(__begin)] : +#-----| r0_67(glval>) = Convert : r2230_54 +# 2230| r2230_55(glval) = FunctionAddress[operator*] : +# 2230| r2230_56(ClassWithDestructor &) = Call[operator*] : func:r2230_55, this:r0_67 +#-----| v0_68(void) = ^IndirectReadSideEffect[-1] : &:r0_67, m2230_40 +# 2230| r2230_57(ClassWithDestructor) = Load[?] : &:r2230_56, ~m2230_50 +# 2230| m2230_58(ClassWithDestructor) = Store[y] : &:r2230_53, r2230_57 +# 2231| r2231_1(glval) = VariableAddress[z1] : +# 2231| m2231_2(ClassWithDestructor) = Uninitialized[z1] : &:r2231_1 # 2231| r2231_3(glval) = FunctionAddress[ClassWithDestructor] : # 2231| v2231_4(void) = Call[ClassWithDestructor] : func:r2231_3, this:r2231_1 -# 2231| m2231_5(unknown) = ^CallSideEffect : ~m2230_6 -# 2231| m2231_6(unknown) = Chi : total:m2230_6, partial:m2231_5 +# 2231| m2231_5(unknown) = ^CallSideEffect : ~m2230_50 +# 2231| m2231_6(unknown) = Chi : total:m2230_50, partial:m2231_5 # 2231| m2231_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2231_1 # 2231| m2231_8(ClassWithDestructor) = Chi : total:m2231_2, partial:m2231_7 # 2232| r2232_1(glval) = VariableAddress[z2] : -# 2232| r2232_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2232| v2232_3(void) = Call[~ClassWithDestructor] : func:r2232_2, this:r2232_1 -# 2232| m2232_4(unknown) = ^CallSideEffect : ~m2231_6 -# 2232| m2232_5(unknown) = Chi : total:m2231_6, partial:m2232_4 -# 2232| v2232_6(void) = ^IndirectReadSideEffect[-1] : &:r2232_1, m2231_8 +# 2232| m2232_2(ClassWithDestructor) = Uninitialized[z2] : &:r2232_1 +# 2232| r2232_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2232| v2232_4(void) = Call[ClassWithDestructor] : func:r2232_3, this:r2232_1 +# 2232| m2232_5(unknown) = ^CallSideEffect : ~m2231_6 +# 2232| m2232_6(unknown) = Chi : total:m2231_6, partial:m2232_5 # 2232| m2232_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2232_1 -# 2232| m2232_8(ClassWithDestructor) = Chi : total:m2231_8, partial:m2232_7 -# 2232| r2232_9(glval) = VariableAddress[z1] : -# 2232| r2232_10(glval) = FunctionAddress[~ClassWithDestructor] : -# 2232| v2232_11(void) = Call[~ClassWithDestructor] : func:r2232_10, this:r2232_9 -# 2232| m2232_12(unknown) = ^CallSideEffect : ~m2232_5 -# 2232| m2232_13(unknown) = Chi : total:m2232_5, partial:m2232_12 -# 2232| v2232_14(void) = ^IndirectReadSideEffect[-1] : &:r2232_9, m2230_8 -# 2232| m2232_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2232_9 -# 2232| m2232_16(ClassWithDestructor) = Chi : total:m2230_8, partial:m2232_15 -# 2229| r2229_59(glval>) = VariableAddress[(__begin)] : -# 2229| r2229_60(glval) = FunctionAddress[operator++] : -# 2229| r2229_61(iterator &) = Call[operator++] : func:r2229_60, this:r2229_59 -# 2229| v2229_62(void) = ^IndirectReadSideEffect[-1] : &:r2229_59, m2229_40 -# 2229| m2229_63(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2229_59 -# 2229| m2229_64(iterator) = Chi : total:m2229_40, partial:m2229_63 -# 2229| r2229_65(glval) = VariableAddress[y] : -# 2229| r2229_66(glval) = FunctionAddress[~ClassWithDestructor] : -# 2229| v2229_67(void) = Call[~ClassWithDestructor] : func:r2229_66, this:r2229_65 -# 2229| m2229_68(unknown) = ^CallSideEffect : ~m2232_13 -# 2229| m2229_69(unknown) = Chi : total:m2232_13, partial:m2229_68 -# 2229| v2229_70(void) = ^IndirectReadSideEffect[-1] : &:r2229_65, m2229_58 -# 2229| m2229_71(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2229_65 -# 2229| m2229_72(ClassWithDestructor) = Chi : total:m2229_58, partial:m2229_71 -# 2229| r2229_73(glval>) = CopyValue : r2229_61 +# 2232| m2232_8(ClassWithDestructor) = Chi : total:m2232_2, partial:m2232_7 +# 2233| r2233_1(glval) = VariableAddress[z2] : +# 2233| r2233_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2233| v2233_3(void) = Call[~ClassWithDestructor] : func:r2233_2, this:r2233_1 +# 2233| m2233_4(unknown) = ^CallSideEffect : ~m2232_6 +# 2233| m2233_5(unknown) = Chi : total:m2232_6, partial:m2233_4 +# 2233| v2233_6(void) = ^IndirectReadSideEffect[-1] : &:r2233_1, m2232_8 +# 2233| m2233_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_1 +# 2233| m2233_8(ClassWithDestructor) = Chi : total:m2232_8, partial:m2233_7 +# 2233| r2233_9(glval) = VariableAddress[z1] : +# 2233| r2233_10(glval) = FunctionAddress[~ClassWithDestructor] : +# 2233| v2233_11(void) = Call[~ClassWithDestructor] : func:r2233_10, this:r2233_9 +# 2233| m2233_12(unknown) = ^CallSideEffect : ~m2233_5 +# 2233| m2233_13(unknown) = Chi : total:m2233_5, partial:m2233_12 +# 2233| v2233_14(void) = ^IndirectReadSideEffect[-1] : &:r2233_9, m2231_8 +# 2233| m2233_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_9 +# 2233| m2233_16(ClassWithDestructor) = Chi : total:m2231_8, partial:m2233_15 +# 2230| r2230_59(glval>) = VariableAddress[(__begin)] : +# 2230| r2230_60(glval) = FunctionAddress[operator++] : +# 2230| r2230_61(iterator &) = Call[operator++] : func:r2230_60, this:r2230_59 +# 2230| v2230_62(void) = ^IndirectReadSideEffect[-1] : &:r2230_59, m2230_40 +# 2230| m2230_63(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2230_59 +# 2230| m2230_64(iterator) = Chi : total:m2230_40, partial:m2230_63 +# 2230| r2230_65(glval) = VariableAddress[y] : +# 2230| r2230_66(glval) = FunctionAddress[~ClassWithDestructor] : +# 2230| v2230_67(void) = Call[~ClassWithDestructor] : func:r2230_66, this:r2230_65 +# 2230| m2230_68(unknown) = ^CallSideEffect : ~m2233_13 +# 2230| m2230_69(unknown) = Chi : total:m2233_13, partial:m2230_68 +# 2230| v2230_70(void) = ^IndirectReadSideEffect[-1] : &:r2230_65, m2230_58 +# 2230| m2230_71(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2230_65 +# 2230| m2230_72(ClassWithDestructor) = Chi : total:m2230_58, partial:m2230_71 +# 2230| r2230_73(glval>) = CopyValue : r2230_61 #-----| Goto (back edge) -> Block 21 -# 2229| Block 23 -# 2229| r2229_74(glval>) = VariableAddress[ys] : -# 2229| r2229_75(glval) = FunctionAddress[~vector] : -# 2229| v2229_76(void) = Call[~vector] : func:r2229_75, this:r2229_74 -# 2229| m2229_77(unknown) = ^CallSideEffect : ~m2229_50 -# 2229| m2229_78(unknown) = Chi : total:m2229_50, partial:m2229_77 -# 2229| v2229_79(void) = ^IndirectReadSideEffect[-1] : &:r2229_74, ~m2229_78 -# 2229| m2229_80(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2229_74 -# 2229| m2229_81(unknown) = Chi : total:m2229_78, partial:m2229_80 -# 2233| v2233_17(void) = NoOp : -# 2233| r2233_18(glval) = VariableAddress[x] : -# 2233| r2233_19(glval) = FunctionAddress[~ClassWithDestructor] : -# 2233| v2233_20(void) = Call[~ClassWithDestructor] : func:r2233_19, this:r2233_18 -# 2233| m2233_21(unknown) = ^CallSideEffect : ~m2229_81 -# 2233| m2233_22(unknown) = Chi : total:m2229_81, partial:m2233_21 -# 2233| v2233_23(void) = ^IndirectReadSideEffect[-1] : &:r2233_18, m2214_8 -# 2233| m2233_24(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_18 -# 2233| m2233_25(ClassWithDestructor) = Chi : total:m2214_8, partial:m2233_24 +# 2230| Block 23 +# 2230| r2230_74(glval>) = VariableAddress[ys] : +# 2230| r2230_75(glval) = FunctionAddress[~vector] : +# 2230| v2230_76(void) = Call[~vector] : func:r2230_75, this:r2230_74 +# 2230| m2230_77(unknown) = ^CallSideEffect : ~m2230_50 +# 2230| m2230_78(unknown) = Chi : total:m2230_50, partial:m2230_77 +# 2230| v2230_79(void) = ^IndirectReadSideEffect[-1] : &:r2230_74, ~m2230_78 +# 2230| m2230_80(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2230_74 +# 2230| m2230_81(unknown) = Chi : total:m2230_78, partial:m2230_80 +# 2234| v2234_17(void) = NoOp : +# 2234| r2234_18(glval) = VariableAddress[x] : +# 2234| r2234_19(glval) = FunctionAddress[~ClassWithDestructor] : +# 2234| v2234_20(void) = Call[~ClassWithDestructor] : func:r2234_19, this:r2234_18 +# 2234| m2234_21(unknown) = ^CallSideEffect : ~m2230_81 +# 2234| m2234_22(unknown) = Chi : total:m2230_81, partial:m2234_21 +# 2234| v2234_23(void) = ^IndirectReadSideEffect[-1] : &:r2234_18, m2215_8 +# 2234| m2234_24(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2234_18 +# 2234| m2234_25(ClassWithDestructor) = Chi : total:m2215_8, partial:m2234_24 #-----| Goto -> Block 1 -# 2198| Block 24 -# 2198| v2198_13(void) = Unreached : +# 2199| Block 24 +# 2199| v2199_13(void) = Unreached : -# 2235| void static_variable_with_destructor_1() -# 2235| Block 0 -# 2235| v2235_1(void) = EnterFunction : -# 2235| m2235_2(unknown) = AliasedDefinition : -# 2235| m2235_3(unknown) = InitializeNonLocal : -# 2235| m2235_4(unknown) = Chi : total:m2235_2, partial:m2235_3 -# 2236| r2236_1(glval) = VariableAddress[a] : -# 2236| m2236_2(ClassWithDestructor) = Uninitialized[a] : &:r2236_1 -# 2236| r2236_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2236| v2236_4(void) = Call[ClassWithDestructor] : func:r2236_3, this:r2236_1 -# 2236| m2236_5(unknown) = ^CallSideEffect : ~m2235_4 -# 2236| m2236_6(unknown) = Chi : total:m2235_4, partial:m2236_5 -# 2236| m2236_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2236_1 -# 2236| m2236_8(ClassWithDestructor) = Chi : total:m2236_2, partial:m2236_7 -# 2237| r2237_1(glval) = VariableAddress[b#init] : -# 2237| r2237_2(bool) = Load[b#init] : &:r2237_1, ~m2236_6 -# 2237| v2237_3(void) = ConditionalBranch : r2237_2 +# 2236| void static_variable_with_destructor_1() +# 2236| Block 0 +# 2236| v2236_1(void) = EnterFunction : +# 2236| m2236_2(unknown) = AliasedDefinition : +# 2236| m2236_3(unknown) = InitializeNonLocal : +# 2236| m2236_4(unknown) = Chi : total:m2236_2, partial:m2236_3 +# 2237| r2237_1(glval) = VariableAddress[a] : +# 2237| m2237_2(ClassWithDestructor) = Uninitialized[a] : &:r2237_1 +# 2237| r2237_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2237| v2237_4(void) = Call[ClassWithDestructor] : func:r2237_3, this:r2237_1 +# 2237| m2237_5(unknown) = ^CallSideEffect : ~m2236_4 +# 2237| m2237_6(unknown) = Chi : total:m2236_4, partial:m2237_5 +# 2237| m2237_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2237_1 +# 2237| m2237_8(ClassWithDestructor) = Chi : total:m2237_2, partial:m2237_7 +# 2238| r2238_1(glval) = VariableAddress[b#init] : +# 2238| r2238_2(bool) = Load[b#init] : &:r2238_1, ~m2237_6 +# 2238| v2238_3(void) = ConditionalBranch : r2238_2 #-----| False -> Block 1 #-----| True -> Block 2 -# 2237| Block 1 -# 2237| r2237_4(glval) = VariableAddress[b] : +# 2238| Block 1 +# 2238| r2238_4(glval) = VariableAddress[b] : #-----| r0_1(glval) = FunctionAddress[ClassWithDestructor] : -#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2237_4 -#-----| m0_3(unknown) = ^CallSideEffect : ~m2236_6 -#-----| m0_4(unknown) = Chi : total:m2236_6, partial:m0_3 -#-----| m0_5(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2237_4 +#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2238_4 +#-----| m0_3(unknown) = ^CallSideEffect : ~m2237_6 +#-----| m0_4(unknown) = Chi : total:m2237_6, partial:m0_3 +#-----| m0_5(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2238_4 #-----| m0_6(unknown) = Chi : total:m0_4, partial:m0_5 -# 2237| r2237_5(bool) = Constant[1] : -# 2237| m2237_6(bool) = Store[b#init] : &:r2237_1, r2237_5 -# 2237| m2237_7(unknown) = Chi : total:m0_6, partial:m2237_6 +# 2238| r2238_5(bool) = Constant[1] : +# 2238| m2238_6(bool) = Store[b#init] : &:r2238_1, r2238_5 +# 2238| m2238_7(unknown) = Chi : total:m0_6, partial:m2238_6 #-----| Goto -> Block 2 -# 2238| Block 2 -# 2238| m2238_1(unknown) = Phi : from 0:~m2236_6, from 1:~m2237_7 -# 2238| v2238_2(void) = NoOp : -# 2238| r2238_3(glval) = VariableAddress[a] : -# 2238| r2238_4(glval) = FunctionAddress[~ClassWithDestructor] : -# 2238| v2238_5(void) = Call[~ClassWithDestructor] : func:r2238_4, this:r2238_3 -# 2238| m2238_6(unknown) = ^CallSideEffect : ~m2238_1 -# 2238| m2238_7(unknown) = Chi : total:m2238_1, partial:m2238_6 -# 2238| v2238_8(void) = ^IndirectReadSideEffect[-1] : &:r2238_3, m2236_8 -# 2238| m2238_9(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2238_3 -# 2238| m2238_10(ClassWithDestructor) = Chi : total:m2236_8, partial:m2238_9 -# 2235| v2235_5(void) = ReturnVoid : -# 2235| v2235_6(void) = AliasedUse : ~m2238_7 -# 2235| v2235_7(void) = ExitFunction : +# 2239| Block 2 +# 2239| m2239_1(unknown) = Phi : from 0:~m2237_6, from 1:~m2238_7 +# 2239| v2239_2(void) = NoOp : +# 2239| r2239_3(glval) = VariableAddress[a] : +# 2239| r2239_4(glval) = FunctionAddress[~ClassWithDestructor] : +# 2239| v2239_5(void) = Call[~ClassWithDestructor] : func:r2239_4, this:r2239_3 +# 2239| m2239_6(unknown) = ^CallSideEffect : ~m2239_1 +# 2239| m2239_7(unknown) = Chi : total:m2239_1, partial:m2239_6 +# 2239| v2239_8(void) = ^IndirectReadSideEffect[-1] : &:r2239_3, m2237_8 +# 2239| m2239_9(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2239_3 +# 2239| m2239_10(ClassWithDestructor) = Chi : total:m2237_8, partial:m2239_9 +# 2236| v2236_5(void) = ReturnVoid : +# 2236| v2236_6(void) = AliasedUse : ~m2239_7 +# 2236| v2236_7(void) = ExitFunction : -# 2240| void static_variable_with_destructor_2() -# 2240| Block 0 -# 2240| v2240_1(void) = EnterFunction : -# 2240| m2240_2(unknown) = AliasedDefinition : -# 2240| m2240_3(unknown) = InitializeNonLocal : -# 2240| m2240_4(unknown) = Chi : total:m2240_2, partial:m2240_3 -# 2241| r2241_1(glval) = VariableAddress[a#init] : -# 2241| r2241_2(bool) = Load[a#init] : &:r2241_1, ~m2240_3 -# 2241| v2241_3(void) = ConditionalBranch : r2241_2 +# 2241| void static_variable_with_destructor_2() +# 2241| Block 0 +# 2241| v2241_1(void) = EnterFunction : +# 2241| m2241_2(unknown) = AliasedDefinition : +# 2241| m2241_3(unknown) = InitializeNonLocal : +# 2241| m2241_4(unknown) = Chi : total:m2241_2, partial:m2241_3 +# 2242| r2242_1(glval) = VariableAddress[a#init] : +# 2242| r2242_2(bool) = Load[a#init] : &:r2242_1, ~m2241_3 +# 2242| v2242_3(void) = ConditionalBranch : r2242_2 #-----| False -> Block 1 #-----| True -> Block 2 -# 2241| Block 1 -# 2241| r2241_4(glval) = VariableAddress[a] : +# 2242| Block 1 +# 2242| r2242_4(glval) = VariableAddress[a] : #-----| r0_1(glval) = FunctionAddress[ClassWithDestructor] : -#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2241_4 -#-----| m0_3(unknown) = ^CallSideEffect : ~m2240_4 -#-----| m0_4(unknown) = Chi : total:m2240_4, partial:m0_3 -#-----| m0_5(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2241_4 +#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2242_4 +#-----| m0_3(unknown) = ^CallSideEffect : ~m2241_4 +#-----| m0_4(unknown) = Chi : total:m2241_4, partial:m0_3 +#-----| m0_5(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2242_4 #-----| m0_6(unknown) = Chi : total:m0_4, partial:m0_5 -# 2241| r2241_5(bool) = Constant[1] : -# 2241| m2241_6(bool) = Store[a#init] : &:r2241_1, r2241_5 -# 2241| m2241_7(unknown) = Chi : total:m0_6, partial:m2241_6 +# 2242| r2242_5(bool) = Constant[1] : +# 2242| m2242_6(bool) = Store[a#init] : &:r2242_1, r2242_5 +# 2242| m2242_7(unknown) = Chi : total:m0_6, partial:m2242_6 #-----| Goto -> Block 2 -# 2242| Block 2 -# 2242| m2242_1(unknown) = Phi : from 0:~m2240_4, from 1:~m2241_7 -# 2242| r2242_2(glval) = VariableAddress[b] : -# 2242| m2242_3(ClassWithDestructor) = Uninitialized[b] : &:r2242_2 -# 2242| r2242_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2242| v2242_5(void) = Call[ClassWithDestructor] : func:r2242_4, this:r2242_2 -# 2242| m2242_6(unknown) = ^CallSideEffect : ~m2242_1 -# 2242| m2242_7(unknown) = Chi : total:m2242_1, partial:m2242_6 -# 2242| m2242_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2242_2 -# 2242| m2242_9(ClassWithDestructor) = Chi : total:m2242_3, partial:m2242_8 -# 2243| v2243_1(void) = NoOp : +# 2243| Block 2 +# 2243| m2243_1(unknown) = Phi : from 0:~m2241_4, from 1:~m2242_7 # 2243| r2243_2(glval) = VariableAddress[b] : -# 2243| r2243_3(glval) = FunctionAddress[~ClassWithDestructor] : -# 2243| v2243_4(void) = Call[~ClassWithDestructor] : func:r2243_3, this:r2243_2 -# 2243| m2243_5(unknown) = ^CallSideEffect : ~m2242_7 -# 2243| m2243_6(unknown) = Chi : total:m2242_7, partial:m2243_5 -# 2243| v2243_7(void) = ^IndirectReadSideEffect[-1] : &:r2243_2, m2242_9 +# 2243| m2243_3(ClassWithDestructor) = Uninitialized[b] : &:r2243_2 +# 2243| r2243_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2243| v2243_5(void) = Call[ClassWithDestructor] : func:r2243_4, this:r2243_2 +# 2243| m2243_6(unknown) = ^CallSideEffect : ~m2243_1 +# 2243| m2243_7(unknown) = Chi : total:m2243_1, partial:m2243_6 # 2243| m2243_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2243_2 -# 2243| m2243_9(ClassWithDestructor) = Chi : total:m2242_9, partial:m2243_8 -# 2240| v2240_5(void) = ReturnVoid : -# 2240| v2240_6(void) = AliasedUse : ~m2243_6 -# 2240| v2240_7(void) = ExitFunction : +# 2243| m2243_9(ClassWithDestructor) = Chi : total:m2243_3, partial:m2243_8 +# 2244| v2244_1(void) = NoOp : +# 2244| r2244_2(glval) = VariableAddress[b] : +# 2244| r2244_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2244| v2244_4(void) = Call[~ClassWithDestructor] : func:r2244_3, this:r2244_2 +# 2244| m2244_5(unknown) = ^CallSideEffect : ~m2243_7 +# 2244| m2244_6(unknown) = Chi : total:m2243_7, partial:m2244_5 +# 2244| v2244_7(void) = ^IndirectReadSideEffect[-1] : &:r2244_2, m2243_9 +# 2244| m2244_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2244_2 +# 2244| m2244_9(ClassWithDestructor) = Chi : total:m2243_9, partial:m2244_8 +# 2241| v2241_5(void) = ReturnVoid : +# 2241| v2241_6(void) = AliasedUse : ~m2244_6 +# 2241| v2241_7(void) = ExitFunction : -# 2245| void static_variable_with_destructor_3() -# 2245| Block 0 -# 2245| v2245_1(void) = EnterFunction : -# 2245| m2245_2(unknown) = AliasedDefinition : -# 2245| m2245_3(unknown) = InitializeNonLocal : -# 2245| m2245_4(unknown) = Chi : total:m2245_2, partial:m2245_3 -# 2246| r2246_1(glval) = VariableAddress[a] : -# 2246| m2246_2(ClassWithDestructor) = Uninitialized[a] : &:r2246_1 -# 2246| r2246_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2246| v2246_4(void) = Call[ClassWithDestructor] : func:r2246_3, this:r2246_1 -# 2246| m2246_5(unknown) = ^CallSideEffect : ~m2245_4 -# 2246| m2246_6(unknown) = Chi : total:m2245_4, partial:m2246_5 -# 2246| m2246_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2246_1 -# 2246| m2246_8(ClassWithDestructor) = Chi : total:m2246_2, partial:m2246_7 -# 2247| r2247_1(glval) = VariableAddress[b] : -# 2247| m2247_2(ClassWithDestructor) = Uninitialized[b] : &:r2247_1 +# 2246| void static_variable_with_destructor_3() +# 2246| Block 0 +# 2246| v2246_1(void) = EnterFunction : +# 2246| m2246_2(unknown) = AliasedDefinition : +# 2246| m2246_3(unknown) = InitializeNonLocal : +# 2246| m2246_4(unknown) = Chi : total:m2246_2, partial:m2246_3 +# 2247| r2247_1(glval) = VariableAddress[a] : +# 2247| m2247_2(ClassWithDestructor) = Uninitialized[a] : &:r2247_1 # 2247| r2247_3(glval) = FunctionAddress[ClassWithDestructor] : # 2247| v2247_4(void) = Call[ClassWithDestructor] : func:r2247_3, this:r2247_1 -# 2247| m2247_5(unknown) = ^CallSideEffect : ~m2246_6 -# 2247| m2247_6(unknown) = Chi : total:m2246_6, partial:m2247_5 +# 2247| m2247_5(unknown) = ^CallSideEffect : ~m2246_4 +# 2247| m2247_6(unknown) = Chi : total:m2246_4, partial:m2247_5 # 2247| m2247_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2247_1 # 2247| m2247_8(ClassWithDestructor) = Chi : total:m2247_2, partial:m2247_7 -# 2248| r2248_1(glval) = VariableAddress[c#init] : -# 2248| r2248_2(bool) = Load[c#init] : &:r2248_1, ~m2247_6 -# 2248| v2248_3(void) = ConditionalBranch : r2248_2 +# 2248| r2248_1(glval) = VariableAddress[b] : +# 2248| m2248_2(ClassWithDestructor) = Uninitialized[b] : &:r2248_1 +# 2248| r2248_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2248| v2248_4(void) = Call[ClassWithDestructor] : func:r2248_3, this:r2248_1 +# 2248| m2248_5(unknown) = ^CallSideEffect : ~m2247_6 +# 2248| m2248_6(unknown) = Chi : total:m2247_6, partial:m2248_5 +# 2248| m2248_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2248_1 +# 2248| m2248_8(ClassWithDestructor) = Chi : total:m2248_2, partial:m2248_7 +# 2249| r2249_1(glval) = VariableAddress[c#init] : +# 2249| r2249_2(bool) = Load[c#init] : &:r2249_1, ~m2248_6 +# 2249| v2249_3(void) = ConditionalBranch : r2249_2 #-----| False -> Block 1 #-----| True -> Block 2 -# 2248| Block 1 -# 2248| r2248_4(glval) = VariableAddress[c] : +# 2249| Block 1 +# 2249| r2249_4(glval) = VariableAddress[c] : #-----| r0_1(glval) = FunctionAddress[ClassWithDestructor] : -#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2248_4 -#-----| m0_3(unknown) = ^CallSideEffect : ~m2247_6 -#-----| m0_4(unknown) = Chi : total:m2247_6, partial:m0_3 -#-----| m0_5(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2248_4 +#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2249_4 +#-----| m0_3(unknown) = ^CallSideEffect : ~m2248_6 +#-----| m0_4(unknown) = Chi : total:m2248_6, partial:m0_3 +#-----| m0_5(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2249_4 #-----| m0_6(unknown) = Chi : total:m0_4, partial:m0_5 -# 2248| r2248_5(bool) = Constant[1] : -# 2248| m2248_6(bool) = Store[c#init] : &:r2248_1, r2248_5 -# 2248| m2248_7(unknown) = Chi : total:m0_6, partial:m2248_6 +# 2249| r2249_5(bool) = Constant[1] : +# 2249| m2249_6(bool) = Store[c#init] : &:r2249_1, r2249_5 +# 2249| m2249_7(unknown) = Chi : total:m0_6, partial:m2249_6 #-----| Goto -> Block 2 -# 2249| Block 2 -# 2249| m2249_1(unknown) = Phi : from 0:~m2247_6, from 1:~m2248_7 -# 2249| v2249_2(void) = NoOp : -# 2249| r2249_3(glval) = VariableAddress[b] : -# 2249| r2249_4(glval) = FunctionAddress[~ClassWithDestructor] : -# 2249| v2249_5(void) = Call[~ClassWithDestructor] : func:r2249_4, this:r2249_3 -# 2249| m2249_6(unknown) = ^CallSideEffect : ~m2249_1 -# 2249| m2249_7(unknown) = Chi : total:m2249_1, partial:m2249_6 -# 2249| v2249_8(void) = ^IndirectReadSideEffect[-1] : &:r2249_3, m2247_8 -# 2249| m2249_9(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2249_3 -# 2249| m2249_10(ClassWithDestructor) = Chi : total:m2247_8, partial:m2249_9 -# 2249| r2249_11(glval) = VariableAddress[a] : -# 2249| r2249_12(glval) = FunctionAddress[~ClassWithDestructor] : -# 2249| v2249_13(void) = Call[~ClassWithDestructor] : func:r2249_12, this:r2249_11 -# 2249| m2249_14(unknown) = ^CallSideEffect : ~m2249_7 -# 2249| m2249_15(unknown) = Chi : total:m2249_7, partial:m2249_14 -# 2249| v2249_16(void) = ^IndirectReadSideEffect[-1] : &:r2249_11, m2246_8 -# 2249| m2249_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2249_11 -# 2249| m2249_18(ClassWithDestructor) = Chi : total:m2246_8, partial:m2249_17 -# 2245| v2245_5(void) = ReturnVoid : -# 2245| v2245_6(void) = AliasedUse : ~m2249_15 -# 2245| v2245_7(void) = ExitFunction : +# 2250| Block 2 +# 2250| m2250_1(unknown) = Phi : from 0:~m2248_6, from 1:~m2249_7 +# 2250| v2250_2(void) = NoOp : +# 2250| r2250_3(glval) = VariableAddress[b] : +# 2250| r2250_4(glval) = FunctionAddress[~ClassWithDestructor] : +# 2250| v2250_5(void) = Call[~ClassWithDestructor] : func:r2250_4, this:r2250_3 +# 2250| m2250_6(unknown) = ^CallSideEffect : ~m2250_1 +# 2250| m2250_7(unknown) = Chi : total:m2250_1, partial:m2250_6 +# 2250| v2250_8(void) = ^IndirectReadSideEffect[-1] : &:r2250_3, m2248_8 +# 2250| m2250_9(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2250_3 +# 2250| m2250_10(ClassWithDestructor) = Chi : total:m2248_8, partial:m2250_9 +# 2250| r2250_11(glval) = VariableAddress[a] : +# 2250| r2250_12(glval) = FunctionAddress[~ClassWithDestructor] : +# 2250| v2250_13(void) = Call[~ClassWithDestructor] : func:r2250_12, this:r2250_11 +# 2250| m2250_14(unknown) = ^CallSideEffect : ~m2250_7 +# 2250| m2250_15(unknown) = Chi : total:m2250_7, partial:m2250_14 +# 2250| v2250_16(void) = ^IndirectReadSideEffect[-1] : &:r2250_11, m2247_8 +# 2250| m2250_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2250_11 +# 2250| m2250_18(ClassWithDestructor) = Chi : total:m2247_8, partial:m2250_17 +# 2246| v2246_5(void) = ReturnVoid : +# 2246| v2246_6(void) = AliasedUse : ~m2250_15 +# 2246| v2246_7(void) = ExitFunction : -# 2251| ClassWithDestructor global_class_with_destructor -# 2251| Block 0 -# 2251| v2251_1(void) = EnterFunction : -# 2251| m2251_2(unknown) = AliasedDefinition : -# 2251| r2251_3(glval) = VariableAddress[global_class_with_destructor] : -# 2251| r2251_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2251| v2251_5(void) = Call[ClassWithDestructor] : func:r2251_4, this:r2251_3 -# 2251| m2251_6(unknown) = ^CallSideEffect : ~m2251_2 -# 2251| m2251_7(unknown) = Chi : total:m2251_2, partial:m2251_6 -# 2251| m2251_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2251_3 -# 2251| m2251_9(unknown) = Chi : total:m2251_7, partial:m2251_8 -# 2251| v2251_10(void) = ReturnVoid : -# 2251| v2251_11(void) = AliasedUse : ~m2251_9 -# 2251| v2251_12(void) = ExitFunction : +# 2252| ClassWithDestructor global_class_with_destructor +# 2252| Block 0 +# 2252| v2252_1(void) = EnterFunction : +# 2252| m2252_2(unknown) = AliasedDefinition : +# 2252| r2252_3(glval) = VariableAddress[global_class_with_destructor] : +# 2252| r2252_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2252| v2252_5(void) = Call[ClassWithDestructor] : func:r2252_4, this:r2252_3 +# 2252| m2252_6(unknown) = ^CallSideEffect : ~m2252_2 +# 2252| m2252_7(unknown) = Chi : total:m2252_2, partial:m2252_6 +# 2252| m2252_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2252_3 +# 2252| m2252_9(unknown) = Chi : total:m2252_7, partial:m2252_8 +# 2252| v2252_10(void) = ReturnVoid : +# 2252| v2252_11(void) = AliasedUse : ~m2252_9 +# 2252| v2252_12(void) = ExitFunction : -# 2255| ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) -# 2255| Block 0 -# 2255| v2255_1(void) = EnterFunction : -# 2255| m2255_2(unknown) = AliasedDefinition : -# 2255| m2255_3(unknown) = InitializeNonLocal : -# 2255| m2255_4(unknown) = Chi : total:m2255_2, partial:m2255_3 -# 2255| r2255_5(glval) = VariableAddress[t] : -# 2255| m2255_6(ClassWithDestructor &) = InitializeParameter[t] : &:r2255_5 -# 2255| r2255_7(ClassWithDestructor &) = Load[t] : &:r2255_5, m2255_6 -# 2255| m2255_8(unknown) = InitializeIndirection[t] : &:r2255_7 -# 2255| r2255_9(glval) = VariableAddress[#return] : -# 2255| r2255_10(glval) = VariableAddress[t] : -# 2255| r2255_11(ClassWithDestructor &) = Load[t] : &:r2255_10, m2255_6 -# 2255| r2255_12(glval) = CopyValue : r2255_11 -# 2255| r2255_13(ClassWithDestructor &) = CopyValue : r2255_12 -# 2255| m2255_14(ClassWithDestructor &) = Store[#return] : &:r2255_9, r2255_13 -# 2255| v2255_15(void) = ReturnIndirection[t] : &:r2255_7, m2255_8 -# 2255| r2255_16(glval) = VariableAddress[#return] : -# 2255| v2255_17(void) = ReturnValue : &:r2255_16, m2255_14 -# 2255| v2255_18(void) = AliasedUse : m2255_3 -# 2255| v2255_19(void) = ExitFunction : +# 2256| ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) +# 2256| Block 0 +# 2256| v2256_1(void) = EnterFunction : +# 2256| m2256_2(unknown) = AliasedDefinition : +# 2256| m2256_3(unknown) = InitializeNonLocal : +# 2256| m2256_4(unknown) = Chi : total:m2256_2, partial:m2256_3 +# 2256| r2256_5(glval) = VariableAddress[t] : +# 2256| m2256_6(ClassWithDestructor &) = InitializeParameter[t] : &:r2256_5 +# 2256| r2256_7(ClassWithDestructor &) = Load[t] : &:r2256_5, m2256_6 +# 2256| m2256_8(unknown) = InitializeIndirection[t] : &:r2256_7 +# 2256| r2256_9(glval) = VariableAddress[#return] : +# 2256| r2256_10(glval) = VariableAddress[t] : +# 2256| r2256_11(ClassWithDestructor &) = Load[t] : &:r2256_10, m2256_6 +# 2256| r2256_12(glval) = CopyValue : r2256_11 +# 2256| r2256_13(ClassWithDestructor &) = CopyValue : r2256_12 +# 2256| m2256_14(ClassWithDestructor &) = Store[#return] : &:r2256_9, r2256_13 +# 2256| v2256_15(void) = ReturnIndirection[t] : &:r2256_7, m2256_8 +# 2256| r2256_16(glval) = VariableAddress[#return] : +# 2256| v2256_17(void) = ReturnValue : &:r2256_16, m2256_14 +# 2256| v2256_18(void) = AliasedUse : m2256_3 +# 2256| v2256_19(void) = ExitFunction : -# 2255| int& vacuous_destructor_call::get(int&) -# 2255| Block 0 -# 2255| v2255_1(void) = EnterFunction : -# 2255| m2255_2(unknown) = AliasedDefinition : -# 2255| m2255_3(unknown) = InitializeNonLocal : -# 2255| m2255_4(unknown) = Chi : total:m2255_2, partial:m2255_3 -# 2255| r2255_5(glval) = VariableAddress[t] : -# 2255| m2255_6(int &) = InitializeParameter[t] : &:r2255_5 -# 2255| r2255_7(int &) = Load[t] : &:r2255_5, m2255_6 -# 2255| m2255_8(unknown) = InitializeIndirection[t] : &:r2255_7 -# 2255| r2255_9(glval) = VariableAddress[#return] : -# 2255| r2255_10(glval) = VariableAddress[t] : -# 2255| r2255_11(int &) = Load[t] : &:r2255_10, m2255_6 -# 2255| r2255_12(glval) = CopyValue : r2255_11 -# 2255| r2255_13(int &) = CopyValue : r2255_12 -# 2255| m2255_14(int &) = Store[#return] : &:r2255_9, r2255_13 -# 2255| v2255_15(void) = ReturnIndirection[t] : &:r2255_7, m2255_8 -# 2255| r2255_16(glval) = VariableAddress[#return] : -# 2255| v2255_17(void) = ReturnValue : &:r2255_16, m2255_14 -# 2255| v2255_18(void) = AliasedUse : m2255_3 -# 2255| v2255_19(void) = ExitFunction : +# 2256| int& vacuous_destructor_call::get(int&) +# 2256| Block 0 +# 2256| v2256_1(void) = EnterFunction : +# 2256| m2256_2(unknown) = AliasedDefinition : +# 2256| m2256_3(unknown) = InitializeNonLocal : +# 2256| m2256_4(unknown) = Chi : total:m2256_2, partial:m2256_3 +# 2256| r2256_5(glval) = VariableAddress[t] : +# 2256| m2256_6(int &) = InitializeParameter[t] : &:r2256_5 +# 2256| r2256_7(int &) = Load[t] : &:r2256_5, m2256_6 +# 2256| m2256_8(unknown) = InitializeIndirection[t] : &:r2256_7 +# 2256| r2256_9(glval) = VariableAddress[#return] : +# 2256| r2256_10(glval) = VariableAddress[t] : +# 2256| r2256_11(int &) = Load[t] : &:r2256_10, m2256_6 +# 2256| r2256_12(glval) = CopyValue : r2256_11 +# 2256| r2256_13(int &) = CopyValue : r2256_12 +# 2256| m2256_14(int &) = Store[#return] : &:r2256_9, r2256_13 +# 2256| v2256_15(void) = ReturnIndirection[t] : &:r2256_7, m2256_8 +# 2256| r2256_16(glval) = VariableAddress[#return] : +# 2256| v2256_17(void) = ReturnValue : &:r2256_16, m2256_14 +# 2256| v2256_18(void) = AliasedUse : m2256_3 +# 2256| v2256_19(void) = ExitFunction : -# 2258| void vacuous_destructor_call::call_destructor(ClassWithDestructor&) -# 2258| Block 0 -# 2258| v2258_1(void) = EnterFunction : -# 2258| m2258_2(unknown) = AliasedDefinition : -# 2258| m2258_3(unknown) = InitializeNonLocal : -# 2258| m2258_4(unknown) = Chi : total:m2258_2, partial:m2258_3 -# 2258| r2258_5(glval) = VariableAddress[t] : -# 2258| m2258_6(ClassWithDestructor &) = InitializeParameter[t] : &:r2258_5 -# 2258| r2258_7(ClassWithDestructor &) = Load[t] : &:r2258_5, m2258_6 -# 2258| m2258_8(unknown) = InitializeIndirection[t] : &:r2258_7 -# 2259| r2259_1(glval) = FunctionAddress[get] : -# 2259| r2259_2(glval) = VariableAddress[t] : -# 2259| r2259_3(ClassWithDestructor &) = Load[t] : &:r2259_2, m2258_6 -# 2259| r2259_4(glval) = CopyValue : r2259_3 -# 2259| r2259_5(ClassWithDestructor &) = CopyValue : r2259_4 -# 2259| r2259_6(ClassWithDestructor &) = Call[get] : func:r2259_1, 0:r2259_5 -# 2259| m2259_7(unknown) = ^CallSideEffect : ~m2258_4 -# 2259| m2259_8(unknown) = Chi : total:m2258_4, partial:m2259_7 -# 2259| v2259_9(void) = ^BufferReadSideEffect[0] : &:r2259_5, ~m2258_8 -# 2259| m2259_10(unknown) = ^BufferMayWriteSideEffect[0] : &:r2259_5 -# 2259| m2259_11(unknown) = Chi : total:m2258_8, partial:m2259_10 -# 2259| r2259_12(glval) = CopyValue : r2259_6 -# 2259| r2259_13(glval) = FunctionAddress[~ClassWithDestructor] : -# 2259| v2259_14(void) = Call[~ClassWithDestructor] : func:r2259_13 -# 2259| m2259_15(unknown) = ^CallSideEffect : ~m2259_8 -# 2259| m2259_16(unknown) = Chi : total:m2259_8, partial:m2259_15 -# 2259| v2259_17(void) = ^IndirectReadSideEffect[-1] : &:r2259_12, ~m2259_11 -# 2259| m2259_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2259_12 -# 2259| m2259_19(unknown) = Chi : total:m2259_11, partial:m2259_18 -# 2260| v2260_1(void) = NoOp : -# 2258| v2258_9(void) = ReturnIndirection[t] : &:r2258_7, m2259_19 -# 2258| v2258_10(void) = ReturnVoid : -# 2258| v2258_11(void) = AliasedUse : ~m2259_16 -# 2258| v2258_12(void) = ExitFunction : +# 2259| void vacuous_destructor_call::call_destructor(ClassWithDestructor&) +# 2259| Block 0 +# 2259| v2259_1(void) = EnterFunction : +# 2259| m2259_2(unknown) = AliasedDefinition : +# 2259| m2259_3(unknown) = InitializeNonLocal : +# 2259| m2259_4(unknown) = Chi : total:m2259_2, partial:m2259_3 +# 2259| r2259_5(glval) = VariableAddress[t] : +# 2259| m2259_6(ClassWithDestructor &) = InitializeParameter[t] : &:r2259_5 +# 2259| r2259_7(ClassWithDestructor &) = Load[t] : &:r2259_5, m2259_6 +# 2259| m2259_8(unknown) = InitializeIndirection[t] : &:r2259_7 +# 2260| r2260_1(glval) = FunctionAddress[get] : +# 2260| r2260_2(glval) = VariableAddress[t] : +# 2260| r2260_3(ClassWithDestructor &) = Load[t] : &:r2260_2, m2259_6 +# 2260| r2260_4(glval) = CopyValue : r2260_3 +# 2260| r2260_5(ClassWithDestructor &) = CopyValue : r2260_4 +# 2260| r2260_6(ClassWithDestructor &) = Call[get] : func:r2260_1, 0:r2260_5 +# 2260| m2260_7(unknown) = ^CallSideEffect : ~m2259_4 +# 2260| m2260_8(unknown) = Chi : total:m2259_4, partial:m2260_7 +# 2260| v2260_9(void) = ^BufferReadSideEffect[0] : &:r2260_5, ~m2259_8 +# 2260| m2260_10(unknown) = ^BufferMayWriteSideEffect[0] : &:r2260_5 +# 2260| m2260_11(unknown) = Chi : total:m2259_8, partial:m2260_10 +# 2260| r2260_12(glval) = CopyValue : r2260_6 +# 2260| r2260_13(glval) = FunctionAddress[~ClassWithDestructor] : +# 2260| v2260_14(void) = Call[~ClassWithDestructor] : func:r2260_13 +# 2260| m2260_15(unknown) = ^CallSideEffect : ~m2260_8 +# 2260| m2260_16(unknown) = Chi : total:m2260_8, partial:m2260_15 +# 2260| v2260_17(void) = ^IndirectReadSideEffect[-1] : &:r2260_12, ~m2260_11 +# 2260| m2260_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2260_12 +# 2260| m2260_19(unknown) = Chi : total:m2260_11, partial:m2260_18 +# 2261| v2261_1(void) = NoOp : +# 2259| v2259_9(void) = ReturnIndirection[t] : &:r2259_7, m2260_19 +# 2259| v2259_10(void) = ReturnVoid : +# 2259| v2259_11(void) = AliasedUse : ~m2260_16 +# 2259| v2259_12(void) = ExitFunction : -# 2258| void vacuous_destructor_call::call_destructor(int&) -# 2258| Block 0 -# 2258| v2258_1(void) = EnterFunction : -# 2258| m2258_2(unknown) = AliasedDefinition : -# 2258| m2258_3(unknown) = InitializeNonLocal : -# 2258| m2258_4(unknown) = Chi : total:m2258_2, partial:m2258_3 -# 2258| r2258_5(glval) = VariableAddress[t] : -# 2258| m2258_6(int &) = InitializeParameter[t] : &:r2258_5 -# 2258| r2258_7(int &) = Load[t] : &:r2258_5, m2258_6 -# 2258| m2258_8(unknown) = InitializeIndirection[t] : &:r2258_7 -# 2259| r2259_1(glval) = FunctionAddress[get] : -# 2259| r2259_2(glval) = VariableAddress[t] : -# 2259| r2259_3(int &) = Load[t] : &:r2259_2, m2258_6 -# 2259| r2259_4(glval) = CopyValue : r2259_3 -# 2259| r2259_5(int &) = CopyValue : r2259_4 -# 2259| r2259_6(int &) = Call[get] : func:r2259_1, 0:r2259_5 -# 2259| m2259_7(unknown) = ^CallSideEffect : ~m2258_4 -# 2259| m2259_8(unknown) = Chi : total:m2258_4, partial:m2259_7 -# 2259| v2259_9(void) = ^BufferReadSideEffect[0] : &:r2259_5, ~m2258_8 -# 2259| m2259_10(unknown) = ^BufferMayWriteSideEffect[0] : &:r2259_5 -# 2259| m2259_11(unknown) = Chi : total:m2258_8, partial:m2259_10 -# 2259| r2259_12(glval) = CopyValue : r2259_6 -# 2260| v2260_1(void) = NoOp : -# 2258| v2258_9(void) = ReturnIndirection[t] : &:r2258_7, m2259_11 -# 2258| v2258_10(void) = ReturnVoid : -# 2258| v2258_11(void) = AliasedUse : ~m2259_8 -# 2258| v2258_12(void) = ExitFunction : +# 2259| void vacuous_destructor_call::call_destructor(int&) +# 2259| Block 0 +# 2259| v2259_1(void) = EnterFunction : +# 2259| m2259_2(unknown) = AliasedDefinition : +# 2259| m2259_3(unknown) = InitializeNonLocal : +# 2259| m2259_4(unknown) = Chi : total:m2259_2, partial:m2259_3 +# 2259| r2259_5(glval) = VariableAddress[t] : +# 2259| m2259_6(int &) = InitializeParameter[t] : &:r2259_5 +# 2259| r2259_7(int &) = Load[t] : &:r2259_5, m2259_6 +# 2259| m2259_8(unknown) = InitializeIndirection[t] : &:r2259_7 +# 2260| r2260_1(glval) = FunctionAddress[get] : +# 2260| r2260_2(glval) = VariableAddress[t] : +# 2260| r2260_3(int &) = Load[t] : &:r2260_2, m2259_6 +# 2260| r2260_4(glval) = CopyValue : r2260_3 +# 2260| r2260_5(int &) = CopyValue : r2260_4 +# 2260| r2260_6(int &) = Call[get] : func:r2260_1, 0:r2260_5 +# 2260| m2260_7(unknown) = ^CallSideEffect : ~m2259_4 +# 2260| m2260_8(unknown) = Chi : total:m2259_4, partial:m2260_7 +# 2260| v2260_9(void) = ^BufferReadSideEffect[0] : &:r2260_5, ~m2259_8 +# 2260| m2260_10(unknown) = ^BufferMayWriteSideEffect[0] : &:r2260_5 +# 2260| m2260_11(unknown) = Chi : total:m2259_8, partial:m2260_10 +# 2260| r2260_12(glval) = CopyValue : r2260_6 +# 2261| v2261_1(void) = NoOp : +# 2259| v2259_9(void) = ReturnIndirection[t] : &:r2259_7, m2260_11 +# 2259| v2259_10(void) = ReturnVoid : +# 2259| v2259_11(void) = AliasedUse : ~m2260_8 +# 2259| v2259_12(void) = ExitFunction : -# 2262| void vacuous_destructor_call::non_vacuous_destructor_call() -# 2262| Block 0 -# 2262| v2262_1(void) = EnterFunction : -# 2262| m2262_2(unknown) = AliasedDefinition : -# 2262| m2262_3(unknown) = InitializeNonLocal : -# 2262| m2262_4(unknown) = Chi : total:m2262_2, partial:m2262_3 -# 2263| r2263_1(glval) = VariableAddress[c] : -# 2263| m2263_2(ClassWithDestructor) = Uninitialized[c] : &:r2263_1 -# 2263| r2263_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2263| v2263_4(void) = Call[ClassWithDestructor] : func:r2263_3, this:r2263_1 -# 2263| m2263_5(unknown) = ^CallSideEffect : ~m2262_4 -# 2263| m2263_6(unknown) = Chi : total:m2262_4, partial:m2263_5 -# 2263| m2263_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2263_1 -# 2263| m2263_8(ClassWithDestructor) = Chi : total:m2263_2, partial:m2263_7 -# 2264| r2264_1(glval) = FunctionAddress[call_destructor] : -# 2264| r2264_2(glval) = VariableAddress[c] : -# 2264| r2264_3(ClassWithDestructor &) = CopyValue : r2264_2 -# 2264| v2264_4(void) = Call[call_destructor] : func:r2264_1, 0:r2264_3 -# 2264| m2264_5(unknown) = ^CallSideEffect : ~m2263_6 -# 2264| m2264_6(unknown) = Chi : total:m2263_6, partial:m2264_5 -# 2264| v2264_7(void) = ^BufferReadSideEffect[0] : &:r2264_3, ~m2263_8 -# 2264| m2264_8(unknown) = ^BufferMayWriteSideEffect[0] : &:r2264_3 -# 2264| m2264_9(ClassWithDestructor) = Chi : total:m2263_8, partial:m2264_8 -# 2265| v2265_1(void) = NoOp : +# 2263| void vacuous_destructor_call::non_vacuous_destructor_call() +# 2263| Block 0 +# 2263| v2263_1(void) = EnterFunction : +# 2263| m2263_2(unknown) = AliasedDefinition : +# 2263| m2263_3(unknown) = InitializeNonLocal : +# 2263| m2263_4(unknown) = Chi : total:m2263_2, partial:m2263_3 +# 2264| r2264_1(glval) = VariableAddress[c] : +# 2264| m2264_2(ClassWithDestructor) = Uninitialized[c] : &:r2264_1 +# 2264| r2264_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2264| v2264_4(void) = Call[ClassWithDestructor] : func:r2264_3, this:r2264_1 +# 2264| m2264_5(unknown) = ^CallSideEffect : ~m2263_4 +# 2264| m2264_6(unknown) = Chi : total:m2263_4, partial:m2264_5 +# 2264| m2264_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2264_1 +# 2264| m2264_8(ClassWithDestructor) = Chi : total:m2264_2, partial:m2264_7 +# 2265| r2265_1(glval) = FunctionAddress[call_destructor] : # 2265| r2265_2(glval) = VariableAddress[c] : -# 2265| r2265_3(glval) = FunctionAddress[~ClassWithDestructor] : -# 2265| v2265_4(void) = Call[~ClassWithDestructor] : func:r2265_3, this:r2265_2 +# 2265| r2265_3(ClassWithDestructor &) = CopyValue : r2265_2 +# 2265| v2265_4(void) = Call[call_destructor] : func:r2265_1, 0:r2265_3 # 2265| m2265_5(unknown) = ^CallSideEffect : ~m2264_6 # 2265| m2265_6(unknown) = Chi : total:m2264_6, partial:m2265_5 -# 2265| v2265_7(void) = ^IndirectReadSideEffect[-1] : &:r2265_2, m2264_9 -# 2265| m2265_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2265_2 -# 2265| m2265_9(ClassWithDestructor) = Chi : total:m2264_9, partial:m2265_8 -# 2262| v2262_5(void) = ReturnVoid : -# 2262| v2262_6(void) = AliasedUse : ~m2265_6 -# 2262| v2262_7(void) = ExitFunction : +# 2265| v2265_7(void) = ^BufferReadSideEffect[0] : &:r2265_3, ~m2264_8 +# 2265| m2265_8(unknown) = ^BufferMayWriteSideEffect[0] : &:r2265_3 +# 2265| m2265_9(ClassWithDestructor) = Chi : total:m2264_8, partial:m2265_8 +# 2266| v2266_1(void) = NoOp : +# 2266| r2266_2(glval) = VariableAddress[c] : +# 2266| r2266_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2266| v2266_4(void) = Call[~ClassWithDestructor] : func:r2266_3, this:r2266_2 +# 2266| m2266_5(unknown) = ^CallSideEffect : ~m2265_6 +# 2266| m2266_6(unknown) = Chi : total:m2265_6, partial:m2266_5 +# 2266| v2266_7(void) = ^IndirectReadSideEffect[-1] : &:r2266_2, m2265_9 +# 2266| m2266_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2266_2 +# 2266| m2266_9(ClassWithDestructor) = Chi : total:m2265_9, partial:m2266_8 +# 2263| v2263_5(void) = ReturnVoid : +# 2263| v2263_6(void) = AliasedUse : ~m2266_6 +# 2263| v2263_7(void) = ExitFunction : -# 2267| void vacuous_destructor_call::vacuous_destructor_call() -# 2267| Block 0 -# 2267| v2267_1(void) = EnterFunction : -# 2267| m2267_2(unknown) = AliasedDefinition : -# 2267| m2267_3(unknown) = InitializeNonLocal : -# 2267| m2267_4(unknown) = Chi : total:m2267_2, partial:m2267_3 -# 2268| r2268_1(glval) = VariableAddress[i] : -# 2268| m2268_2(int) = Uninitialized[i] : &:r2268_1 -# 2269| r2269_1(glval) = FunctionAddress[call_destructor] : -# 2269| r2269_2(glval) = VariableAddress[i] : -# 2269| r2269_3(int &) = CopyValue : r2269_2 -# 2269| v2269_4(void) = Call[call_destructor] : func:r2269_1, 0:r2269_3 -# 2269| m2269_5(unknown) = ^CallSideEffect : ~m2267_4 -# 2269| m2269_6(unknown) = Chi : total:m2267_4, partial:m2269_5 -# 2269| v2269_7(void) = ^BufferReadSideEffect[0] : &:r2269_3, ~m2268_2 -# 2269| m2269_8(unknown) = ^BufferMayWriteSideEffect[0] : &:r2269_3 -# 2269| m2269_9(int) = Chi : total:m2268_2, partial:m2269_8 -# 2270| v2270_1(void) = NoOp : -# 2267| v2267_5(void) = ReturnVoid : -# 2267| v2267_6(void) = AliasedUse : ~m2269_6 -# 2267| v2267_7(void) = ExitFunction : +# 2268| void vacuous_destructor_call::vacuous_destructor_call() +# 2268| Block 0 +# 2268| v2268_1(void) = EnterFunction : +# 2268| m2268_2(unknown) = AliasedDefinition : +# 2268| m2268_3(unknown) = InitializeNonLocal : +# 2268| m2268_4(unknown) = Chi : total:m2268_2, partial:m2268_3 +# 2269| r2269_1(glval) = VariableAddress[i] : +# 2269| m2269_2(int) = Uninitialized[i] : &:r2269_1 +# 2270| r2270_1(glval) = FunctionAddress[call_destructor] : +# 2270| r2270_2(glval) = VariableAddress[i] : +# 2270| r2270_3(int &) = CopyValue : r2270_2 +# 2270| v2270_4(void) = Call[call_destructor] : func:r2270_1, 0:r2270_3 +# 2270| m2270_5(unknown) = ^CallSideEffect : ~m2268_4 +# 2270| m2270_6(unknown) = Chi : total:m2268_4, partial:m2270_5 +# 2270| v2270_7(void) = ^BufferReadSideEffect[0] : &:r2270_3, ~m2269_2 +# 2270| m2270_8(unknown) = ^BufferMayWriteSideEffect[0] : &:r2270_3 +# 2270| m2270_9(int) = Chi : total:m2269_2, partial:m2270_8 +# 2271| v2271_1(void) = NoOp : +# 2268| v2268_5(void) = ReturnVoid : +# 2268| v2268_6(void) = AliasedUse : ~m2270_6 +# 2268| v2268_7(void) = ExitFunction : -# 2273| void TryCatchDestructors(bool) -# 2273| Block 0 -# 2273| v2273_1(void) = EnterFunction : -# 2273| m2273_2(unknown) = AliasedDefinition : -# 2273| m2273_3(unknown) = InitializeNonLocal : -# 2273| m2273_4(unknown) = Chi : total:m2273_2, partial:m2273_3 -# 2273| r2273_5(glval) = VariableAddress[b] : -# 2273| m2273_6(bool) = InitializeParameter[b] : &:r2273_5 -# 2275| r2275_1(glval) = VariableAddress[s] : -# 2275| m2275_2(String) = Uninitialized[s] : &:r2275_1 -# 2275| m2275_3(unknown) = Chi : total:m2273_4, partial:m2275_2 -# 2275| r2275_4(glval) = FunctionAddress[String] : -# 2275| v2275_5(void) = Call[String] : func:r2275_4, this:r2275_1 -# 2275| m2275_6(unknown) = ^CallSideEffect : ~m2275_3 -# 2275| m2275_7(unknown) = Chi : total:m2275_3, partial:m2275_6 -# 2275| m2275_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2275_1 -# 2275| m2275_9(unknown) = Chi : total:m2275_7, partial:m2275_8 -# 2276| r2276_1(glval) = VariableAddress[b] : -# 2276| r2276_2(bool) = Load[b] : &:r2276_1, m2273_6 -# 2276| v2276_3(void) = ConditionalBranch : r2276_2 +# 2274| void TryCatchDestructors(bool) +# 2274| Block 0 +# 2274| v2274_1(void) = EnterFunction : +# 2274| m2274_2(unknown) = AliasedDefinition : +# 2274| m2274_3(unknown) = InitializeNonLocal : +# 2274| m2274_4(unknown) = Chi : total:m2274_2, partial:m2274_3 +# 2274| r2274_5(glval) = VariableAddress[b] : +# 2274| m2274_6(bool) = InitializeParameter[b] : &:r2274_5 +# 2276| r2276_1(glval) = VariableAddress[s] : +# 2276| m2276_2(String) = Uninitialized[s] : &:r2276_1 +# 2276| m2276_3(unknown) = Chi : total:m2274_4, partial:m2276_2 +# 2276| r2276_4(glval) = FunctionAddress[String] : +# 2276| v2276_5(void) = Call[String] : func:r2276_4, this:r2276_1 +# 2276| m2276_6(unknown) = ^CallSideEffect : ~m2276_3 +# 2276| m2276_7(unknown) = Chi : total:m2276_3, partial:m2276_6 +# 2276| m2276_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2276_1 +# 2276| m2276_9(unknown) = Chi : total:m2276_7, partial:m2276_8 +# 2277| r2277_1(glval) = VariableAddress[b] : +# 2277| r2277_2(bool) = Load[b] : &:r2277_1, m2274_6 +# 2277| v2277_3(void) = ConditionalBranch : r2277_2 #-----| False -> Block 4 #-----| True -> Block 3 -# 2273| Block 1 -# 2273| m2273_7(unknown) = Phi : from 2:~m2273_10, from 10:~m2289_1 -# 2273| v2273_8(void) = AliasedUse : ~m2273_7 -# 2273| v2273_9(void) = ExitFunction : +# 2274| Block 1 +# 2274| m2274_7(unknown) = Phi : from 2:~m2274_10, from 10:~m2290_1 +# 2274| v2274_8(void) = AliasedUse : ~m2274_7 +# 2274| v2274_9(void) = ExitFunction : -# 2273| Block 2 -# 2273| m2273_10(unknown) = Phi : from 6:~m2282_12, from 9:~m2280_8 -# 2273| v2273_11(void) = Unwind : +# 2274| Block 2 +# 2274| m2274_10(unknown) = Phi : from 6:~m2283_12, from 9:~m2281_8 +# 2274| v2274_11(void) = Unwind : #-----| Goto -> Block 1 -# 2277| Block 3 -# 2277| r2277_1(glval) = VariableAddress[#throw2277:7] : -# 2277| r2277_2(glval) = StringConstant["string literal"] : -# 2277| r2277_3(char *) = Convert : r2277_2 -# 2277| m2277_4(char *) = Store[#throw2277:7] : &:r2277_1, r2277_3 -# 2277| v2277_5(void) = ThrowValue : &:r2277_1, m2277_4 -# 2280| r2280_1(glval) = VariableAddress[s] : -# 2280| r2280_2(glval) = FunctionAddress[~String] : -# 2280| v2280_3(void) = Call[~String] : func:r2280_2, this:r2280_1 -# 2280| m2280_4(unknown) = ^CallSideEffect : ~m2275_9 -# 2280| m2280_5(unknown) = Chi : total:m2275_9, partial:m2280_4 -# 2280| v2280_6(void) = ^IndirectReadSideEffect[-1] : &:r2280_1, ~m2280_5 -# 2280| m2280_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 -# 2280| m2280_8(unknown) = Chi : total:m2280_5, partial:m2280_7 +# 2278| Block 3 +# 2278| r2278_1(glval) = VariableAddress[#throw2278:7] : +# 2278| r2278_2(glval) = StringConstant["string literal"] : +# 2278| r2278_3(char *) = Convert : r2278_2 +# 2278| m2278_4(char *) = Store[#throw2278:7] : &:r2278_1, r2278_3 +# 2278| v2278_5(void) = ThrowValue : &:r2278_1, m2278_4 +# 2281| r2281_1(glval) = VariableAddress[s] : +# 2281| r2281_2(glval) = FunctionAddress[~String] : +# 2281| v2281_3(void) = Call[~String] : func:r2281_2, this:r2281_1 +# 2281| m2281_4(unknown) = ^CallSideEffect : ~m2276_9 +# 2281| m2281_5(unknown) = Chi : total:m2276_9, partial:m2281_4 +# 2281| v2281_6(void) = ^IndirectReadSideEffect[-1] : &:r2281_1, ~m2281_5 +# 2281| m2281_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_1 +# 2281| m2281_8(unknown) = Chi : total:m2281_5, partial:m2281_7 #-----| Exception -> Block 5 -# 2279| Block 4 -# 2279| r2279_1(glval) = VariableAddress[s2] : -# 2279| m2279_2(String) = Uninitialized[s2] : &:r2279_1 -# 2279| m2279_3(unknown) = Chi : total:m2275_9, partial:m2279_2 -# 2279| r2279_4(glval) = FunctionAddress[String] : -# 2279| v2279_5(void) = Call[String] : func:r2279_4, this:r2279_1 -# 2279| m2279_6(unknown) = ^CallSideEffect : ~m2279_3 -# 2279| m2279_7(unknown) = Chi : total:m2279_3, partial:m2279_6 -# 2279| m2279_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2279_1 -# 2279| m2279_9(unknown) = Chi : total:m2279_7, partial:m2279_8 -# 2280| r2280_9(glval) = VariableAddress[s2] : -# 2280| r2280_10(glval) = FunctionAddress[~String] : -# 2280| v2280_11(void) = Call[~String] : func:r2280_10, this:r2280_9 -# 2280| m2280_12(unknown) = ^CallSideEffect : ~m2279_9 -# 2280| m2280_13(unknown) = Chi : total:m2279_9, partial:m2280_12 -# 2280| v2280_14(void) = ^IndirectReadSideEffect[-1] : &:r2280_9, ~m2280_13 -# 2280| m2280_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_9 -# 2280| m2280_16(unknown) = Chi : total:m2280_13, partial:m2280_15 -# 2280| r2280_17(glval) = VariableAddress[s] : -# 2280| r2280_18(glval) = FunctionAddress[~String] : -# 2280| v2280_19(void) = Call[~String] : func:r2280_18, this:r2280_17 -# 2280| m2280_20(unknown) = ^CallSideEffect : ~m2280_16 -# 2280| m2280_21(unknown) = Chi : total:m2280_16, partial:m2280_20 -# 2280| v2280_22(void) = ^IndirectReadSideEffect[-1] : &:r2280_17, ~m2280_21 -# 2280| m2280_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_17 -# 2280| m2280_24(unknown) = Chi : total:m2280_21, partial:m2280_23 +# 2280| Block 4 +# 2280| r2280_1(glval) = VariableAddress[s2] : +# 2280| m2280_2(String) = Uninitialized[s2] : &:r2280_1 +# 2280| m2280_3(unknown) = Chi : total:m2276_9, partial:m2280_2 +# 2280| r2280_4(glval) = FunctionAddress[String] : +# 2280| v2280_5(void) = Call[String] : func:r2280_4, this:r2280_1 +# 2280| m2280_6(unknown) = ^CallSideEffect : ~m2280_3 +# 2280| m2280_7(unknown) = Chi : total:m2280_3, partial:m2280_6 +# 2280| m2280_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 +# 2280| m2280_9(unknown) = Chi : total:m2280_7, partial:m2280_8 +# 2281| r2281_9(glval) = VariableAddress[s2] : +# 2281| r2281_10(glval) = FunctionAddress[~String] : +# 2281| v2281_11(void) = Call[~String] : func:r2281_10, this:r2281_9 +# 2281| m2281_12(unknown) = ^CallSideEffect : ~m2280_9 +# 2281| m2281_13(unknown) = Chi : total:m2280_9, partial:m2281_12 +# 2281| v2281_14(void) = ^IndirectReadSideEffect[-1] : &:r2281_9, ~m2281_13 +# 2281| m2281_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_9 +# 2281| m2281_16(unknown) = Chi : total:m2281_13, partial:m2281_15 +# 2281| r2281_17(glval) = VariableAddress[s] : +# 2281| r2281_18(glval) = FunctionAddress[~String] : +# 2281| v2281_19(void) = Call[~String] : func:r2281_18, this:r2281_17 +# 2281| m2281_20(unknown) = ^CallSideEffect : ~m2281_16 +# 2281| m2281_21(unknown) = Chi : total:m2281_16, partial:m2281_20 +# 2281| v2281_22(void) = ^IndirectReadSideEffect[-1] : &:r2281_17, ~m2281_21 +# 2281| m2281_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_17 +# 2281| m2281_24(unknown) = Chi : total:m2281_21, partial:m2281_23 #-----| Goto -> Block 10 -# 2281| Block 5 -# 2281| v2281_1(void) = CatchByType[const char *] : +# 2282| Block 5 +# 2282| v2282_1(void) = CatchByType[const char *] : #-----| Exception -> Block 7 #-----| Goto -> Block 6 -# 2281| Block 6 -# 2281| r2281_2(glval) = VariableAddress[s] : -# 2281| m2281_3(char *) = InitializeParameter[s] : &:r2281_2 -# 2281| r2281_4(char *) = Load[s] : &:r2281_2, m2281_3 -# 2281| m2281_5(unknown) = InitializeIndirection[s] : &:r2281_4 -# 2281| m2281_6(unknown) = Chi : total:m2280_8, partial:m2281_5 -# 2282| r2282_1(glval) = VariableAddress[#throw2282:5] : -# 2282| m2282_2(String) = Uninitialized[#throw2282:5] : &:r2282_1 -# 2282| m2282_3(unknown) = Chi : total:m2281_6, partial:m2282_2 -# 2282| r2282_4(glval) = FunctionAddress[String] : -# 2282| r2282_5(glval) = VariableAddress[s] : -# 2282| r2282_6(char *) = Load[s] : &:r2282_5, m2281_3 -# 2282| v2282_7(void) = Call[String] : func:r2282_4, this:r2282_1, 0:r2282_6 -# 2282| m2282_8(unknown) = ^CallSideEffect : ~m2282_3 -# 2282| m2282_9(unknown) = Chi : total:m2282_3, partial:m2282_8 -# 2282| v2282_10(void) = ^BufferReadSideEffect[0] : &:r2282_6, ~m2282_9 -# 2282| m2282_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2282_1 -# 2282| m2282_12(unknown) = Chi : total:m2282_9, partial:m2282_11 -# 2282| v2282_13(void) = ThrowValue : &:r2282_1, ~m2282_12 +# 2282| Block 6 +# 2282| r2282_2(glval) = VariableAddress[s] : +# 2282| m2282_3(char *) = InitializeParameter[s] : &:r2282_2 +# 2282| r2282_4(char *) = Load[s] : &:r2282_2, m2282_3 +# 2282| m2282_5(unknown) = InitializeIndirection[s] : &:r2282_4 +# 2282| m2282_6(unknown) = Chi : total:m2281_8, partial:m2282_5 +# 2283| r2283_1(glval) = VariableAddress[#throw2283:5] : +# 2283| m2283_2(String) = Uninitialized[#throw2283:5] : &:r2283_1 +# 2283| m2283_3(unknown) = Chi : total:m2282_6, partial:m2283_2 +# 2283| r2283_4(glval) = FunctionAddress[String] : +# 2283| r2283_5(glval) = VariableAddress[s] : +# 2283| r2283_6(char *) = Load[s] : &:r2283_5, m2282_3 +# 2283| v2283_7(void) = Call[String] : func:r2283_4, this:r2283_1, 0:r2283_6 +# 2283| m2283_8(unknown) = ^CallSideEffect : ~m2283_3 +# 2283| m2283_9(unknown) = Chi : total:m2283_3, partial:m2283_8 +# 2283| v2283_10(void) = ^BufferReadSideEffect[0] : &:r2283_6, ~m2283_9 +# 2283| m2283_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2283_1 +# 2283| m2283_12(unknown) = Chi : total:m2283_9, partial:m2283_11 +# 2283| v2283_13(void) = ThrowValue : &:r2283_1, ~m2283_12 #-----| Exception -> Block 2 -# 2284| Block 7 -# 2284| v2284_1(void) = CatchByType[const String &] : +# 2285| Block 7 +# 2285| v2285_1(void) = CatchByType[const String &] : #-----| Exception -> Block 9 #-----| Goto -> Block 8 -# 2284| Block 8 -# 2284| r2284_2(glval) = VariableAddress[e] : -# 2284| m2284_3(String &) = InitializeParameter[e] : &:r2284_2 -# 2284| r2284_4(String &) = Load[e] : &:r2284_2, m2284_3 -# 2284| m2284_5(unknown) = InitializeIndirection[e] : &:r2284_4 -# 2284| v2284_6(void) = NoOp : +# 2285| Block 8 +# 2285| r2285_2(glval) = VariableAddress[e] : +# 2285| m2285_3(String &) = InitializeParameter[e] : &:r2285_2 +# 2285| r2285_4(String &) = Load[e] : &:r2285_2, m2285_3 +# 2285| m2285_5(unknown) = InitializeIndirection[e] : &:r2285_4 +# 2285| v2285_6(void) = NoOp : #-----| Goto -> Block 10 -# 2286| Block 9 -# 2286| v2286_1(void) = CatchAny : -# 2287| v2287_1(void) = ReThrow : +# 2287| Block 9 +# 2287| v2287_1(void) = CatchAny : +# 2288| v2288_1(void) = ReThrow : #-----| Exception -> Block 2 -# 2289| Block 10 -# 2289| m2289_1(unknown) = Phi : from 4:~m2280_24, from 8:~m2280_8 -# 2289| v2289_2(void) = NoOp : -# 2273| v2273_12(void) = ReturnVoid : +# 2290| Block 10 +# 2290| m2290_1(unknown) = Phi : from 4:~m2281_24, from 8:~m2281_8 +# 2290| v2290_2(void) = NoOp : +# 2274| v2274_12(void) = ReturnVoid : #-----| Goto -> Block 1 -# 2291| void IfDestructors(bool) -# 2291| Block 0 -# 2291| v2291_1(void) = EnterFunction : -# 2291| m2291_2(unknown) = AliasedDefinition : -# 2291| m2291_3(unknown) = InitializeNonLocal : -# 2291| m2291_4(unknown) = Chi : total:m2291_2, partial:m2291_3 -# 2291| r2291_5(glval) = VariableAddress[b] : -# 2291| m2291_6(bool) = InitializeParameter[b] : &:r2291_5 -# 2292| r2292_1(glval) = VariableAddress[s1] : -# 2292| m2292_2(String) = Uninitialized[s1] : &:r2292_1 -# 2292| m2292_3(unknown) = Chi : total:m2291_4, partial:m2292_2 -# 2292| r2292_4(glval) = FunctionAddress[String] : -# 2292| v2292_5(void) = Call[String] : func:r2292_4, this:r2292_1 -# 2292| m2292_6(unknown) = ^CallSideEffect : ~m2292_3 -# 2292| m2292_7(unknown) = Chi : total:m2292_3, partial:m2292_6 -# 2292| m2292_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2292_1 -# 2292| m2292_9(unknown) = Chi : total:m2292_7, partial:m2292_8 -# 2293| r2293_1(glval) = VariableAddress[b] : -# 2293| r2293_2(bool) = Load[b] : &:r2293_1, m2291_6 -# 2293| v2293_3(void) = ConditionalBranch : r2293_2 +# 2292| void IfDestructors(bool) +# 2292| Block 0 +# 2292| v2292_1(void) = EnterFunction : +# 2292| m2292_2(unknown) = AliasedDefinition : +# 2292| m2292_3(unknown) = InitializeNonLocal : +# 2292| m2292_4(unknown) = Chi : total:m2292_2, partial:m2292_3 +# 2292| r2292_5(glval) = VariableAddress[b] : +# 2292| m2292_6(bool) = InitializeParameter[b] : &:r2292_5 +# 2293| r2293_1(glval) = VariableAddress[s1] : +# 2293| m2293_2(String) = Uninitialized[s1] : &:r2293_1 +# 2293| m2293_3(unknown) = Chi : total:m2292_4, partial:m2293_2 +# 2293| r2293_4(glval) = FunctionAddress[String] : +# 2293| v2293_5(void) = Call[String] : func:r2293_4, this:r2293_1 +# 2293| m2293_6(unknown) = ^CallSideEffect : ~m2293_3 +# 2293| m2293_7(unknown) = Chi : total:m2293_3, partial:m2293_6 +# 2293| m2293_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2293_1 +# 2293| m2293_9(unknown) = Chi : total:m2293_7, partial:m2293_8 +# 2294| r2294_1(glval) = VariableAddress[b] : +# 2294| r2294_2(bool) = Load[b] : &:r2294_1, m2292_6 +# 2294| v2294_3(void) = ConditionalBranch : r2294_2 #-----| False -> Block 2 #-----| True -> Block 1 -# 2294| Block 1 -# 2294| r2294_1(glval) = VariableAddress[s2] : -# 2294| m2294_2(String) = Uninitialized[s2] : &:r2294_1 -# 2294| m2294_3(unknown) = Chi : total:m2292_9, partial:m2294_2 -# 2294| r2294_4(glval) = FunctionAddress[String] : -# 2294| v2294_5(void) = Call[String] : func:r2294_4, this:r2294_1 -# 2294| m2294_6(unknown) = ^CallSideEffect : ~m2294_3 -# 2294| m2294_7(unknown) = Chi : total:m2294_3, partial:m2294_6 -# 2294| m2294_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2294_1 -# 2294| m2294_9(unknown) = Chi : total:m2294_7, partial:m2294_8 +# 2295| Block 1 # 2295| r2295_1(glval) = VariableAddress[s2] : -# 2295| r2295_2(glval) = FunctionAddress[~String] : -# 2295| v2295_3(void) = Call[~String] : func:r2295_2, this:r2295_1 -# 2295| m2295_4(unknown) = ^CallSideEffect : ~m2294_9 -# 2295| m2295_5(unknown) = Chi : total:m2294_9, partial:m2295_4 -# 2295| v2295_6(void) = ^IndirectReadSideEffect[-1] : &:r2295_1, ~m2295_5 -# 2295| m2295_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2295_1 -# 2295| m2295_8(unknown) = Chi : total:m2295_5, partial:m2295_7 +# 2295| m2295_2(String) = Uninitialized[s2] : &:r2295_1 +# 2295| m2295_3(unknown) = Chi : total:m2293_9, partial:m2295_2 +# 2295| r2295_4(glval) = FunctionAddress[String] : +# 2295| v2295_5(void) = Call[String] : func:r2295_4, this:r2295_1 +# 2295| m2295_6(unknown) = ^CallSideEffect : ~m2295_3 +# 2295| m2295_7(unknown) = Chi : total:m2295_3, partial:m2295_6 +# 2295| m2295_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2295_1 +# 2295| m2295_9(unknown) = Chi : total:m2295_7, partial:m2295_8 +# 2296| r2296_1(glval) = VariableAddress[s2] : +# 2296| r2296_2(glval) = FunctionAddress[~String] : +# 2296| v2296_3(void) = Call[~String] : func:r2296_2, this:r2296_1 +# 2296| m2296_4(unknown) = ^CallSideEffect : ~m2295_9 +# 2296| m2296_5(unknown) = Chi : total:m2295_9, partial:m2296_4 +# 2296| v2296_6(void) = ^IndirectReadSideEffect[-1] : &:r2296_1, ~m2296_5 +# 2296| m2296_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2296_1 +# 2296| m2296_8(unknown) = Chi : total:m2296_5, partial:m2296_7 #-----| Goto -> Block 3 -# 2296| Block 2 -# 2296| r2296_1(glval) = VariableAddress[s3] : -# 2296| m2296_2(String) = Uninitialized[s3] : &:r2296_1 -# 2296| m2296_3(unknown) = Chi : total:m2292_9, partial:m2296_2 -# 2296| r2296_4(glval) = FunctionAddress[String] : -# 2296| v2296_5(void) = Call[String] : func:r2296_4, this:r2296_1 -# 2296| m2296_6(unknown) = ^CallSideEffect : ~m2296_3 -# 2296| m2296_7(unknown) = Chi : total:m2296_3, partial:m2296_6 -# 2296| m2296_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2296_1 -# 2296| m2296_9(unknown) = Chi : total:m2296_7, partial:m2296_8 +# 2297| Block 2 # 2297| r2297_1(glval) = VariableAddress[s3] : -# 2297| r2297_2(glval) = FunctionAddress[~String] : -# 2297| v2297_3(void) = Call[~String] : func:r2297_2, this:r2297_1 -# 2297| m2297_4(unknown) = ^CallSideEffect : ~m2296_9 -# 2297| m2297_5(unknown) = Chi : total:m2296_9, partial:m2297_4 -# 2297| v2297_6(void) = ^IndirectReadSideEffect[-1] : &:r2297_1, ~m2297_5 -# 2297| m2297_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2297_1 -# 2297| m2297_8(unknown) = Chi : total:m2297_5, partial:m2297_7 +# 2297| m2297_2(String) = Uninitialized[s3] : &:r2297_1 +# 2297| m2297_3(unknown) = Chi : total:m2293_9, partial:m2297_2 +# 2297| r2297_4(glval) = FunctionAddress[String] : +# 2297| v2297_5(void) = Call[String] : func:r2297_4, this:r2297_1 +# 2297| m2297_6(unknown) = ^CallSideEffect : ~m2297_3 +# 2297| m2297_7(unknown) = Chi : total:m2297_3, partial:m2297_6 +# 2297| m2297_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2297_1 +# 2297| m2297_9(unknown) = Chi : total:m2297_7, partial:m2297_8 +# 2298| r2298_1(glval) = VariableAddress[s3] : +# 2298| r2298_2(glval) = FunctionAddress[~String] : +# 2298| v2298_3(void) = Call[~String] : func:r2298_2, this:r2298_1 +# 2298| m2298_4(unknown) = ^CallSideEffect : ~m2297_9 +# 2298| m2298_5(unknown) = Chi : total:m2297_9, partial:m2298_4 +# 2298| v2298_6(void) = ^IndirectReadSideEffect[-1] : &:r2298_1, ~m2298_5 +# 2298| m2298_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2298_1 +# 2298| m2298_8(unknown) = Chi : total:m2298_5, partial:m2298_7 #-----| Goto -> Block 3 -# 2298| Block 3 -# 2298| m2298_1(unknown) = Phi : from 1:~m2295_8, from 2:~m2297_8 -# 2298| r2298_2(glval) = VariableAddress[s4] : -# 2298| m2298_3(String) = Uninitialized[s4] : &:r2298_2 -# 2298| m2298_4(unknown) = Chi : total:m2298_1, partial:m2298_3 -# 2298| r2298_5(glval) = FunctionAddress[String] : -# 2298| v2298_6(void) = Call[String] : func:r2298_5, this:r2298_2 -# 2298| m2298_7(unknown) = ^CallSideEffect : ~m2298_4 -# 2298| m2298_8(unknown) = Chi : total:m2298_4, partial:m2298_7 -# 2298| m2298_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2298_2 -# 2298| m2298_10(unknown) = Chi : total:m2298_8, partial:m2298_9 -# 2299| v2299_1(void) = NoOp : +# 2299| Block 3 +# 2299| m2299_1(unknown) = Phi : from 1:~m2296_8, from 2:~m2298_8 # 2299| r2299_2(glval) = VariableAddress[s4] : -# 2299| r2299_3(glval) = FunctionAddress[~String] : -# 2299| v2299_4(void) = Call[~String] : func:r2299_3, this:r2299_2 -# 2299| m2299_5(unknown) = ^CallSideEffect : ~m2298_10 -# 2299| m2299_6(unknown) = Chi : total:m2298_10, partial:m2299_5 -# 2299| v2299_7(void) = ^IndirectReadSideEffect[-1] : &:r2299_2, ~m2299_6 -# 2299| m2299_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2299_2 -# 2299| m2299_9(unknown) = Chi : total:m2299_6, partial:m2299_8 -# 2299| r2299_10(glval) = VariableAddress[s1] : -# 2299| r2299_11(glval) = FunctionAddress[~String] : -# 2299| v2299_12(void) = Call[~String] : func:r2299_11, this:r2299_10 -# 2299| m2299_13(unknown) = ^CallSideEffect : ~m2299_9 -# 2299| m2299_14(unknown) = Chi : total:m2299_9, partial:m2299_13 -# 2299| v2299_15(void) = ^IndirectReadSideEffect[-1] : &:r2299_10, ~m2299_14 -# 2299| m2299_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r2299_10 -# 2299| m2299_17(unknown) = Chi : total:m2299_14, partial:m2299_16 -# 2291| v2291_7(void) = ReturnVoid : -# 2291| v2291_8(void) = AliasedUse : ~m2299_14 -# 2291| v2291_9(void) = ExitFunction : +# 2299| m2299_3(String) = Uninitialized[s4] : &:r2299_2 +# 2299| m2299_4(unknown) = Chi : total:m2299_1, partial:m2299_3 +# 2299| r2299_5(glval) = FunctionAddress[String] : +# 2299| v2299_6(void) = Call[String] : func:r2299_5, this:r2299_2 +# 2299| m2299_7(unknown) = ^CallSideEffect : ~m2299_4 +# 2299| m2299_8(unknown) = Chi : total:m2299_4, partial:m2299_7 +# 2299| m2299_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2299_2 +# 2299| m2299_10(unknown) = Chi : total:m2299_8, partial:m2299_9 +# 2300| v2300_1(void) = NoOp : +# 2300| r2300_2(glval) = VariableAddress[s4] : +# 2300| r2300_3(glval) = FunctionAddress[~String] : +# 2300| v2300_4(void) = Call[~String] : func:r2300_3, this:r2300_2 +# 2300| m2300_5(unknown) = ^CallSideEffect : ~m2299_10 +# 2300| m2300_6(unknown) = Chi : total:m2299_10, partial:m2300_5 +# 2300| v2300_7(void) = ^IndirectReadSideEffect[-1] : &:r2300_2, ~m2300_6 +# 2300| m2300_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2300_2 +# 2300| m2300_9(unknown) = Chi : total:m2300_6, partial:m2300_8 +# 2300| r2300_10(glval) = VariableAddress[s1] : +# 2300| r2300_11(glval) = FunctionAddress[~String] : +# 2300| v2300_12(void) = Call[~String] : func:r2300_11, this:r2300_10 +# 2300| m2300_13(unknown) = ^CallSideEffect : ~m2300_9 +# 2300| m2300_14(unknown) = Chi : total:m2300_9, partial:m2300_13 +# 2300| v2300_15(void) = ^IndirectReadSideEffect[-1] : &:r2300_10, ~m2300_14 +# 2300| m2300_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r2300_10 +# 2300| m2300_17(unknown) = Chi : total:m2300_14, partial:m2300_16 +# 2292| v2292_7(void) = ReturnVoid : +# 2292| v2292_8(void) = AliasedUse : ~m2300_14 +# 2292| v2292_9(void) = ExitFunction : -# 2301| void ForDestructors() -# 2301| Block 0 -# 2301| v2301_1(void) = EnterFunction : -# 2301| m2301_2(unknown) = AliasedDefinition : -# 2301| m2301_3(unknown) = InitializeNonLocal : -# 2301| m2301_4(unknown) = Chi : total:m2301_2, partial:m2301_3 -# 2302| r2302_1(glval) = VariableAddress[c] : -# 2302| r2302_2(char) = Constant[97] : -# 2302| m2302_3(char) = Store[c] : &:r2302_1, r2302_2 -# 2303| r2303_1(glval) = VariableAddress[s] : -# 2303| m2303_2(String) = Uninitialized[s] : &:r2303_1 -# 2303| m2303_3(unknown) = Chi : total:m2301_4, partial:m2303_2 -# 2303| r2303_4(glval) = FunctionAddress[String] : -# 2303| r2303_5(glval) = StringConstant["hello"] : -# 2303| r2303_6(char *) = Convert : r2303_5 -# 2303| v2303_7(void) = Call[String] : func:r2303_4, this:r2303_1, 0:r2303_6 -# 2303| m2303_8(unknown) = ^CallSideEffect : ~m2303_3 -# 2303| m2303_9(unknown) = Chi : total:m2303_3, partial:m2303_8 -# 2303| v2303_10(void) = ^BufferReadSideEffect[0] : &:r2303_6, ~m2301_3 -# 2303| m2303_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2303_1 -# 2303| m2303_12(unknown) = Chi : total:m2303_9, partial:m2303_11 +# 2302| void ForDestructors() +# 2302| Block 0 +# 2302| v2302_1(void) = EnterFunction : +# 2302| m2302_2(unknown) = AliasedDefinition : +# 2302| m2302_3(unknown) = InitializeNonLocal : +# 2302| m2302_4(unknown) = Chi : total:m2302_2, partial:m2302_3 +# 2303| r2303_1(glval) = VariableAddress[c] : +# 2303| r2303_2(char) = Constant[97] : +# 2303| m2303_3(char) = Store[c] : &:r2303_1, r2303_2 +# 2304| r2304_1(glval) = VariableAddress[s] : +# 2304| m2304_2(String) = Uninitialized[s] : &:r2304_1 +# 2304| m2304_3(unknown) = Chi : total:m2302_4, partial:m2304_2 +# 2304| r2304_4(glval) = FunctionAddress[String] : +# 2304| r2304_5(glval) = StringConstant["hello"] : +# 2304| r2304_6(char *) = Convert : r2304_5 +# 2304| v2304_7(void) = Call[String] : func:r2304_4, this:r2304_1, 0:r2304_6 +# 2304| m2304_8(unknown) = ^CallSideEffect : ~m2304_3 +# 2304| m2304_9(unknown) = Chi : total:m2304_3, partial:m2304_8 +# 2304| v2304_10(void) = ^BufferReadSideEffect[0] : &:r2304_6, ~m2302_3 +# 2304| m2304_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_1 +# 2304| m2304_12(unknown) = Chi : total:m2304_9, partial:m2304_11 #-----| Goto -> Block 1 -# 2303| Block 1 -# 2303| m2303_13(unknown) = Phi : from 0:~m2303_12, from 2:~m2303_28 -# 2303| m2303_14(char) = Phi : from 0:m2302_3, from 2:m2303_30 -# 2303| r2303_15(glval) = VariableAddress[c] : -# 2303| r2303_16(char) = Load[c] : &:r2303_15, m2303_14 -# 2303| r2303_17(int) = Convert : r2303_16 -# 2303| r2303_18(int) = Constant[0] : -# 2303| r2303_19(bool) = CompareNE : r2303_17, r2303_18 -# 2303| v2303_20(void) = ConditionalBranch : r2303_19 +# 2304| Block 1 +# 2304| m2304_13(unknown) = Phi : from 0:~m2304_12, from 2:~m2304_28 +# 2304| m2304_14(char) = Phi : from 0:m2303_3, from 2:m2304_30 +# 2304| r2304_15(glval) = VariableAddress[c] : +# 2304| r2304_16(char) = Load[c] : &:r2304_15, m2304_14 +# 2304| r2304_17(int) = Convert : r2304_16 +# 2304| r2304_18(int) = Constant[0] : +# 2304| r2304_19(bool) = CompareNE : r2304_17, r2304_18 +# 2304| v2304_20(void) = ConditionalBranch : r2304_19 #-----| False -> Block 3 #-----| True -> Block 2 -# 2304| Block 2 -# 2304| r2304_1(glval) = VariableAddress[s2] : -# 2304| m2304_2(String) = Uninitialized[s2] : &:r2304_1 -# 2304| m2304_3(unknown) = Chi : total:m2303_13, partial:m2304_2 -# 2304| r2304_4(glval) = FunctionAddress[String] : -# 2304| v2304_5(void) = Call[String] : func:r2304_4, this:r2304_1 -# 2304| m2304_6(unknown) = ^CallSideEffect : ~m2304_3 -# 2304| m2304_7(unknown) = Chi : total:m2304_3, partial:m2304_6 -# 2304| m2304_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_1 -# 2304| m2304_9(unknown) = Chi : total:m2304_7, partial:m2304_8 +# 2305| Block 2 # 2305| r2305_1(glval) = VariableAddress[s2] : -# 2305| r2305_2(glval) = FunctionAddress[~String] : -# 2305| v2305_3(void) = Call[~String] : func:r2305_2, this:r2305_1 -# 2305| m2305_4(unknown) = ^CallSideEffect : ~m2304_9 -# 2305| m2305_5(unknown) = Chi : total:m2304_9, partial:m2305_4 -# 2305| v2305_6(void) = ^IndirectReadSideEffect[-1] : &:r2305_1, ~m2305_5 -# 2305| m2305_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2305_1 -# 2305| m2305_8(unknown) = Chi : total:m2305_5, partial:m2305_7 -# 2303| r2303_21(glval) = VariableAddress[s] : -# 2303| r2303_22(glval) = FunctionAddress[pop_back] : -# 2303| r2303_23(char) = Call[pop_back] : func:r2303_22, this:r2303_21 -# 2303| m2303_24(unknown) = ^CallSideEffect : ~m2305_8 -# 2303| m2303_25(unknown) = Chi : total:m2305_8, partial:m2303_24 -# 2303| v2303_26(void) = ^IndirectReadSideEffect[-1] : &:r2303_21, ~m2303_25 -# 2303| m2303_27(String) = ^IndirectMayWriteSideEffect[-1] : &:r2303_21 -# 2303| m2303_28(unknown) = Chi : total:m2303_25, partial:m2303_27 -# 2303| r2303_29(glval) = VariableAddress[c] : -# 2303| m2303_30(char) = Store[c] : &:r2303_29, r2303_23 +# 2305| m2305_2(String) = Uninitialized[s2] : &:r2305_1 +# 2305| m2305_3(unknown) = Chi : total:m2304_13, partial:m2305_2 +# 2305| r2305_4(glval) = FunctionAddress[String] : +# 2305| v2305_5(void) = Call[String] : func:r2305_4, this:r2305_1 +# 2305| m2305_6(unknown) = ^CallSideEffect : ~m2305_3 +# 2305| m2305_7(unknown) = Chi : total:m2305_3, partial:m2305_6 +# 2305| m2305_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2305_1 +# 2305| m2305_9(unknown) = Chi : total:m2305_7, partial:m2305_8 +# 2306| r2306_1(glval) = VariableAddress[s2] : +# 2306| r2306_2(glval) = FunctionAddress[~String] : +# 2306| v2306_3(void) = Call[~String] : func:r2306_2, this:r2306_1 +# 2306| m2306_4(unknown) = ^CallSideEffect : ~m2305_9 +# 2306| m2306_5(unknown) = Chi : total:m2305_9, partial:m2306_4 +# 2306| v2306_6(void) = ^IndirectReadSideEffect[-1] : &:r2306_1, ~m2306_5 +# 2306| m2306_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2306_1 +# 2306| m2306_8(unknown) = Chi : total:m2306_5, partial:m2306_7 +# 2304| r2304_21(glval) = VariableAddress[s] : +# 2304| r2304_22(glval) = FunctionAddress[pop_back] : +# 2304| r2304_23(char) = Call[pop_back] : func:r2304_22, this:r2304_21 +# 2304| m2304_24(unknown) = ^CallSideEffect : ~m2306_8 +# 2304| m2304_25(unknown) = Chi : total:m2306_8, partial:m2304_24 +# 2304| v2304_26(void) = ^IndirectReadSideEffect[-1] : &:r2304_21, ~m2304_25 +# 2304| m2304_27(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_21 +# 2304| m2304_28(unknown) = Chi : total:m2304_25, partial:m2304_27 +# 2304| r2304_29(glval) = VariableAddress[c] : +# 2304| m2304_30(char) = Store[c] : &:r2304_29, r2304_23 #-----| Goto (back edge) -> Block 1 -# 2303| Block 3 -# 2303| r2303_31(glval) = VariableAddress[s] : -# 2303| r2303_32(glval) = FunctionAddress[~String] : -# 2303| v2303_33(void) = Call[~String] : func:r2303_32, this:r2303_31 -# 2303| m2303_34(unknown) = ^CallSideEffect : ~m2303_13 -# 2303| m2303_35(unknown) = Chi : total:m2303_13, partial:m2303_34 -# 2303| v2303_36(void) = ^IndirectReadSideEffect[-1] : &:r2303_31, ~m2303_35 -# 2303| m2303_37(String) = ^IndirectMayWriteSideEffect[-1] : &:r2303_31 -# 2303| m2303_38(unknown) = Chi : total:m2303_35, partial:m2303_37 -# 2307| r2307_1(glval &&>) = VariableAddress[(__range)] : -# 2307| r2307_2(glval>) = VariableAddress[#temp2307:20] : -# 2307| m2307_3(vector) = Uninitialized[#temp2307:20] : &:r2307_2 -# 2307| m2307_4(unknown) = Chi : total:m2303_38, partial:m2307_3 -# 2307| r2307_5(glval) = FunctionAddress[vector] : -# 2307| r2307_6(glval) = VariableAddress[#temp2307:40] : -# 2307| m2307_7(String) = Uninitialized[#temp2307:40] : &:r2307_6 -# 2307| m2307_8(unknown) = Chi : total:m2307_4, partial:m2307_7 -# 2307| r2307_9(glval) = FunctionAddress[String] : -# 2307| r2307_10(glval) = StringConstant["hello"] : -# 2307| r2307_11(char *) = Convert : r2307_10 -# 2307| v2307_12(void) = Call[String] : func:r2307_9, this:r2307_6, 0:r2307_11 -# 2307| m2307_13(unknown) = ^CallSideEffect : ~m2307_8 -# 2307| m2307_14(unknown) = Chi : total:m2307_8, partial:m2307_13 -# 2307| v2307_15(void) = ^BufferReadSideEffect[0] : &:r2307_11, ~m2301_3 -# 2307| m2307_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_6 -# 2307| m2307_17(unknown) = Chi : total:m2307_14, partial:m2307_16 -# 2307| r2307_18(String) = Load[#temp2307:40] : &:r2307_6, ~m2307_17 -# 2307| v2307_19(void) = Call[vector] : func:r2307_5, this:r2307_2, 0:r2307_18 -# 2307| m2307_20(unknown) = ^CallSideEffect : ~m2307_17 -# 2307| m2307_21(unknown) = Chi : total:m2307_17, partial:m2307_20 -# 2307| m2307_22(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2307_2 -# 2307| m2307_23(unknown) = Chi : total:m2307_21, partial:m2307_22 -# 2307| r2307_24(glval) = CopyValue : r2307_6 -# 2307| r2307_25(glval) = FunctionAddress[~String] : -# 2307| v2307_26(void) = Call[~String] : func:r2307_25, this:r2307_24 -# 2307| m2307_27(unknown) = ^CallSideEffect : ~m2307_23 -# 2307| m2307_28(unknown) = Chi : total:m2307_23, partial:m2307_27 -# 2307| v2307_29(void) = ^IndirectReadSideEffect[-1] : &:r2307_24, ~m2307_28 -# 2307| m2307_30(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_24 -# 2307| m2307_31(unknown) = Chi : total:m2307_28, partial:m2307_30 -# 2307| r2307_32(vector &) = CopyValue : r2307_2 -# 2307| m2307_33(vector &&) = Store[(__range)] : &:r2307_1, r2307_32 -# 2307| r2307_34(glval>) = VariableAddress[(__begin)] : -# 2307| r2307_35(glval &&>) = VariableAddress[(__range)] : -# 2307| r2307_36(vector &&) = Load[(__range)] : &:r2307_35, m2307_33 -#-----| r0_1(glval>) = CopyValue : r2307_36 +# 2304| Block 3 +# 2304| r2304_31(glval) = VariableAddress[s] : +# 2304| r2304_32(glval) = FunctionAddress[~String] : +# 2304| v2304_33(void) = Call[~String] : func:r2304_32, this:r2304_31 +# 2304| m2304_34(unknown) = ^CallSideEffect : ~m2304_13 +# 2304| m2304_35(unknown) = Chi : total:m2304_13, partial:m2304_34 +# 2304| v2304_36(void) = ^IndirectReadSideEffect[-1] : &:r2304_31, ~m2304_35 +# 2304| m2304_37(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_31 +# 2304| m2304_38(unknown) = Chi : total:m2304_35, partial:m2304_37 +# 2308| r2308_1(glval &&>) = VariableAddress[(__range)] : +# 2308| r2308_2(glval>) = VariableAddress[#temp2308:20] : +# 2308| m2308_3(vector) = Uninitialized[#temp2308:20] : &:r2308_2 +# 2308| m2308_4(unknown) = Chi : total:m2304_38, partial:m2308_3 +# 2308| r2308_5(glval) = FunctionAddress[vector] : +# 2308| r2308_6(glval) = VariableAddress[#temp2308:40] : +# 2308| m2308_7(String) = Uninitialized[#temp2308:40] : &:r2308_6 +# 2308| m2308_8(unknown) = Chi : total:m2308_4, partial:m2308_7 +# 2308| r2308_9(glval) = FunctionAddress[String] : +# 2308| r2308_10(glval) = StringConstant["hello"] : +# 2308| r2308_11(char *) = Convert : r2308_10 +# 2308| v2308_12(void) = Call[String] : func:r2308_9, this:r2308_6, 0:r2308_11 +# 2308| m2308_13(unknown) = ^CallSideEffect : ~m2308_8 +# 2308| m2308_14(unknown) = Chi : total:m2308_8, partial:m2308_13 +# 2308| v2308_15(void) = ^BufferReadSideEffect[0] : &:r2308_11, ~m2302_3 +# 2308| m2308_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_6 +# 2308| m2308_17(unknown) = Chi : total:m2308_14, partial:m2308_16 +# 2308| r2308_18(String) = Load[#temp2308:40] : &:r2308_6, ~m2308_17 +# 2308| v2308_19(void) = Call[vector] : func:r2308_5, this:r2308_2, 0:r2308_18 +# 2308| m2308_20(unknown) = ^CallSideEffect : ~m2308_17 +# 2308| m2308_21(unknown) = Chi : total:m2308_17, partial:m2308_20 +# 2308| m2308_22(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2308_2 +# 2308| m2308_23(unknown) = Chi : total:m2308_21, partial:m2308_22 +# 2308| r2308_24(glval) = CopyValue : r2308_6 +# 2308| r2308_25(glval) = FunctionAddress[~String] : +# 2308| v2308_26(void) = Call[~String] : func:r2308_25, this:r2308_24 +# 2308| m2308_27(unknown) = ^CallSideEffect : ~m2308_23 +# 2308| m2308_28(unknown) = Chi : total:m2308_23, partial:m2308_27 +# 2308| v2308_29(void) = ^IndirectReadSideEffect[-1] : &:r2308_24, ~m2308_28 +# 2308| m2308_30(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_24 +# 2308| m2308_31(unknown) = Chi : total:m2308_28, partial:m2308_30 +# 2308| r2308_32(vector &) = CopyValue : r2308_2 +# 2308| m2308_33(vector &&) = Store[(__range)] : &:r2308_1, r2308_32 +# 2308| r2308_34(glval>) = VariableAddress[(__begin)] : +# 2308| r2308_35(glval &&>) = VariableAddress[(__range)] : +# 2308| r2308_36(vector &&) = Load[(__range)] : &:r2308_35, m2308_33 +#-----| r0_1(glval>) = CopyValue : r2308_36 #-----| r0_2(glval>) = Convert : r0_1 -# 2307| r2307_37(glval) = FunctionAddress[begin] : -# 2307| r2307_38(iterator) = Call[begin] : func:r2307_37, this:r0_2 -#-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m2307_28 -# 2307| m2307_39(iterator) = Store[(__begin)] : &:r2307_34, r2307_38 -# 2307| r2307_40(glval>) = VariableAddress[(__end)] : -# 2307| r2307_41(glval &&>) = VariableAddress[(__range)] : -# 2307| r2307_42(vector &&) = Load[(__range)] : &:r2307_41, m2307_33 -#-----| r0_4(glval>) = CopyValue : r2307_42 +# 2308| r2308_37(glval) = FunctionAddress[begin] : +# 2308| r2308_38(iterator) = Call[begin] : func:r2308_37, this:r0_2 +#-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m2308_28 +# 2308| m2308_39(iterator) = Store[(__begin)] : &:r2308_34, r2308_38 +# 2308| r2308_40(glval>) = VariableAddress[(__end)] : +# 2308| r2308_41(glval &&>) = VariableAddress[(__range)] : +# 2308| r2308_42(vector &&) = Load[(__range)] : &:r2308_41, m2308_33 +#-----| r0_4(glval>) = CopyValue : r2308_42 #-----| r0_5(glval>) = Convert : r0_4 -# 2307| r2307_43(glval) = FunctionAddress[end] : -# 2307| r2307_44(iterator) = Call[end] : func:r2307_43, this:r0_5 -#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m2307_28 -# 2307| m2307_45(iterator) = Store[(__end)] : &:r2307_40, r2307_44 -# 2307| m2307_46(unknown) = Chi : total:m2307_31, partial:m2307_45 +# 2308| r2308_43(glval) = FunctionAddress[end] : +# 2308| r2308_44(iterator) = Call[end] : func:r2308_43, this:r0_5 +#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m2308_28 +# 2308| m2308_45(iterator) = Store[(__end)] : &:r2308_40, r2308_44 +# 2308| m2308_46(unknown) = Chi : total:m2308_31, partial:m2308_45 #-----| Goto -> Block 4 -# 2307| Block 4 -# 2307| m2307_47(iterator) = Phi : from 3:m2307_39, from 5:m2307_81 -# 2307| m2307_48(unknown) = Phi : from 3:~m2307_46, from 5:~m2307_89 -# 2307| r2307_49(glval>) = VariableAddress[(__begin)] : -#-----| r0_7(glval>) = Convert : r2307_49 -# 2307| r2307_50(glval) = FunctionAddress[operator!=] : +# 2308| Block 4 +# 2308| m2308_47(iterator) = Phi : from 3:m2308_39, from 5:m2308_81 +# 2308| m2308_48(unknown) = Phi : from 3:~m2308_46, from 5:~m2308_89 +# 2308| r2308_49(glval>) = VariableAddress[(__begin)] : +#-----| r0_7(glval>) = Convert : r2308_49 +# 2308| r2308_50(glval) = FunctionAddress[operator!=] : #-----| r0_8(glval>) = VariableAddress[#temp0:0] : #-----| m0_9(iterator) = Uninitialized[#temp0:0] : &:r0_8 -#-----| m0_10(unknown) = Chi : total:m2307_48, partial:m0_9 -# 2307| r2307_51(glval) = FunctionAddress[iterator] : -# 2307| r2307_52(glval>) = VariableAddress[(__end)] : -#-----| r0_11(glval>) = Convert : r2307_52 +#-----| m0_10(unknown) = Chi : total:m2308_48, partial:m0_9 +# 2308| r2308_51(glval) = FunctionAddress[iterator] : +# 2308| r2308_52(glval>) = VariableAddress[(__end)] : +#-----| r0_11(glval>) = Convert : r2308_52 #-----| r0_12(iterator &) = CopyValue : r0_11 -# 2307| v2307_53(void) = Call[iterator] : func:r2307_51, this:r0_8, 0:r0_12 -# 2307| m2307_54(unknown) = ^CallSideEffect : ~m0_10 -# 2307| m2307_55(unknown) = Chi : total:m0_10, partial:m2307_54 -#-----| v0_13(void) = ^BufferReadSideEffect[0] : &:r0_12, ~m2307_55 -# 2307| m2307_56(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 -# 2307| m2307_57(unknown) = Chi : total:m2307_55, partial:m2307_56 -#-----| r0_14(iterator) = Load[#temp0:0] : &:r0_8, ~m2307_57 -# 2307| r2307_58(bool) = Call[operator!=] : func:r2307_50, this:r0_7, 0:r0_14 -#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_7, m2307_47 -# 2307| v2307_59(void) = ConditionalBranch : r2307_58 +# 2308| v2308_53(void) = Call[iterator] : func:r2308_51, this:r0_8, 0:r0_12 +# 2308| m2308_54(unknown) = ^CallSideEffect : ~m0_10 +# 2308| m2308_55(unknown) = Chi : total:m0_10, partial:m2308_54 +#-----| v0_13(void) = ^BufferReadSideEffect[0] : &:r0_12, ~m2308_55 +# 2308| m2308_56(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 +# 2308| m2308_57(unknown) = Chi : total:m2308_55, partial:m2308_56 +#-----| r0_14(iterator) = Load[#temp0:0] : &:r0_8, ~m2308_57 +# 2308| r2308_58(bool) = Call[operator!=] : func:r2308_50, this:r0_7, 0:r0_14 +#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_7, m2308_47 +# 2308| v2308_59(void) = ConditionalBranch : r2308_58 #-----| False -> Block 6 #-----| True -> Block 5 -# 2307| Block 5 -# 2307| r2307_60(glval) = VariableAddress[s] : -# 2307| m2307_61(String) = Uninitialized[s] : &:r2307_60 -# 2307| m2307_62(unknown) = Chi : total:m2307_57, partial:m2307_61 -# 2307| r2307_63(glval) = FunctionAddress[String] : -# 2307| r2307_64(glval>) = VariableAddress[(__begin)] : -#-----| r0_16(glval>) = Convert : r2307_64 -# 2307| r2307_65(glval) = FunctionAddress[operator*] : -# 2307| r2307_66(String &) = Call[operator*] : func:r2307_65, this:r0_16 -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, m2307_47 -# 2307| r2307_67(glval) = CopyValue : r2307_66 -# 2307| r2307_68(glval) = Convert : r2307_67 -# 2307| r2307_69(String &) = CopyValue : r2307_68 -# 2307| v2307_70(void) = Call[String] : func:r2307_63, this:r2307_60, 0:r2307_69 -# 2307| m2307_71(unknown) = ^CallSideEffect : ~m2307_62 -# 2307| m2307_72(unknown) = Chi : total:m2307_62, partial:m2307_71 -# 2307| v2307_73(void) = ^BufferReadSideEffect[0] : &:r2307_69, ~m2307_72 -# 2307| m2307_74(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_60 -# 2307| m2307_75(unknown) = Chi : total:m2307_72, partial:m2307_74 -# 2308| r2308_1(glval) = VariableAddress[s2] : -# 2308| m2308_2(String) = Uninitialized[s2] : &:r2308_1 -# 2308| m2308_3(unknown) = Chi : total:m2307_75, partial:m2308_2 -# 2308| r2308_4(glval) = FunctionAddress[String] : -# 2308| v2308_5(void) = Call[String] : func:r2308_4, this:r2308_1 -# 2308| m2308_6(unknown) = ^CallSideEffect : ~m2308_3 -# 2308| m2308_7(unknown) = Chi : total:m2308_3, partial:m2308_6 -# 2308| m2308_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_1 -# 2308| m2308_9(unknown) = Chi : total:m2308_7, partial:m2308_8 +# 2308| Block 5 +# 2308| r2308_60(glval) = VariableAddress[s] : +# 2308| m2308_61(String) = Uninitialized[s] : &:r2308_60 +# 2308| m2308_62(unknown) = Chi : total:m2308_57, partial:m2308_61 +# 2308| r2308_63(glval) = FunctionAddress[String] : +# 2308| r2308_64(glval>) = VariableAddress[(__begin)] : +#-----| r0_16(glval>) = Convert : r2308_64 +# 2308| r2308_65(glval) = FunctionAddress[operator*] : +# 2308| r2308_66(String &) = Call[operator*] : func:r2308_65, this:r0_16 +#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, m2308_47 +# 2308| r2308_67(glval) = CopyValue : r2308_66 +# 2308| r2308_68(glval) = Convert : r2308_67 +# 2308| r2308_69(String &) = CopyValue : r2308_68 +# 2308| v2308_70(void) = Call[String] : func:r2308_63, this:r2308_60, 0:r2308_69 +# 2308| m2308_71(unknown) = ^CallSideEffect : ~m2308_62 +# 2308| m2308_72(unknown) = Chi : total:m2308_62, partial:m2308_71 +# 2308| v2308_73(void) = ^BufferReadSideEffect[0] : &:r2308_69, ~m2308_72 +# 2308| m2308_74(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_60 +# 2308| m2308_75(unknown) = Chi : total:m2308_72, partial:m2308_74 # 2309| r2309_1(glval) = VariableAddress[s2] : -# 2309| r2309_2(glval) = FunctionAddress[~String] : -# 2309| v2309_3(void) = Call[~String] : func:r2309_2, this:r2309_1 -# 2309| m2309_4(unknown) = ^CallSideEffect : ~m2308_9 -# 2309| m2309_5(unknown) = Chi : total:m2308_9, partial:m2309_4 -# 2309| v2309_6(void) = ^IndirectReadSideEffect[-1] : &:r2309_1, ~m2309_5 -# 2309| m2309_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2309_1 -# 2309| m2309_8(unknown) = Chi : total:m2309_5, partial:m2309_7 -# 2307| r2307_76(glval>) = VariableAddress[(__begin)] : -# 2307| r2307_77(glval) = FunctionAddress[operator++] : -# 2307| r2307_78(iterator &) = Call[operator++] : func:r2307_77, this:r2307_76 -# 2307| v2307_79(void) = ^IndirectReadSideEffect[-1] : &:r2307_76, m2307_47 -# 2307| m2307_80(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2307_76 -# 2307| m2307_81(iterator) = Chi : total:m2307_47, partial:m2307_80 -# 2307| r2307_82(glval) = VariableAddress[s] : -# 2307| r2307_83(glval) = FunctionAddress[~String] : -# 2307| v2307_84(void) = Call[~String] : func:r2307_83, this:r2307_82 -# 2307| m2307_85(unknown) = ^CallSideEffect : ~m2309_8 -# 2307| m2307_86(unknown) = Chi : total:m2309_8, partial:m2307_85 -# 2307| v2307_87(void) = ^IndirectReadSideEffect[-1] : &:r2307_82, ~m2307_86 -# 2307| m2307_88(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_82 -# 2307| m2307_89(unknown) = Chi : total:m2307_86, partial:m2307_88 -# 2307| r2307_90(glval>) = CopyValue : r2307_78 +# 2309| m2309_2(String) = Uninitialized[s2] : &:r2309_1 +# 2309| m2309_3(unknown) = Chi : total:m2308_75, partial:m2309_2 +# 2309| r2309_4(glval) = FunctionAddress[String] : +# 2309| v2309_5(void) = Call[String] : func:r2309_4, this:r2309_1 +# 2309| m2309_6(unknown) = ^CallSideEffect : ~m2309_3 +# 2309| m2309_7(unknown) = Chi : total:m2309_3, partial:m2309_6 +# 2309| m2309_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2309_1 +# 2309| m2309_9(unknown) = Chi : total:m2309_7, partial:m2309_8 +# 2310| r2310_1(glval) = VariableAddress[s2] : +# 2310| r2310_2(glval) = FunctionAddress[~String] : +# 2310| v2310_3(void) = Call[~String] : func:r2310_2, this:r2310_1 +# 2310| m2310_4(unknown) = ^CallSideEffect : ~m2309_9 +# 2310| m2310_5(unknown) = Chi : total:m2309_9, partial:m2310_4 +# 2310| v2310_6(void) = ^IndirectReadSideEffect[-1] : &:r2310_1, ~m2310_5 +# 2310| m2310_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2310_1 +# 2310| m2310_8(unknown) = Chi : total:m2310_5, partial:m2310_7 +# 2308| r2308_76(glval>) = VariableAddress[(__begin)] : +# 2308| r2308_77(glval) = FunctionAddress[operator++] : +# 2308| r2308_78(iterator &) = Call[operator++] : func:r2308_77, this:r2308_76 +# 2308| v2308_79(void) = ^IndirectReadSideEffect[-1] : &:r2308_76, m2308_47 +# 2308| m2308_80(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2308_76 +# 2308| m2308_81(iterator) = Chi : total:m2308_47, partial:m2308_80 +# 2308| r2308_82(glval) = VariableAddress[s] : +# 2308| r2308_83(glval) = FunctionAddress[~String] : +# 2308| v2308_84(void) = Call[~String] : func:r2308_83, this:r2308_82 +# 2308| m2308_85(unknown) = ^CallSideEffect : ~m2310_8 +# 2308| m2308_86(unknown) = Chi : total:m2310_8, partial:m2308_85 +# 2308| v2308_87(void) = ^IndirectReadSideEffect[-1] : &:r2308_82, ~m2308_86 +# 2308| m2308_88(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_82 +# 2308| m2308_89(unknown) = Chi : total:m2308_86, partial:m2308_88 +# 2308| r2308_90(glval>) = CopyValue : r2308_78 #-----| Goto (back edge) -> Block 4 -# 2311| Block 6 -# 2311| r2311_1(glval) = VariableAddress[s] : -# 2311| m2311_2(String) = Uninitialized[s] : &:r2311_1 -# 2311| m2311_3(unknown) = Chi : total:m2307_57, partial:m2311_2 -# 2311| r2311_4(glval) = FunctionAddress[String] : -# 2311| r2311_5(glval) = StringConstant["hello"] : -# 2311| r2311_6(char *) = Convert : r2311_5 -# 2311| v2311_7(void) = Call[String] : func:r2311_4, this:r2311_1, 0:r2311_6 -# 2311| m2311_8(unknown) = ^CallSideEffect : ~m2311_3 -# 2311| m2311_9(unknown) = Chi : total:m2311_3, partial:m2311_8 -# 2311| v2311_10(void) = ^BufferReadSideEffect[0] : &:r2311_6, ~m2301_3 -# 2311| m2311_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_1 -# 2311| m2311_12(unknown) = Chi : total:m2311_9, partial:m2311_11 -# 2311| r2311_13(glval) = VariableAddress[s2] : -# 2311| m2311_14(String) = Uninitialized[s2] : &:r2311_13 -# 2311| m2311_15(unknown) = Chi : total:m2311_12, partial:m2311_14 -# 2311| r2311_16(glval) = FunctionAddress[String] : -# 2311| r2311_17(glval) = StringConstant["world"] : -# 2311| r2311_18(char *) = Convert : r2311_17 -# 2311| v2311_19(void) = Call[String] : func:r2311_16, this:r2311_13, 0:r2311_18 -# 2311| m2311_20(unknown) = ^CallSideEffect : ~m2311_15 -# 2311| m2311_21(unknown) = Chi : total:m2311_15, partial:m2311_20 -# 2311| v2311_22(void) = ^BufferReadSideEffect[0] : &:r2311_18, ~m2301_3 -# 2311| m2311_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_13 -# 2311| m2311_24(unknown) = Chi : total:m2311_21, partial:m2311_23 +# 2308| Block 6 +# 2308| r2308_91(glval>) = CopyValue : r2308_2 +# 2308| r2308_92(glval) = FunctionAddress[~vector] : +# 2308| v2308_93(void) = Call[~vector] : func:r2308_92, this:r2308_91 +# 2308| m2308_94(unknown) = ^CallSideEffect : ~m2308_57 +# 2308| m2308_95(unknown) = Chi : total:m2308_57, partial:m2308_94 +# 2308| v2308_96(void) = ^IndirectReadSideEffect[-1] : &:r2308_91, ~m2308_95 +# 2308| m2308_97(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2308_91 +# 2308| m2308_98(unknown) = Chi : total:m2308_95, partial:m2308_97 +# 2312| r2312_1(glval) = VariableAddress[s] : +# 2312| m2312_2(String) = Uninitialized[s] : &:r2312_1 +# 2312| m2312_3(unknown) = Chi : total:m2308_98, partial:m2312_2 +# 2312| r2312_4(glval) = FunctionAddress[String] : +# 2312| r2312_5(glval) = StringConstant["hello"] : +# 2312| r2312_6(char *) = Convert : r2312_5 +# 2312| v2312_7(void) = Call[String] : func:r2312_4, this:r2312_1, 0:r2312_6 +# 2312| m2312_8(unknown) = ^CallSideEffect : ~m2312_3 +# 2312| m2312_9(unknown) = Chi : total:m2312_3, partial:m2312_8 +# 2312| v2312_10(void) = ^BufferReadSideEffect[0] : &:r2312_6, ~m2302_3 +# 2312| m2312_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_1 +# 2312| m2312_12(unknown) = Chi : total:m2312_9, partial:m2312_11 +# 2312| r2312_13(glval) = VariableAddress[s2] : +# 2312| m2312_14(String) = Uninitialized[s2] : &:r2312_13 +# 2312| m2312_15(unknown) = Chi : total:m2312_12, partial:m2312_14 +# 2312| r2312_16(glval) = FunctionAddress[String] : +# 2312| r2312_17(glval) = StringConstant["world"] : +# 2312| r2312_18(char *) = Convert : r2312_17 +# 2312| v2312_19(void) = Call[String] : func:r2312_16, this:r2312_13, 0:r2312_18 +# 2312| m2312_20(unknown) = ^CallSideEffect : ~m2312_15 +# 2312| m2312_21(unknown) = Chi : total:m2312_15, partial:m2312_20 +# 2312| v2312_22(void) = ^BufferReadSideEffect[0] : &:r2312_18, ~m2302_3 +# 2312| m2312_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_13 +# 2312| m2312_24(unknown) = Chi : total:m2312_21, partial:m2312_23 #-----| Goto -> Block 7 -# 2311| Block 7 -# 2311| m2311_25(unknown) = Phi : from 6:~m2311_24, from 8:~m2311_40 -# 2311| m2311_26(char) = Phi : from 6:m2303_14, from 8:m2311_42 -# 2311| r2311_27(glval) = VariableAddress[c] : -# 2311| r2311_28(char) = Load[c] : &:r2311_27, m2311_26 -# 2311| r2311_29(int) = Convert : r2311_28 -# 2311| r2311_30(int) = Constant[0] : -# 2311| r2311_31(bool) = CompareNE : r2311_29, r2311_30 -# 2311| v2311_32(void) = ConditionalBranch : r2311_31 +# 2312| Block 7 +# 2312| m2312_25(unknown) = Phi : from 6:~m2312_24, from 8:~m2312_40 +# 2312| m2312_26(char) = Phi : from 6:m2304_14, from 8:m2312_42 +# 2312| r2312_27(glval) = VariableAddress[c] : +# 2312| r2312_28(char) = Load[c] : &:r2312_27, m2312_26 +# 2312| r2312_29(int) = Convert : r2312_28 +# 2312| r2312_30(int) = Constant[0] : +# 2312| r2312_31(bool) = CompareNE : r2312_29, r2312_30 +# 2312| v2312_32(void) = ConditionalBranch : r2312_31 #-----| False -> Block 9 #-----| True -> Block 8 -# 2312| Block 8 -# 2312| r2312_1(char) = Constant[0] : -# 2312| r2312_2(glval) = VariableAddress[c] : -# 2312| m2312_3(char) = Store[c] : &:r2312_2, r2312_1 -# 2311| r2311_33(glval) = VariableAddress[s] : -# 2311| r2311_34(glval) = FunctionAddress[pop_back] : -# 2311| r2311_35(char) = Call[pop_back] : func:r2311_34, this:r2311_33 -# 2311| m2311_36(unknown) = ^CallSideEffect : ~m2311_25 -# 2311| m2311_37(unknown) = Chi : total:m2311_25, partial:m2311_36 -# 2311| v2311_38(void) = ^IndirectReadSideEffect[-1] : &:r2311_33, ~m2311_37 -# 2311| m2311_39(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_33 -# 2311| m2311_40(unknown) = Chi : total:m2311_37, partial:m2311_39 -# 2311| r2311_41(glval) = VariableAddress[c] : -# 2311| m2311_42(char) = Store[c] : &:r2311_41, r2311_35 +# 2313| Block 8 +# 2313| r2313_1(char) = Constant[0] : +# 2313| r2313_2(glval) = VariableAddress[c] : +# 2313| m2313_3(char) = Store[c] : &:r2313_2, r2313_1 +# 2312| r2312_33(glval) = VariableAddress[s] : +# 2312| r2312_34(glval) = FunctionAddress[pop_back] : +# 2312| r2312_35(char) = Call[pop_back] : func:r2312_34, this:r2312_33 +# 2312| m2312_36(unknown) = ^CallSideEffect : ~m2312_25 +# 2312| m2312_37(unknown) = Chi : total:m2312_25, partial:m2312_36 +# 2312| v2312_38(void) = ^IndirectReadSideEffect[-1] : &:r2312_33, ~m2312_37 +# 2312| m2312_39(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_33 +# 2312| m2312_40(unknown) = Chi : total:m2312_37, partial:m2312_39 +# 2312| r2312_41(glval) = VariableAddress[c] : +# 2312| m2312_42(char) = Store[c] : &:r2312_41, r2312_35 #-----| Goto (back edge) -> Block 7 -# 2311| Block 9 -# 2311| r2311_43(glval) = VariableAddress[s2] : -# 2311| r2311_44(glval) = FunctionAddress[~String] : -# 2311| v2311_45(void) = Call[~String] : func:r2311_44, this:r2311_43 -# 2311| m2311_46(unknown) = ^CallSideEffect : ~m2311_25 -# 2311| m2311_47(unknown) = Chi : total:m2311_25, partial:m2311_46 -# 2311| v2311_48(void) = ^IndirectReadSideEffect[-1] : &:r2311_43, ~m2311_47 -# 2311| m2311_49(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_43 -# 2311| m2311_50(unknown) = Chi : total:m2311_47, partial:m2311_49 -# 2311| r2311_51(glval) = VariableAddress[s] : -# 2311| r2311_52(glval) = FunctionAddress[~String] : -# 2311| v2311_53(void) = Call[~String] : func:r2311_52, this:r2311_51 -# 2311| m2311_54(unknown) = ^CallSideEffect : ~m2311_50 -# 2311| m2311_55(unknown) = Chi : total:m2311_50, partial:m2311_54 -# 2311| v2311_56(void) = ^IndirectReadSideEffect[-1] : &:r2311_51, ~m2311_55 -# 2311| m2311_57(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_51 -# 2311| m2311_58(unknown) = Chi : total:m2311_55, partial:m2311_57 -# 2314| v2314_1(void) = NoOp : -# 2301| v2301_5(void) = ReturnVoid : -# 2301| v2301_6(void) = AliasedUse : ~m2311_55 -# 2301| v2301_7(void) = ExitFunction : +# 2312| Block 9 +# 2312| r2312_43(glval) = VariableAddress[s2] : +# 2312| r2312_44(glval) = FunctionAddress[~String] : +# 2312| v2312_45(void) = Call[~String] : func:r2312_44, this:r2312_43 +# 2312| m2312_46(unknown) = ^CallSideEffect : ~m2312_25 +# 2312| m2312_47(unknown) = Chi : total:m2312_25, partial:m2312_46 +# 2312| v2312_48(void) = ^IndirectReadSideEffect[-1] : &:r2312_43, ~m2312_47 +# 2312| m2312_49(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_43 +# 2312| m2312_50(unknown) = Chi : total:m2312_47, partial:m2312_49 +# 2312| r2312_51(glval) = VariableAddress[s] : +# 2312| r2312_52(glval) = FunctionAddress[~String] : +# 2312| v2312_53(void) = Call[~String] : func:r2312_52, this:r2312_51 +# 2312| m2312_54(unknown) = ^CallSideEffect : ~m2312_50 +# 2312| m2312_55(unknown) = Chi : total:m2312_50, partial:m2312_54 +# 2312| v2312_56(void) = ^IndirectReadSideEffect[-1] : &:r2312_51, ~m2312_55 +# 2312| m2312_57(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_51 +# 2312| m2312_58(unknown) = Chi : total:m2312_55, partial:m2312_57 +# 2315| v2315_1(void) = NoOp : +# 2302| v2302_5(void) = ReturnVoid : +# 2302| v2302_6(void) = AliasedUse : ~m2312_55 +# 2302| v2302_7(void) = ExitFunction : -# 2316| void IfDestructors2(bool) -# 2316| Block 0 -# 2316| v2316_1(void) = EnterFunction : -# 2316| m2316_2(unknown) = AliasedDefinition : -# 2316| m2316_3(unknown) = InitializeNonLocal : -# 2316| m2316_4(unknown) = Chi : total:m2316_2, partial:m2316_3 -# 2316| r2316_5(glval) = VariableAddress[b] : -# 2316| m2316_6(bool) = InitializeParameter[b] : &:r2316_5 -# 2317| r2317_1(glval) = VariableAddress[s] : -# 2317| m2317_2(String) = Uninitialized[s] : &:r2317_1 -# 2317| m2317_3(unknown) = Chi : total:m2316_4, partial:m2317_2 -# 2317| r2317_4(glval) = FunctionAddress[String] : -# 2317| r2317_5(glval) = StringConstant["hello"] : -# 2317| r2317_6(char *) = Convert : r2317_5 -# 2317| v2317_7(void) = Call[String] : func:r2317_4, this:r2317_1, 0:r2317_6 -# 2317| m2317_8(unknown) = ^CallSideEffect : ~m2317_3 -# 2317| m2317_9(unknown) = Chi : total:m2317_3, partial:m2317_8 -# 2317| v2317_10(void) = ^BufferReadSideEffect[0] : &:r2317_6, ~m2316_3 -# 2317| m2317_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2317_1 -# 2317| m2317_12(unknown) = Chi : total:m2317_9, partial:m2317_11 -# 2317| r2317_13(glval) = VariableAddress[b] : -# 2317| r2317_14(bool) = Load[b] : &:r2317_13, m2316_6 -# 2317| v2317_15(void) = ConditionalBranch : r2317_14 +# 2317| void IfDestructors2(bool) +# 2317| Block 0 +# 2317| v2317_1(void) = EnterFunction : +# 2317| m2317_2(unknown) = AliasedDefinition : +# 2317| m2317_3(unknown) = InitializeNonLocal : +# 2317| m2317_4(unknown) = Chi : total:m2317_2, partial:m2317_3 +# 2317| r2317_5(glval) = VariableAddress[b] : +# 2317| m2317_6(bool) = InitializeParameter[b] : &:r2317_5 +# 2318| r2318_1(glval) = VariableAddress[s] : +# 2318| m2318_2(String) = Uninitialized[s] : &:r2318_1 +# 2318| m2318_3(unknown) = Chi : total:m2317_4, partial:m2318_2 +# 2318| r2318_4(glval) = FunctionAddress[String] : +# 2318| r2318_5(glval) = StringConstant["hello"] : +# 2318| r2318_6(char *) = Convert : r2318_5 +# 2318| v2318_7(void) = Call[String] : func:r2318_4, this:r2318_1, 0:r2318_6 +# 2318| m2318_8(unknown) = ^CallSideEffect : ~m2318_3 +# 2318| m2318_9(unknown) = Chi : total:m2318_3, partial:m2318_8 +# 2318| v2318_10(void) = ^BufferReadSideEffect[0] : &:r2318_6, ~m2317_3 +# 2318| m2318_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2318_1 +# 2318| m2318_12(unknown) = Chi : total:m2318_9, partial:m2318_11 +# 2318| r2318_13(glval) = VariableAddress[b] : +# 2318| r2318_14(bool) = Load[b] : &:r2318_13, m2317_6 +# 2318| v2318_15(void) = ConditionalBranch : r2318_14 #-----| False -> Block 2 #-----| True -> Block 1 -# 2318| Block 1 -# 2318| r2318_1(glval) = VariableAddress[x] : -# 2318| r2318_2(int) = Constant[0] : -# 2318| m2318_3(int) = Store[x] : &:r2318_1, r2318_2 +# 2319| Block 1 +# 2319| r2319_1(glval) = VariableAddress[x] : +# 2319| r2319_2(int) = Constant[0] : +# 2319| m2319_3(int) = Store[x] : &:r2319_1, r2319_2 #-----| Goto -> Block 3 -# 2320| Block 2 -# 2320| r2320_1(glval) = VariableAddress[y] : -# 2320| r2320_2(int) = Constant[0] : -# 2320| m2320_3(int) = Store[y] : &:r2320_1, r2320_2 +# 2321| Block 2 +# 2321| r2321_1(glval) = VariableAddress[y] : +# 2321| r2321_2(int) = Constant[0] : +# 2321| m2321_3(int) = Store[y] : &:r2321_1, r2321_2 #-----| Goto -> Block 3 -# 2321| Block 3 -# 2321| r2321_1(glval) = VariableAddress[s] : -# 2321| r2321_2(glval) = FunctionAddress[~String] : -# 2321| v2321_3(void) = Call[~String] : func:r2321_2, this:r2321_1 -# 2321| m2321_4(unknown) = ^CallSideEffect : ~m2317_12 -# 2321| m2321_5(unknown) = Chi : total:m2317_12, partial:m2321_4 -# 2321| v2321_6(void) = ^IndirectReadSideEffect[-1] : &:r2321_1, ~m2321_5 -# 2321| m2321_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2321_1 -# 2321| m2321_8(unknown) = Chi : total:m2321_5, partial:m2321_7 -# 2322| v2322_1(void) = NoOp : -# 2316| v2316_7(void) = ReturnVoid : -# 2316| v2316_8(void) = AliasedUse : ~m2321_5 -# 2316| v2316_9(void) = ExitFunction : +# 2322| Block 3 +# 2322| r2322_1(glval) = VariableAddress[s] : +# 2322| r2322_2(glval) = FunctionAddress[~String] : +# 2322| v2322_3(void) = Call[~String] : func:r2322_2, this:r2322_1 +# 2322| m2322_4(unknown) = ^CallSideEffect : ~m2318_12 +# 2322| m2322_5(unknown) = Chi : total:m2318_12, partial:m2322_4 +# 2322| v2322_6(void) = ^IndirectReadSideEffect[-1] : &:r2322_1, ~m2322_5 +# 2322| m2322_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2322_1 +# 2322| m2322_8(unknown) = Chi : total:m2322_5, partial:m2322_7 +# 2323| v2323_1(void) = NoOp : +# 2317| v2317_7(void) = ReturnVoid : +# 2317| v2317_8(void) = AliasedUse : ~m2322_5 +# 2317| v2317_9(void) = ExitFunction : -# 2331| void IfDestructors3(bool) -# 2331| Block 0 -# 2331| v2331_1(void) = EnterFunction : -# 2331| m2331_2(unknown) = AliasedDefinition : -# 2331| m2331_3(unknown) = InitializeNonLocal : -# 2331| m2331_4(unknown) = Chi : total:m2331_2, partial:m2331_3 -# 2331| r2331_5(glval) = VariableAddress[b] : -# 2331| m2331_6(bool) = InitializeParameter[b] : &:r2331_5 -# 2332| r2332_1(glval) = VariableAddress[B] : -# 2332| m2332_2(Bool) = Uninitialized[B] : &:r2332_1 -# 2332| m2332_3(unknown) = Chi : total:m2331_4, partial:m2332_2 -# 2332| r2332_4(glval) = FunctionAddress[Bool] : +# 2332| void IfDestructors3(bool) +# 2332| Block 0 +# 2332| v2332_1(void) = EnterFunction : +# 2332| m2332_2(unknown) = AliasedDefinition : +# 2332| m2332_3(unknown) = InitializeNonLocal : +# 2332| m2332_4(unknown) = Chi : total:m2332_2, partial:m2332_3 # 2332| r2332_5(glval) = VariableAddress[b] : -# 2332| r2332_6(bool) = Load[b] : &:r2332_5, m2331_6 -# 2332| v2332_7(void) = Call[Bool] : func:r2332_4, this:r2332_1, 0:r2332_6 -# 2332| m2332_8(unknown) = ^CallSideEffect : ~m2332_3 -# 2332| m2332_9(unknown) = Chi : total:m2332_3, partial:m2332_8 -# 2332| m2332_10(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2332_1 -# 2332| m2332_11(unknown) = Chi : total:m2332_9, partial:m2332_10 -# 2332| r2332_12(glval) = VariableAddress[B] : -# 2332| r2332_13(glval) = FunctionAddress[operator bool] : -# 2332| r2332_14(bool) = Call[operator bool] : func:r2332_13, this:r2332_12 -# 2332| m2332_15(unknown) = ^CallSideEffect : ~m2332_11 -# 2332| m2332_16(unknown) = Chi : total:m2332_11, partial:m2332_15 -# 2332| v2332_17(void) = ^IndirectReadSideEffect[-1] : &:r2332_12, ~m2332_16 -# 2332| m2332_18(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2332_12 -# 2332| m2332_19(unknown) = Chi : total:m2332_16, partial:m2332_18 -# 2332| r2332_20(bool) = CopyValue : r2332_14 -# 2332| v2332_21(void) = ConditionalBranch : r2332_20 +# 2332| m2332_6(bool) = InitializeParameter[b] : &:r2332_5 +# 2333| r2333_1(glval) = VariableAddress[B] : +# 2333| m2333_2(Bool) = Uninitialized[B] : &:r2333_1 +# 2333| m2333_3(unknown) = Chi : total:m2332_4, partial:m2333_2 +# 2333| r2333_4(glval) = FunctionAddress[Bool] : +# 2333| r2333_5(glval) = VariableAddress[b] : +# 2333| r2333_6(bool) = Load[b] : &:r2333_5, m2332_6 +# 2333| v2333_7(void) = Call[Bool] : func:r2333_4, this:r2333_1, 0:r2333_6 +# 2333| m2333_8(unknown) = ^CallSideEffect : ~m2333_3 +# 2333| m2333_9(unknown) = Chi : total:m2333_3, partial:m2333_8 +# 2333| m2333_10(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2333_1 +# 2333| m2333_11(unknown) = Chi : total:m2333_9, partial:m2333_10 +# 2333| r2333_12(glval) = VariableAddress[B] : +# 2333| r2333_13(glval) = FunctionAddress[operator bool] : +# 2333| r2333_14(bool) = Call[operator bool] : func:r2333_13, this:r2333_12 +# 2333| m2333_15(unknown) = ^CallSideEffect : ~m2333_11 +# 2333| m2333_16(unknown) = Chi : total:m2333_11, partial:m2333_15 +# 2333| v2333_17(void) = ^IndirectReadSideEffect[-1] : &:r2333_12, ~m2333_16 +# 2333| m2333_18(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2333_12 +# 2333| m2333_19(unknown) = Chi : total:m2333_16, partial:m2333_18 +# 2333| r2333_20(bool) = CopyValue : r2333_14 +# 2333| v2333_21(void) = ConditionalBranch : r2333_20 #-----| False -> Block 2 #-----| True -> Block 1 -# 2333| Block 1 -# 2333| r2333_1(glval) = VariableAddress[s1] : -# 2333| m2333_2(String) = Uninitialized[s1] : &:r2333_1 -# 2333| m2333_3(unknown) = Chi : total:m2332_19, partial:m2333_2 -# 2333| r2333_4(glval) = FunctionAddress[String] : -# 2333| v2333_5(void) = Call[String] : func:r2333_4, this:r2333_1 -# 2333| m2333_6(unknown) = ^CallSideEffect : ~m2333_3 -# 2333| m2333_7(unknown) = Chi : total:m2333_3, partial:m2333_6 -# 2333| m2333_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2333_1 -# 2333| m2333_9(unknown) = Chi : total:m2333_7, partial:m2333_8 +# 2334| Block 1 # 2334| r2334_1(glval) = VariableAddress[s1] : -# 2334| r2334_2(glval) = FunctionAddress[~String] : -# 2334| v2334_3(void) = Call[~String] : func:r2334_2, this:r2334_1 -# 2334| m2334_4(unknown) = ^CallSideEffect : ~m2333_9 -# 2334| m2334_5(unknown) = Chi : total:m2333_9, partial:m2334_4 -# 2334| v2334_6(void) = ^IndirectReadSideEffect[-1] : &:r2334_1, ~m2334_5 -# 2334| m2334_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2334_1 -# 2334| m2334_8(unknown) = Chi : total:m2334_5, partial:m2334_7 +# 2334| m2334_2(String) = Uninitialized[s1] : &:r2334_1 +# 2334| m2334_3(unknown) = Chi : total:m2333_19, partial:m2334_2 +# 2334| r2334_4(glval) = FunctionAddress[String] : +# 2334| v2334_5(void) = Call[String] : func:r2334_4, this:r2334_1 +# 2334| m2334_6(unknown) = ^CallSideEffect : ~m2334_3 +# 2334| m2334_7(unknown) = Chi : total:m2334_3, partial:m2334_6 +# 2334| m2334_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2334_1 +# 2334| m2334_9(unknown) = Chi : total:m2334_7, partial:m2334_8 +# 2335| r2335_1(glval) = VariableAddress[s1] : +# 2335| r2335_2(glval) = FunctionAddress[~String] : +# 2335| v2335_3(void) = Call[~String] : func:r2335_2, this:r2335_1 +# 2335| m2335_4(unknown) = ^CallSideEffect : ~m2334_9 +# 2335| m2335_5(unknown) = Chi : total:m2334_9, partial:m2335_4 +# 2335| v2335_6(void) = ^IndirectReadSideEffect[-1] : &:r2335_1, ~m2335_5 +# 2335| m2335_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2335_1 +# 2335| m2335_8(unknown) = Chi : total:m2335_5, partial:m2335_7 #-----| Goto -> Block 3 -# 2335| Block 2 -# 2335| r2335_1(glval) = VariableAddress[s2] : -# 2335| m2335_2(String) = Uninitialized[s2] : &:r2335_1 -# 2335| m2335_3(unknown) = Chi : total:m2332_19, partial:m2335_2 -# 2335| r2335_4(glval) = FunctionAddress[String] : -# 2335| v2335_5(void) = Call[String] : func:r2335_4, this:r2335_1 -# 2335| m2335_6(unknown) = ^CallSideEffect : ~m2335_3 -# 2335| m2335_7(unknown) = Chi : total:m2335_3, partial:m2335_6 -# 2335| m2335_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2335_1 -# 2335| m2335_9(unknown) = Chi : total:m2335_7, partial:m2335_8 +# 2336| Block 2 # 2336| r2336_1(glval) = VariableAddress[s2] : -# 2336| r2336_2(glval) = FunctionAddress[~String] : -# 2336| v2336_3(void) = Call[~String] : func:r2336_2, this:r2336_1 -# 2336| m2336_4(unknown) = ^CallSideEffect : ~m2335_9 -# 2336| m2336_5(unknown) = Chi : total:m2335_9, partial:m2336_4 -# 2336| v2336_6(void) = ^IndirectReadSideEffect[-1] : &:r2336_1, ~m2336_5 -# 2336| m2336_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2336_1 -# 2336| m2336_8(unknown) = Chi : total:m2336_5, partial:m2336_7 +# 2336| m2336_2(String) = Uninitialized[s2] : &:r2336_1 +# 2336| m2336_3(unknown) = Chi : total:m2333_19, partial:m2336_2 +# 2336| r2336_4(glval) = FunctionAddress[String] : +# 2336| v2336_5(void) = Call[String] : func:r2336_4, this:r2336_1 +# 2336| m2336_6(unknown) = ^CallSideEffect : ~m2336_3 +# 2336| m2336_7(unknown) = Chi : total:m2336_3, partial:m2336_6 +# 2336| m2336_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2336_1 +# 2336| m2336_9(unknown) = Chi : total:m2336_7, partial:m2336_8 +# 2337| r2337_1(glval) = VariableAddress[s2] : +# 2337| r2337_2(glval) = FunctionAddress[~String] : +# 2337| v2337_3(void) = Call[~String] : func:r2337_2, this:r2337_1 +# 2337| m2337_4(unknown) = ^CallSideEffect : ~m2336_9 +# 2337| m2337_5(unknown) = Chi : total:m2336_9, partial:m2337_4 +# 2337| v2337_6(void) = ^IndirectReadSideEffect[-1] : &:r2337_1, ~m2337_5 +# 2337| m2337_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2337_1 +# 2337| m2337_8(unknown) = Chi : total:m2337_5, partial:m2337_7 #-----| Goto -> Block 3 -# 2336| Block 3 -# 2336| m2336_9(unknown) = Phi : from 1:~m2334_8, from 2:~m2336_8 -# 2336| r2336_10(glval) = VariableAddress[B] : -# 2336| r2336_11(glval) = FunctionAddress[~Bool] : -# 2336| v2336_12(void) = Call[~Bool] : func:r2336_11, this:r2336_10 -# 2336| m2336_13(unknown) = ^CallSideEffect : ~m2336_9 -# 2336| m2336_14(unknown) = Chi : total:m2336_9, partial:m2336_13 -# 2336| v2336_15(void) = ^IndirectReadSideEffect[-1] : &:r2336_10, ~m2336_14 -# 2336| m2336_16(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2336_10 -# 2336| m2336_17(unknown) = Chi : total:m2336_14, partial:m2336_16 -# 2337| v2337_1(void) = NoOp : -# 2331| v2331_7(void) = ReturnVoid : -# 2331| v2331_8(void) = AliasedUse : ~m2336_14 -# 2331| v2331_9(void) = ExitFunction : +# 2337| Block 3 +# 2337| m2337_9(unknown) = Phi : from 1:~m2335_8, from 2:~m2337_8 +# 2337| r2337_10(glval) = VariableAddress[B] : +# 2337| r2337_11(glval) = FunctionAddress[~Bool] : +# 2337| v2337_12(void) = Call[~Bool] : func:r2337_11, this:r2337_10 +# 2337| m2337_13(unknown) = ^CallSideEffect : ~m2337_9 +# 2337| m2337_14(unknown) = Chi : total:m2337_9, partial:m2337_13 +# 2337| v2337_15(void) = ^IndirectReadSideEffect[-1] : &:r2337_10, ~m2337_14 +# 2337| m2337_16(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2337_10 +# 2337| m2337_17(unknown) = Chi : total:m2337_14, partial:m2337_16 +# 2338| v2338_1(void) = NoOp : +# 2332| v2332_7(void) = ReturnVoid : +# 2332| v2332_8(void) = AliasedUse : ~m2337_14 +# 2332| v2332_9(void) = ExitFunction : -# 2339| void WhileLoopDestructors(bool) -# 2339| Block 0 -# 2339| v2339_1(void) = EnterFunction : -# 2339| m2339_2(unknown) = AliasedDefinition : -# 2339| m2339_3(unknown) = InitializeNonLocal : -# 2339| m2339_4(unknown) = Chi : total:m2339_2, partial:m2339_3 -# 2339| r2339_5(glval) = VariableAddress[b] : -# 2339| m2339_6(bool) = InitializeParameter[b] : &:r2339_5 -# 2341| r2341_1(glval) = VariableAddress[s] : -# 2341| m2341_2(String) = Uninitialized[s] : &:r2341_1 -# 2341| m2341_3(unknown) = Chi : total:m2339_4, partial:m2341_2 -# 2341| r2341_4(glval) = FunctionAddress[String] : -# 2341| v2341_5(void) = Call[String] : func:r2341_4, this:r2341_1 -# 2341| m2341_6(unknown) = ^CallSideEffect : ~m2341_3 -# 2341| m2341_7(unknown) = Chi : total:m2341_3, partial:m2341_6 -# 2341| m2341_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2341_1 -# 2341| m2341_9(unknown) = Chi : total:m2341_7, partial:m2341_8 +# 2340| void WhileLoopDestructors(bool) +# 2340| Block 0 +# 2340| v2340_1(void) = EnterFunction : +# 2340| m2340_2(unknown) = AliasedDefinition : +# 2340| m2340_3(unknown) = InitializeNonLocal : +# 2340| m2340_4(unknown) = Chi : total:m2340_2, partial:m2340_3 +# 2340| r2340_5(glval) = VariableAddress[b] : +# 2340| m2340_6(bool) = InitializeParameter[b] : &:r2340_5 +# 2342| r2342_1(glval) = VariableAddress[s] : +# 2342| m2342_2(String) = Uninitialized[s] : &:r2342_1 +# 2342| m2342_3(unknown) = Chi : total:m2340_4, partial:m2342_2 +# 2342| r2342_4(glval) = FunctionAddress[String] : +# 2342| v2342_5(void) = Call[String] : func:r2342_4, this:r2342_1 +# 2342| m2342_6(unknown) = ^CallSideEffect : ~m2342_3 +# 2342| m2342_7(unknown) = Chi : total:m2342_3, partial:m2342_6 +# 2342| m2342_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2342_1 +# 2342| m2342_9(unknown) = Chi : total:m2342_7, partial:m2342_8 #-----| Goto -> Block 1 -# 2342| Block 1 -# 2342| m2342_1(bool) = Phi : from 0:m2339_6, from 2:m2343_3 -# 2342| r2342_2(glval) = VariableAddress[b] : -# 2342| r2342_3(bool) = Load[b] : &:r2342_2, m2342_1 -# 2342| v2342_4(void) = ConditionalBranch : r2342_3 +# 2343| Block 1 +# 2343| m2343_1(bool) = Phi : from 0:m2340_6, from 2:m2344_3 +# 2343| r2343_2(glval) = VariableAddress[b] : +# 2343| r2343_3(bool) = Load[b] : &:r2343_2, m2343_1 +# 2343| v2343_4(void) = ConditionalBranch : r2343_3 #-----| False -> Block 3 #-----| True -> Block 2 -# 2343| Block 2 -# 2343| r2343_1(bool) = Constant[0] : -# 2343| r2343_2(glval) = VariableAddress[b] : -# 2343| m2343_3(bool) = Store[b] : &:r2343_2, r2343_1 +# 2344| Block 2 +# 2344| r2344_1(bool) = Constant[0] : +# 2344| r2344_2(glval) = VariableAddress[b] : +# 2344| m2344_3(bool) = Store[b] : &:r2344_2, r2344_1 #-----| Goto (back edge) -> Block 1 -# 2345| Block 3 -# 2345| r2345_1(glval) = VariableAddress[s] : -# 2345| r2345_2(glval) = FunctionAddress[~String] : -# 2345| v2345_3(void) = Call[~String] : func:r2345_2, this:r2345_1 -# 2345| m2345_4(unknown) = ^CallSideEffect : ~m2341_9 -# 2345| m2345_5(unknown) = Chi : total:m2341_9, partial:m2345_4 -# 2345| v2345_6(void) = ^IndirectReadSideEffect[-1] : &:r2345_1, ~m2345_5 -# 2345| m2345_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2345_1 -# 2345| m2345_8(unknown) = Chi : total:m2345_5, partial:m2345_7 +# 2346| Block 3 +# 2346| r2346_1(glval) = VariableAddress[s] : +# 2346| r2346_2(glval) = FunctionAddress[~String] : +# 2346| v2346_3(void) = Call[~String] : func:r2346_2, this:r2346_1 +# 2346| m2346_4(unknown) = ^CallSideEffect : ~m2342_9 +# 2346| m2346_5(unknown) = Chi : total:m2342_9, partial:m2346_4 +# 2346| v2346_6(void) = ^IndirectReadSideEffect[-1] : &:r2346_1, ~m2346_5 +# 2346| m2346_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2346_1 +# 2346| m2346_8(unknown) = Chi : total:m2346_5, partial:m2346_7 #-----| Goto -> Block 4 -# 2348| Block 4 -# 2348| m2348_1(unknown) = Phi : from 3:~m2345_8, from 5:~m2350_8 -# 2348| m2348_2(bool) = Phi : from 3:m2342_1, from 5:m2349_3 -# 2348| r2348_3(glval) = VariableAddress[B] : -# 2348| m2348_4(Bool) = Uninitialized[B] : &:r2348_3 -# 2348| m2348_5(unknown) = Chi : total:m2348_1, partial:m2348_4 -# 2348| r2348_6(glval) = FunctionAddress[Bool] : -# 2348| r2348_7(glval) = VariableAddress[b] : -# 2348| r2348_8(bool) = Load[b] : &:r2348_7, m2348_2 -# 2348| v2348_9(void) = Call[Bool] : func:r2348_6, this:r2348_3, 0:r2348_8 -# 2348| m2348_10(unknown) = ^CallSideEffect : ~m2348_5 -# 2348| m2348_11(unknown) = Chi : total:m2348_5, partial:m2348_10 -# 2348| m2348_12(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2348_3 -# 2348| m2348_13(unknown) = Chi : total:m2348_11, partial:m2348_12 -# 2348| r2348_14(glval) = VariableAddress[B] : -# 2348| r2348_15(glval) = FunctionAddress[operator bool] : -# 2348| r2348_16(bool) = Call[operator bool] : func:r2348_15, this:r2348_14 -# 2348| m2348_17(unknown) = ^CallSideEffect : ~m2348_13 -# 2348| m2348_18(unknown) = Chi : total:m2348_13, partial:m2348_17 -# 2348| v2348_19(void) = ^IndirectReadSideEffect[-1] : &:r2348_14, ~m2348_18 -# 2348| m2348_20(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2348_14 -# 2348| m2348_21(unknown) = Chi : total:m2348_18, partial:m2348_20 -# 2348| r2348_22(bool) = CopyValue : r2348_16 -# 2348| v2348_23(void) = ConditionalBranch : r2348_22 +# 2349| Block 4 +# 2349| m2349_1(unknown) = Phi : from 3:~m2346_8, from 5:~m2351_8 +# 2349| m2349_2(bool) = Phi : from 3:m2343_1, from 5:m2350_3 +# 2349| r2349_3(glval) = VariableAddress[B] : +# 2349| m2349_4(Bool) = Uninitialized[B] : &:r2349_3 +# 2349| m2349_5(unknown) = Chi : total:m2349_1, partial:m2349_4 +# 2349| r2349_6(glval) = FunctionAddress[Bool] : +# 2349| r2349_7(glval) = VariableAddress[b] : +# 2349| r2349_8(bool) = Load[b] : &:r2349_7, m2349_2 +# 2349| v2349_9(void) = Call[Bool] : func:r2349_6, this:r2349_3, 0:r2349_8 +# 2349| m2349_10(unknown) = ^CallSideEffect : ~m2349_5 +# 2349| m2349_11(unknown) = Chi : total:m2349_5, partial:m2349_10 +# 2349| m2349_12(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2349_3 +# 2349| m2349_13(unknown) = Chi : total:m2349_11, partial:m2349_12 +# 2349| r2349_14(glval) = VariableAddress[B] : +# 2349| r2349_15(glval) = FunctionAddress[operator bool] : +# 2349| r2349_16(bool) = Call[operator bool] : func:r2349_15, this:r2349_14 +# 2349| m2349_17(unknown) = ^CallSideEffect : ~m2349_13 +# 2349| m2349_18(unknown) = Chi : total:m2349_13, partial:m2349_17 +# 2349| v2349_19(void) = ^IndirectReadSideEffect[-1] : &:r2349_14, ~m2349_18 +# 2349| m2349_20(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2349_14 +# 2349| m2349_21(unknown) = Chi : total:m2349_18, partial:m2349_20 +# 2349| r2349_22(bool) = CopyValue : r2349_16 +# 2349| v2349_23(void) = ConditionalBranch : r2349_22 #-----| False -> Block 6 #-----| True -> Block 5 -# 2349| Block 5 -# 2349| r2349_1(bool) = Constant[0] : -# 2349| r2349_2(glval) = VariableAddress[b] : -# 2349| m2349_3(bool) = Store[b] : &:r2349_2, r2349_1 -# 2350| r2350_1(glval) = VariableAddress[B] : -# 2350| r2350_2(glval) = FunctionAddress[~Bool] : -# 2350| v2350_3(void) = Call[~Bool] : func:r2350_2, this:r2350_1 -# 2350| m2350_4(unknown) = ^CallSideEffect : ~m2348_21 -# 2350| m2350_5(unknown) = Chi : total:m2348_21, partial:m2350_4 -# 2350| v2350_6(void) = ^IndirectReadSideEffect[-1] : &:r2350_1, ~m2350_5 -# 2350| m2350_7(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2350_1 -# 2350| m2350_8(unknown) = Chi : total:m2350_5, partial:m2350_7 +# 2350| Block 5 +# 2350| r2350_1(bool) = Constant[0] : +# 2350| r2350_2(glval) = VariableAddress[b] : +# 2350| m2350_3(bool) = Store[b] : &:r2350_2, r2350_1 +# 2351| r2351_1(glval) = VariableAddress[B] : +# 2351| r2351_2(glval) = FunctionAddress[~Bool] : +# 2351| v2351_3(void) = Call[~Bool] : func:r2351_2, this:r2351_1 +# 2351| m2351_4(unknown) = ^CallSideEffect : ~m2349_21 +# 2351| m2351_5(unknown) = Chi : total:m2349_21, partial:m2351_4 +# 2351| v2351_6(void) = ^IndirectReadSideEffect[-1] : &:r2351_1, ~m2351_5 +# 2351| m2351_7(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2351_1 +# 2351| m2351_8(unknown) = Chi : total:m2351_5, partial:m2351_7 #-----| Goto (back edge) -> Block 4 -# 2350| Block 6 -# 2350| r2350_9(glval) = VariableAddress[B] : -# 2350| r2350_10(glval) = FunctionAddress[~Bool] : -# 2350| v2350_11(void) = Call[~Bool] : func:r2350_10, this:r2350_9 -# 2350| m2350_12(unknown) = ^CallSideEffect : ~m2348_21 -# 2350| m2350_13(unknown) = Chi : total:m2348_21, partial:m2350_12 -# 2350| v2350_14(void) = ^IndirectReadSideEffect[-1] : &:r2350_9, ~m2350_13 -# 2350| m2350_15(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2350_9 -# 2350| m2350_16(unknown) = Chi : total:m2350_13, partial:m2350_15 -# 2352| v2352_1(void) = NoOp : -# 2339| v2339_7(void) = ReturnVoid : -# 2339| v2339_8(void) = AliasedUse : ~m2350_13 -# 2339| v2339_9(void) = ExitFunction : +# 2351| Block 6 +# 2351| r2351_9(glval) = VariableAddress[B] : +# 2351| r2351_10(glval) = FunctionAddress[~Bool] : +# 2351| v2351_11(void) = Call[~Bool] : func:r2351_10, this:r2351_9 +# 2351| m2351_12(unknown) = ^CallSideEffect : ~m2349_21 +# 2351| m2351_13(unknown) = Chi : total:m2349_21, partial:m2351_12 +# 2351| v2351_14(void) = ^IndirectReadSideEffect[-1] : &:r2351_9, ~m2351_13 +# 2351| m2351_15(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2351_9 +# 2351| m2351_16(unknown) = Chi : total:m2351_13, partial:m2351_15 +# 2353| v2353_1(void) = NoOp : +# 2340| v2340_7(void) = ReturnVoid : +# 2340| v2340_8(void) = AliasedUse : ~m2351_13 +# 2340| v2340_9(void) = ExitFunction : -# 2354| void VoidFunc() -# 2354| Block 0 -# 2354| v2354_1(void) = EnterFunction : -# 2354| m2354_2(unknown) = AliasedDefinition : -# 2354| m2354_3(unknown) = InitializeNonLocal : -# 2354| m2354_4(unknown) = Chi : total:m2354_2, partial:m2354_3 -# 2354| v2354_5(void) = NoOp : -# 2354| v2354_6(void) = ReturnVoid : -# 2354| v2354_7(void) = AliasedUse : m2354_3 -# 2354| v2354_8(void) = ExitFunction : +# 2355| void VoidFunc() +# 2355| Block 0 +# 2355| v2355_1(void) = EnterFunction : +# 2355| m2355_2(unknown) = AliasedDefinition : +# 2355| m2355_3(unknown) = InitializeNonLocal : +# 2355| m2355_4(unknown) = Chi : total:m2355_2, partial:m2355_3 +# 2355| v2355_5(void) = NoOp : +# 2355| v2355_6(void) = ReturnVoid : +# 2355| v2355_7(void) = AliasedUse : m2355_3 +# 2355| v2355_8(void) = ExitFunction : -# 2356| void IfReturnDestructors(bool) -# 2356| Block 0 -# 2356| v2356_1(void) = EnterFunction : -# 2356| m2356_2(unknown) = AliasedDefinition : -# 2356| m2356_3(unknown) = InitializeNonLocal : -# 2356| m2356_4(unknown) = Chi : total:m2356_2, partial:m2356_3 -# 2356| r2356_5(glval) = VariableAddress[b] : -# 2356| m2356_6(bool) = InitializeParameter[b] : &:r2356_5 -# 2357| r2357_1(glval) = VariableAddress[s] : -# 2357| m2357_2(String) = Uninitialized[s] : &:r2357_1 -# 2357| m2357_3(unknown) = Chi : total:m2356_4, partial:m2357_2 -# 2357| r2357_4(glval) = FunctionAddress[String] : -# 2357| v2357_5(void) = Call[String] : func:r2357_4, this:r2357_1 -# 2357| m2357_6(unknown) = ^CallSideEffect : ~m2357_3 -# 2357| m2357_7(unknown) = Chi : total:m2357_3, partial:m2357_6 -# 2357| m2357_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2357_1 -# 2357| m2357_9(unknown) = Chi : total:m2357_7, partial:m2357_8 -# 2358| r2358_1(glval) = VariableAddress[b] : -# 2358| r2358_2(bool) = Load[b] : &:r2358_1, m2356_6 -# 2358| v2358_3(void) = ConditionalBranch : r2358_2 +# 2357| void IfReturnDestructors(bool) +# 2357| Block 0 +# 2357| v2357_1(void) = EnterFunction : +# 2357| m2357_2(unknown) = AliasedDefinition : +# 2357| m2357_3(unknown) = InitializeNonLocal : +# 2357| m2357_4(unknown) = Chi : total:m2357_2, partial:m2357_3 +# 2357| r2357_5(glval) = VariableAddress[b] : +# 2357| m2357_6(bool) = InitializeParameter[b] : &:r2357_5 +# 2358| r2358_1(glval) = VariableAddress[s] : +# 2358| m2358_2(String) = Uninitialized[s] : &:r2358_1 +# 2358| m2358_3(unknown) = Chi : total:m2357_4, partial:m2358_2 +# 2358| r2358_4(glval) = FunctionAddress[String] : +# 2358| v2358_5(void) = Call[String] : func:r2358_4, this:r2358_1 +# 2358| m2358_6(unknown) = ^CallSideEffect : ~m2358_3 +# 2358| m2358_7(unknown) = Chi : total:m2358_3, partial:m2358_6 +# 2358| m2358_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2358_1 +# 2358| m2358_9(unknown) = Chi : total:m2358_7, partial:m2358_8 +# 2359| r2359_1(glval) = VariableAddress[b] : +# 2359| r2359_2(bool) = Load[b] : &:r2359_1, m2357_6 +# 2359| v2359_3(void) = ConditionalBranch : r2359_2 #-----| False -> Block 3 #-----| True -> Block 2 -# 2356| Block 1 -# 2356| m2356_7(unknown) = Phi : from 2:~m2365_8, from 4:~m2365_16, from 5:~m2365_25 -# 2356| v2356_8(void) = ReturnVoid : -# 2356| v2356_9(void) = AliasedUse : ~m2356_7 -# 2356| v2356_10(void) = ExitFunction : +# 2357| Block 1 +# 2357| m2357_7(unknown) = Phi : from 2:~m2366_8, from 4:~m2366_16, from 5:~m2366_25 +# 2357| v2357_8(void) = ReturnVoid : +# 2357| v2357_9(void) = AliasedUse : ~m2357_7 +# 2357| v2357_10(void) = ExitFunction : -# 2359| Block 2 -# 2359| v2359_1(void) = NoOp : -# 2365| r2365_1(glval) = VariableAddress[s] : -# 2365| r2365_2(glval) = FunctionAddress[~String] : -# 2365| v2365_3(void) = Call[~String] : func:r2365_2, this:r2365_1 -# 2365| m2365_4(unknown) = ^CallSideEffect : ~m2357_9 -# 2365| m2365_5(unknown) = Chi : total:m2357_9, partial:m2365_4 -# 2365| v2365_6(void) = ^IndirectReadSideEffect[-1] : &:r2365_1, ~m2365_5 -# 2365| m2365_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2365_1 -# 2365| m2365_8(unknown) = Chi : total:m2365_5, partial:m2365_7 +# 2360| Block 2 +# 2360| v2360_1(void) = NoOp : +# 2366| r2366_1(glval) = VariableAddress[s] : +# 2366| r2366_2(glval) = FunctionAddress[~String] : +# 2366| v2366_3(void) = Call[~String] : func:r2366_2, this:r2366_1 +# 2366| m2366_4(unknown) = ^CallSideEffect : ~m2358_9 +# 2366| m2366_5(unknown) = Chi : total:m2358_9, partial:m2366_4 +# 2366| v2366_6(void) = ^IndirectReadSideEffect[-1] : &:r2366_1, ~m2366_5 +# 2366| m2366_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2366_1 +# 2366| m2366_8(unknown) = Chi : total:m2366_5, partial:m2366_7 #-----| Goto -> Block 1 -# 2361| Block 3 -# 2361| r2361_1(glval) = VariableAddress[b] : -# 2361| r2361_2(bool) = Load[b] : &:r2361_1, m2356_6 -# 2361| v2361_3(void) = ConditionalBranch : r2361_2 +# 2362| Block 3 +# 2362| r2362_1(glval) = VariableAddress[b] : +# 2362| r2362_2(bool) = Load[b] : &:r2362_1, m2357_6 +# 2362| v2362_3(void) = ConditionalBranch : r2362_2 #-----| False -> Block 5 #-----| True -> Block 4 -# 2362| Block 4 -# 2362| r2362_1(glval) = FunctionAddress[VoidFunc] : -# 2362| v2362_2(void) = Call[VoidFunc] : func:r2362_1 -# 2362| m2362_3(unknown) = ^CallSideEffect : ~m2357_9 -# 2362| m2362_4(unknown) = Chi : total:m2357_9, partial:m2362_3 -# 2362| v2362_5(void) = NoOp : -# 2365| r2365_9(glval) = VariableAddress[s] : -# 2365| r2365_10(glval) = FunctionAddress[~String] : -# 2365| v2365_11(void) = Call[~String] : func:r2365_10, this:r2365_9 -# 2365| m2365_12(unknown) = ^CallSideEffect : ~m2362_4 -# 2365| m2365_13(unknown) = Chi : total:m2362_4, partial:m2365_12 -# 2365| v2365_14(void) = ^IndirectReadSideEffect[-1] : &:r2365_9, ~m2365_13 -# 2365| m2365_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2365_9 -# 2365| m2365_16(unknown) = Chi : total:m2365_13, partial:m2365_15 +# 2363| Block 4 +# 2363| r2363_1(glval) = FunctionAddress[VoidFunc] : +# 2363| v2363_2(void) = Call[VoidFunc] : func:r2363_1 +# 2363| m2363_3(unknown) = ^CallSideEffect : ~m2358_9 +# 2363| m2363_4(unknown) = Chi : total:m2358_9, partial:m2363_3 +# 2363| v2363_5(void) = NoOp : +# 2366| r2366_9(glval) = VariableAddress[s] : +# 2366| r2366_10(glval) = FunctionAddress[~String] : +# 2366| v2366_11(void) = Call[~String] : func:r2366_10, this:r2366_9 +# 2366| m2366_12(unknown) = ^CallSideEffect : ~m2363_4 +# 2366| m2366_13(unknown) = Chi : total:m2363_4, partial:m2366_12 +# 2366| v2366_14(void) = ^IndirectReadSideEffect[-1] : &:r2366_9, ~m2366_13 +# 2366| m2366_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2366_9 +# 2366| m2366_16(unknown) = Chi : total:m2366_13, partial:m2366_15 #-----| Goto -> Block 1 -# 2364| Block 5 -# 2364| r2364_1(glval) = VariableAddress[s] : -# 2365| v2365_17(void) = NoOp : -# 2365| r2365_18(glval) = VariableAddress[s] : -# 2365| r2365_19(glval) = FunctionAddress[~String] : -# 2365| v2365_20(void) = Call[~String] : func:r2365_19, this:r2365_18 -# 2365| m2365_21(unknown) = ^CallSideEffect : ~m2357_9 -# 2365| m2365_22(unknown) = Chi : total:m2357_9, partial:m2365_21 -# 2365| v2365_23(void) = ^IndirectReadSideEffect[-1] : &:r2365_18, ~m2365_22 -# 2365| m2365_24(String) = ^IndirectMayWriteSideEffect[-1] : &:r2365_18 -# 2365| m2365_25(unknown) = Chi : total:m2365_22, partial:m2365_24 +# 2365| Block 5 +# 2365| r2365_1(glval) = VariableAddress[s] : +# 2366| v2366_17(void) = NoOp : +# 2366| r2366_18(glval) = VariableAddress[s] : +# 2366| r2366_19(glval) = FunctionAddress[~String] : +# 2366| v2366_20(void) = Call[~String] : func:r2366_19, this:r2366_18 +# 2366| m2366_21(unknown) = ^CallSideEffect : ~m2358_9 +# 2366| m2366_22(unknown) = Chi : total:m2358_9, partial:m2366_21 +# 2366| v2366_23(void) = ^IndirectReadSideEffect[-1] : &:r2366_18, ~m2366_22 +# 2366| m2366_24(String) = ^IndirectMayWriteSideEffect[-1] : &:r2366_18 +# 2366| m2366_25(unknown) = Chi : total:m2366_22, partial:m2366_24 #-----| Goto -> Block 1 -# 2367| int IfReturnDestructors3(bool) -# 2367| Block 0 -# 2367| v2367_1(void) = EnterFunction : -# 2367| m2367_2(unknown) = AliasedDefinition : -# 2367| m2367_3(unknown) = InitializeNonLocal : -# 2367| m2367_4(unknown) = Chi : total:m2367_2, partial:m2367_3 -# 2367| r2367_5(glval) = VariableAddress[b] : -# 2367| m2367_6(bool) = InitializeParameter[b] : &:r2367_5 -# 2368| r2368_1(glval) = VariableAddress[s] : -# 2368| m2368_2(String) = Uninitialized[s] : &:r2368_1 -# 2368| m2368_3(unknown) = Chi : total:m2367_4, partial:m2368_2 -# 2368| r2368_4(glval) = FunctionAddress[String] : -# 2368| v2368_5(void) = Call[String] : func:r2368_4, this:r2368_1 -# 2368| m2368_6(unknown) = ^CallSideEffect : ~m2368_3 -# 2368| m2368_7(unknown) = Chi : total:m2368_3, partial:m2368_6 -# 2368| m2368_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2368_1 -# 2368| m2368_9(unknown) = Chi : total:m2368_7, partial:m2368_8 -# 2369| r2369_1(glval) = VariableAddress[b] : -# 2369| r2369_2(bool) = Load[b] : &:r2369_1, m2367_6 -# 2369| v2369_3(void) = ConditionalBranch : r2369_2 +# 2368| int IfReturnDestructors3(bool) +# 2368| Block 0 +# 2368| v2368_1(void) = EnterFunction : +# 2368| m2368_2(unknown) = AliasedDefinition : +# 2368| m2368_3(unknown) = InitializeNonLocal : +# 2368| m2368_4(unknown) = Chi : total:m2368_2, partial:m2368_3 +# 2368| r2368_5(glval) = VariableAddress[b] : +# 2368| m2368_6(bool) = InitializeParameter[b] : &:r2368_5 +# 2369| r2369_1(glval) = VariableAddress[s] : +# 2369| m2369_2(String) = Uninitialized[s] : &:r2369_1 +# 2369| m2369_3(unknown) = Chi : total:m2368_4, partial:m2369_2 +# 2369| r2369_4(glval) = FunctionAddress[String] : +# 2369| v2369_5(void) = Call[String] : func:r2369_4, this:r2369_1 +# 2369| m2369_6(unknown) = ^CallSideEffect : ~m2369_3 +# 2369| m2369_7(unknown) = Chi : total:m2369_3, partial:m2369_6 +# 2369| m2369_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2369_1 +# 2369| m2369_9(unknown) = Chi : total:m2369_7, partial:m2369_8 +# 2370| r2370_1(glval) = VariableAddress[b] : +# 2370| r2370_2(bool) = Load[b] : &:r2370_1, m2368_6 +# 2370| v2370_3(void) = ConditionalBranch : r2370_2 #-----| False -> Block 3 #-----| True -> Block 2 -# 2367| Block 1 -# 2367| m2367_7(unknown) = Phi : from 2:~m2373_8, from 3:~m2373_16 -# 2367| m2367_8(int) = Phi : from 2:m2370_3, from 3:m2372_3 -# 2367| r2367_9(glval) = VariableAddress[#return] : -# 2367| v2367_10(void) = ReturnValue : &:r2367_9, m2367_8 -# 2367| v2367_11(void) = AliasedUse : ~m2367_7 -# 2367| v2367_12(void) = ExitFunction : +# 2368| Block 1 +# 2368| m2368_7(unknown) = Phi : from 2:~m2374_8, from 3:~m2374_16 +# 2368| m2368_8(int) = Phi : from 2:m2371_3, from 3:m2373_3 +# 2368| r2368_9(glval) = VariableAddress[#return] : +# 2368| v2368_10(void) = ReturnValue : &:r2368_9, m2368_8 +# 2368| v2368_11(void) = AliasedUse : ~m2368_7 +# 2368| v2368_12(void) = ExitFunction : -# 2370| Block 2 -# 2370| r2370_1(glval) = VariableAddress[#return] : -# 2370| r2370_2(int) = Constant[1] : -# 2370| m2370_3(int) = Store[#return] : &:r2370_1, r2370_2 -# 2373| r2373_1(glval) = VariableAddress[s] : -# 2373| r2373_2(glval) = FunctionAddress[~String] : -# 2373| v2373_3(void) = Call[~String] : func:r2373_2, this:r2373_1 -# 2373| m2373_4(unknown) = ^CallSideEffect : ~m2368_9 -# 2373| m2373_5(unknown) = Chi : total:m2368_9, partial:m2373_4 -# 2373| v2373_6(void) = ^IndirectReadSideEffect[-1] : &:r2373_1, ~m2373_5 -# 2373| m2373_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2373_1 -# 2373| m2373_8(unknown) = Chi : total:m2373_5, partial:m2373_7 +# 2371| Block 2 +# 2371| r2371_1(glval) = VariableAddress[#return] : +# 2371| r2371_2(int) = Constant[1] : +# 2371| m2371_3(int) = Store[#return] : &:r2371_1, r2371_2 +# 2374| r2374_1(glval) = VariableAddress[s] : +# 2374| r2374_2(glval) = FunctionAddress[~String] : +# 2374| v2374_3(void) = Call[~String] : func:r2374_2, this:r2374_1 +# 2374| m2374_4(unknown) = ^CallSideEffect : ~m2369_9 +# 2374| m2374_5(unknown) = Chi : total:m2369_9, partial:m2374_4 +# 2374| v2374_6(void) = ^IndirectReadSideEffect[-1] : &:r2374_1, ~m2374_5 +# 2374| m2374_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2374_1 +# 2374| m2374_8(unknown) = Chi : total:m2374_5, partial:m2374_7 #-----| Goto -> Block 1 -# 2372| Block 3 -# 2372| r2372_1(glval) = VariableAddress[#return] : -# 2372| r2372_2(int) = Constant[0] : -# 2372| m2372_3(int) = Store[#return] : &:r2372_1, r2372_2 -# 2373| r2373_9(glval) = VariableAddress[s] : -# 2373| r2373_10(glval) = FunctionAddress[~String] : -# 2373| v2373_11(void) = Call[~String] : func:r2373_10, this:r2373_9 -# 2373| m2373_12(unknown) = ^CallSideEffect : ~m2368_9 -# 2373| m2373_13(unknown) = Chi : total:m2368_9, partial:m2373_12 -# 2373| v2373_14(void) = ^IndirectReadSideEffect[-1] : &:r2373_9, ~m2373_13 -# 2373| m2373_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2373_9 -# 2373| m2373_16(unknown) = Chi : total:m2373_13, partial:m2373_15 +# 2373| Block 3 +# 2373| r2373_1(glval) = VariableAddress[#return] : +# 2373| r2373_2(int) = Constant[0] : +# 2373| m2373_3(int) = Store[#return] : &:r2373_1, r2373_2 +# 2374| r2374_9(glval) = VariableAddress[s] : +# 2374| r2374_10(glval) = FunctionAddress[~String] : +# 2374| v2374_11(void) = Call[~String] : func:r2374_10, this:r2374_9 +# 2374| m2374_12(unknown) = ^CallSideEffect : ~m2369_9 +# 2374| m2374_13(unknown) = Chi : total:m2369_9, partial:m2374_12 +# 2374| v2374_14(void) = ^IndirectReadSideEffect[-1] : &:r2374_9, ~m2374_13 +# 2374| m2374_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2374_9 +# 2374| m2374_16(unknown) = Chi : total:m2374_13, partial:m2374_15 #-----| Goto -> Block 1 -# 2375| void VoidReturnDestructors() -# 2375| Block 0 -# 2375| v2375_1(void) = EnterFunction : -# 2375| m2375_2(unknown) = AliasedDefinition : -# 2375| m2375_3(unknown) = InitializeNonLocal : -# 2375| m2375_4(unknown) = Chi : total:m2375_2, partial:m2375_3 -# 2376| r2376_1(glval) = VariableAddress[s] : -# 2376| m2376_2(String) = Uninitialized[s] : &:r2376_1 -# 2376| m2376_3(unknown) = Chi : total:m2375_4, partial:m2376_2 -# 2376| r2376_4(glval) = FunctionAddress[String] : -# 2376| v2376_5(void) = Call[String] : func:r2376_4, this:r2376_1 -# 2376| m2376_6(unknown) = ^CallSideEffect : ~m2376_3 -# 2376| m2376_7(unknown) = Chi : total:m2376_3, partial:m2376_6 -# 2376| m2376_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2376_1 -# 2376| m2376_9(unknown) = Chi : total:m2376_7, partial:m2376_8 -# 2377| r2377_1(glval) = FunctionAddress[VoidFunc] : -# 2377| v2377_2(void) = Call[VoidFunc] : func:r2377_1 -# 2377| m2377_3(unknown) = ^CallSideEffect : ~m2376_9 -# 2377| m2377_4(unknown) = Chi : total:m2376_9, partial:m2377_3 -# 2377| v2377_5(void) = NoOp : -# 2378| r2378_1(glval) = VariableAddress[s] : -# 2378| r2378_2(glval) = FunctionAddress[~String] : -# 2378| v2378_3(void) = Call[~String] : func:r2378_2, this:r2378_1 -# 2378| m2378_4(unknown) = ^CallSideEffect : ~m2377_4 -# 2378| m2378_5(unknown) = Chi : total:m2377_4, partial:m2378_4 -# 2378| v2378_6(void) = ^IndirectReadSideEffect[-1] : &:r2378_1, ~m2378_5 -# 2378| m2378_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2378_1 -# 2378| m2378_8(unknown) = Chi : total:m2378_5, partial:m2378_7 -# 2375| v2375_5(void) = ReturnVoid : -# 2375| v2375_6(void) = AliasedUse : ~m2378_5 -# 2375| v2375_7(void) = ExitFunction : +# 2376| void VoidReturnDestructors() +# 2376| Block 0 +# 2376| v2376_1(void) = EnterFunction : +# 2376| m2376_2(unknown) = AliasedDefinition : +# 2376| m2376_3(unknown) = InitializeNonLocal : +# 2376| m2376_4(unknown) = Chi : total:m2376_2, partial:m2376_3 +# 2377| r2377_1(glval) = VariableAddress[s] : +# 2377| m2377_2(String) = Uninitialized[s] : &:r2377_1 +# 2377| m2377_3(unknown) = Chi : total:m2376_4, partial:m2377_2 +# 2377| r2377_4(glval) = FunctionAddress[String] : +# 2377| v2377_5(void) = Call[String] : func:r2377_4, this:r2377_1 +# 2377| m2377_6(unknown) = ^CallSideEffect : ~m2377_3 +# 2377| m2377_7(unknown) = Chi : total:m2377_3, partial:m2377_6 +# 2377| m2377_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2377_1 +# 2377| m2377_9(unknown) = Chi : total:m2377_7, partial:m2377_8 +# 2378| r2378_1(glval) = FunctionAddress[VoidFunc] : +# 2378| v2378_2(void) = Call[VoidFunc] : func:r2378_1 +# 2378| m2378_3(unknown) = ^CallSideEffect : ~m2377_9 +# 2378| m2378_4(unknown) = Chi : total:m2377_9, partial:m2378_3 +# 2378| v2378_5(void) = NoOp : +# 2379| r2379_1(glval) = VariableAddress[s] : +# 2379| r2379_2(glval) = FunctionAddress[~String] : +# 2379| v2379_3(void) = Call[~String] : func:r2379_2, this:r2379_1 +# 2379| m2379_4(unknown) = ^CallSideEffect : ~m2378_4 +# 2379| m2379_5(unknown) = Chi : total:m2378_4, partial:m2379_4 +# 2379| v2379_6(void) = ^IndirectReadSideEffect[-1] : &:r2379_1, ~m2379_5 +# 2379| m2379_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2379_1 +# 2379| m2379_8(unknown) = Chi : total:m2379_5, partial:m2379_7 +# 2376| v2376_5(void) = ReturnVoid : +# 2376| v2376_6(void) = AliasedUse : ~m2379_5 +# 2376| v2376_7(void) = ExitFunction : -# 2388| return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() -# 2388| Block 0 -# 2388| v2388_1(void) = EnterFunction : -# 2388| m2388_2(unknown) = AliasedDefinition : -# 2388| m2388_3(unknown) = InitializeNonLocal : -# 2388| m2388_4(unknown) = Chi : total:m2388_2, partial:m2388_3 -# 2390| r2390_1(glval<..:: *>) = VariableAddress[#return] : -# 2390| r2390_2(..()(..)) = FunctionAddress[VoidToInt] : -# 2390| m2390_3(..:: *) = Store[#return] : &:r2390_1, r2390_2 -# 2388| r2388_5(glval<..:: *>) = VariableAddress[#return] : -# 2388| v2388_6(void) = ReturnValue : &:r2388_5, m2390_3 -# 2388| v2388_7(void) = AliasedUse : m2388_3 -# 2388| v2388_8(void) = ExitFunction : +# 2389| return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() +# 2389| Block 0 +# 2389| v2389_1(void) = EnterFunction : +# 2389| m2389_2(unknown) = AliasedDefinition : +# 2389| m2389_3(unknown) = InitializeNonLocal : +# 2389| m2389_4(unknown) = Chi : total:m2389_2, partial:m2389_3 +# 2391| r2391_1(glval<..:: *>) = VariableAddress[#return] : +# 2391| r2391_2(..()(..)) = FunctionAddress[VoidToInt] : +# 2391| m2391_3(..:: *) = Store[#return] : &:r2391_1, r2391_2 +# 2389| r2389_5(glval<..:: *>) = VariableAddress[#return] : +# 2389| v2389_6(void) = ReturnValue : &:r2389_5, m2391_3 +# 2389| v2389_7(void) = AliasedUse : m2389_3 +# 2389| v2389_8(void) = ExitFunction : -# 2395| int small_operation_should_not_be_constant_folded() -# 2395| Block 0 -# 2395| v2395_1(void) = EnterFunction : -# 2395| m2395_2(unknown) = AliasedDefinition : -# 2395| m2395_3(unknown) = InitializeNonLocal : -# 2395| m2395_4(unknown) = Chi : total:m2395_2, partial:m2395_3 -# 2396| r2396_1(glval) = VariableAddress[#return] : -# 2396| r2396_2(int) = Constant[1] : -# 2396| r2396_3(int) = Constant[2] : -# 2396| r2396_4(int) = BitXor : r2396_2, r2396_3 -# 2396| m2396_5(int) = Store[#return] : &:r2396_1, r2396_4 -# 2395| r2395_5(glval) = VariableAddress[#return] : -# 2395| v2395_6(void) = ReturnValue : &:r2395_5, m2396_5 -# 2395| v2395_7(void) = AliasedUse : m2395_3 -# 2395| v2395_8(void) = ExitFunction : +# 2396| int small_operation_should_not_be_constant_folded() +# 2396| Block 0 +# 2396| v2396_1(void) = EnterFunction : +# 2396| m2396_2(unknown) = AliasedDefinition : +# 2396| m2396_3(unknown) = InitializeNonLocal : +# 2396| m2396_4(unknown) = Chi : total:m2396_2, partial:m2396_3 +# 2397| r2397_1(glval) = VariableAddress[#return] : +# 2397| r2397_2(int) = Constant[1] : +# 2397| r2397_3(int) = Constant[2] : +# 2397| r2397_4(int) = BitXor : r2397_2, r2397_3 +# 2397| m2397_5(int) = Store[#return] : &:r2397_1, r2397_4 +# 2396| r2396_5(glval) = VariableAddress[#return] : +# 2396| v2396_6(void) = ReturnValue : &:r2396_5, m2397_5 +# 2396| v2396_7(void) = AliasedUse : m2396_3 +# 2396| v2396_8(void) = ExitFunction : -# 2406| int large_operation_should_be_constant_folded() -# 2406| Block 0 -# 2406| v2406_1(void) = EnterFunction : -# 2406| m2406_2(unknown) = AliasedDefinition : -# 2406| m2406_3(unknown) = InitializeNonLocal : -# 2406| m2406_4(unknown) = Chi : total:m2406_2, partial:m2406_3 -# 2407| r2407_1(glval) = VariableAddress[#return] : -# 2407| r2407_2(int) = Constant[0] : -# 2407| m2407_3(int) = Store[#return] : &:r2407_1, r2407_2 -# 2406| r2406_5(glval) = VariableAddress[#return] : -# 2406| v2406_6(void) = ReturnValue : &:r2406_5, m2407_3 -# 2406| v2406_7(void) = AliasedUse : m2406_3 -# 2406| v2406_8(void) = ExitFunction : +# 2407| int large_operation_should_be_constant_folded() +# 2407| Block 0 +# 2407| v2407_1(void) = EnterFunction : +# 2407| m2407_2(unknown) = AliasedDefinition : +# 2407| m2407_3(unknown) = InitializeNonLocal : +# 2407| m2407_4(unknown) = Chi : total:m2407_2, partial:m2407_3 +# 2408| r2408_1(glval) = VariableAddress[#return] : +# 2408| r2408_2(int) = Constant[0] : +# 2408| m2408_3(int) = Store[#return] : &:r2408_1, r2408_2 +# 2407| r2407_5(glval) = VariableAddress[#return] : +# 2407| v2407_6(void) = ReturnValue : &:r2407_5, m2408_3 +# 2407| v2407_7(void) = AliasedUse : m2407_3 +# 2407| v2407_8(void) = ExitFunction : -# 2410| void initialization_with_temp_destructor() -# 2410| Block 0 -# 2410| v2410_1(void) = EnterFunction : -# 2410| m2410_2(unknown) = AliasedDefinition : -# 2410| m2410_3(unknown) = InitializeNonLocal : -# 2410| m2410_4(unknown) = Chi : total:m2410_2, partial:m2410_3 -# 2411| r2411_1(glval) = VariableAddress[x] : -# 2411| r2411_2(glval) = VariableAddress[#temp2411:18] : -# 2411| m2411_3(ClassWithDestructor) = Uninitialized[#temp2411:18] : &:r2411_2 -# 2411| r2411_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2411| v2411_5(void) = Call[ClassWithDestructor] : func:r2411_4, this:r2411_2 -# 2411| m2411_6(unknown) = ^CallSideEffect : ~m2410_4 -# 2411| m2411_7(unknown) = Chi : total:m2410_4, partial:m2411_6 -# 2411| m2411_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2411_2 -# 2411| m2411_9(ClassWithDestructor) = Chi : total:m2411_3, partial:m2411_8 -# 2411| r2411_10(glval) = FunctionAddress[get_x] : -# 2411| r2411_11(char) = Call[get_x] : func:r2411_10, this:r2411_2 -# 2411| m2411_12(unknown) = ^CallSideEffect : ~m2411_7 -# 2411| m2411_13(unknown) = Chi : total:m2411_7, partial:m2411_12 -# 2411| v2411_14(void) = ^IndirectReadSideEffect[-1] : &:r2411_2, m2411_9 -# 2411| m2411_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2411_2 -# 2411| m2411_16(ClassWithDestructor) = Chi : total:m2411_9, partial:m2411_15 -# 2411| r2411_17(glval) = CopyValue : r2411_2 -# 2411| r2411_18(glval) = FunctionAddress[~ClassWithDestructor] : -# 2411| v2411_19(void) = Call[~ClassWithDestructor] : func:r2411_18, this:r2411_17 -# 2411| m2411_20(unknown) = ^CallSideEffect : ~m2411_13 -# 2411| m2411_21(unknown) = Chi : total:m2411_13, partial:m2411_20 -# 2411| v2411_22(void) = ^IndirectReadSideEffect[-1] : &:r2411_17, m2411_16 -# 2411| m2411_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2411_17 -# 2411| m2411_24(ClassWithDestructor) = Chi : total:m2411_16, partial:m2411_23 -# 2411| m2411_25(char) = Store[x] : &:r2411_1, r2411_11 -# 2411| r2411_26(glval) = VariableAddress[x] : -# 2411| r2411_27(char) = Load[x] : &:r2411_26, m2411_25 -# 2411| r2411_28(char) = Constant[0] : -# 2411| r2411_29(bool) = CompareNE : r2411_27, r2411_28 -# 2411| r2411_30(bool) = CopyValue : r2411_29 -# 2411| v2411_31(void) = ConditionalBranch : r2411_30 +# 2411| void initialization_with_temp_destructor() +# 2411| Block 0 +# 2411| v2411_1(void) = EnterFunction : +# 2411| m2411_2(unknown) = AliasedDefinition : +# 2411| m2411_3(unknown) = InitializeNonLocal : +# 2411| m2411_4(unknown) = Chi : total:m2411_2, partial:m2411_3 +# 2412| r2412_1(glval) = VariableAddress[x] : +# 2412| r2412_2(glval) = VariableAddress[#temp2412:18] : +# 2412| m2412_3(ClassWithDestructor) = Uninitialized[#temp2412:18] : &:r2412_2 +# 2412| r2412_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2412| v2412_5(void) = Call[ClassWithDestructor] : func:r2412_4, this:r2412_2 +# 2412| m2412_6(unknown) = ^CallSideEffect : ~m2411_4 +# 2412| m2412_7(unknown) = Chi : total:m2411_4, partial:m2412_6 +# 2412| m2412_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2412_2 +# 2412| m2412_9(ClassWithDestructor) = Chi : total:m2412_3, partial:m2412_8 +# 2412| r2412_10(glval) = FunctionAddress[get_x] : +# 2412| r2412_11(char) = Call[get_x] : func:r2412_10, this:r2412_2 +# 2412| m2412_12(unknown) = ^CallSideEffect : ~m2412_7 +# 2412| m2412_13(unknown) = Chi : total:m2412_7, partial:m2412_12 +# 2412| v2412_14(void) = ^IndirectReadSideEffect[-1] : &:r2412_2, m2412_9 +# 2412| m2412_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2412_2 +# 2412| m2412_16(ClassWithDestructor) = Chi : total:m2412_9, partial:m2412_15 +# 2412| r2412_17(glval) = CopyValue : r2412_2 +# 2412| r2412_18(glval) = FunctionAddress[~ClassWithDestructor] : +# 2412| v2412_19(void) = Call[~ClassWithDestructor] : func:r2412_18, this:r2412_17 +# 2412| m2412_20(unknown) = ^CallSideEffect : ~m2412_13 +# 2412| m2412_21(unknown) = Chi : total:m2412_13, partial:m2412_20 +# 2412| v2412_22(void) = ^IndirectReadSideEffect[-1] : &:r2412_17, m2412_16 +# 2412| m2412_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2412_17 +# 2412| m2412_24(ClassWithDestructor) = Chi : total:m2412_16, partial:m2412_23 +# 2412| m2412_25(char) = Store[x] : &:r2412_1, r2412_11 +# 2412| r2412_26(glval) = VariableAddress[x] : +# 2412| r2412_27(char) = Load[x] : &:r2412_26, m2412_25 +# 2412| r2412_28(char) = Constant[0] : +# 2412| r2412_29(bool) = CompareNE : r2412_27, r2412_28 +# 2412| r2412_30(bool) = CopyValue : r2412_29 +# 2412| v2412_31(void) = ConditionalBranch : r2412_30 #-----| False -> Block 2 #-----| True -> Block 1 -# 2412| Block 1 -# 2412| r2412_1(glval) = VariableAddress[x] : -# 2412| r2412_2(char) = Load[x] : &:r2412_1, m2411_25 -# 2412| r2412_3(char) = Constant[1] : -# 2412| r2412_4(char) = Add : r2412_2, r2412_3 -# 2412| m2412_5(char) = Store[x] : &:r2412_1, r2412_4 +# 2413| Block 1 +# 2413| r2413_1(glval) = VariableAddress[x] : +# 2413| r2413_2(char) = Load[x] : &:r2413_1, m2412_25 +# 2413| r2413_3(char) = Constant[1] : +# 2413| r2413_4(char) = Add : r2413_2, r2413_3 +# 2413| m2413_5(char) = Store[x] : &:r2413_1, r2413_4 #-----| Goto -> Block 2 -# 2414| Block 2 -# 2414| r2414_1(glval) = VariableAddress[x] : -# 2414| r2414_2(glval) = VariableAddress[#temp2414:18] : -# 2414| m2414_3(ClassWithDestructor) = Uninitialized[#temp2414:18] : &:r2414_2 -# 2414| r2414_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2414| v2414_5(void) = Call[ClassWithDestructor] : func:r2414_4, this:r2414_2 -# 2414| m2414_6(unknown) = ^CallSideEffect : ~m2411_21 -# 2414| m2414_7(unknown) = Chi : total:m2411_21, partial:m2414_6 -# 2414| m2414_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2414_2 -# 2414| m2414_9(ClassWithDestructor) = Chi : total:m2414_3, partial:m2414_8 -# 2414| r2414_10(glval) = FunctionAddress[get_x] : -# 2414| r2414_11(char) = Call[get_x] : func:r2414_10, this:r2414_2 -# 2414| m2414_12(unknown) = ^CallSideEffect : ~m2414_7 -# 2414| m2414_13(unknown) = Chi : total:m2414_7, partial:m2414_12 -# 2414| v2414_14(void) = ^IndirectReadSideEffect[-1] : &:r2414_2, m2414_9 -# 2414| m2414_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2414_2 -# 2414| m2414_16(ClassWithDestructor) = Chi : total:m2414_9, partial:m2414_15 -# 2414| r2414_17(glval) = CopyValue : r2414_2 -# 2414| r2414_18(glval) = FunctionAddress[~ClassWithDestructor] : -# 2414| v2414_19(void) = Call[~ClassWithDestructor] : func:r2414_18, this:r2414_17 -# 2414| m2414_20(unknown) = ^CallSideEffect : ~m2414_13 -# 2414| m2414_21(unknown) = Chi : total:m2414_13, partial:m2414_20 -# 2414| v2414_22(void) = ^IndirectReadSideEffect[-1] : &:r2414_17, m2414_16 -# 2414| m2414_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2414_17 -# 2414| m2414_24(ClassWithDestructor) = Chi : total:m2414_16, partial:m2414_23 -# 2414| m2414_25(char) = Store[x] : &:r2414_1, r2414_11 -# 2414| r2414_26(glval) = VariableAddress[x] : -# 2414| r2414_27(char) = Load[x] : &:r2414_26, m2414_25 -# 2414| r2414_28(char) = Constant[0] : -# 2414| r2414_29(bool) = CompareNE : r2414_27, r2414_28 -# 2414| v2414_30(void) = ConditionalBranch : r2414_29 +# 2415| Block 2 +# 2415| r2415_1(glval) = VariableAddress[x] : +# 2415| r2415_2(glval) = VariableAddress[#temp2415:18] : +# 2415| m2415_3(ClassWithDestructor) = Uninitialized[#temp2415:18] : &:r2415_2 +# 2415| r2415_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2415| v2415_5(void) = Call[ClassWithDestructor] : func:r2415_4, this:r2415_2 +# 2415| m2415_6(unknown) = ^CallSideEffect : ~m2412_21 +# 2415| m2415_7(unknown) = Chi : total:m2412_21, partial:m2415_6 +# 2415| m2415_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2415_2 +# 2415| m2415_9(ClassWithDestructor) = Chi : total:m2415_3, partial:m2415_8 +# 2415| r2415_10(glval) = FunctionAddress[get_x] : +# 2415| r2415_11(char) = Call[get_x] : func:r2415_10, this:r2415_2 +# 2415| m2415_12(unknown) = ^CallSideEffect : ~m2415_7 +# 2415| m2415_13(unknown) = Chi : total:m2415_7, partial:m2415_12 +# 2415| v2415_14(void) = ^IndirectReadSideEffect[-1] : &:r2415_2, m2415_9 +# 2415| m2415_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2415_2 +# 2415| m2415_16(ClassWithDestructor) = Chi : total:m2415_9, partial:m2415_15 +# 2415| r2415_17(glval) = CopyValue : r2415_2 +# 2415| r2415_18(glval) = FunctionAddress[~ClassWithDestructor] : +# 2415| v2415_19(void) = Call[~ClassWithDestructor] : func:r2415_18, this:r2415_17 +# 2415| m2415_20(unknown) = ^CallSideEffect : ~m2415_13 +# 2415| m2415_21(unknown) = Chi : total:m2415_13, partial:m2415_20 +# 2415| v2415_22(void) = ^IndirectReadSideEffect[-1] : &:r2415_17, m2415_16 +# 2415| m2415_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2415_17 +# 2415| m2415_24(ClassWithDestructor) = Chi : total:m2415_16, partial:m2415_23 +# 2415| m2415_25(char) = Store[x] : &:r2415_1, r2415_11 +# 2415| r2415_26(glval) = VariableAddress[x] : +# 2415| r2415_27(char) = Load[x] : &:r2415_26, m2415_25 +# 2415| r2415_28(char) = Constant[0] : +# 2415| r2415_29(bool) = CompareNE : r2415_27, r2415_28 +# 2415| v2415_30(void) = ConditionalBranch : r2415_29 #-----| False -> Block 4 #-----| True -> Block 3 -# 2415| Block 3 -# 2415| r2415_1(glval) = VariableAddress[x] : -# 2415| r2415_2(char) = Load[x] : &:r2415_1, m2414_25 -# 2415| r2415_3(char) = Constant[1] : -# 2415| r2415_4(char) = Add : r2415_2, r2415_3 -# 2415| m2415_5(char) = Store[x] : &:r2415_1, r2415_4 +# 2416| Block 3 +# 2416| r2416_1(glval) = VariableAddress[x] : +# 2416| r2416_2(char) = Load[x] : &:r2416_1, m2415_25 +# 2416| r2416_3(char) = Constant[1] : +# 2416| r2416_4(char) = Add : r2416_2, r2416_3 +# 2416| m2416_5(char) = Store[x] : &:r2416_1, r2416_4 #-----| Goto -> Block 4 -# 2417| Block 4 -# 2417| r2417_1(glval) = VariableAddress[x] : -# 2417| r2417_2(glval) = VariableAddress[#temp2417:28] : -# 2417| m2417_3(ClassWithDestructor) = Uninitialized[#temp2417:28] : &:r2417_2 -# 2417| r2417_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2417| v2417_5(void) = Call[ClassWithDestructor] : func:r2417_4, this:r2417_2 -# 2417| m2417_6(unknown) = ^CallSideEffect : ~m2414_21 -# 2417| m2417_7(unknown) = Chi : total:m2414_21, partial:m2417_6 -# 2417| m2417_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2417_2 -# 2417| m2417_9(ClassWithDestructor) = Chi : total:m2417_3, partial:m2417_8 -# 2417| r2417_10(glval) = FunctionAddress[get_x] : -# 2417| r2417_11(char) = Call[get_x] : func:r2417_10, this:r2417_2 -# 2417| m2417_12(unknown) = ^CallSideEffect : ~m2417_7 -# 2417| m2417_13(unknown) = Chi : total:m2417_7, partial:m2417_12 -# 2417| v2417_14(void) = ^IndirectReadSideEffect[-1] : &:r2417_2, m2417_9 -# 2417| m2417_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2417_2 -# 2417| m2417_16(ClassWithDestructor) = Chi : total:m2417_9, partial:m2417_15 -# 2417| r2417_17(glval) = CopyValue : r2417_2 -# 2417| r2417_18(glval) = FunctionAddress[~ClassWithDestructor] : -# 2417| v2417_19(void) = Call[~ClassWithDestructor] : func:r2417_18, this:r2417_17 -# 2417| m2417_20(unknown) = ^CallSideEffect : ~m2417_13 -# 2417| m2417_21(unknown) = Chi : total:m2417_13, partial:m2417_20 -# 2417| v2417_22(void) = ^IndirectReadSideEffect[-1] : &:r2417_17, m2417_16 -# 2417| m2417_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2417_17 -# 2417| m2417_24(ClassWithDestructor) = Chi : total:m2417_16, partial:m2417_23 -# 2417| m2417_25(char) = Store[x] : &:r2417_1, r2417_11 -# 2417| r2417_26(bool) = Constant[1] : -# 2417| v2417_27(void) = ConditionalBranch : r2417_26 +# 2418| Block 4 +# 2418| r2418_1(glval) = VariableAddress[x] : +# 2418| r2418_2(glval) = VariableAddress[#temp2418:28] : +# 2418| m2418_3(ClassWithDestructor) = Uninitialized[#temp2418:28] : &:r2418_2 +# 2418| r2418_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2418| v2418_5(void) = Call[ClassWithDestructor] : func:r2418_4, this:r2418_2 +# 2418| m2418_6(unknown) = ^CallSideEffect : ~m2415_21 +# 2418| m2418_7(unknown) = Chi : total:m2415_21, partial:m2418_6 +# 2418| m2418_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2418_2 +# 2418| m2418_9(ClassWithDestructor) = Chi : total:m2418_3, partial:m2418_8 +# 2418| r2418_10(glval) = FunctionAddress[get_x] : +# 2418| r2418_11(char) = Call[get_x] : func:r2418_10, this:r2418_2 +# 2418| m2418_12(unknown) = ^CallSideEffect : ~m2418_7 +# 2418| m2418_13(unknown) = Chi : total:m2418_7, partial:m2418_12 +# 2418| v2418_14(void) = ^IndirectReadSideEffect[-1] : &:r2418_2, m2418_9 +# 2418| m2418_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2418_2 +# 2418| m2418_16(ClassWithDestructor) = Chi : total:m2418_9, partial:m2418_15 +# 2418| r2418_17(glval) = CopyValue : r2418_2 +# 2418| r2418_18(glval) = FunctionAddress[~ClassWithDestructor] : +# 2418| v2418_19(void) = Call[~ClassWithDestructor] : func:r2418_18, this:r2418_17 +# 2418| m2418_20(unknown) = ^CallSideEffect : ~m2418_13 +# 2418| m2418_21(unknown) = Chi : total:m2418_13, partial:m2418_20 +# 2418| v2418_22(void) = ^IndirectReadSideEffect[-1] : &:r2418_17, m2418_16 +# 2418| m2418_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2418_17 +# 2418| m2418_24(ClassWithDestructor) = Chi : total:m2418_16, partial:m2418_23 +# 2418| m2418_25(char) = Store[x] : &:r2418_1, r2418_11 +# 2418| r2418_26(bool) = Constant[1] : +# 2418| v2418_27(void) = ConditionalBranch : r2418_26 #-----| False -> Block 13 #-----| True -> Block 5 -# 2418| Block 5 -# 2418| r2418_1(glval) = VariableAddress[x] : -# 2418| r2418_2(char) = Load[x] : &:r2418_1, m2417_25 -# 2418| r2418_3(char) = Constant[1] : -# 2418| r2418_4(char) = Add : r2418_2, r2418_3 -# 2418| m2418_5(char) = Store[x] : &:r2418_1, r2418_4 -# 2420| r2420_1(glval) = VariableAddress[x] : -# 2420| r2420_2(glval) = VariableAddress[#temp2420:21] : -# 2420| m2420_3(ClassWithDestructor) = Uninitialized[#temp2420:21] : &:r2420_2 -# 2420| r2420_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2420| v2420_5(void) = Call[ClassWithDestructor] : func:r2420_4, this:r2420_2 -# 2420| m2420_6(unknown) = ^CallSideEffect : ~m2417_21 -# 2420| m2420_7(unknown) = Chi : total:m2417_21, partial:m2420_6 -# 2420| m2420_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2420_2 -# 2420| m2420_9(ClassWithDestructor) = Chi : total:m2420_3, partial:m2420_8 -# 2420| r2420_10(glval) = FunctionAddress[get_x] : -# 2420| r2420_11(char) = Call[get_x] : func:r2420_10, this:r2420_2 -# 2420| m2420_12(unknown) = ^CallSideEffect : ~m2420_7 -# 2420| m2420_13(unknown) = Chi : total:m2420_7, partial:m2420_12 -# 2420| v2420_14(void) = ^IndirectReadSideEffect[-1] : &:r2420_2, m2420_9 -# 2420| m2420_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2420_2 -# 2420| m2420_16(ClassWithDestructor) = Chi : total:m2420_9, partial:m2420_15 -# 2420| r2420_17(glval) = CopyValue : r2420_2 -# 2420| r2420_18(glval) = FunctionAddress[~ClassWithDestructor] : -# 2420| v2420_19(void) = Call[~ClassWithDestructor] : func:r2420_18, this:r2420_17 -# 2420| m2420_20(unknown) = ^CallSideEffect : ~m2420_13 -# 2420| m2420_21(unknown) = Chi : total:m2420_13, partial:m2420_20 -# 2420| v2420_22(void) = ^IndirectReadSideEffect[-1] : &:r2420_17, m2420_16 -# 2420| m2420_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2420_17 -# 2420| m2420_24(ClassWithDestructor) = Chi : total:m2420_16, partial:m2420_23 -# 2420| m2420_25(char) = Store[x] : &:r2420_1, r2420_11 -# 2420| r2420_26(glval) = VariableAddress[x] : -# 2420| r2420_27(char) = Load[x] : &:r2420_26, m2420_25 -# 2420| r2420_28(int) = Convert : r2420_27 -# 2420| r2420_29(int) = CopyValue : r2420_28 -# 2420| v2420_30(void) = Switch : r2420_29 +# 2419| Block 5 +# 2419| r2419_1(glval) = VariableAddress[x] : +# 2419| r2419_2(char) = Load[x] : &:r2419_1, m2418_25 +# 2419| r2419_3(char) = Constant[1] : +# 2419| r2419_4(char) = Add : r2419_2, r2419_3 +# 2419| m2419_5(char) = Store[x] : &:r2419_1, r2419_4 +# 2421| r2421_1(glval) = VariableAddress[x] : +# 2421| r2421_2(glval) = VariableAddress[#temp2421:21] : +# 2421| m2421_3(ClassWithDestructor) = Uninitialized[#temp2421:21] : &:r2421_2 +# 2421| r2421_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2421| v2421_5(void) = Call[ClassWithDestructor] : func:r2421_4, this:r2421_2 +# 2421| m2421_6(unknown) = ^CallSideEffect : ~m2418_21 +# 2421| m2421_7(unknown) = Chi : total:m2418_21, partial:m2421_6 +# 2421| m2421_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2421_2 +# 2421| m2421_9(ClassWithDestructor) = Chi : total:m2421_3, partial:m2421_8 +# 2421| r2421_10(glval) = FunctionAddress[get_x] : +# 2421| r2421_11(char) = Call[get_x] : func:r2421_10, this:r2421_2 +# 2421| m2421_12(unknown) = ^CallSideEffect : ~m2421_7 +# 2421| m2421_13(unknown) = Chi : total:m2421_7, partial:m2421_12 +# 2421| v2421_14(void) = ^IndirectReadSideEffect[-1] : &:r2421_2, m2421_9 +# 2421| m2421_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2421_2 +# 2421| m2421_16(ClassWithDestructor) = Chi : total:m2421_9, partial:m2421_15 +# 2421| r2421_17(glval) = CopyValue : r2421_2 +# 2421| r2421_18(glval) = FunctionAddress[~ClassWithDestructor] : +# 2421| v2421_19(void) = Call[~ClassWithDestructor] : func:r2421_18, this:r2421_17 +# 2421| m2421_20(unknown) = ^CallSideEffect : ~m2421_13 +# 2421| m2421_21(unknown) = Chi : total:m2421_13, partial:m2421_20 +# 2421| v2421_22(void) = ^IndirectReadSideEffect[-1] : &:r2421_17, m2421_16 +# 2421| m2421_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2421_17 +# 2421| m2421_24(ClassWithDestructor) = Chi : total:m2421_16, partial:m2421_23 +# 2421| m2421_25(char) = Store[x] : &:r2421_1, r2421_11 +# 2421| r2421_26(glval) = VariableAddress[x] : +# 2421| r2421_27(char) = Load[x] : &:r2421_26, m2421_25 +# 2421| r2421_28(int) = Convert : r2421_27 +# 2421| r2421_29(int) = CopyValue : r2421_28 +# 2421| v2421_30(void) = Switch : r2421_29 #-----| Case[97] -> Block 6 #-----| Default -> Block 7 -# 2421| Block 6 -# 2421| v2421_1(void) = NoOp : -# 2422| r2422_1(glval) = VariableAddress[x] : -# 2422| r2422_2(char) = Load[x] : &:r2422_1, m2420_25 -# 2422| r2422_3(char) = Constant[1] : -# 2422| r2422_4(char) = Add : r2422_2, r2422_3 -# 2422| m2422_5(char) = Store[x] : &:r2422_1, r2422_4 +# 2422| Block 6 +# 2422| v2422_1(void) = NoOp : +# 2423| r2423_1(glval) = VariableAddress[x] : +# 2423| r2423_2(char) = Load[x] : &:r2423_1, m2421_25 +# 2423| r2423_3(char) = Constant[1] : +# 2423| r2423_4(char) = Add : r2423_2, r2423_3 +# 2423| m2423_5(char) = Store[x] : &:r2423_1, r2423_4 #-----| Goto -> Block 7 -# 2425| Block 7 -# 2425| r2425_1(glval) = VariableAddress[x] : -# 2425| r2425_2(glval) = VariableAddress[#temp2425:21] : -# 2425| m2425_3(ClassWithDestructor) = Uninitialized[#temp2425:21] : &:r2425_2 -# 2425| r2425_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2425| v2425_5(void) = Call[ClassWithDestructor] : func:r2425_4, this:r2425_2 -# 2425| m2425_6(unknown) = ^CallSideEffect : ~m2420_21 -# 2425| m2425_7(unknown) = Chi : total:m2420_21, partial:m2425_6 -# 2425| m2425_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2425_2 -# 2425| m2425_9(ClassWithDestructor) = Chi : total:m2425_3, partial:m2425_8 -# 2425| r2425_10(glval) = FunctionAddress[get_x] : -# 2425| r2425_11(char) = Call[get_x] : func:r2425_10, this:r2425_2 -# 2425| m2425_12(unknown) = ^CallSideEffect : ~m2425_7 -# 2425| m2425_13(unknown) = Chi : total:m2425_7, partial:m2425_12 -# 2425| v2425_14(void) = ^IndirectReadSideEffect[-1] : &:r2425_2, m2425_9 -# 2425| m2425_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2425_2 -# 2425| m2425_16(ClassWithDestructor) = Chi : total:m2425_9, partial:m2425_15 -# 2425| r2425_17(glval) = CopyValue : r2425_2 -# 2425| r2425_18(glval) = FunctionAddress[~ClassWithDestructor] : -# 2425| v2425_19(void) = Call[~ClassWithDestructor] : func:r2425_18, this:r2425_17 -# 2425| m2425_20(unknown) = ^CallSideEffect : ~m2425_13 -# 2425| m2425_21(unknown) = Chi : total:m2425_13, partial:m2425_20 -# 2425| v2425_22(void) = ^IndirectReadSideEffect[-1] : &:r2425_17, m2425_16 -# 2425| m2425_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2425_17 -# 2425| m2425_24(ClassWithDestructor) = Chi : total:m2425_16, partial:m2425_23 -# 2425| m2425_25(char) = Store[x] : &:r2425_1, r2425_11 -# 2425| r2425_26(glval) = VariableAddress[x] : -# 2425| r2425_27(char) = Load[x] : &:r2425_26, m2425_25 -# 2425| r2425_28(int) = Convert : r2425_27 -# 2425| v2425_29(void) = Switch : r2425_28 +# 2426| Block 7 +# 2426| r2426_1(glval) = VariableAddress[x] : +# 2426| r2426_2(glval) = VariableAddress[#temp2426:21] : +# 2426| m2426_3(ClassWithDestructor) = Uninitialized[#temp2426:21] : &:r2426_2 +# 2426| r2426_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2426| v2426_5(void) = Call[ClassWithDestructor] : func:r2426_4, this:r2426_2 +# 2426| m2426_6(unknown) = ^CallSideEffect : ~m2421_21 +# 2426| m2426_7(unknown) = Chi : total:m2421_21, partial:m2426_6 +# 2426| m2426_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2426_2 +# 2426| m2426_9(ClassWithDestructor) = Chi : total:m2426_3, partial:m2426_8 +# 2426| r2426_10(glval) = FunctionAddress[get_x] : +# 2426| r2426_11(char) = Call[get_x] : func:r2426_10, this:r2426_2 +# 2426| m2426_12(unknown) = ^CallSideEffect : ~m2426_7 +# 2426| m2426_13(unknown) = Chi : total:m2426_7, partial:m2426_12 +# 2426| v2426_14(void) = ^IndirectReadSideEffect[-1] : &:r2426_2, m2426_9 +# 2426| m2426_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2426_2 +# 2426| m2426_16(ClassWithDestructor) = Chi : total:m2426_9, partial:m2426_15 +# 2426| r2426_17(glval) = CopyValue : r2426_2 +# 2426| r2426_18(glval) = FunctionAddress[~ClassWithDestructor] : +# 2426| v2426_19(void) = Call[~ClassWithDestructor] : func:r2426_18, this:r2426_17 +# 2426| m2426_20(unknown) = ^CallSideEffect : ~m2426_13 +# 2426| m2426_21(unknown) = Chi : total:m2426_13, partial:m2426_20 +# 2426| v2426_22(void) = ^IndirectReadSideEffect[-1] : &:r2426_17, m2426_16 +# 2426| m2426_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2426_17 +# 2426| m2426_24(ClassWithDestructor) = Chi : total:m2426_16, partial:m2426_23 +# 2426| m2426_25(char) = Store[x] : &:r2426_1, r2426_11 +# 2426| r2426_26(glval) = VariableAddress[x] : +# 2426| r2426_27(char) = Load[x] : &:r2426_26, m2426_25 +# 2426| r2426_28(int) = Convert : r2426_27 +# 2426| v2426_29(void) = Switch : r2426_28 #-----| Case[97] -> Block 8 #-----| Default -> Block 9 -# 2426| Block 8 -# 2426| v2426_1(void) = NoOp : -# 2427| r2427_1(glval) = VariableAddress[x] : -# 2427| r2427_2(char) = Load[x] : &:r2427_1, m2425_25 -# 2427| r2427_3(char) = Constant[1] : -# 2427| r2427_4(char) = Add : r2427_2, r2427_3 -# 2427| m2427_5(char) = Store[x] : &:r2427_1, r2427_4 +# 2427| Block 8 +# 2427| v2427_1(void) = NoOp : +# 2428| r2428_1(glval) = VariableAddress[x] : +# 2428| r2428_2(char) = Load[x] : &:r2428_1, m2426_25 +# 2428| r2428_3(char) = Constant[1] : +# 2428| r2428_4(char) = Add : r2428_2, r2428_3 +# 2428| m2428_5(char) = Store[x] : &:r2428_1, r2428_4 #-----| Goto -> Block 9 -# 2430| Block 9 -# 2430| r2430_1(glval) = VariableAddress[x] : -# 2430| r2430_2(glval) = VariableAddress[#temp2430:18] : -# 2430| m2430_3(ClassWithDestructor) = Uninitialized[#temp2430:18] : &:r2430_2 -# 2430| r2430_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2430| v2430_5(void) = Call[ClassWithDestructor] : func:r2430_4, this:r2430_2 -# 2430| m2430_6(unknown) = ^CallSideEffect : ~m2425_21 -# 2430| m2430_7(unknown) = Chi : total:m2425_21, partial:m2430_6 -# 2430| m2430_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2430_2 -# 2430| m2430_9(ClassWithDestructor) = Chi : total:m2430_3, partial:m2430_8 -# 2430| r2430_10(glval) = FunctionAddress[get_x] : -# 2430| r2430_11(char) = Call[get_x] : func:r2430_10, this:r2430_2 -# 2430| m2430_12(unknown) = ^CallSideEffect : ~m2430_7 -# 2430| m2430_13(unknown) = Chi : total:m2430_7, partial:m2430_12 -# 2430| v2430_14(void) = ^IndirectReadSideEffect[-1] : &:r2430_2, m2430_9 -# 2430| m2430_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2430_2 -# 2430| m2430_16(ClassWithDestructor) = Chi : total:m2430_9, partial:m2430_15 -# 2430| r2430_17(glval) = CopyValue : r2430_2 -# 2430| r2430_18(glval) = FunctionAddress[~ClassWithDestructor] : -# 2430| v2430_19(void) = Call[~ClassWithDestructor] : func:r2430_18, this:r2430_17 -# 2430| m2430_20(unknown) = ^CallSideEffect : ~m2430_13 -# 2430| m2430_21(unknown) = Chi : total:m2430_13, partial:m2430_20 -# 2430| v2430_22(void) = ^IndirectReadSideEffect[-1] : &:r2430_17, m2430_16 -# 2430| m2430_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2430_17 -# 2430| m2430_24(ClassWithDestructor) = Chi : total:m2430_16, partial:m2430_23 -# 2430| m2430_25(char) = Store[x] : &:r2430_1, r2430_11 -# 2430| r2430_26(glval &&>) = VariableAddress[(__range)] : -# 2430| r2430_27(glval>) = VariableAddress[#temp2430:58] : -# 2430| m2430_28(vector) = Uninitialized[#temp2430:58] : &:r2430_27 -# 2430| m2430_29(unknown) = Chi : total:m2430_21, partial:m2430_28 -# 2430| r2430_30(glval) = FunctionAddress[vector] : -# 2430| r2430_31(glval) = VariableAddress[x] : -# 2430| r2430_32(char) = Load[x] : &:r2430_31, m2430_25 -# 2430| v2430_33(void) = Call[vector] : func:r2430_30, this:r2430_27, 0:r2430_32 -# 2430| m2430_34(unknown) = ^CallSideEffect : ~m2430_29 -# 2430| m2430_35(unknown) = Chi : total:m2430_29, partial:m2430_34 -# 2430| m2430_36(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2430_27 -# 2430| m2430_37(unknown) = Chi : total:m2430_35, partial:m2430_36 -# 2430| r2430_38(vector &) = CopyValue : r2430_27 -# 2430| m2430_39(vector &&) = Store[(__range)] : &:r2430_26, r2430_38 -# 2430| r2430_40(glval>) = VariableAddress[(__begin)] : -# 2430| r2430_41(glval &&>) = VariableAddress[(__range)] : -# 2430| r2430_42(vector &&) = Load[(__range)] : &:r2430_41, m2430_39 -#-----| r0_1(glval>) = CopyValue : r2430_42 +# 2431| Block 9 +# 2431| r2431_1(glval) = VariableAddress[x] : +# 2431| r2431_2(glval) = VariableAddress[#temp2431:18] : +# 2431| m2431_3(ClassWithDestructor) = Uninitialized[#temp2431:18] : &:r2431_2 +# 2431| r2431_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2431| v2431_5(void) = Call[ClassWithDestructor] : func:r2431_4, this:r2431_2 +# 2431| m2431_6(unknown) = ^CallSideEffect : ~m2426_21 +# 2431| m2431_7(unknown) = Chi : total:m2426_21, partial:m2431_6 +# 2431| m2431_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2431_2 +# 2431| m2431_9(ClassWithDestructor) = Chi : total:m2431_3, partial:m2431_8 +# 2431| r2431_10(glval) = FunctionAddress[get_x] : +# 2431| r2431_11(char) = Call[get_x] : func:r2431_10, this:r2431_2 +# 2431| m2431_12(unknown) = ^CallSideEffect : ~m2431_7 +# 2431| m2431_13(unknown) = Chi : total:m2431_7, partial:m2431_12 +# 2431| v2431_14(void) = ^IndirectReadSideEffect[-1] : &:r2431_2, m2431_9 +# 2431| m2431_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2431_2 +# 2431| m2431_16(ClassWithDestructor) = Chi : total:m2431_9, partial:m2431_15 +# 2431| r2431_17(glval) = CopyValue : r2431_2 +# 2431| r2431_18(glval) = FunctionAddress[~ClassWithDestructor] : +# 2431| v2431_19(void) = Call[~ClassWithDestructor] : func:r2431_18, this:r2431_17 +# 2431| m2431_20(unknown) = ^CallSideEffect : ~m2431_13 +# 2431| m2431_21(unknown) = Chi : total:m2431_13, partial:m2431_20 +# 2431| v2431_22(void) = ^IndirectReadSideEffect[-1] : &:r2431_17, m2431_16 +# 2431| m2431_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2431_17 +# 2431| m2431_24(ClassWithDestructor) = Chi : total:m2431_16, partial:m2431_23 +# 2431| m2431_25(char) = Store[x] : &:r2431_1, r2431_11 +# 2431| r2431_26(glval &&>) = VariableAddress[(__range)] : +# 2431| r2431_27(glval>) = VariableAddress[#temp2431:58] : +# 2431| m2431_28(vector) = Uninitialized[#temp2431:58] : &:r2431_27 +# 2431| m2431_29(unknown) = Chi : total:m2431_21, partial:m2431_28 +# 2431| r2431_30(glval) = FunctionAddress[vector] : +# 2431| r2431_31(glval) = VariableAddress[x] : +# 2431| r2431_32(char) = Load[x] : &:r2431_31, m2431_25 +# 2431| v2431_33(void) = Call[vector] : func:r2431_30, this:r2431_27, 0:r2431_32 +# 2431| m2431_34(unknown) = ^CallSideEffect : ~m2431_29 +# 2431| m2431_35(unknown) = Chi : total:m2431_29, partial:m2431_34 +# 2431| m2431_36(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2431_27 +# 2431| m2431_37(unknown) = Chi : total:m2431_35, partial:m2431_36 +# 2431| r2431_38(vector &) = CopyValue : r2431_27 +# 2431| m2431_39(vector &&) = Store[(__range)] : &:r2431_26, r2431_38 +# 2431| r2431_40(glval>) = VariableAddress[(__begin)] : +# 2431| r2431_41(glval &&>) = VariableAddress[(__range)] : +# 2431| r2431_42(vector &&) = Load[(__range)] : &:r2431_41, m2431_39 +#-----| r0_1(glval>) = CopyValue : r2431_42 #-----| r0_2(glval>) = Convert : r0_1 -# 2430| r2430_43(glval) = FunctionAddress[begin] : -# 2430| r2430_44(iterator) = Call[begin] : func:r2430_43, this:r0_2 -#-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m2430_37 -# 2430| m2430_45(iterator) = Store[(__begin)] : &:r2430_40, r2430_44 -# 2430| r2430_46(glval>) = VariableAddress[(__end)] : -# 2430| r2430_47(glval &&>) = VariableAddress[(__range)] : -# 2430| r2430_48(vector &&) = Load[(__range)] : &:r2430_47, m2430_39 -#-----| r0_4(glval>) = CopyValue : r2430_48 +# 2431| r2431_43(glval) = FunctionAddress[begin] : +# 2431| r2431_44(iterator) = Call[begin] : func:r2431_43, this:r0_2 +#-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m2431_37 +# 2431| m2431_45(iterator) = Store[(__begin)] : &:r2431_40, r2431_44 +# 2431| r2431_46(glval>) = VariableAddress[(__end)] : +# 2431| r2431_47(glval &&>) = VariableAddress[(__range)] : +# 2431| r2431_48(vector &&) = Load[(__range)] : &:r2431_47, m2431_39 +#-----| r0_4(glval>) = CopyValue : r2431_48 #-----| r0_5(glval>) = Convert : r0_4 -# 2430| r2430_49(glval) = FunctionAddress[end] : -# 2430| r2430_50(iterator) = Call[end] : func:r2430_49, this:r0_5 -#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m2430_37 -# 2430| m2430_51(iterator) = Store[(__end)] : &:r2430_46, r2430_50 -# 2430| m2430_52(unknown) = Chi : total:m2430_37, partial:m2430_51 +# 2431| r2431_49(glval) = FunctionAddress[end] : +# 2431| r2431_50(iterator) = Call[end] : func:r2431_49, this:r0_5 +#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m2431_37 +# 2431| m2431_51(iterator) = Store[(__end)] : &:r2431_46, r2431_50 +# 2431| m2431_52(unknown) = Chi : total:m2431_37, partial:m2431_51 #-----| Goto -> Block 10 -# 2430| Block 10 -# 2430| m2430_53(iterator) = Phi : from 9:m2430_45, from 11:m2430_77 -# 2430| m2430_54(unknown) = Phi : from 9:~m2430_52, from 11:~m2430_63 -# 2430| r2430_55(glval>) = VariableAddress[(__begin)] : -#-----| r0_7(glval>) = Convert : r2430_55 -# 2430| r2430_56(glval) = FunctionAddress[operator!=] : +# 2431| Block 10 +# 2431| m2431_53(iterator) = Phi : from 9:m2431_45, from 11:m2431_77 +# 2431| m2431_54(unknown) = Phi : from 9:~m2431_52, from 11:~m2431_63 +# 2431| r2431_55(glval>) = VariableAddress[(__begin)] : +#-----| r0_7(glval>) = Convert : r2431_55 +# 2431| r2431_56(glval) = FunctionAddress[operator!=] : #-----| r0_8(glval>) = VariableAddress[#temp0:0] : #-----| m0_9(iterator) = Uninitialized[#temp0:0] : &:r0_8 -#-----| m0_10(unknown) = Chi : total:m2430_54, partial:m0_9 -# 2430| r2430_57(glval) = FunctionAddress[iterator] : -# 2430| r2430_58(glval>) = VariableAddress[(__end)] : -#-----| r0_11(glval>) = Convert : r2430_58 +#-----| m0_10(unknown) = Chi : total:m2431_54, partial:m0_9 +# 2431| r2431_57(glval) = FunctionAddress[iterator] : +# 2431| r2431_58(glval>) = VariableAddress[(__end)] : +#-----| r0_11(glval>) = Convert : r2431_58 #-----| r0_12(iterator &) = CopyValue : r0_11 -# 2430| v2430_59(void) = Call[iterator] : func:r2430_57, this:r0_8, 0:r0_12 -# 2430| m2430_60(unknown) = ^CallSideEffect : ~m0_10 -# 2430| m2430_61(unknown) = Chi : total:m0_10, partial:m2430_60 -#-----| v0_13(void) = ^BufferReadSideEffect[0] : &:r0_12, ~m2430_61 -# 2430| m2430_62(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 -# 2430| m2430_63(unknown) = Chi : total:m2430_61, partial:m2430_62 -#-----| r0_14(iterator) = Load[#temp0:0] : &:r0_8, ~m2430_63 -# 2430| r2430_64(bool) = Call[operator!=] : func:r2430_56, this:r0_7, 0:r0_14 -#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_7, m2430_53 -# 2430| v2430_65(void) = ConditionalBranch : r2430_64 +# 2431| v2431_59(void) = Call[iterator] : func:r2431_57, this:r0_8, 0:r0_12 +# 2431| m2431_60(unknown) = ^CallSideEffect : ~m0_10 +# 2431| m2431_61(unknown) = Chi : total:m0_10, partial:m2431_60 +#-----| v0_13(void) = ^BufferReadSideEffect[0] : &:r0_12, ~m2431_61 +# 2431| m2431_62(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 +# 2431| m2431_63(unknown) = Chi : total:m2431_61, partial:m2431_62 +#-----| r0_14(iterator) = Load[#temp0:0] : &:r0_8, ~m2431_63 +# 2431| r2431_64(bool) = Call[operator!=] : func:r2431_56, this:r0_7, 0:r0_14 +#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_7, m2431_53 +# 2431| v2431_65(void) = ConditionalBranch : r2431_64 #-----| False -> Block 12 #-----| True -> Block 11 -# 2430| Block 11 -# 2430| r2430_66(glval) = VariableAddress[y] : -# 2430| r2430_67(glval>) = VariableAddress[(__begin)] : -#-----| r0_16(glval>) = Convert : r2430_67 -# 2430| r2430_68(glval) = FunctionAddress[operator*] : -# 2430| r2430_69(char &) = Call[operator*] : func:r2430_68, this:r0_16 -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, m2430_53 -# 2430| r2430_70(char) = Load[?] : &:r2430_69, ~m2430_63 -# 2430| m2430_71(char) = Store[y] : &:r2430_66, r2430_70 -# 2431| r2431_1(glval) = VariableAddress[x] : -# 2431| r2431_2(char) = Load[x] : &:r2431_1, m2430_25 -# 2431| r2431_3(int) = Convert : r2431_2 -# 2431| r2431_4(glval) = VariableAddress[y] : -# 2431| r2431_5(char) = Load[y] : &:r2431_4, m2430_71 -# 2431| r2431_6(int) = Convert : r2431_5 -# 2431| r2431_7(int) = Add : r2431_6, r2431_3 -# 2431| r2431_8(char) = Convert : r2431_7 -# 2431| m2431_9(char) = Store[y] : &:r2431_4, r2431_8 -# 2430| r2430_72(glval>) = VariableAddress[(__begin)] : -# 2430| r2430_73(glval) = FunctionAddress[operator++] : -# 2430| r2430_74(iterator &) = Call[operator++] : func:r2430_73, this:r2430_72 -# 2430| v2430_75(void) = ^IndirectReadSideEffect[-1] : &:r2430_72, m2430_53 -# 2430| m2430_76(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2430_72 -# 2430| m2430_77(iterator) = Chi : total:m2430_53, partial:m2430_76 -# 2430| r2430_78(glval>) = CopyValue : r2430_74 +# 2431| Block 11 +# 2431| r2431_66(glval) = VariableAddress[y] : +# 2431| r2431_67(glval>) = VariableAddress[(__begin)] : +#-----| r0_16(glval>) = Convert : r2431_67 +# 2431| r2431_68(glval) = FunctionAddress[operator*] : +# 2431| r2431_69(char &) = Call[operator*] : func:r2431_68, this:r0_16 +#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, m2431_53 +# 2431| r2431_70(char) = Load[?] : &:r2431_69, ~m2431_63 +# 2431| m2431_71(char) = Store[y] : &:r2431_66, r2431_70 +# 2432| r2432_1(glval) = VariableAddress[x] : +# 2432| r2432_2(char) = Load[x] : &:r2432_1, m2431_25 +# 2432| r2432_3(int) = Convert : r2432_2 +# 2432| r2432_4(glval) = VariableAddress[y] : +# 2432| r2432_5(char) = Load[y] : &:r2432_4, m2431_71 +# 2432| r2432_6(int) = Convert : r2432_5 +# 2432| r2432_7(int) = Add : r2432_6, r2432_3 +# 2432| r2432_8(char) = Convert : r2432_7 +# 2432| m2432_9(char) = Store[y] : &:r2432_4, r2432_8 +# 2431| r2431_72(glval>) = VariableAddress[(__begin)] : +# 2431| r2431_73(glval) = FunctionAddress[operator++] : +# 2431| r2431_74(iterator &) = Call[operator++] : func:r2431_73, this:r2431_72 +# 2431| v2431_75(void) = ^IndirectReadSideEffect[-1] : &:r2431_72, m2431_53 +# 2431| m2431_76(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2431_72 +# 2431| m2431_77(iterator) = Chi : total:m2431_53, partial:m2431_76 +# 2431| r2431_78(glval>) = CopyValue : r2431_74 #-----| Goto (back edge) -> Block 10 -# 2432| Block 12 -# 2432| v2432_1(void) = NoOp : -# 2410| v2410_5(void) = ReturnVoid : -# 2410| v2410_6(void) = AliasedUse : ~m2430_61 -# 2410| v2410_7(void) = ExitFunction : +# 2431| Block 12 +# 2431| r2431_79(glval>) = CopyValue : r2431_27 +# 2431| r2431_80(glval) = FunctionAddress[~vector] : +# 2431| v2431_81(void) = Call[~vector] : func:r2431_80, this:r2431_79 +# 2431| m2431_82(unknown) = ^CallSideEffect : ~m2431_63 +# 2431| m2431_83(unknown) = Chi : total:m2431_63, partial:m2431_82 +# 2431| v2431_84(void) = ^IndirectReadSideEffect[-1] : &:r2431_79, ~m2431_83 +# 2431| m2431_85(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2431_79 +# 2431| m2431_86(unknown) = Chi : total:m2431_83, partial:m2431_85 +# 2433| v2433_1(void) = NoOp : +# 2411| v2411_5(void) = ReturnVoid : +# 2411| v2411_6(void) = AliasedUse : ~m2431_83 +# 2411| v2411_7(void) = ExitFunction : -# 2410| Block 13 -# 2410| v2410_8(void) = Unreached : +# 2411| Block 13 +# 2411| v2411_8(void) = Unreached : -# 2434| void param_with_destructor_by_value(ClassWithDestructor) -# 2434| Block 0 -# 2434| v2434_1(void) = EnterFunction : -# 2434| m2434_2(unknown) = AliasedDefinition : -# 2434| m2434_3(unknown) = InitializeNonLocal : -# 2434| m2434_4(unknown) = Chi : total:m2434_2, partial:m2434_3 -# 2434| r2434_5(glval) = VariableAddress[c] : -# 2434| m2434_6(ClassWithDestructor) = InitializeParameter[c] : &:r2434_5 -# 2436| v2436_1(void) = NoOp : -# 2434| v2434_7(void) = ReturnVoid : -# 2434| v2434_8(void) = AliasedUse : m2434_3 -# 2434| v2434_9(void) = ExitFunction : +# 2435| void param_with_destructor_by_value(ClassWithDestructor) +# 2435| Block 0 +# 2435| v2435_1(void) = EnterFunction : +# 2435| m2435_2(unknown) = AliasedDefinition : +# 2435| m2435_3(unknown) = InitializeNonLocal : +# 2435| m2435_4(unknown) = Chi : total:m2435_2, partial:m2435_3 +# 2435| r2435_5(glval) = VariableAddress[c] : +# 2435| m2435_6(ClassWithDestructor) = InitializeParameter[c] : &:r2435_5 +# 2437| v2437_1(void) = NoOp : +# 2435| v2435_7(void) = ReturnVoid : +# 2435| v2435_8(void) = AliasedUse : m2435_3 +# 2435| v2435_9(void) = ExitFunction : -# 2438| void param_with_destructor_by_pointer(ClassWithDestructor*) -# 2438| Block 0 -# 2438| v2438_1(void) = EnterFunction : -# 2438| m2438_2(unknown) = AliasedDefinition : -# 2438| m2438_3(unknown) = InitializeNonLocal : -# 2438| m2438_4(unknown) = Chi : total:m2438_2, partial:m2438_3 -# 2438| r2438_5(glval) = VariableAddress[c] : -# 2438| m2438_6(ClassWithDestructor *) = InitializeParameter[c] : &:r2438_5 -# 2438| r2438_7(ClassWithDestructor *) = Load[c] : &:r2438_5, m2438_6 -# 2438| m2438_8(unknown) = InitializeIndirection[c] : &:r2438_7 -# 2440| v2440_1(void) = NoOp : -# 2438| v2438_9(void) = ReturnIndirection[c] : &:r2438_7, m2438_8 -# 2438| v2438_10(void) = ReturnVoid : -# 2438| v2438_11(void) = AliasedUse : m2438_3 -# 2438| v2438_12(void) = ExitFunction : +# 2439| void param_with_destructor_by_pointer(ClassWithDestructor*) +# 2439| Block 0 +# 2439| v2439_1(void) = EnterFunction : +# 2439| m2439_2(unknown) = AliasedDefinition : +# 2439| m2439_3(unknown) = InitializeNonLocal : +# 2439| m2439_4(unknown) = Chi : total:m2439_2, partial:m2439_3 +# 2439| r2439_5(glval) = VariableAddress[c] : +# 2439| m2439_6(ClassWithDestructor *) = InitializeParameter[c] : &:r2439_5 +# 2439| r2439_7(ClassWithDestructor *) = Load[c] : &:r2439_5, m2439_6 +# 2439| m2439_8(unknown) = InitializeIndirection[c] : &:r2439_7 +# 2441| v2441_1(void) = NoOp : +# 2439| v2439_9(void) = ReturnIndirection[c] : &:r2439_7, m2439_8 +# 2439| v2439_10(void) = ReturnVoid : +# 2439| v2439_11(void) = AliasedUse : m2439_3 +# 2439| v2439_12(void) = ExitFunction : -# 2442| void param_with_destructor_by_ref(ClassWithDestructor&) -# 2442| Block 0 -# 2442| v2442_1(void) = EnterFunction : -# 2442| m2442_2(unknown) = AliasedDefinition : -# 2442| m2442_3(unknown) = InitializeNonLocal : -# 2442| m2442_4(unknown) = Chi : total:m2442_2, partial:m2442_3 -# 2442| r2442_5(glval) = VariableAddress[c] : -# 2442| m2442_6(ClassWithDestructor &) = InitializeParameter[c] : &:r2442_5 -# 2442| r2442_7(ClassWithDestructor &) = Load[c] : &:r2442_5, m2442_6 -# 2442| m2442_8(unknown) = InitializeIndirection[c] : &:r2442_7 -# 2444| v2444_1(void) = NoOp : -# 2442| v2442_9(void) = ReturnIndirection[c] : &:r2442_7, m2442_8 -# 2442| v2442_10(void) = ReturnVoid : -# 2442| v2442_11(void) = AliasedUse : m2442_3 -# 2442| v2442_12(void) = ExitFunction : +# 2443| void param_with_destructor_by_ref(ClassWithDestructor&) +# 2443| Block 0 +# 2443| v2443_1(void) = EnterFunction : +# 2443| m2443_2(unknown) = AliasedDefinition : +# 2443| m2443_3(unknown) = InitializeNonLocal : +# 2443| m2443_4(unknown) = Chi : total:m2443_2, partial:m2443_3 +# 2443| r2443_5(glval) = VariableAddress[c] : +# 2443| m2443_6(ClassWithDestructor &) = InitializeParameter[c] : &:r2443_5 +# 2443| r2443_7(ClassWithDestructor &) = Load[c] : &:r2443_5, m2443_6 +# 2443| m2443_8(unknown) = InitializeIndirection[c] : &:r2443_7 +# 2445| v2445_1(void) = NoOp : +# 2443| v2443_9(void) = ReturnIndirection[c] : &:r2443_7, m2443_8 +# 2443| v2443_10(void) = ReturnVoid : +# 2443| v2443_11(void) = AliasedUse : m2443_3 +# 2443| v2443_12(void) = ExitFunction : -# 2446| void param_with_destructor_by_rref(ClassWithDestructor&&) -# 2446| Block 0 -# 2446| v2446_1(void) = EnterFunction : -# 2446| m2446_2(unknown) = AliasedDefinition : -# 2446| m2446_3(unknown) = InitializeNonLocal : -# 2446| m2446_4(unknown) = Chi : total:m2446_2, partial:m2446_3 -# 2446| r2446_5(glval) = VariableAddress[c] : -# 2446| m2446_6(ClassWithDestructor &&) = InitializeParameter[c] : &:r2446_5 -# 2446| r2446_7(ClassWithDestructor &&) = Load[c] : &:r2446_5, m2446_6 -# 2446| m2446_8(unknown) = InitializeIndirection[c] : &:r2446_7 -# 2448| v2448_1(void) = NoOp : -# 2446| v2446_9(void) = ReturnIndirection[c] : &:r2446_7, m2446_8 -# 2446| v2446_10(void) = ReturnVoid : -# 2446| v2446_11(void) = AliasedUse : m2446_3 -# 2446| v2446_12(void) = ExitFunction : +# 2447| void param_with_destructor_by_rref(ClassWithDestructor&&) +# 2447| Block 0 +# 2447| v2447_1(void) = EnterFunction : +# 2447| m2447_2(unknown) = AliasedDefinition : +# 2447| m2447_3(unknown) = InitializeNonLocal : +# 2447| m2447_4(unknown) = Chi : total:m2447_2, partial:m2447_3 +# 2447| r2447_5(glval) = VariableAddress[c] : +# 2447| m2447_6(ClassWithDestructor &&) = InitializeParameter[c] : &:r2447_5 +# 2447| r2447_7(ClassWithDestructor &&) = Load[c] : &:r2447_5, m2447_6 +# 2447| m2447_8(unknown) = InitializeIndirection[c] : &:r2447_7 +# 2449| v2449_1(void) = NoOp : +# 2447| v2447_9(void) = ReturnIndirection[c] : &:r2447_7, m2447_8 +# 2447| v2447_10(void) = ReturnVoid : +# 2447| v2447_11(void) = AliasedUse : m2447_3 +# 2447| v2447_12(void) = ExitFunction : -# 2450| void rethrow_with_destruction(int) -# 2450| Block 0 -# 2450| v2450_1(void) = EnterFunction : -# 2450| m2450_2(unknown) = AliasedDefinition : -# 2450| m2450_3(unknown) = InitializeNonLocal : -# 2450| m2450_4(unknown) = Chi : total:m2450_2, partial:m2450_3 -# 2450| r2450_5(glval) = VariableAddress[x] : -# 2450| m2450_6(int) = InitializeParameter[x] : &:r2450_5 -# 2451| r2451_1(glval) = VariableAddress[c] : -# 2451| m2451_2(ClassWithDestructor) = Uninitialized[c] : &:r2451_1 -# 2451| r2451_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2451| v2451_4(void) = Call[ClassWithDestructor] : func:r2451_3, this:r2451_1 -# 2451| m2451_5(unknown) = ^CallSideEffect : ~m2450_4 -# 2451| m2451_6(unknown) = Chi : total:m2450_4, partial:m2451_5 -# 2451| m2451_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2451_1 -# 2451| m2451_8(ClassWithDestructor) = Chi : total:m2451_2, partial:m2451_7 -# 2452| v2452_1(void) = ReThrow : -# 2453| r2453_1(glval) = VariableAddress[c] : -# 2453| r2453_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2453| v2453_3(void) = Call[~ClassWithDestructor] : func:r2453_2, this:r2453_1 -# 2453| m2453_4(unknown) = ^CallSideEffect : ~m2451_6 -# 2453| m2453_5(unknown) = Chi : total:m2451_6, partial:m2453_4 -# 2453| v2453_6(void) = ^IndirectReadSideEffect[-1] : &:r2453_1, m2451_8 -# 2453| m2453_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2453_1 -# 2453| m2453_8(ClassWithDestructor) = Chi : total:m2451_8, partial:m2453_7 +# 2451| void rethrow_with_destruction(int) +# 2451| Block 0 +# 2451| v2451_1(void) = EnterFunction : +# 2451| m2451_2(unknown) = AliasedDefinition : +# 2451| m2451_3(unknown) = InitializeNonLocal : +# 2451| m2451_4(unknown) = Chi : total:m2451_2, partial:m2451_3 +# 2451| r2451_5(glval) = VariableAddress[x] : +# 2451| m2451_6(int) = InitializeParameter[x] : &:r2451_5 +# 2452| r2452_1(glval) = VariableAddress[c] : +# 2452| m2452_2(ClassWithDestructor) = Uninitialized[c] : &:r2452_1 +# 2452| r2452_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2452| v2452_4(void) = Call[ClassWithDestructor] : func:r2452_3, this:r2452_1 +# 2452| m2452_5(unknown) = ^CallSideEffect : ~m2451_4 +# 2452| m2452_6(unknown) = Chi : total:m2451_4, partial:m2452_5 +# 2452| m2452_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2452_1 +# 2452| m2452_8(ClassWithDestructor) = Chi : total:m2452_2, partial:m2452_7 +# 2453| v2453_1(void) = ReThrow : +# 2454| r2454_1(glval) = VariableAddress[c] : +# 2454| r2454_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2454| v2454_3(void) = Call[~ClassWithDestructor] : func:r2454_2, this:r2454_1 +# 2454| m2454_4(unknown) = ^CallSideEffect : ~m2452_6 +# 2454| m2454_5(unknown) = Chi : total:m2452_6, partial:m2454_4 +# 2454| v2454_6(void) = ^IndirectReadSideEffect[-1] : &:r2454_1, m2452_8 +# 2454| m2454_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2454_1 +# 2454| m2454_8(ClassWithDestructor) = Chi : total:m2452_8, partial:m2454_7 #-----| Exception -> Block 1 -# 2450| Block 1 -# 2450| v2450_7(void) = Unwind : -# 2450| v2450_8(void) = AliasedUse : ~m2453_5 -# 2450| v2450_9(void) = ExitFunction : +# 2451| Block 1 +# 2451| v2451_7(void) = Unwind : +# 2451| v2451_8(void) = AliasedUse : ~m2454_5 +# 2451| v2451_9(void) = ExitFunction : -# 2459| void new_with_destructor(ClassWithDestructor) -# 2459| Block 0 -# 2459| v2459_1(void) = EnterFunction : -# 2459| m2459_2(unknown) = AliasedDefinition : -# 2459| m2459_3(unknown) = InitializeNonLocal : -# 2459| m2459_4(unknown) = Chi : total:m2459_2, partial:m2459_3 -# 2459| r2459_5(glval) = VariableAddress[a] : -# 2459| m2459_6(ClassWithDestructor) = InitializeParameter[a] : &:r2459_5 -# 2461| r2461_1(glval) = VariableAddress[b] : -# 2461| r2461_2(glval) = FunctionAddress[operator new] : -# 2461| r2461_3(unsigned long) = Constant[1] : -# 2461| r2461_4(void *) = Call[operator new] : func:r2461_2, 0:r2461_3 -# 2461| m2461_5(unknown) = ^CallSideEffect : ~m2459_4 -# 2461| m2461_6(unknown) = Chi : total:m2459_4, partial:m2461_5 -# 2461| m2461_7(unknown) = ^InitializeDynamicAllocation : &:r2461_4 -# 2461| m2461_8(unknown) = Chi : total:m2461_6, partial:m2461_7 -# 2461| r2461_9(ByValueConstructor *) = Convert : r2461_4 -# 2461| r2461_10(glval) = FunctionAddress[ByValueConstructor] : -# 2461| r2461_11(glval) = VariableAddress[#temp2461:52] : -# 2461| r2461_12(glval) = VariableAddress[a] : -# 2461| r2461_13(ClassWithDestructor) = Load[a] : &:r2461_12, m2459_6 -# 2461| m2461_14(ClassWithDestructor) = Store[#temp2461:52] : &:r2461_11, r2461_13 -# 2461| r2461_15(ClassWithDestructor) = Load[#temp2461:52] : &:r2461_11, m2461_14 -# 2461| v2461_16(void) = Call[ByValueConstructor] : func:r2461_10, this:r2461_9, 0:r2461_15 -# 2461| m2461_17(unknown) = ^CallSideEffect : ~m2461_8 -# 2461| m2461_18(unknown) = Chi : total:m2461_8, partial:m2461_17 -# 2461| m2461_19(ByValueConstructor) = ^IndirectMayWriteSideEffect[-1] : &:r2461_9 -# 2461| m2461_20(unknown) = Chi : total:m2461_18, partial:m2461_19 -# 2461| r2461_21(glval) = CopyValue : r2461_11 -# 2461| r2461_22(glval) = FunctionAddress[~ClassWithDestructor] : -# 2461| v2461_23(void) = Call[~ClassWithDestructor] : func:r2461_22, this:r2461_21 -# 2461| m2461_24(unknown) = ^CallSideEffect : ~m2461_20 -# 2461| m2461_25(unknown) = Chi : total:m2461_20, partial:m2461_24 -# 2461| v2461_26(void) = ^IndirectReadSideEffect[-1] : &:r2461_21, m2461_14 -# 2461| m2461_27(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2461_21 -# 2461| m2461_28(ClassWithDestructor) = Chi : total:m2461_14, partial:m2461_27 -# 2461| m2461_29(ByValueConstructor *) = Store[b] : &:r2461_1, r2461_9 -# 2462| v2462_1(void) = NoOp : -# 2459| v2459_7(void) = ReturnVoid : -# 2459| v2459_8(void) = AliasedUse : ~m2461_25 -# 2459| v2459_9(void) = ExitFunction : +# 2460| void new_with_destructor(ClassWithDestructor) +# 2460| Block 0 +# 2460| v2460_1(void) = EnterFunction : +# 2460| m2460_2(unknown) = AliasedDefinition : +# 2460| m2460_3(unknown) = InitializeNonLocal : +# 2460| m2460_4(unknown) = Chi : total:m2460_2, partial:m2460_3 +# 2460| r2460_5(glval) = VariableAddress[a] : +# 2460| m2460_6(ClassWithDestructor) = InitializeParameter[a] : &:r2460_5 +# 2462| r2462_1(glval) = VariableAddress[b] : +# 2462| r2462_2(glval) = FunctionAddress[operator new] : +# 2462| r2462_3(unsigned long) = Constant[1] : +# 2462| r2462_4(void *) = Call[operator new] : func:r2462_2, 0:r2462_3 +# 2462| m2462_5(unknown) = ^CallSideEffect : ~m2460_4 +# 2462| m2462_6(unknown) = Chi : total:m2460_4, partial:m2462_5 +# 2462| m2462_7(unknown) = ^InitializeDynamicAllocation : &:r2462_4 +# 2462| m2462_8(unknown) = Chi : total:m2462_6, partial:m2462_7 +# 2462| r2462_9(ByValueConstructor *) = Convert : r2462_4 +# 2462| r2462_10(glval) = FunctionAddress[ByValueConstructor] : +# 2462| r2462_11(glval) = VariableAddress[#temp2462:52] : +# 2462| r2462_12(glval) = VariableAddress[a] : +# 2462| r2462_13(ClassWithDestructor) = Load[a] : &:r2462_12, m2460_6 +# 2462| m2462_14(ClassWithDestructor) = Store[#temp2462:52] : &:r2462_11, r2462_13 +# 2462| r2462_15(ClassWithDestructor) = Load[#temp2462:52] : &:r2462_11, m2462_14 +# 2462| v2462_16(void) = Call[ByValueConstructor] : func:r2462_10, this:r2462_9, 0:r2462_15 +# 2462| m2462_17(unknown) = ^CallSideEffect : ~m2462_8 +# 2462| m2462_18(unknown) = Chi : total:m2462_8, partial:m2462_17 +# 2462| m2462_19(ByValueConstructor) = ^IndirectMayWriteSideEffect[-1] : &:r2462_9 +# 2462| m2462_20(unknown) = Chi : total:m2462_18, partial:m2462_19 +# 2462| r2462_21(glval) = CopyValue : r2462_11 +# 2462| r2462_22(glval) = FunctionAddress[~ClassWithDestructor] : +# 2462| v2462_23(void) = Call[~ClassWithDestructor] : func:r2462_22, this:r2462_21 +# 2462| m2462_24(unknown) = ^CallSideEffect : ~m2462_20 +# 2462| m2462_25(unknown) = Chi : total:m2462_20, partial:m2462_24 +# 2462| v2462_26(void) = ^IndirectReadSideEffect[-1] : &:r2462_21, m2462_14 +# 2462| m2462_27(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2462_21 +# 2462| m2462_28(ClassWithDestructor) = Chi : total:m2462_14, partial:m2462_27 +# 2462| m2462_29(ByValueConstructor *) = Store[b] : &:r2462_1, r2462_9 +# 2463| v2463_1(void) = NoOp : +# 2460| v2460_7(void) = ReturnVoid : +# 2460| v2460_8(void) = AliasedUse : ~m2462_25 +# 2460| v2460_9(void) = ExitFunction : -# 2478| void rvalue_conversion_with_destructor::test() -# 2478| Block 0 -# 2478| v2478_1(void) = EnterFunction : -# 2478| m2478_2(unknown) = AliasedDefinition : -# 2478| m2478_3(unknown) = InitializeNonLocal : -# 2478| m2478_4(unknown) = Chi : total:m2478_2, partial:m2478_3 -# 2480| r2480_1(glval) = VariableAddress[a] : -# 2480| r2480_2(glval) = VariableAddress[#temp2480:18] : -# 2480| r2480_3(glval) = FunctionAddress[get] : -# 2480| r2480_4(B) = Call[get] : func:r2480_3 -# 2480| m2480_5(unknown) = ^CallSideEffect : ~m2478_4 -# 2480| m2480_6(unknown) = Chi : total:m2478_4, partial:m2480_5 -# 2480| m2480_7(B) = Store[#temp2480:18] : &:r2480_2, r2480_4 -# 2480| m2480_8(unknown) = Chi : total:m2480_6, partial:m2480_7 -# 2480| r2480_9(glval) = Convert : r2480_2 -# 2480| r2480_10(glval) = FunctionAddress[operator->] : -# 2480| r2480_11(A *) = Call[operator->] : func:r2480_10, this:r2480_9 -# 2480| m2480_12(unknown) = ^CallSideEffect : ~m2480_8 -# 2480| m2480_13(unknown) = Chi : total:m2480_8, partial:m2480_12 -# 2480| v2480_14(void) = ^IndirectReadSideEffect[-1] : &:r2480_9, ~m2480_13 -# 2480| r2480_15(glval) = FieldAddress[a] : r2480_11 -# 2480| r2480_16(glval) = CopyValue : r2480_2 -# 2480| r2480_17(glval) = FunctionAddress[~B] : -# 2480| v2480_18(void) = Call[~B] : func:r2480_17, this:r2480_16 -# 2480| m2480_19(unknown) = ^CallSideEffect : ~m2480_13 -# 2480| m2480_20(unknown) = Chi : total:m2480_13, partial:m2480_19 -# 2480| v2480_21(void) = ^IndirectReadSideEffect[-1] : &:r2480_16, ~m2480_20 -# 2480| m2480_22(B) = ^IndirectMayWriteSideEffect[-1] : &:r2480_16 -# 2480| m2480_23(unknown) = Chi : total:m2480_20, partial:m2480_22 -# 2480| r2480_24(unsigned int) = Load[?] : &:r2480_15, ~m2480_23 -# 2480| m2480_25(unsigned int) = Store[a] : &:r2480_1, r2480_24 -# 2481| v2481_1(void) = NoOp : -# 2478| v2478_5(void) = ReturnVoid : -# 2478| v2478_6(void) = AliasedUse : ~m2480_20 -# 2478| v2478_7(void) = ExitFunction : +# 2479| void rvalue_conversion_with_destructor::test() +# 2479| Block 0 +# 2479| v2479_1(void) = EnterFunction : +# 2479| m2479_2(unknown) = AliasedDefinition : +# 2479| m2479_3(unknown) = InitializeNonLocal : +# 2479| m2479_4(unknown) = Chi : total:m2479_2, partial:m2479_3 +# 2481| r2481_1(glval) = VariableAddress[a] : +# 2481| r2481_2(glval) = VariableAddress[#temp2481:18] : +# 2481| r2481_3(glval) = FunctionAddress[get] : +# 2481| r2481_4(B) = Call[get] : func:r2481_3 +# 2481| m2481_5(unknown) = ^CallSideEffect : ~m2479_4 +# 2481| m2481_6(unknown) = Chi : total:m2479_4, partial:m2481_5 +# 2481| m2481_7(B) = Store[#temp2481:18] : &:r2481_2, r2481_4 +# 2481| m2481_8(unknown) = Chi : total:m2481_6, partial:m2481_7 +# 2481| r2481_9(glval) = Convert : r2481_2 +# 2481| r2481_10(glval) = FunctionAddress[operator->] : +# 2481| r2481_11(A *) = Call[operator->] : func:r2481_10, this:r2481_9 +# 2481| m2481_12(unknown) = ^CallSideEffect : ~m2481_8 +# 2481| m2481_13(unknown) = Chi : total:m2481_8, partial:m2481_12 +# 2481| v2481_14(void) = ^IndirectReadSideEffect[-1] : &:r2481_9, ~m2481_13 +# 2481| r2481_15(glval) = FieldAddress[a] : r2481_11 +# 2481| r2481_16(glval) = CopyValue : r2481_2 +# 2481| r2481_17(glval) = FunctionAddress[~B] : +# 2481| v2481_18(void) = Call[~B] : func:r2481_17, this:r2481_16 +# 2481| m2481_19(unknown) = ^CallSideEffect : ~m2481_13 +# 2481| m2481_20(unknown) = Chi : total:m2481_13, partial:m2481_19 +# 2481| v2481_21(void) = ^IndirectReadSideEffect[-1] : &:r2481_16, ~m2481_20 +# 2481| m2481_22(B) = ^IndirectMayWriteSideEffect[-1] : &:r2481_16 +# 2481| m2481_23(unknown) = Chi : total:m2481_20, partial:m2481_22 +# 2481| r2481_24(unsigned int) = Load[?] : &:r2481_15, ~m2481_23 +# 2481| m2481_25(unsigned int) = Store[a] : &:r2481_1, r2481_24 +# 2482| v2482_1(void) = NoOp : +# 2479| v2479_5(void) = ReturnVoid : +# 2479| v2479_6(void) = AliasedUse : ~m2481_20 +# 2479| v2479_7(void) = ExitFunction : -# 2484| void destructor_without_block(bool) -# 2484| Block 0 -# 2484| v2484_1(void) = EnterFunction : -# 2484| m2484_2(unknown) = AliasedDefinition : -# 2484| m2484_3(unknown) = InitializeNonLocal : -# 2484| m2484_4(unknown) = Chi : total:m2484_2, partial:m2484_3 -# 2484| r2484_5(glval) = VariableAddress[b] : -# 2484| m2484_6(bool) = InitializeParameter[b] : &:r2484_5 -# 2486| r2486_1(glval) = VariableAddress[b] : -# 2486| r2486_2(bool) = Load[b] : &:r2486_1, m2484_6 -# 2486| v2486_3(void) = ConditionalBranch : r2486_2 +# 2485| void destructor_without_block(bool) +# 2485| Block 0 +# 2485| v2485_1(void) = EnterFunction : +# 2485| m2485_2(unknown) = AliasedDefinition : +# 2485| m2485_3(unknown) = InitializeNonLocal : +# 2485| m2485_4(unknown) = Chi : total:m2485_2, partial:m2485_3 +# 2485| r2485_5(glval) = VariableAddress[b] : +# 2485| m2485_6(bool) = InitializeParameter[b] : &:r2485_5 +# 2487| r2487_1(glval) = VariableAddress[b] : +# 2487| r2487_2(bool) = Load[b] : &:r2487_1, m2485_6 +# 2487| v2487_3(void) = ConditionalBranch : r2487_2 #-----| False -> Block 2 #-----| True -> Block 1 -# 2487| Block 1 -# 2487| r2487_1(glval) = VariableAddress[c] : -# 2487| m2487_2(ClassWithDestructor) = Uninitialized[c] : &:r2487_1 -# 2487| r2487_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2487| v2487_4(void) = Call[ClassWithDestructor] : func:r2487_3, this:r2487_1 -# 2487| m2487_5(unknown) = ^CallSideEffect : ~m2484_4 -# 2487| m2487_6(unknown) = Chi : total:m2484_4, partial:m2487_5 -# 2487| m2487_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2487_1 -# 2487| m2487_8(ClassWithDestructor) = Chi : total:m2487_2, partial:m2487_7 +# 2488| Block 1 +# 2488| r2488_1(glval) = VariableAddress[c] : +# 2488| m2488_2(ClassWithDestructor) = Uninitialized[c] : &:r2488_1 +# 2488| r2488_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2488| v2488_4(void) = Call[ClassWithDestructor] : func:r2488_3, this:r2488_1 +# 2488| m2488_5(unknown) = ^CallSideEffect : ~m2485_4 +# 2488| m2488_6(unknown) = Chi : total:m2485_4, partial:m2488_5 +# 2488| m2488_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2488_1 +# 2488| m2488_8(ClassWithDestructor) = Chi : total:m2488_2, partial:m2488_7 #-----| r0_1(glval) = VariableAddress[c] : #-----| r0_2(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_3(void) = Call[~ClassWithDestructor] : func:r0_2, this:r0_1 -#-----| m0_4(unknown) = ^CallSideEffect : ~m2487_6 -#-----| m0_5(unknown) = Chi : total:m2487_6, partial:m0_4 -#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_1, m2487_8 +#-----| m0_4(unknown) = ^CallSideEffect : ~m2488_6 +#-----| m0_5(unknown) = Chi : total:m2488_6, partial:m0_4 +#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_1, m2488_8 #-----| m0_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_1 -#-----| m0_8(ClassWithDestructor) = Chi : total:m2487_8, partial:m0_7 +#-----| m0_8(ClassWithDestructor) = Chi : total:m2488_8, partial:m0_7 #-----| Goto -> Block 2 -# 2489| Block 2 -# 2489| m2489_1(unknown) = Phi : from 0:~m2484_4, from 1:~m0_5 -# 2489| r2489_2(glval) = VariableAddress[b] : -# 2489| r2489_3(bool) = Load[b] : &:r2489_2, m2484_6 -# 2489| v2489_4(void) = ConditionalBranch : r2489_3 +# 2490| Block 2 +# 2490| m2490_1(unknown) = Phi : from 0:~m2485_4, from 1:~m0_5 +# 2490| r2490_2(glval) = VariableAddress[b] : +# 2490| r2490_3(bool) = Load[b] : &:r2490_2, m2485_6 +# 2490| v2490_4(void) = ConditionalBranch : r2490_3 #-----| False -> Block 4 #-----| True -> Block 3 -# 2490| Block 3 -# 2490| r2490_1(glval) = VariableAddress[d] : -# 2490| m2490_2(ClassWithDestructor) = Uninitialized[d] : &:r2490_1 -# 2490| r2490_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2490| v2490_4(void) = Call[ClassWithDestructor] : func:r2490_3, this:r2490_1 -# 2490| m2490_5(unknown) = ^CallSideEffect : ~m2489_1 -# 2490| m2490_6(unknown) = Chi : total:m2489_1, partial:m2490_5 -# 2490| m2490_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2490_1 -# 2490| m2490_8(ClassWithDestructor) = Chi : total:m2490_2, partial:m2490_7 +# 2491| Block 3 +# 2491| r2491_1(glval) = VariableAddress[d] : +# 2491| m2491_2(ClassWithDestructor) = Uninitialized[d] : &:r2491_1 +# 2491| r2491_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2491| v2491_4(void) = Call[ClassWithDestructor] : func:r2491_3, this:r2491_1 +# 2491| m2491_5(unknown) = ^CallSideEffect : ~m2490_1 +# 2491| m2491_6(unknown) = Chi : total:m2490_1, partial:m2491_5 +# 2491| m2491_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2491_1 +# 2491| m2491_8(ClassWithDestructor) = Chi : total:m2491_2, partial:m2491_7 #-----| r0_9(glval) = VariableAddress[d] : #-----| r0_10(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_11(void) = Call[~ClassWithDestructor] : func:r0_10, this:r0_9 -#-----| m0_12(unknown) = ^CallSideEffect : ~m2490_6 -#-----| m0_13(unknown) = Chi : total:m2490_6, partial:m0_12 -#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_9, m2490_8 +#-----| m0_12(unknown) = ^CallSideEffect : ~m2491_6 +#-----| m0_13(unknown) = Chi : total:m2491_6, partial:m0_12 +#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_9, m2491_8 #-----| m0_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_9 -#-----| m0_16(ClassWithDestructor) = Chi : total:m2490_8, partial:m0_15 +#-----| m0_16(ClassWithDestructor) = Chi : total:m2491_8, partial:m0_15 #-----| Goto -> Block 5 -# 2492| Block 4 -# 2492| r2492_1(glval) = VariableAddress[e] : -# 2492| m2492_2(ClassWithDestructor) = Uninitialized[e] : &:r2492_1 -# 2492| r2492_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2492| v2492_4(void) = Call[ClassWithDestructor] : func:r2492_3, this:r2492_1 -# 2492| m2492_5(unknown) = ^CallSideEffect : ~m2489_1 -# 2492| m2492_6(unknown) = Chi : total:m2489_1, partial:m2492_5 -# 2492| m2492_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2492_1 -# 2492| m2492_8(ClassWithDestructor) = Chi : total:m2492_2, partial:m2492_7 +# 2493| Block 4 +# 2493| r2493_1(glval) = VariableAddress[e] : +# 2493| m2493_2(ClassWithDestructor) = Uninitialized[e] : &:r2493_1 +# 2493| r2493_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2493| v2493_4(void) = Call[ClassWithDestructor] : func:r2493_3, this:r2493_1 +# 2493| m2493_5(unknown) = ^CallSideEffect : ~m2490_1 +# 2493| m2493_6(unknown) = Chi : total:m2490_1, partial:m2493_5 +# 2493| m2493_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2493_1 +# 2493| m2493_8(ClassWithDestructor) = Chi : total:m2493_2, partial:m2493_7 #-----| r0_17(glval) = VariableAddress[e] : #-----| r0_18(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_19(void) = Call[~ClassWithDestructor] : func:r0_18, this:r0_17 -#-----| m0_20(unknown) = ^CallSideEffect : ~m2492_6 -#-----| m0_21(unknown) = Chi : total:m2492_6, partial:m0_20 -#-----| v0_22(void) = ^IndirectReadSideEffect[-1] : &:r0_17, m2492_8 +#-----| m0_20(unknown) = ^CallSideEffect : ~m2493_6 +#-----| m0_21(unknown) = Chi : total:m2493_6, partial:m0_20 +#-----| v0_22(void) = ^IndirectReadSideEffect[-1] : &:r0_17, m2493_8 #-----| m0_23(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_17 -#-----| m0_24(ClassWithDestructor) = Chi : total:m2492_8, partial:m0_23 +#-----| m0_24(ClassWithDestructor) = Chi : total:m2493_8, partial:m0_23 #-----| Goto -> Block 5 -# 2494| Block 5 -# 2494| m2494_1(unknown) = Phi : from 3:~m0_13, from 4:~m0_21, from 6:~m0_29 -# 2494| r2494_2(glval) = VariableAddress[b] : -# 2494| r2494_3(bool) = Load[b] : &:r2494_2, m2484_6 -# 2494| v2494_4(void) = ConditionalBranch : r2494_3 +# 2495| Block 5 +# 2495| m2495_1(unknown) = Phi : from 3:~m0_13, from 4:~m0_21, from 6:~m0_29 +# 2495| r2495_2(glval) = VariableAddress[b] : +# 2495| r2495_3(bool) = Load[b] : &:r2495_2, m2485_6 +# 2495| v2495_4(void) = ConditionalBranch : r2495_3 #-----| False -> Block 7 #-----| True -> Block 6 -# 2495| Block 6 -# 2495| r2495_1(glval) = VariableAddress[f] : -# 2495| m2495_2(ClassWithDestructor) = Uninitialized[f] : &:r2495_1 -# 2495| r2495_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2495| v2495_4(void) = Call[ClassWithDestructor] : func:r2495_3, this:r2495_1 -# 2495| m2495_5(unknown) = ^CallSideEffect : ~m2494_1 -# 2495| m2495_6(unknown) = Chi : total:m2494_1, partial:m2495_5 -# 2495| m2495_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2495_1 -# 2495| m2495_8(ClassWithDestructor) = Chi : total:m2495_2, partial:m2495_7 +# 2496| Block 6 +# 2496| r2496_1(glval) = VariableAddress[f] : +# 2496| m2496_2(ClassWithDestructor) = Uninitialized[f] : &:r2496_1 +# 2496| r2496_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2496| v2496_4(void) = Call[ClassWithDestructor] : func:r2496_3, this:r2496_1 +# 2496| m2496_5(unknown) = ^CallSideEffect : ~m2495_1 +# 2496| m2496_6(unknown) = Chi : total:m2495_1, partial:m2496_5 +# 2496| m2496_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2496_1 +# 2496| m2496_8(ClassWithDestructor) = Chi : total:m2496_2, partial:m2496_7 #-----| r0_25(glval) = VariableAddress[f] : #-----| r0_26(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_27(void) = Call[~ClassWithDestructor] : func:r0_26, this:r0_25 -#-----| m0_28(unknown) = ^CallSideEffect : ~m2495_6 -#-----| m0_29(unknown) = Chi : total:m2495_6, partial:m0_28 -#-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_25, m2495_8 +#-----| m0_28(unknown) = ^CallSideEffect : ~m2496_6 +#-----| m0_29(unknown) = Chi : total:m2496_6, partial:m0_28 +#-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_25, m2496_8 #-----| m0_31(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_25 -#-----| m0_32(ClassWithDestructor) = Chi : total:m2495_8, partial:m0_31 +#-----| m0_32(ClassWithDestructor) = Chi : total:m2496_8, partial:m0_31 #-----| Goto (back edge) -> Block 5 -# 2497| Block 7 -# 2497| r2497_1(glval) = VariableAddress[i] : -# 2497| r2497_2(int) = Constant[0] : -# 2497| m2497_3(int) = Store[i] : &:r2497_1, r2497_2 +# 2498| Block 7 +# 2498| r2498_1(glval) = VariableAddress[i] : +# 2498| r2498_2(int) = Constant[0] : +# 2498| m2498_3(int) = Store[i] : &:r2498_1, r2498_2 #-----| Goto -> Block 8 -# 2497| Block 8 -# 2497| m2497_4(unknown) = Phi : from 7:~m2494_1, from 9:~m0_37 -# 2497| m2497_5(int) = Phi : from 7:m2497_3, from 9:m2497_15 -# 2497| r2497_6(glval) = VariableAddress[i] : -# 2497| r2497_7(int) = Load[i] : &:r2497_6, m2497_5 -# 2497| r2497_8(int) = Constant[42] : -# 2497| r2497_9(bool) = CompareLT : r2497_7, r2497_8 -# 2497| v2497_10(void) = ConditionalBranch : r2497_9 +# 2498| Block 8 +# 2498| m2498_4(unknown) = Phi : from 7:~m2495_1, from 9:~m0_37 +# 2498| m2498_5(int) = Phi : from 7:m2498_3, from 9:m2498_15 +# 2498| r2498_6(glval) = VariableAddress[i] : +# 2498| r2498_7(int) = Load[i] : &:r2498_6, m2498_5 +# 2498| r2498_8(int) = Constant[42] : +# 2498| r2498_9(bool) = CompareLT : r2498_7, r2498_8 +# 2498| v2498_10(void) = ConditionalBranch : r2498_9 #-----| False -> Block 10 #-----| True -> Block 9 -# 2498| Block 9 -# 2498| r2498_1(glval) = VariableAddress[g] : -# 2498| m2498_2(ClassWithDestructor) = Uninitialized[g] : &:r2498_1 -# 2498| r2498_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2498| v2498_4(void) = Call[ClassWithDestructor] : func:r2498_3, this:r2498_1 -# 2498| m2498_5(unknown) = ^CallSideEffect : ~m2497_4 -# 2498| m2498_6(unknown) = Chi : total:m2497_4, partial:m2498_5 -# 2498| m2498_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2498_1 -# 2498| m2498_8(ClassWithDestructor) = Chi : total:m2498_2, partial:m2498_7 +# 2499| Block 9 +# 2499| r2499_1(glval) = VariableAddress[g] : +# 2499| m2499_2(ClassWithDestructor) = Uninitialized[g] : &:r2499_1 +# 2499| r2499_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2499| v2499_4(void) = Call[ClassWithDestructor] : func:r2499_3, this:r2499_1 +# 2499| m2499_5(unknown) = ^CallSideEffect : ~m2498_4 +# 2499| m2499_6(unknown) = Chi : total:m2498_4, partial:m2499_5 +# 2499| m2499_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2499_1 +# 2499| m2499_8(ClassWithDestructor) = Chi : total:m2499_2, partial:m2499_7 #-----| r0_33(glval) = VariableAddress[g] : #-----| r0_34(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_35(void) = Call[~ClassWithDestructor] : func:r0_34, this:r0_33 -#-----| m0_36(unknown) = ^CallSideEffect : ~m2498_6 -#-----| m0_37(unknown) = Chi : total:m2498_6, partial:m0_36 -#-----| v0_38(void) = ^IndirectReadSideEffect[-1] : &:r0_33, m2498_8 +#-----| m0_36(unknown) = ^CallSideEffect : ~m2499_6 +#-----| m0_37(unknown) = Chi : total:m2499_6, partial:m0_36 +#-----| v0_38(void) = ^IndirectReadSideEffect[-1] : &:r0_33, m2499_8 #-----| m0_39(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_33 -#-----| m0_40(ClassWithDestructor) = Chi : total:m2498_8, partial:m0_39 -# 2497| r2497_11(glval) = VariableAddress[i] : -# 2497| r2497_12(int) = Load[i] : &:r2497_11, m2497_5 -# 2497| r2497_13(int) = Constant[1] : -# 2497| r2497_14(int) = Add : r2497_12, r2497_13 -# 2497| m2497_15(int) = Store[i] : &:r2497_11, r2497_14 +#-----| m0_40(ClassWithDestructor) = Chi : total:m2499_8, partial:m0_39 +# 2498| r2498_11(glval) = VariableAddress[i] : +# 2498| r2498_12(int) = Load[i] : &:r2498_11, m2498_5 +# 2498| r2498_13(int) = Constant[1] : +# 2498| r2498_14(int) = Add : r2498_12, r2498_13 +# 2498| m2498_15(int) = Store[i] : &:r2498_11, r2498_14 #-----| Goto (back edge) -> Block 8 -# 2499| Block 10 -# 2499| v2499_1(void) = NoOp : -# 2484| v2484_7(void) = ReturnVoid : -# 2484| v2484_8(void) = AliasedUse : ~m2497_4 -# 2484| v2484_9(void) = ExitFunction : +# 2500| Block 10 +# 2500| v2500_1(void) = NoOp : +# 2485| v2485_7(void) = ReturnVoid : +# 2485| v2485_8(void) = AliasedUse : ~m2498_4 +# 2485| v2485_9(void) = ExitFunction : -# 2501| void destruction_in_switch_1(int) -# 2501| Block 0 -# 2501| v2501_1(void) = EnterFunction : -# 2501| m2501_2(unknown) = AliasedDefinition : -# 2501| m2501_3(unknown) = InitializeNonLocal : -# 2501| m2501_4(unknown) = Chi : total:m2501_2, partial:m2501_3 -# 2501| r2501_5(glval) = VariableAddress[c] : -# 2501| m2501_6(int) = InitializeParameter[c] : &:r2501_5 -# 2502| r2502_1(glval) = VariableAddress[c] : -# 2502| r2502_2(int) = Load[c] : &:r2502_1, m2501_6 -# 2502| v2502_3(void) = Switch : r2502_2 +# 2502| void destruction_in_switch_1(int) +# 2502| Block 0 +# 2502| v2502_1(void) = EnterFunction : +# 2502| m2502_2(unknown) = AliasedDefinition : +# 2502| m2502_3(unknown) = InitializeNonLocal : +# 2502| m2502_4(unknown) = Chi : total:m2502_2, partial:m2502_3 +# 2502| r2502_5(glval) = VariableAddress[c] : +# 2502| m2502_6(int) = InitializeParameter[c] : &:r2502_5 +# 2503| r2503_1(glval) = VariableAddress[c] : +# 2503| r2503_2(int) = Load[c] : &:r2503_1, m2502_6 +# 2503| v2503_3(void) = Switch : r2503_2 #-----| Case[0] -> Block 1 #-----| Default -> Block 2 -# 2503| Block 1 -# 2503| v2503_1(void) = NoOp : -# 2504| r2504_1(glval) = VariableAddress[x] : -# 2504| m2504_2(ClassWithDestructor) = Uninitialized[x] : &:r2504_1 -# 2504| r2504_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2504| v2504_4(void) = Call[ClassWithDestructor] : func:r2504_3, this:r2504_1 -# 2504| m2504_5(unknown) = ^CallSideEffect : ~m2501_4 -# 2504| m2504_6(unknown) = Chi : total:m2501_4, partial:m2504_5 -# 2504| m2504_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2504_1 -# 2504| m2504_8(ClassWithDestructor) = Chi : total:m2504_2, partial:m2504_7 -# 2506| r2506_1(glval) = VariableAddress[x] : -# 2506| r2506_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2506| v2506_3(void) = Call[~ClassWithDestructor] : func:r2506_2, this:r2506_1 -# 2506| m2506_4(unknown) = ^CallSideEffect : ~m2504_6 -# 2506| m2506_5(unknown) = Chi : total:m2504_6, partial:m2506_4 -# 2506| v2506_6(void) = ^IndirectReadSideEffect[-1] : &:r2506_1, m2504_8 -# 2506| m2506_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2506_1 -# 2506| m2506_8(ClassWithDestructor) = Chi : total:m2504_8, partial:m2506_7 -# 2505| v2505_1(void) = NoOp : +# 2504| Block 1 +# 2504| v2504_1(void) = NoOp : +# 2505| r2505_1(glval) = VariableAddress[x] : +# 2505| m2505_2(ClassWithDestructor) = Uninitialized[x] : &:r2505_1 +# 2505| r2505_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2505| v2505_4(void) = Call[ClassWithDestructor] : func:r2505_3, this:r2505_1 +# 2505| m2505_5(unknown) = ^CallSideEffect : ~m2502_4 +# 2505| m2505_6(unknown) = Chi : total:m2502_4, partial:m2505_5 +# 2505| m2505_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2505_1 +# 2505| m2505_8(ClassWithDestructor) = Chi : total:m2505_2, partial:m2505_7 +# 2507| r2507_1(glval) = VariableAddress[x] : +# 2507| r2507_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2507| v2507_3(void) = Call[~ClassWithDestructor] : func:r2507_2, this:r2507_1 +# 2507| m2507_4(unknown) = ^CallSideEffect : ~m2505_6 +# 2507| m2507_5(unknown) = Chi : total:m2505_6, partial:m2507_4 +# 2507| v2507_6(void) = ^IndirectReadSideEffect[-1] : &:r2507_1, m2505_8 +# 2507| m2507_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2507_1 +# 2507| m2507_8(ClassWithDestructor) = Chi : total:m2505_8, partial:m2507_7 +# 2506| v2506_1(void) = NoOp : #-----| Goto -> Block 2 -# 2507| Block 2 -# 2507| m2507_1(unknown) = Phi : from 0:~m2501_4, from 1:~m2506_5 -# 2507| v2507_2(void) = NoOp : -# 2508| v2508_1(void) = NoOp : -# 2501| v2501_7(void) = ReturnVoid : -# 2501| v2501_8(void) = AliasedUse : ~m2507_1 -# 2501| v2501_9(void) = ExitFunction : +# 2508| Block 2 +# 2508| m2508_1(unknown) = Phi : from 0:~m2502_4, from 1:~m2507_5 +# 2508| v2508_2(void) = NoOp : +# 2509| v2509_1(void) = NoOp : +# 2502| v2502_7(void) = ReturnVoid : +# 2502| v2502_8(void) = AliasedUse : ~m2508_1 +# 2502| v2502_9(void) = ExitFunction : -# 2510| void destruction_in_switch_2(int) -# 2510| Block 0 -# 2510| v2510_1(void) = EnterFunction : -# 2510| m2510_2(unknown) = AliasedDefinition : -# 2510| m2510_3(unknown) = InitializeNonLocal : -# 2510| m2510_4(unknown) = Chi : total:m2510_2, partial:m2510_3 -# 2510| r2510_5(glval) = VariableAddress[c] : -# 2510| m2510_6(int) = InitializeParameter[c] : &:r2510_5 -# 2511| r2511_1(glval) = VariableAddress[y] : -# 2511| m2511_2(ClassWithDestructor) = Uninitialized[y] : &:r2511_1 -# 2511| r2511_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2511| v2511_4(void) = Call[ClassWithDestructor] : func:r2511_3, this:r2511_1 -# 2511| m2511_5(unknown) = ^CallSideEffect : ~m2510_4 -# 2511| m2511_6(unknown) = Chi : total:m2510_4, partial:m2511_5 -# 2511| m2511_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2511_1 -# 2511| m2511_8(ClassWithDestructor) = Chi : total:m2511_2, partial:m2511_7 -# 2511| r2511_9(glval) = VariableAddress[c] : -# 2511| r2511_10(int) = Load[c] : &:r2511_9, m2510_6 -# 2511| v2511_11(void) = Switch : r2511_10 +# 2511| void destruction_in_switch_2(int) +# 2511| Block 0 +# 2511| v2511_1(void) = EnterFunction : +# 2511| m2511_2(unknown) = AliasedDefinition : +# 2511| m2511_3(unknown) = InitializeNonLocal : +# 2511| m2511_4(unknown) = Chi : total:m2511_2, partial:m2511_3 +# 2511| r2511_5(glval) = VariableAddress[c] : +# 2511| m2511_6(int) = InitializeParameter[c] : &:r2511_5 +# 2512| r2512_1(glval) = VariableAddress[y] : +# 2512| m2512_2(ClassWithDestructor) = Uninitialized[y] : &:r2512_1 +# 2512| r2512_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2512| v2512_4(void) = Call[ClassWithDestructor] : func:r2512_3, this:r2512_1 +# 2512| m2512_5(unknown) = ^CallSideEffect : ~m2511_4 +# 2512| m2512_6(unknown) = Chi : total:m2511_4, partial:m2512_5 +# 2512| m2512_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2512_1 +# 2512| m2512_8(ClassWithDestructor) = Chi : total:m2512_2, partial:m2512_7 +# 2512| r2512_9(glval) = VariableAddress[c] : +# 2512| r2512_10(int) = Load[c] : &:r2512_9, m2511_6 +# 2512| v2512_11(void) = Switch : r2512_10 #-----| Case[0] -> Block 1 #-----| Default -> Block 2 -# 2512| Block 1 -# 2512| v2512_1(void) = NoOp : -# 2518| r2518_1(glval) = VariableAddress[y] : -# 2518| r2518_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2518| v2518_3(void) = Call[~ClassWithDestructor] : func:r2518_2, this:r2518_1 -# 2518| m2518_4(unknown) = ^CallSideEffect : ~m2511_6 -# 2518| m2518_5(unknown) = Chi : total:m2511_6, partial:m2518_4 -# 2518| v2518_6(void) = ^IndirectReadSideEffect[-1] : &:r2518_1, m2511_8 -# 2518| m2518_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2518_1 -# 2518| m2518_8(ClassWithDestructor) = Chi : total:m2511_8, partial:m2518_7 +# 2513| Block 1 # 2513| v2513_1(void) = NoOp : +# 2519| r2519_1(glval) = VariableAddress[y] : +# 2519| r2519_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2519| v2519_3(void) = Call[~ClassWithDestructor] : func:r2519_2, this:r2519_1 +# 2519| m2519_4(unknown) = ^CallSideEffect : ~m2512_6 +# 2519| m2519_5(unknown) = Chi : total:m2512_6, partial:m2519_4 +# 2519| v2519_6(void) = ^IndirectReadSideEffect[-1] : &:r2519_1, m2512_8 +# 2519| m2519_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2519_1 +# 2519| m2519_8(ClassWithDestructor) = Chi : total:m2512_8, partial:m2519_7 +# 2514| v2514_1(void) = NoOp : #-----| Goto -> Block 3 -# 2515| Block 2 -# 2515| v2515_1(void) = NoOp : -# 2518| r2518_9(glval) = VariableAddress[y] : -# 2518| r2518_10(glval) = FunctionAddress[~ClassWithDestructor] : -# 2518| v2518_11(void) = Call[~ClassWithDestructor] : func:r2518_10, this:r2518_9 -# 2518| m2518_12(unknown) = ^CallSideEffect : ~m2511_6 -# 2518| m2518_13(unknown) = Chi : total:m2511_6, partial:m2518_12 -# 2518| v2518_14(void) = ^IndirectReadSideEffect[-1] : &:r2518_9, m2511_8 -# 2518| m2518_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2518_9 -# 2518| m2518_16(ClassWithDestructor) = Chi : total:m2511_8, partial:m2518_15 +# 2516| Block 2 # 2516| v2516_1(void) = NoOp : +# 2519| r2519_9(glval) = VariableAddress[y] : +# 2519| r2519_10(glval) = FunctionAddress[~ClassWithDestructor] : +# 2519| v2519_11(void) = Call[~ClassWithDestructor] : func:r2519_10, this:r2519_9 +# 2519| m2519_12(unknown) = ^CallSideEffect : ~m2512_6 +# 2519| m2519_13(unknown) = Chi : total:m2512_6, partial:m2519_12 +# 2519| v2519_14(void) = ^IndirectReadSideEffect[-1] : &:r2519_9, m2512_8 +# 2519| m2519_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2519_9 +# 2519| m2519_16(ClassWithDestructor) = Chi : total:m2512_8, partial:m2519_15 +# 2517| v2517_1(void) = NoOp : #-----| Goto -> Block 3 -# 2518| Block 3 -# 2518| m2518_17(unknown) = Phi : from 1:~m2518_5, from 2:~m2518_13 -# 2518| v2518_18(void) = NoOp : -# 2519| v2519_1(void) = NoOp : -# 2510| v2510_7(void) = ReturnVoid : -# 2510| v2510_8(void) = AliasedUse : ~m2518_17 -# 2510| v2510_9(void) = ExitFunction : +# 2519| Block 3 +# 2519| m2519_17(unknown) = Phi : from 1:~m2519_5, from 2:~m2519_13 +# 2519| v2519_18(void) = NoOp : +# 2520| v2520_1(void) = NoOp : +# 2511| v2511_7(void) = ReturnVoid : +# 2511| v2511_8(void) = AliasedUse : ~m2519_17 +# 2511| v2511_9(void) = ExitFunction : -# 2521| void destruction_in_switch_3(int) -# 2521| Block 0 -# 2521| v2521_1(void) = EnterFunction : -# 2521| m2521_2(unknown) = AliasedDefinition : -# 2521| m2521_3(unknown) = InitializeNonLocal : -# 2521| m2521_4(unknown) = Chi : total:m2521_2, partial:m2521_3 -# 2521| r2521_5(glval) = VariableAddress[c] : -# 2521| m2521_6(int) = InitializeParameter[c] : &:r2521_5 -# 2522| r2522_1(glval) = VariableAddress[y] : -# 2522| m2522_2(ClassWithDestructor) = Uninitialized[y] : &:r2522_1 -# 2522| r2522_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2522| v2522_4(void) = Call[ClassWithDestructor] : func:r2522_3, this:r2522_1 -# 2522| m2522_5(unknown) = ^CallSideEffect : ~m2521_4 -# 2522| m2522_6(unknown) = Chi : total:m2521_4, partial:m2522_5 -# 2522| m2522_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2522_1 -# 2522| m2522_8(ClassWithDestructor) = Chi : total:m2522_2, partial:m2522_7 -# 2522| r2522_9(glval) = VariableAddress[c] : -# 2522| r2522_10(int) = Load[c] : &:r2522_9, m2521_6 -# 2522| v2522_11(void) = Switch : r2522_10 +# 2522| void destruction_in_switch_3(int) +# 2522| Block 0 +# 2522| v2522_1(void) = EnterFunction : +# 2522| m2522_2(unknown) = AliasedDefinition : +# 2522| m2522_3(unknown) = InitializeNonLocal : +# 2522| m2522_4(unknown) = Chi : total:m2522_2, partial:m2522_3 +# 2522| r2522_5(glval) = VariableAddress[c] : +# 2522| m2522_6(int) = InitializeParameter[c] : &:r2522_5 +# 2523| r2523_1(glval) = VariableAddress[y] : +# 2523| m2523_2(ClassWithDestructor) = Uninitialized[y] : &:r2523_1 +# 2523| r2523_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2523| v2523_4(void) = Call[ClassWithDestructor] : func:r2523_3, this:r2523_1 +# 2523| m2523_5(unknown) = ^CallSideEffect : ~m2522_4 +# 2523| m2523_6(unknown) = Chi : total:m2522_4, partial:m2523_5 +# 2523| m2523_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2523_1 +# 2523| m2523_8(ClassWithDestructor) = Chi : total:m2523_2, partial:m2523_7 +# 2523| r2523_9(glval) = VariableAddress[c] : +# 2523| r2523_10(int) = Load[c] : &:r2523_9, m2522_6 +# 2523| v2523_11(void) = Switch : r2523_10 #-----| Case[0] -> Block 1 #-----| Default -> Block 2 -# 2523| Block 1 -# 2523| v2523_1(void) = NoOp : -# 2524| r2524_1(glval) = VariableAddress[x] : -# 2524| m2524_2(ClassWithDestructor) = Uninitialized[x] : &:r2524_1 -# 2524| r2524_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2524| v2524_4(void) = Call[ClassWithDestructor] : func:r2524_3, this:r2524_1 -# 2524| m2524_5(unknown) = ^CallSideEffect : ~m2522_6 -# 2524| m2524_6(unknown) = Chi : total:m2522_6, partial:m2524_5 -# 2524| m2524_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2524_1 -# 2524| m2524_8(ClassWithDestructor) = Chi : total:m2524_2, partial:m2524_7 -# 2526| r2526_1(glval) = VariableAddress[x] : -# 2526| r2526_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2526| v2526_3(void) = Call[~ClassWithDestructor] : func:r2526_2, this:r2526_1 -# 2526| m2526_4(unknown) = ^CallSideEffect : ~m2524_6 -# 2526| m2526_5(unknown) = Chi : total:m2524_6, partial:m2526_4 -# 2526| v2526_6(void) = ^IndirectReadSideEffect[-1] : &:r2526_1, m2524_8 -# 2526| m2526_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2526_1 -# 2526| m2526_8(ClassWithDestructor) = Chi : total:m2524_8, partial:m2526_7 -# 2530| r2530_1(glval) = VariableAddress[y] : -# 2530| r2530_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2530| v2530_3(void) = Call[~ClassWithDestructor] : func:r2530_2, this:r2530_1 -# 2530| m2530_4(unknown) = ^CallSideEffect : ~m2526_5 -# 2530| m2530_5(unknown) = Chi : total:m2526_5, partial:m2530_4 -# 2530| v2530_6(void) = ^IndirectReadSideEffect[-1] : &:r2530_1, m2522_8 -# 2530| m2530_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2530_1 -# 2530| m2530_8(ClassWithDestructor) = Chi : total:m2522_8, partial:m2530_7 -# 2525| v2525_1(void) = NoOp : +# 2524| Block 1 +# 2524| v2524_1(void) = NoOp : +# 2525| r2525_1(glval) = VariableAddress[x] : +# 2525| m2525_2(ClassWithDestructor) = Uninitialized[x] : &:r2525_1 +# 2525| r2525_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2525| v2525_4(void) = Call[ClassWithDestructor] : func:r2525_3, this:r2525_1 +# 2525| m2525_5(unknown) = ^CallSideEffect : ~m2523_6 +# 2525| m2525_6(unknown) = Chi : total:m2523_6, partial:m2525_5 +# 2525| m2525_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2525_1 +# 2525| m2525_8(ClassWithDestructor) = Chi : total:m2525_2, partial:m2525_7 +# 2527| r2527_1(glval) = VariableAddress[x] : +# 2527| r2527_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2527| v2527_3(void) = Call[~ClassWithDestructor] : func:r2527_2, this:r2527_1 +# 2527| m2527_4(unknown) = ^CallSideEffect : ~m2525_6 +# 2527| m2527_5(unknown) = Chi : total:m2525_6, partial:m2527_4 +# 2527| v2527_6(void) = ^IndirectReadSideEffect[-1] : &:r2527_1, m2525_8 +# 2527| m2527_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2527_1 +# 2527| m2527_8(ClassWithDestructor) = Chi : total:m2525_8, partial:m2527_7 +# 2531| r2531_1(glval) = VariableAddress[y] : +# 2531| r2531_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2531| v2531_3(void) = Call[~ClassWithDestructor] : func:r2531_2, this:r2531_1 +# 2531| m2531_4(unknown) = ^CallSideEffect : ~m2527_5 +# 2531| m2531_5(unknown) = Chi : total:m2527_5, partial:m2531_4 +# 2531| v2531_6(void) = ^IndirectReadSideEffect[-1] : &:r2531_1, m2523_8 +# 2531| m2531_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2531_1 +# 2531| m2531_8(ClassWithDestructor) = Chi : total:m2523_8, partial:m2531_7 +# 2526| v2526_1(void) = NoOp : #-----| Goto -> Block 3 -# 2527| Block 2 -# 2527| v2527_1(void) = NoOp : -# 2530| r2530_9(glval) = VariableAddress[y] : -# 2530| r2530_10(glval) = FunctionAddress[~ClassWithDestructor] : -# 2530| v2530_11(void) = Call[~ClassWithDestructor] : func:r2530_10, this:r2530_9 -# 2530| m2530_12(unknown) = ^CallSideEffect : ~m2522_6 -# 2530| m2530_13(unknown) = Chi : total:m2522_6, partial:m2530_12 -# 2530| v2530_14(void) = ^IndirectReadSideEffect[-1] : &:r2530_9, m2522_8 -# 2530| m2530_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2530_9 -# 2530| m2530_16(ClassWithDestructor) = Chi : total:m2522_8, partial:m2530_15 +# 2528| Block 2 # 2528| v2528_1(void) = NoOp : +# 2531| r2531_9(glval) = VariableAddress[y] : +# 2531| r2531_10(glval) = FunctionAddress[~ClassWithDestructor] : +# 2531| v2531_11(void) = Call[~ClassWithDestructor] : func:r2531_10, this:r2531_9 +# 2531| m2531_12(unknown) = ^CallSideEffect : ~m2523_6 +# 2531| m2531_13(unknown) = Chi : total:m2523_6, partial:m2531_12 +# 2531| v2531_14(void) = ^IndirectReadSideEffect[-1] : &:r2531_9, m2523_8 +# 2531| m2531_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2531_9 +# 2531| m2531_16(ClassWithDestructor) = Chi : total:m2523_8, partial:m2531_15 +# 2529| v2529_1(void) = NoOp : #-----| Goto -> Block 3 -# 2530| Block 3 -# 2530| m2530_17(unknown) = Phi : from 1:~m2530_5, from 2:~m2530_13 -# 2530| v2530_18(void) = NoOp : -# 2531| v2531_1(void) = NoOp : -# 2521| v2521_7(void) = ReturnVoid : -# 2521| v2521_8(void) = AliasedUse : ~m2530_17 -# 2521| v2521_9(void) = ExitFunction : +# 2531| Block 3 +# 2531| m2531_17(unknown) = Phi : from 1:~m2531_5, from 2:~m2531_13 +# 2531| v2531_18(void) = NoOp : +# 2532| v2532_1(void) = NoOp : +# 2522| v2522_7(void) = ReturnVoid : +# 2522| v2522_8(void) = AliasedUse : ~m2531_17 +# 2522| v2522_9(void) = ExitFunction : + +# 2534| void destructor_possibly_not_handled() +# 2534| Block 0 +# 2534| v2534_1(void) = EnterFunction : +# 2534| m2534_2(unknown) = AliasedDefinition : +# 2534| m2534_3(unknown) = InitializeNonLocal : +# 2534| m2534_4(unknown) = Chi : total:m2534_2, partial:m2534_3 +# 2535| r2535_1(glval) = VariableAddress[x] : +# 2535| m2535_2(ClassWithDestructor) = Uninitialized[x] : &:r2535_1 +# 2535| r2535_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2535| v2535_4(void) = Call[ClassWithDestructor] : func:r2535_3, this:r2535_1 +# 2535| m2535_5(unknown) = ^CallSideEffect : ~m2534_4 +# 2535| m2535_6(unknown) = Chi : total:m2534_4, partial:m2535_5 +# 2535| m2535_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2535_1 +# 2535| m2535_8(ClassWithDestructor) = Chi : total:m2535_2, partial:m2535_7 +# 2537| r2537_1(glval) = VariableAddress[#throw2537:5] : +# 2537| r2537_2(int) = Constant[42] : +# 2537| m2537_3(int) = Store[#throw2537:5] : &:r2537_1, r2537_2 +# 2537| v2537_4(void) = ThrowValue : &:r2537_1, m2537_3 +#-----| Exception -> Block 2 + +# 2534| Block 1 +# 2534| m2534_5(unknown) = Phi : from 3:~m2541_6, from 4:~m2541_14 +# 2534| v2534_6(void) = AliasedUse : ~m2534_5 +# 2534| v2534_7(void) = ExitFunction : + +# 2539| Block 2 +# 2539| v2539_1(void) = CatchByType[char] : +#-----| Exception -> Block 4 +#-----| Goto -> Block 3 + +# 2539| Block 3 +# 2539| r2539_2(glval) = VariableAddress[(unnamed parameter 0)] : +# 2539| m2539_3(char) = InitializeParameter[(unnamed parameter 0)] : &:r2539_2 +# 2539| v2539_4(void) = NoOp : +# 2541| v2541_1(void) = NoOp : +# 2541| r2541_2(glval) = VariableAddress[x] : +# 2541| r2541_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2541| v2541_4(void) = Call[~ClassWithDestructor] : func:r2541_3, this:r2541_2 +# 2541| m2541_5(unknown) = ^CallSideEffect : ~m2535_6 +# 2541| m2541_6(unknown) = Chi : total:m2535_6, partial:m2541_5 +# 2541| v2541_7(void) = ^IndirectReadSideEffect[-1] : &:r2541_2, m2535_8 +# 2541| m2541_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2541_2 +# 2541| m2541_9(ClassWithDestructor) = Chi : total:m2535_8, partial:m2541_8 +# 2534| v2534_8(void) = ReturnVoid : +#-----| Goto -> Block 1 + +# 2541| Block 4 +# 2541| r2541_10(glval) = VariableAddress[x] : +# 2541| r2541_11(glval) = FunctionAddress[~ClassWithDestructor] : +# 2541| v2541_12(void) = Call[~ClassWithDestructor] : func:r2541_11, this:r2541_10 +# 2541| m2541_13(unknown) = ^CallSideEffect : ~m2535_6 +# 2541| m2541_14(unknown) = Chi : total:m2535_6, partial:m2541_13 +# 2541| v2541_15(void) = ^IndirectReadSideEffect[-1] : &:r2541_10, m2535_8 +# 2541| m2541_16(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2541_10 +# 2541| m2541_17(ClassWithDestructor) = Chi : total:m2535_8, partial:m2541_16 +# 2534| v2534_9(void) = Unwind : +#-----| Goto -> Block 1 + +# 2545| void this_inconsistency(bool) +# 2545| Block 0 +# 2545| v2545_1(void) = EnterFunction : +# 2545| m2545_2(unknown) = AliasedDefinition : +# 2545| m2545_3(unknown) = InitializeNonLocal : +# 2545| m2545_4(unknown) = Chi : total:m2545_2, partial:m2545_3 +# 2545| r2545_5(glval) = VariableAddress[b] : +# 2545| m2545_6(bool) = InitializeParameter[b] : &:r2545_5 +# 2546| r2546_1(glval) = VariableAddress[a] : +# 2546| r2546_2(glval) = VariableAddress[#temp2546:38] : +# 2546| r2546_3(glval) = FunctionAddress[getClassWithDestructor] : +# 2546| r2546_4(ClassWithDestructor) = Call[getClassWithDestructor] : func:r2546_3 +# 2546| m2546_5(unknown) = ^CallSideEffect : ~m2545_4 +# 2546| m2546_6(unknown) = Chi : total:m2545_4, partial:m2546_5 +# 2546| m2546_7(ClassWithDestructor) = Store[#temp2546:38] : &:r2546_2, r2546_4 +# 2546| m2546_8(unknown) = Chi : total:m2546_6, partial:m2546_7 +# 2546| r2546_9(glval) = Convert : r2546_2 +# 2546| r2546_10(ClassWithDestructor &) = CopyValue : r2546_9 +# 2546| m2546_11(ClassWithDestructor &) = Store[a] : &:r2546_1, r2546_10 +# 2546| r2546_12(glval) = VariableAddress[a] : +# 2546| r2546_13(ClassWithDestructor &) = Load[a] : &:r2546_12, m2546_11 +# 2546| r2546_14(ClassWithDestructor) = CopyValue : r2546_13 +# 2546| r2546_15(glval) = FunctionAddress[operator bool] : +# 2546| r2546_16(bool) = Call[operator bool] : func:r2546_15, this:r2546_14 +# 2546| m2546_17(unknown) = ^CallSideEffect : ~m2546_8 +# 2546| m2546_18(unknown) = Chi : total:m2546_8, partial:m2546_17 +# 2546| v2546_19(void) = ^IndirectReadSideEffect[-1] : &:r2546_14, ~m2546_18 +# 2546| r2546_20(bool) = CopyValue : r2546_16 +# 2546| v2546_21(void) = ConditionalBranch : r2546_20 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2547| Block 1 +# 2547| v2547_1(void) = NoOp : +#-----| Goto -> Block 2 + +# 2547| Block 2 +# 2547| r2547_2(glval) = CopyValue : r2546_2 +# 2547| r2547_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2547| v2547_4(void) = Call[~ClassWithDestructor] : func:r2547_3, this:r2547_2 +# 2547| m2547_5(unknown) = ^CallSideEffect : ~m2546_18 +# 2547| m2547_6(unknown) = Chi : total:m2546_18, partial:m2547_5 +# 2547| v2547_7(void) = ^IndirectReadSideEffect[-1] : &:r2547_2, ~m2547_6 +# 2547| m2547_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2547_2 +# 2547| m2547_9(unknown) = Chi : total:m2547_6, partial:m2547_8 +# 2548| v2548_1(void) = NoOp : +# 2545| v2545_7(void) = ReturnVoid : +# 2545| v2545_8(void) = AliasedUse : ~m2547_6 +# 2545| v2545_9(void) = ExitFunction : + +# 2550| void constexpr_inconsistency(bool) +# 2550| Block 0 +# 2550| v2550_1(void) = EnterFunction : +# 2550| m2550_2(unknown) = AliasedDefinition : +# 2550| m2550_3(unknown) = InitializeNonLocal : +# 2550| m2550_4(unknown) = Chi : total:m2550_2, partial:m2550_3 +# 2550| r2550_5(glval) = VariableAddress[b] : +# 2550| m2550_6(bool) = InitializeParameter[b] : &:r2550_5 +# 2551| r2551_1(glval) = VariableAddress[a] : +# 2551| r2551_2(glval) = VariableAddress[#temp2551:48] : +# 2551| r2551_3(glval) = FunctionAddress[getClassWithDestructor] : +# 2551| r2551_4(ClassWithDestructor) = Call[getClassWithDestructor] : func:r2551_3 +# 2551| m2551_5(unknown) = ^CallSideEffect : ~m2550_4 +# 2551| m2551_6(unknown) = Chi : total:m2550_4, partial:m2551_5 +# 2551| m2551_7(ClassWithDestructor) = Store[#temp2551:48] : &:r2551_2, r2551_4 +# 2551| r2551_8(glval) = Convert : r2551_2 +# 2551| r2551_9(ClassWithDestructor &) = CopyValue : r2551_8 +# 2551| m2551_10(ClassWithDestructor &) = Store[a] : &:r2551_1, r2551_9 +# 2551| r2551_11(bool) = Constant[1] : +# 2551| v2551_12(void) = ConditionalBranch : r2551_11 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2552| Block 1 +# 2552| v2552_1(void) = NoOp : +# 2552| r2552_2(glval) = CopyValue : r2551_2 +# 2552| r2552_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2552| v2552_4(void) = Call[~ClassWithDestructor] : func:r2552_3, this:r2552_2 +# 2552| m2552_5(unknown) = ^CallSideEffect : ~m2551_6 +# 2552| m2552_6(unknown) = Chi : total:m2551_6, partial:m2552_5 +# 2552| v2552_7(void) = ^IndirectReadSideEffect[-1] : &:r2552_2, m2551_7 +# 2552| m2552_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2552_2 +# 2552| m2552_9(ClassWithDestructor) = Chi : total:m2551_7, partial:m2552_8 +# 2553| v2553_1(void) = NoOp : +# 2550| v2550_7(void) = ReturnVoid : +# 2550| v2550_8(void) = AliasedUse : ~m2552_6 +# 2550| v2550_9(void) = ExitFunction : + +# 2550| Block 2 +# 2550| v2550_10(void) = Unreached : perf-regression.cpp: # 6| void Big::Big() diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected index 8f472b49f27..5a0234a4cc4 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected @@ -27,6 +27,7 @@ invalidOverlap nonUniqueEnclosingIRFunction fieldAddressOnNonPointer thisArgumentIsNonPointer +| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected index 8f472b49f27..5a0234a4cc4 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected @@ -27,6 +27,7 @@ invalidOverlap nonUniqueEnclosingIRFunction fieldAddressOnNonPointer thisArgumentIsNonPointer +| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | diff --git a/cpp/ql/test/library-tests/ir/ir/ir.cpp b/cpp/ql/test/library-tests/ir/ir/ir.cpp index e6c8b90ea5c..3c6b1cdbbf0 100644 --- a/cpp/ql/test/library-tests/ir/ir/ir.cpp +++ b/cpp/ql/test/library-tests/ir/ir/ir.cpp @@ -2191,6 +2191,7 @@ public: void set_x(char y) { *x = y; } char get_x() { return *x; } + operator bool() const; }; constexpr bool initialization_with_destructor_bool = true; @@ -2530,4 +2531,25 @@ void destruction_in_switch_3(int c) { } } +void destructor_possibly_not_handled() { + ClassWithDestructor x; + try { + throw 42; + } + catch(char) { + } +} + +ClassWithDestructor getClassWithDestructor(); + +void this_inconsistency(bool b) { + if (const ClassWithDestructor& a = getClassWithDestructor()) + ; +} + +void constexpr_inconsistency(bool b) { + if constexpr (const ClassWithDestructor& a = getClassWithDestructor(); initialization_with_destructor_bool) + ; +} + // semmle-extractor-options: -std=c++20 --clang diff --git a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected index 11dd363ebc5..ac1034bfc6c 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected @@ -36,6 +36,7 @@ invalidOverlap nonUniqueEnclosingIRFunction fieldAddressOnNonPointer thisArgumentIsNonPointer +| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | diff --git a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected index 71796c4c39e..842aa7ad4b7 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -14108,2162 +14108,2171 @@ ir.cpp: # 2193| v2193_18(void) = AliasedUse : ~m? # 2193| v2193_19(void) = ExitFunction : -# 2196| bool initialization_with_destructor_bool -# 2196| Block 0 -# 2196| v2196_1(void) = EnterFunction : -# 2196| mu2196_2(unknown) = AliasedDefinition : -# 2196| r2196_3(glval) = VariableAddress[initialization_with_destructor_bool] : -# 2196| r2196_4(bool) = Constant[1] : -# 2196| mu2196_5(bool) = Store[initialization_with_destructor_bool] : &:r2196_3, r2196_4 -# 2196| v2196_6(void) = ReturnVoid : -# 2196| v2196_7(void) = AliasedUse : ~m? -# 2196| v2196_8(void) = ExitFunction : +# 2197| bool initialization_with_destructor_bool +# 2197| Block 0 +# 2197| v2197_1(void) = EnterFunction : +# 2197| mu2197_2(unknown) = AliasedDefinition : +# 2197| r2197_3(glval) = VariableAddress[initialization_with_destructor_bool] : +# 2197| r2197_4(bool) = Constant[1] : +# 2197| mu2197_5(bool) = Store[initialization_with_destructor_bool] : &:r2197_3, r2197_4 +# 2197| v2197_6(void) = ReturnVoid : +# 2197| v2197_7(void) = AliasedUse : ~m? +# 2197| v2197_8(void) = ExitFunction : -# 2198| void initialization_with_destructor(bool, char) -# 2198| Block 0 -# 2198| v2198_1(void) = EnterFunction : -# 2198| mu2198_2(unknown) = AliasedDefinition : -# 2198| mu2198_3(unknown) = InitializeNonLocal : -# 2198| r2198_4(glval) = VariableAddress[b] : -# 2198| mu2198_5(bool) = InitializeParameter[b] : &:r2198_4 -# 2198| r2198_6(glval) = VariableAddress[c] : -# 2198| mu2198_7(char) = InitializeParameter[c] : &:r2198_6 -# 2199| r2199_1(glval) = VariableAddress[x] : -# 2199| mu2199_2(ClassWithDestructor) = Uninitialized[x] : &:r2199_1 -# 2199| r2199_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2199| v2199_4(void) = Call[ClassWithDestructor] : func:r2199_3, this:r2199_1 -# 2199| mu2199_5(unknown) = ^CallSideEffect : ~m? -# 2199| mu2199_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2199_1 -# 2199| r2199_7(glval) = VariableAddress[b] : -# 2199| r2199_8(bool) = Load[b] : &:r2199_7, ~m? -# 2199| v2199_9(void) = ConditionalBranch : r2199_8 +# 2199| void initialization_with_destructor(bool, char) +# 2199| Block 0 +# 2199| v2199_1(void) = EnterFunction : +# 2199| mu2199_2(unknown) = AliasedDefinition : +# 2199| mu2199_3(unknown) = InitializeNonLocal : +# 2199| r2199_4(glval) = VariableAddress[b] : +# 2199| mu2199_5(bool) = InitializeParameter[b] : &:r2199_4 +# 2199| r2199_6(glval) = VariableAddress[c] : +# 2199| mu2199_7(char) = InitializeParameter[c] : &:r2199_6 +# 2200| r2200_1(glval) = VariableAddress[x] : +# 2200| mu2200_2(ClassWithDestructor) = Uninitialized[x] : &:r2200_1 +# 2200| r2200_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2200| v2200_4(void) = Call[ClassWithDestructor] : func:r2200_3, this:r2200_1 +# 2200| mu2200_5(unknown) = ^CallSideEffect : ~m? +# 2200| mu2200_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2200_1 +# 2200| r2200_7(glval) = VariableAddress[b] : +# 2200| r2200_8(bool) = Load[b] : &:r2200_7, ~m? +# 2200| v2200_9(void) = ConditionalBranch : r2200_8 #-----| False -> Block 3 #-----| True -> Block 2 -# 2198| Block 1 -# 2198| v2198_8(void) = ReturnVoid : -# 2198| v2198_9(void) = AliasedUse : ~m? -# 2198| v2198_10(void) = ExitFunction : +# 2199| Block 1 +# 2199| v2199_8(void) = ReturnVoid : +# 2199| v2199_9(void) = AliasedUse : ~m? +# 2199| v2199_10(void) = ExitFunction : -# 2200| Block 2 -# 2200| r2200_1(glval) = VariableAddress[x] : -# 2200| r2200_2(glval) = FunctionAddress[set_x] : -# 2200| r2200_3(char) = Constant[97] : -# 2200| v2200_4(void) = Call[set_x] : func:r2200_2, this:r2200_1, 0:r2200_3 -# 2200| mu2200_5(unknown) = ^CallSideEffect : ~m? -# 2200| v2200_6(void) = ^IndirectReadSideEffect[-1] : &:r2200_1, ~m? -# 2200| mu2200_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2200_1 -# 2200| r2200_8(glval) = VariableAddress[x] : -# 2200| r2200_9(glval) = FunctionAddress[~ClassWithDestructor] : -# 2200| v2200_10(void) = Call[~ClassWithDestructor] : func:r2200_9, this:r2200_8 -# 2200| mu2200_11(unknown) = ^CallSideEffect : ~m? -# 2200| v2200_12(void) = ^IndirectReadSideEffect[-1] : &:r2200_8, ~m? -# 2200| mu2200_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2200_8 +# 2201| Block 2 +# 2201| r2201_1(glval) = VariableAddress[x] : +# 2201| r2201_2(glval) = FunctionAddress[set_x] : +# 2201| r2201_3(char) = Constant[97] : +# 2201| v2201_4(void) = Call[set_x] : func:r2201_2, this:r2201_1, 0:r2201_3 +# 2201| mu2201_5(unknown) = ^CallSideEffect : ~m? +# 2201| v2201_6(void) = ^IndirectReadSideEffect[-1] : &:r2201_1, ~m? +# 2201| mu2201_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2201_1 #-----| Goto -> Block 3 -# 2202| Block 3 -# 2202| r2202_1(glval) = VariableAddress[x] : -# 2202| mu2202_2(ClassWithDestructor) = Uninitialized[x] : &:r2202_1 -# 2202| r2202_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2202| v2202_4(void) = Call[ClassWithDestructor] : func:r2202_3, this:r2202_1 -# 2202| mu2202_5(unknown) = ^CallSideEffect : ~m? -# 2202| mu2202_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2202_1 -# 2202| r2202_7(bool) = Constant[1] : -# 2202| v2202_8(void) = ConditionalBranch : r2202_7 -#-----| False -> Block 6 +# 2201| Block 3 +# 2201| r2201_8(glval) = VariableAddress[x] : +# 2201| r2201_9(glval) = FunctionAddress[~ClassWithDestructor] : +# 2201| v2201_10(void) = Call[~ClassWithDestructor] : func:r2201_9, this:r2201_8 +# 2201| mu2201_11(unknown) = ^CallSideEffect : ~m? +# 2201| v2201_12(void) = ^IndirectReadSideEffect[-1] : &:r2201_8, ~m? +# 2201| mu2201_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2201_8 +# 2203| r2203_1(glval) = VariableAddress[x] : +# 2203| mu2203_2(ClassWithDestructor) = Uninitialized[x] : &:r2203_1 +# 2203| r2203_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2203| v2203_4(void) = Call[ClassWithDestructor] : func:r2203_3, this:r2203_1 +# 2203| mu2203_5(unknown) = ^CallSideEffect : ~m? +# 2203| mu2203_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2203_1 +# 2203| r2203_7(bool) = Constant[1] : +# 2203| v2203_8(void) = ConditionalBranch : r2203_7 +#-----| False -> Block 5 #-----| True -> Block 4 -# 2203| Block 4 -# 2203| r2203_1(glval) = VariableAddress[x] : -# 2203| r2203_2(glval) = FunctionAddress[set_x] : -# 2203| r2203_3(char) = Constant[97] : -# 2203| v2203_4(void) = Call[set_x] : func:r2203_2, this:r2203_1, 0:r2203_3 -# 2203| mu2203_5(unknown) = ^CallSideEffect : ~m? -# 2203| v2203_6(void) = ^IndirectReadSideEffect[-1] : &:r2203_1, ~m? -# 2203| mu2203_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2203_1 -#-----| Goto -> Block 6 +# 2204| Block 4 +# 2204| r2204_1(glval) = VariableAddress[x] : +# 2204| r2204_2(glval) = FunctionAddress[set_x] : +# 2204| r2204_3(char) = Constant[97] : +# 2204| v2204_4(void) = Call[set_x] : func:r2204_2, this:r2204_1, 0:r2204_3 +# 2204| mu2204_5(unknown) = ^CallSideEffect : ~m? +# 2204| v2204_6(void) = ^IndirectReadSideEffect[-1] : &:r2204_1, ~m? +# 2204| mu2204_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2204_1 +#-----| Goto -> Block 5 -# 2203| Block 5 -# 2203| r2203_8(glval) = VariableAddress[x] : -# 2203| r2203_9(glval) = FunctionAddress[~ClassWithDestructor] : -# 2203| v2203_10(void) = Call[~ClassWithDestructor] : func:r2203_9, this:r2203_8 -# 2203| mu2203_11(unknown) = ^CallSideEffect : ~m? -# 2203| v2203_12(void) = ^IndirectReadSideEffect[-1] : &:r2203_8, ~m? -# 2203| mu2203_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2203_8 -#-----| Goto -> Block 6 +# 2204| Block 5 +# 2204| r2204_8(glval) = VariableAddress[x] : +# 2204| r2204_9(glval) = FunctionAddress[~ClassWithDestructor] : +# 2204| v2204_10(void) = Call[~ClassWithDestructor] : func:r2204_9, this:r2204_8 +# 2204| mu2204_11(unknown) = ^CallSideEffect : ~m? +# 2204| v2204_12(void) = ^IndirectReadSideEffect[-1] : &:r2204_8, ~m? +# 2204| mu2204_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2204_8 +# 2206| r2206_1(glval) = VariableAddress[x] : +# 2206| mu2206_2(ClassWithDestructor) = Uninitialized[x] : &:r2206_1 +# 2206| r2206_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2206| v2206_4(void) = Call[ClassWithDestructor] : func:r2206_3, this:r2206_1 +# 2206| mu2206_5(unknown) = ^CallSideEffect : ~m? +# 2206| mu2206_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2206_1 +# 2206| r2206_7(glval) = VariableAddress[c] : +# 2206| r2206_8(char) = Load[c] : &:r2206_7, ~m? +# 2206| r2206_9(int) = Convert : r2206_8 +# 2206| v2206_10(void) = Switch : r2206_9 +#-----| Case[97] -> Block 6 +#-----| Default -> Block 7 -# 2205| Block 6 -# 2205| r2205_1(glval) = VariableAddress[x] : -# 2205| mu2205_2(ClassWithDestructor) = Uninitialized[x] : &:r2205_1 -# 2205| r2205_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2205| v2205_4(void) = Call[ClassWithDestructor] : func:r2205_3, this:r2205_1 -# 2205| mu2205_5(unknown) = ^CallSideEffect : ~m? -# 2205| mu2205_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2205_1 -# 2205| r2205_7(glval) = VariableAddress[c] : -# 2205| r2205_8(char) = Load[c] : &:r2205_7, ~m? -# 2205| r2205_9(int) = Convert : r2205_8 -# 2205| v2205_10(void) = Switch : r2205_9 -#-----| Case[97] -> Block 7 -#-----| Default -> Block 8 - -# 2206| Block 7 -# 2206| v2206_1(void) = NoOp : -# 2207| r2207_1(glval) = VariableAddress[x] : -# 2207| r2207_2(glval) = FunctionAddress[set_x] : -# 2207| r2207_3(char) = Constant[97] : -# 2207| v2207_4(void) = Call[set_x] : func:r2207_2, this:r2207_1, 0:r2207_3 -# 2207| mu2207_5(unknown) = ^CallSideEffect : ~m? -# 2207| v2207_6(void) = ^IndirectReadSideEffect[-1] : &:r2207_1, ~m? -# 2207| mu2207_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2207_1 -# 2212| r2212_1(glval) = VariableAddress[x] : -# 2212| r2212_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2212| v2212_3(void) = Call[~ClassWithDestructor] : func:r2212_2, this:r2212_1 -# 2212| mu2212_4(unknown) = ^CallSideEffect : ~m? -# 2212| v2212_5(void) = ^IndirectReadSideEffect[-1] : &:r2212_1, ~m? -# 2212| mu2212_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2212_1 -# 2208| v2208_1(void) = NoOp : -#-----| Goto -> Block 10 - -# 2209| Block 8 +# 2207| Block 6 +# 2207| v2207_1(void) = NoOp : +# 2208| r2208_1(glval) = VariableAddress[x] : +# 2208| r2208_2(glval) = FunctionAddress[set_x] : +# 2208| r2208_3(char) = Constant[97] : +# 2208| v2208_4(void) = Call[set_x] : func:r2208_2, this:r2208_1, 0:r2208_3 +# 2208| mu2208_5(unknown) = ^CallSideEffect : ~m? +# 2208| v2208_6(void) = ^IndirectReadSideEffect[-1] : &:r2208_1, ~m? +# 2208| mu2208_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2208_1 +# 2213| r2213_1(glval) = VariableAddress[x] : +# 2213| r2213_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2213| v2213_3(void) = Call[~ClassWithDestructor] : func:r2213_2, this:r2213_1 +# 2213| mu2213_4(unknown) = ^CallSideEffect : ~m? +# 2213| v2213_5(void) = ^IndirectReadSideEffect[-1] : &:r2213_1, ~m? +# 2213| mu2213_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2213_1 # 2209| v2209_1(void) = NoOp : -# 2210| r2210_1(glval) = VariableAddress[x] : -# 2210| r2210_2(glval) = FunctionAddress[set_x] : -# 2210| r2210_3(char) = Constant[98] : -# 2210| v2210_4(void) = Call[set_x] : func:r2210_2, this:r2210_1, 0:r2210_3 -# 2210| mu2210_5(unknown) = ^CallSideEffect : ~m? -# 2210| v2210_6(void) = ^IndirectReadSideEffect[-1] : &:r2210_1, ~m? -# 2210| mu2210_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2210_1 -# 2212| r2212_7(glval) = VariableAddress[x] : -# 2212| r2212_8(glval) = FunctionAddress[~ClassWithDestructor] : -# 2212| v2212_9(void) = Call[~ClassWithDestructor] : func:r2212_8, this:r2212_7 -# 2212| mu2212_10(unknown) = ^CallSideEffect : ~m? -# 2212| v2212_11(void) = ^IndirectReadSideEffect[-1] : &:r2212_7, ~m? -# 2212| mu2212_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2212_7 -# 2211| v2211_1(void) = NoOp : -#-----| Goto -> Block 10 +#-----| Goto -> Block 9 -# 2212| Block 9 -# 2212| r2212_13(glval) = VariableAddress[x] : -# 2212| r2212_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2212| v2212_15(void) = Call[~ClassWithDestructor] : func:r2212_14, this:r2212_13 -# 2212| mu2212_16(unknown) = ^CallSideEffect : ~m? -# 2212| v2212_17(void) = ^IndirectReadSideEffect[-1] : &:r2212_13, ~m? -# 2212| mu2212_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2212_13 -#-----| Goto -> Block 10 +# 2210| Block 7 +# 2210| v2210_1(void) = NoOp : +# 2211| r2211_1(glval) = VariableAddress[x] : +# 2211| r2211_2(glval) = FunctionAddress[set_x] : +# 2211| r2211_3(char) = Constant[98] : +# 2211| v2211_4(void) = Call[set_x] : func:r2211_2, this:r2211_1, 0:r2211_3 +# 2211| mu2211_5(unknown) = ^CallSideEffect : ~m? +# 2211| v2211_6(void) = ^IndirectReadSideEffect[-1] : &:r2211_1, ~m? +# 2211| mu2211_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2211_1 +# 2213| r2213_7(glval) = VariableAddress[x] : +# 2213| r2213_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2213| v2213_9(void) = Call[~ClassWithDestructor] : func:r2213_8, this:r2213_7 +# 2213| mu2213_10(unknown) = ^CallSideEffect : ~m? +# 2213| v2213_11(void) = ^IndirectReadSideEffect[-1] : &:r2213_7, ~m? +# 2213| mu2213_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2213_7 +# 2212| v2212_1(void) = NoOp : +#-----| Goto -> Block 9 -# 2212| Block 10 -# 2212| v2212_19(void) = NoOp : -# 2214| r2214_1(glval) = VariableAddress[x] : -# 2214| mu2214_2(ClassWithDestructor) = Uninitialized[x] : &:r2214_1 -# 2214| r2214_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2214| v2214_4(void) = Call[ClassWithDestructor] : func:r2214_3, this:r2214_1 -# 2214| mu2214_5(unknown) = ^CallSideEffect : ~m? -# 2214| mu2214_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2214_1 -# 2215| r2215_1(glval>) = VariableAddress[ys] : -# 2215| mu2215_2(vector) = Uninitialized[ys] : &:r2215_1 -# 2215| r2215_3(glval) = FunctionAddress[vector] : -# 2215| r2215_4(glval) = VariableAddress[#temp2215:45] : -# 2215| r2215_5(glval) = VariableAddress[x] : -# 2215| r2215_6(ClassWithDestructor) = Load[x] : &:r2215_5, ~m? -# 2215| mu2215_7(ClassWithDestructor) = Store[#temp2215:45] : &:r2215_4, r2215_6 -# 2215| r2215_8(ClassWithDestructor) = Load[#temp2215:45] : &:r2215_4, ~m? -# 2215| v2215_9(void) = Call[vector] : func:r2215_3, this:r2215_1, 0:r2215_8 -# 2215| mu2215_10(unknown) = ^CallSideEffect : ~m? -# 2215| mu2215_11(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2215_1 -# 2215| r2215_12(glval) = CopyValue : r2215_4 -# 2215| r2215_13(glval) = FunctionAddress[~ClassWithDestructor] : -# 2215| v2215_14(void) = Call[~ClassWithDestructor] : func:r2215_13, this:r2215_12 -# 2215| mu2215_15(unknown) = ^CallSideEffect : ~m? -# 2215| v2215_16(void) = ^IndirectReadSideEffect[-1] : &:r2215_12, ~m? -# 2215| mu2215_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2215_12 -# 2215| r2215_18(glval &>) = VariableAddress[(__range)] : -# 2215| r2215_19(glval>) = VariableAddress[ys] : -# 2215| r2215_20(vector &) = CopyValue : r2215_19 -# 2215| mu2215_21(vector &) = Store[(__range)] : &:r2215_18, r2215_20 -# 2215| r2215_22(glval>) = VariableAddress[(__begin)] : -# 2215| r2215_23(glval &>) = VariableAddress[(__range)] : -# 2215| r2215_24(vector &) = Load[(__range)] : &:r2215_23, ~m? -#-----| r0_1(glval>) = CopyValue : r2215_24 +# 2213| Block 8 +# 2213| r2213_13(glval) = VariableAddress[x] : +# 2213| r2213_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2213| v2213_15(void) = Call[~ClassWithDestructor] : func:r2213_14, this:r2213_13 +# 2213| mu2213_16(unknown) = ^CallSideEffect : ~m? +# 2213| v2213_17(void) = ^IndirectReadSideEffect[-1] : &:r2213_13, ~m? +# 2213| mu2213_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2213_13 +#-----| Goto -> Block 9 + +# 2213| Block 9 +# 2213| v2213_19(void) = NoOp : +# 2215| r2215_1(glval) = VariableAddress[x] : +# 2215| mu2215_2(ClassWithDestructor) = Uninitialized[x] : &:r2215_1 +# 2215| r2215_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2215| v2215_4(void) = Call[ClassWithDestructor] : func:r2215_3, this:r2215_1 +# 2215| mu2215_5(unknown) = ^CallSideEffect : ~m? +# 2215| mu2215_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2215_1 +# 2216| r2216_1(glval>) = VariableAddress[ys] : +# 2216| mu2216_2(vector) = Uninitialized[ys] : &:r2216_1 +# 2216| r2216_3(glval) = FunctionAddress[vector] : +# 2216| r2216_4(glval) = VariableAddress[#temp2216:45] : +# 2216| r2216_5(glval) = VariableAddress[x] : +# 2216| r2216_6(ClassWithDestructor) = Load[x] : &:r2216_5, ~m? +# 2216| mu2216_7(ClassWithDestructor) = Store[#temp2216:45] : &:r2216_4, r2216_6 +# 2216| r2216_8(ClassWithDestructor) = Load[#temp2216:45] : &:r2216_4, ~m? +# 2216| v2216_9(void) = Call[vector] : func:r2216_3, this:r2216_1, 0:r2216_8 +# 2216| mu2216_10(unknown) = ^CallSideEffect : ~m? +# 2216| mu2216_11(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2216_1 +# 2216| r2216_12(glval) = CopyValue : r2216_4 +# 2216| r2216_13(glval) = FunctionAddress[~ClassWithDestructor] : +# 2216| v2216_14(void) = Call[~ClassWithDestructor] : func:r2216_13, this:r2216_12 +# 2216| mu2216_15(unknown) = ^CallSideEffect : ~m? +# 2216| v2216_16(void) = ^IndirectReadSideEffect[-1] : &:r2216_12, ~m? +# 2216| mu2216_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2216_12 +# 2216| r2216_18(glval &>) = VariableAddress[(__range)] : +# 2216| r2216_19(glval>) = VariableAddress[ys] : +# 2216| r2216_20(vector &) = CopyValue : r2216_19 +# 2216| mu2216_21(vector &) = Store[(__range)] : &:r2216_18, r2216_20 +# 2216| r2216_22(glval>) = VariableAddress[(__begin)] : +# 2216| r2216_23(glval &>) = VariableAddress[(__range)] : +# 2216| r2216_24(vector &) = Load[(__range)] : &:r2216_23, ~m? +#-----| r0_1(glval>) = CopyValue : r2216_24 #-----| r0_2(glval>) = Convert : r0_1 -# 2215| r2215_25(glval) = FunctionAddress[begin] : -# 2215| r2215_26(iterator) = Call[begin] : func:r2215_25, this:r0_2 +# 2216| r2216_25(glval) = FunctionAddress[begin] : +# 2216| r2216_26(iterator) = Call[begin] : func:r2216_25, this:r0_2 #-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m? -# 2215| mu2215_27(iterator) = Store[(__begin)] : &:r2215_22, r2215_26 -# 2215| r2215_28(glval>) = VariableAddress[(__end)] : -# 2215| r2215_29(glval &>) = VariableAddress[(__range)] : -# 2215| r2215_30(vector &) = Load[(__range)] : &:r2215_29, ~m? -#-----| r0_4(glval>) = CopyValue : r2215_30 +# 2216| mu2216_27(iterator) = Store[(__begin)] : &:r2216_22, r2216_26 +# 2216| r2216_28(glval>) = VariableAddress[(__end)] : +# 2216| r2216_29(glval &>) = VariableAddress[(__range)] : +# 2216| r2216_30(vector &) = Load[(__range)] : &:r2216_29, ~m? +#-----| r0_4(glval>) = CopyValue : r2216_30 #-----| r0_5(glval>) = Convert : r0_4 -# 2215| r2215_31(glval) = FunctionAddress[end] : -# 2215| r2215_32(iterator) = Call[end] : func:r2215_31, this:r0_5 +# 2216| r2216_31(glval) = FunctionAddress[end] : +# 2216| r2216_32(iterator) = Call[end] : func:r2216_31, this:r0_5 #-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? -# 2215| mu2215_33(iterator) = Store[(__end)] : &:r2215_28, r2215_32 -#-----| Goto -> Block 11 +# 2216| mu2216_33(iterator) = Store[(__end)] : &:r2216_28, r2216_32 +#-----| Goto -> Block 10 -# 2215| Block 11 -# 2215| r2215_34(glval>) = VariableAddress[(__begin)] : -#-----| r0_7(glval>) = Convert : r2215_34 -# 2215| r2215_35(glval) = FunctionAddress[operator!=] : +# 2216| Block 10 +# 2216| r2216_34(glval>) = VariableAddress[(__begin)] : +#-----| r0_7(glval>) = Convert : r2216_34 +# 2216| r2216_35(glval) = FunctionAddress[operator!=] : #-----| r0_8(glval>) = VariableAddress[#temp0:0] : #-----| mu0_9(iterator) = Uninitialized[#temp0:0] : &:r0_8 -# 2215| r2215_36(glval) = FunctionAddress[iterator] : -# 2215| r2215_37(glval>) = VariableAddress[(__end)] : -#-----| r0_10(glval>) = Convert : r2215_37 +# 2216| r2216_36(glval) = FunctionAddress[iterator] : +# 2216| r2216_37(glval>) = VariableAddress[(__end)] : +#-----| r0_10(glval>) = Convert : r2216_37 #-----| r0_11(iterator &) = CopyValue : r0_10 -# 2215| v2215_38(void) = Call[iterator] : func:r2215_36, this:r0_8, 0:r0_11 -# 2215| mu2215_39(unknown) = ^CallSideEffect : ~m? +# 2216| v2216_38(void) = Call[iterator] : func:r2216_36, this:r0_8, 0:r0_11 +# 2216| mu2216_39(unknown) = ^CallSideEffect : ~m? #-----| v0_12(void) = ^BufferReadSideEffect[0] : &:r0_11, ~m? -# 2215| mu2215_40(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 +# 2216| mu2216_40(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 #-----| r0_13(iterator) = Load[#temp0:0] : &:r0_8, ~m? -# 2215| r2215_41(bool) = Call[operator!=] : func:r2215_35, this:r0_7, 0:r0_13 +# 2216| r2216_41(bool) = Call[operator!=] : func:r2216_35, this:r0_7, 0:r0_13 #-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_7, ~m? -# 2215| v2215_42(void) = ConditionalBranch : r2215_41 -#-----| False -> Block 13 -#-----| True -> Block 12 +# 2216| v2216_42(void) = ConditionalBranch : r2216_41 +#-----| False -> Block 12 +#-----| True -> Block 11 -# 2215| Block 12 -# 2215| r2215_43(glval) = VariableAddress[y] : -# 2215| r2215_44(glval>) = VariableAddress[(__begin)] : -#-----| r0_15(glval>) = Convert : r2215_44 -# 2215| r2215_45(glval) = FunctionAddress[operator*] : -# 2215| r2215_46(ClassWithDestructor &) = Call[operator*] : func:r2215_45, this:r0_15 +# 2216| Block 11 +# 2216| r2216_43(glval) = VariableAddress[y] : +# 2216| r2216_44(glval>) = VariableAddress[(__begin)] : +#-----| r0_15(glval>) = Convert : r2216_44 +# 2216| r2216_45(glval) = FunctionAddress[operator*] : +# 2216| r2216_46(ClassWithDestructor &) = Call[operator*] : func:r2216_45, this:r0_15 #-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m? -# 2215| r2215_47(ClassWithDestructor) = Load[?] : &:r2215_46, ~m? -# 2215| mu2215_48(ClassWithDestructor) = Store[y] : &:r2215_43, r2215_47 -# 2216| r2216_1(glval) = VariableAddress[y] : -# 2216| r2216_2(glval) = FunctionAddress[set_x] : -# 2216| r2216_3(char) = Constant[97] : -# 2216| v2216_4(void) = Call[set_x] : func:r2216_2, this:r2216_1, 0:r2216_3 -# 2216| mu2216_5(unknown) = ^CallSideEffect : ~m? -# 2216| v2216_6(void) = ^IndirectReadSideEffect[-1] : &:r2216_1, ~m? -# 2216| mu2216_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2216_1 -# 2215| r2215_49(glval>) = VariableAddress[(__begin)] : -# 2215| r2215_50(glval) = FunctionAddress[operator++] : -# 2215| r2215_51(iterator &) = Call[operator++] : func:r2215_50, this:r2215_49 -# 2215| v2215_52(void) = ^IndirectReadSideEffect[-1] : &:r2215_49, ~m? -# 2215| mu2215_53(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2215_49 -# 2215| r2215_54(glval) = VariableAddress[y] : -# 2215| r2215_55(glval) = FunctionAddress[~ClassWithDestructor] : -# 2215| v2215_56(void) = Call[~ClassWithDestructor] : func:r2215_55, this:r2215_54 -# 2215| mu2215_57(unknown) = ^CallSideEffect : ~m? -# 2215| v2215_58(void) = ^IndirectReadSideEffect[-1] : &:r2215_54, ~m? -# 2215| mu2215_59(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2215_54 -# 2215| r2215_60(glval>) = CopyValue : r2215_51 -#-----| Goto (back edge) -> Block 11 +# 2216| r2216_47(ClassWithDestructor) = Load[?] : &:r2216_46, ~m? +# 2216| mu2216_48(ClassWithDestructor) = Store[y] : &:r2216_43, r2216_47 +# 2217| r2217_1(glval) = VariableAddress[y] : +# 2217| r2217_2(glval) = FunctionAddress[set_x] : +# 2217| r2217_3(char) = Constant[97] : +# 2217| v2217_4(void) = Call[set_x] : func:r2217_2, this:r2217_1, 0:r2217_3 +# 2217| mu2217_5(unknown) = ^CallSideEffect : ~m? +# 2217| v2217_6(void) = ^IndirectReadSideEffect[-1] : &:r2217_1, ~m? +# 2217| mu2217_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2217_1 +# 2216| r2216_49(glval>) = VariableAddress[(__begin)] : +# 2216| r2216_50(glval) = FunctionAddress[operator++] : +# 2216| r2216_51(iterator &) = Call[operator++] : func:r2216_50, this:r2216_49 +# 2216| v2216_52(void) = ^IndirectReadSideEffect[-1] : &:r2216_49, ~m? +# 2216| mu2216_53(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2216_49 +# 2216| r2216_54(glval) = VariableAddress[y] : +# 2216| r2216_55(glval) = FunctionAddress[~ClassWithDestructor] : +# 2216| v2216_56(void) = Call[~ClassWithDestructor] : func:r2216_55, this:r2216_54 +# 2216| mu2216_57(unknown) = ^CallSideEffect : ~m? +# 2216| v2216_58(void) = ^IndirectReadSideEffect[-1] : &:r2216_54, ~m? +# 2216| mu2216_59(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2216_54 +# 2216| r2216_60(glval>) = CopyValue : r2216_51 +#-----| Goto (back edge) -> Block 10 -# 2215| Block 13 -# 2215| r2215_61(glval>) = VariableAddress[ys] : -# 2215| r2215_62(glval) = FunctionAddress[~vector] : -# 2215| v2215_63(void) = Call[~vector] : func:r2215_62, this:r2215_61 -# 2215| mu2215_64(unknown) = ^CallSideEffect : ~m? -# 2215| v2215_65(void) = ^IndirectReadSideEffect[-1] : &:r2215_61, ~m? -# 2215| mu2215_66(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2215_61 -# 2218| r2218_1(glval>) = VariableAddress[ys] : -# 2218| mu2218_2(vector) = Uninitialized[ys] : &:r2218_1 -# 2218| r2218_3(glval) = FunctionAddress[vector] : -# 2218| r2218_4(glval) = VariableAddress[#temp2218:45] : -# 2218| r2218_5(glval) = VariableAddress[x] : -# 2218| r2218_6(ClassWithDestructor) = Load[x] : &:r2218_5, ~m? -# 2218| mu2218_7(ClassWithDestructor) = Store[#temp2218:45] : &:r2218_4, r2218_6 -# 2218| r2218_8(ClassWithDestructor) = Load[#temp2218:45] : &:r2218_4, ~m? -# 2218| v2218_9(void) = Call[vector] : func:r2218_3, this:r2218_1, 0:r2218_8 -# 2218| mu2218_10(unknown) = ^CallSideEffect : ~m? -# 2218| mu2218_11(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2218_1 -# 2218| r2218_12(glval) = CopyValue : r2218_4 -# 2218| r2218_13(glval) = FunctionAddress[~ClassWithDestructor] : -# 2218| v2218_14(void) = Call[~ClassWithDestructor] : func:r2218_13, this:r2218_12 -# 2218| mu2218_15(unknown) = ^CallSideEffect : ~m? -# 2218| v2218_16(void) = ^IndirectReadSideEffect[-1] : &:r2218_12, ~m? -# 2218| mu2218_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2218_12 -# 2218| r2218_18(glval &>) = VariableAddress[(__range)] : -# 2218| r2218_19(glval>) = VariableAddress[ys] : -# 2218| r2218_20(vector &) = CopyValue : r2218_19 -# 2218| mu2218_21(vector &) = Store[(__range)] : &:r2218_18, r2218_20 -# 2218| r2218_22(glval>) = VariableAddress[(__begin)] : -# 2218| r2218_23(glval &>) = VariableAddress[(__range)] : -# 2218| r2218_24(vector &) = Load[(__range)] : &:r2218_23, ~m? -#-----| r0_17(glval>) = CopyValue : r2218_24 +# 2216| Block 12 +# 2216| r2216_61(glval>) = VariableAddress[ys] : +# 2216| r2216_62(glval) = FunctionAddress[~vector] : +# 2216| v2216_63(void) = Call[~vector] : func:r2216_62, this:r2216_61 +# 2216| mu2216_64(unknown) = ^CallSideEffect : ~m? +# 2216| v2216_65(void) = ^IndirectReadSideEffect[-1] : &:r2216_61, ~m? +# 2216| mu2216_66(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2216_61 +# 2219| r2219_1(glval>) = VariableAddress[ys] : +# 2219| mu2219_2(vector) = Uninitialized[ys] : &:r2219_1 +# 2219| r2219_3(glval) = FunctionAddress[vector] : +# 2219| r2219_4(glval) = VariableAddress[#temp2219:45] : +# 2219| r2219_5(glval) = VariableAddress[x] : +# 2219| r2219_6(ClassWithDestructor) = Load[x] : &:r2219_5, ~m? +# 2219| mu2219_7(ClassWithDestructor) = Store[#temp2219:45] : &:r2219_4, r2219_6 +# 2219| r2219_8(ClassWithDestructor) = Load[#temp2219:45] : &:r2219_4, ~m? +# 2219| v2219_9(void) = Call[vector] : func:r2219_3, this:r2219_1, 0:r2219_8 +# 2219| mu2219_10(unknown) = ^CallSideEffect : ~m? +# 2219| mu2219_11(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2219_1 +# 2219| r2219_12(glval) = CopyValue : r2219_4 +# 2219| r2219_13(glval) = FunctionAddress[~ClassWithDestructor] : +# 2219| v2219_14(void) = Call[~ClassWithDestructor] : func:r2219_13, this:r2219_12 +# 2219| mu2219_15(unknown) = ^CallSideEffect : ~m? +# 2219| v2219_16(void) = ^IndirectReadSideEffect[-1] : &:r2219_12, ~m? +# 2219| mu2219_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2219_12 +# 2219| r2219_18(glval &>) = VariableAddress[(__range)] : +# 2219| r2219_19(glval>) = VariableAddress[ys] : +# 2219| r2219_20(vector &) = CopyValue : r2219_19 +# 2219| mu2219_21(vector &) = Store[(__range)] : &:r2219_18, r2219_20 +# 2219| r2219_22(glval>) = VariableAddress[(__begin)] : +# 2219| r2219_23(glval &>) = VariableAddress[(__range)] : +# 2219| r2219_24(vector &) = Load[(__range)] : &:r2219_23, ~m? +#-----| r0_17(glval>) = CopyValue : r2219_24 #-----| r0_18(glval>) = Convert : r0_17 -# 2218| r2218_25(glval) = FunctionAddress[begin] : -# 2218| r2218_26(iterator) = Call[begin] : func:r2218_25, this:r0_18 +# 2219| r2219_25(glval) = FunctionAddress[begin] : +# 2219| r2219_26(iterator) = Call[begin] : func:r2219_25, this:r0_18 #-----| v0_19(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~m? -# 2218| mu2218_27(iterator) = Store[(__begin)] : &:r2218_22, r2218_26 -# 2218| r2218_28(glval>) = VariableAddress[(__end)] : -# 2218| r2218_29(glval &>) = VariableAddress[(__range)] : -# 2218| r2218_30(vector &) = Load[(__range)] : &:r2218_29, ~m? -#-----| r0_20(glval>) = CopyValue : r2218_30 +# 2219| mu2219_27(iterator) = Store[(__begin)] : &:r2219_22, r2219_26 +# 2219| r2219_28(glval>) = VariableAddress[(__end)] : +# 2219| r2219_29(glval &>) = VariableAddress[(__range)] : +# 2219| r2219_30(vector &) = Load[(__range)] : &:r2219_29, ~m? +#-----| r0_20(glval>) = CopyValue : r2219_30 #-----| r0_21(glval>) = Convert : r0_20 -# 2218| r2218_31(glval) = FunctionAddress[end] : -# 2218| r2218_32(iterator) = Call[end] : func:r2218_31, this:r0_21 +# 2219| r2219_31(glval) = FunctionAddress[end] : +# 2219| r2219_32(iterator) = Call[end] : func:r2219_31, this:r0_21 #-----| v0_22(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m? -# 2218| mu2218_33(iterator) = Store[(__end)] : &:r2218_28, r2218_32 -#-----| Goto -> Block 14 +# 2219| mu2219_33(iterator) = Store[(__end)] : &:r2219_28, r2219_32 +#-----| Goto -> Block 13 -# 2218| Block 14 -# 2218| r2218_34(glval>) = VariableAddress[(__begin)] : -#-----| r0_23(glval>) = Convert : r2218_34 -# 2218| r2218_35(glval) = FunctionAddress[operator!=] : +# 2219| Block 13 +# 2219| r2219_34(glval>) = VariableAddress[(__begin)] : +#-----| r0_23(glval>) = Convert : r2219_34 +# 2219| r2219_35(glval) = FunctionAddress[operator!=] : #-----| r0_24(glval>) = VariableAddress[#temp0:0] : #-----| mu0_25(iterator) = Uninitialized[#temp0:0] : &:r0_24 -# 2218| r2218_36(glval) = FunctionAddress[iterator] : -# 2218| r2218_37(glval>) = VariableAddress[(__end)] : -#-----| r0_26(glval>) = Convert : r2218_37 +# 2219| r2219_36(glval) = FunctionAddress[iterator] : +# 2219| r2219_37(glval>) = VariableAddress[(__end)] : +#-----| r0_26(glval>) = Convert : r2219_37 #-----| r0_27(iterator &) = CopyValue : r0_26 -# 2218| v2218_38(void) = Call[iterator] : func:r2218_36, this:r0_24, 0:r0_27 -# 2218| mu2218_39(unknown) = ^CallSideEffect : ~m? +# 2219| v2219_38(void) = Call[iterator] : func:r2219_36, this:r0_24, 0:r0_27 +# 2219| mu2219_39(unknown) = ^CallSideEffect : ~m? #-----| v0_28(void) = ^BufferReadSideEffect[0] : &:r0_27, ~m? -# 2218| mu2218_40(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_24 +# 2219| mu2219_40(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_24 #-----| r0_29(iterator) = Load[#temp0:0] : &:r0_24, ~m? -# 2218| r2218_41(bool) = Call[operator!=] : func:r2218_35, this:r0_23, 0:r0_29 +# 2219| r2219_41(bool) = Call[operator!=] : func:r2219_35, this:r0_23, 0:r0_29 #-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_23, ~m? -# 2218| v2218_42(void) = ConditionalBranch : r2218_41 -#-----| False -> Block 18 +# 2219| v2219_42(void) = ConditionalBranch : r2219_41 +#-----| False -> Block 17 +#-----| True -> Block 15 + +# 2219| Block 14 +# 2219| r2219_43(glval>) = VariableAddress[(__begin)] : +# 2219| r2219_44(glval) = FunctionAddress[operator++] : +# 2219| r2219_45(iterator &) = Call[operator++] : func:r2219_44, this:r2219_43 +# 2219| v2219_46(void) = ^IndirectReadSideEffect[-1] : &:r2219_43, ~m? +# 2219| mu2219_47(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2219_43 +# 2219| r2219_48(glval) = VariableAddress[y] : +# 2219| r2219_49(glval) = FunctionAddress[~ClassWithDestructor] : +# 2219| v2219_50(void) = Call[~ClassWithDestructor] : func:r2219_49, this:r2219_48 +# 2219| mu2219_51(unknown) = ^CallSideEffect : ~m? +# 2219| v2219_52(void) = ^IndirectReadSideEffect[-1] : &:r2219_48, ~m? +# 2219| mu2219_53(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2219_48 +# 2219| r2219_54(glval>) = CopyValue : r2219_45 +#-----| Goto (back edge) -> Block 13 + +# 2219| Block 15 +# 2219| r2219_55(glval) = VariableAddress[y] : +# 2219| r2219_56(glval>) = VariableAddress[(__begin)] : +#-----| r0_31(glval>) = Convert : r2219_56 +# 2219| r2219_57(glval) = FunctionAddress[operator*] : +# 2219| r2219_58(ClassWithDestructor &) = Call[operator*] : func:r2219_57, this:r0_31 +#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m? +# 2219| r2219_59(ClassWithDestructor) = Load[?] : &:r2219_58, ~m? +# 2219| mu2219_60(ClassWithDestructor) = Store[y] : &:r2219_55, r2219_59 +# 2220| r2220_1(glval) = VariableAddress[y] : +# 2220| r2220_2(glval) = FunctionAddress[set_x] : +# 2220| r2220_3(char) = Constant[97] : +# 2220| v2220_4(void) = Call[set_x] : func:r2220_2, this:r2220_1, 0:r2220_3 +# 2220| mu2220_5(unknown) = ^CallSideEffect : ~m? +# 2220| v2220_6(void) = ^IndirectReadSideEffect[-1] : &:r2220_1, ~m? +# 2220| mu2220_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2220_1 +# 2221| r2221_1(glval) = VariableAddress[y] : +# 2221| r2221_2(glval) = FunctionAddress[get_x] : +# 2221| r2221_3(char) = Call[get_x] : func:r2221_2, this:r2221_1 +# 2221| mu2221_4(unknown) = ^CallSideEffect : ~m? +# 2221| v2221_5(void) = ^IndirectReadSideEffect[-1] : &:r2221_1, ~m? +# 2221| mu2221_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2221_1 +# 2221| r2221_7(int) = Convert : r2221_3 +# 2221| r2221_8(int) = Constant[98] : +# 2221| r2221_9(bool) = CompareEQ : r2221_7, r2221_8 +# 2221| v2221_10(void) = ConditionalBranch : r2221_9 +#-----| False -> Block 14 #-----| True -> Block 16 -# 2218| Block 15 -# 2218| r2218_43(glval>) = VariableAddress[(__begin)] : -# 2218| r2218_44(glval) = FunctionAddress[operator++] : -# 2218| r2218_45(iterator &) = Call[operator++] : func:r2218_44, this:r2218_43 -# 2218| v2218_46(void) = ^IndirectReadSideEffect[-1] : &:r2218_43, ~m? -# 2218| mu2218_47(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2218_43 -# 2218| r2218_48(glval) = VariableAddress[y] : -# 2218| r2218_49(glval) = FunctionAddress[~ClassWithDestructor] : -# 2218| v2218_50(void) = Call[~ClassWithDestructor] : func:r2218_49, this:r2218_48 -# 2218| mu2218_51(unknown) = ^CallSideEffect : ~m? -# 2218| v2218_52(void) = ^IndirectReadSideEffect[-1] : &:r2218_48, ~m? -# 2218| mu2218_53(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2218_48 -# 2218| r2218_54(glval>) = CopyValue : r2218_45 -#-----| Goto (back edge) -> Block 14 - -# 2218| Block 16 -# 2218| r2218_55(glval) = VariableAddress[y] : -# 2218| r2218_56(glval>) = VariableAddress[(__begin)] : -#-----| r0_31(glval>) = Convert : r2218_56 -# 2218| r2218_57(glval) = FunctionAddress[operator*] : -# 2218| r2218_58(ClassWithDestructor &) = Call[operator*] : func:r2218_57, this:r0_31 -#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m? -# 2218| r2218_59(ClassWithDestructor) = Load[?] : &:r2218_58, ~m? -# 2218| mu2218_60(ClassWithDestructor) = Store[y] : &:r2218_55, r2218_59 -# 2219| r2219_1(glval) = VariableAddress[y] : -# 2219| r2219_2(glval) = FunctionAddress[set_x] : -# 2219| r2219_3(char) = Constant[97] : -# 2219| v2219_4(void) = Call[set_x] : func:r2219_2, this:r2219_1, 0:r2219_3 -# 2219| mu2219_5(unknown) = ^CallSideEffect : ~m? -# 2219| v2219_6(void) = ^IndirectReadSideEffect[-1] : &:r2219_1, ~m? -# 2219| mu2219_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2219_1 -# 2220| r2220_1(glval) = VariableAddress[y] : -# 2220| r2220_2(glval) = FunctionAddress[get_x] : -# 2220| r2220_3(char) = Call[get_x] : func:r2220_2, this:r2220_1 -# 2220| mu2220_4(unknown) = ^CallSideEffect : ~m? -# 2220| v2220_5(void) = ^IndirectReadSideEffect[-1] : &:r2220_1, ~m? -# 2220| mu2220_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2220_1 -# 2220| r2220_7(int) = Convert : r2220_3 -# 2220| r2220_8(int) = Constant[98] : -# 2220| r2220_9(bool) = CompareEQ : r2220_7, r2220_8 -# 2220| v2220_10(void) = ConditionalBranch : r2220_9 -#-----| False -> Block 15 -#-----| True -> Block 17 - -# 2221| Block 17 -# 2221| v2221_1(void) = NoOp : -# 2218| r2218_61(glval) = VariableAddress[y] : -# 2218| r2218_62(glval) = FunctionAddress[~ClassWithDestructor] : -# 2218| v2218_63(void) = Call[~ClassWithDestructor] : func:r2218_62, this:r2218_61 -# 2218| mu2218_64(unknown) = ^CallSideEffect : ~m? -# 2218| v2218_65(void) = ^IndirectReadSideEffect[-1] : &:r2218_61, ~m? -# 2218| mu2218_66(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2218_61 -# 2218| r2218_67(glval>) = VariableAddress[ys] : -# 2218| r2218_68(glval) = FunctionAddress[~vector] : -# 2218| v2218_69(void) = Call[~vector] : func:r2218_68, this:r2218_67 -# 2218| mu2218_70(unknown) = ^CallSideEffect : ~m? -# 2218| v2218_71(void) = ^IndirectReadSideEffect[-1] : &:r2218_67, ~m? -# 2218| mu2218_72(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2218_67 -# 2233| r2233_1(glval) = VariableAddress[x] : -# 2233| r2233_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2233| v2233_3(void) = Call[~ClassWithDestructor] : func:r2233_2, this:r2233_1 -# 2233| mu2233_4(unknown) = ^CallSideEffect : ~m? -# 2233| v2233_5(void) = ^IndirectReadSideEffect[-1] : &:r2233_1, ~m? -# 2233| mu2233_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_1 +# 2222| Block 16 +# 2222| v2222_1(void) = NoOp : +# 2219| r2219_61(glval) = VariableAddress[y] : +# 2219| r2219_62(glval) = FunctionAddress[~ClassWithDestructor] : +# 2219| v2219_63(void) = Call[~ClassWithDestructor] : func:r2219_62, this:r2219_61 +# 2219| mu2219_64(unknown) = ^CallSideEffect : ~m? +# 2219| v2219_65(void) = ^IndirectReadSideEffect[-1] : &:r2219_61, ~m? +# 2219| mu2219_66(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2219_61 +# 2219| r2219_67(glval>) = VariableAddress[ys] : +# 2219| r2219_68(glval) = FunctionAddress[~vector] : +# 2219| v2219_69(void) = Call[~vector] : func:r2219_68, this:r2219_67 +# 2219| mu2219_70(unknown) = ^CallSideEffect : ~m? +# 2219| v2219_71(void) = ^IndirectReadSideEffect[-1] : &:r2219_67, ~m? +# 2219| mu2219_72(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2219_67 +# 2234| r2234_1(glval) = VariableAddress[x] : +# 2234| r2234_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2234| v2234_3(void) = Call[~ClassWithDestructor] : func:r2234_2, this:r2234_1 +# 2234| mu2234_4(unknown) = ^CallSideEffect : ~m? +# 2234| v2234_5(void) = ^IndirectReadSideEffect[-1] : &:r2234_1, ~m? +# 2234| mu2234_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2234_1 #-----| Goto -> Block 1 -# 2218| Block 18 -# 2218| r2218_73(glval>) = VariableAddress[ys] : -# 2218| r2218_74(glval) = FunctionAddress[~vector] : -# 2218| v2218_75(void) = Call[~vector] : func:r2218_74, this:r2218_73 -# 2218| mu2218_76(unknown) = ^CallSideEffect : ~m? -# 2218| v2218_77(void) = ^IndirectReadSideEffect[-1] : &:r2218_73, ~m? -# 2218| mu2218_78(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2218_73 -# 2224| r2224_1(glval>) = VariableAddress[ys] : -# 2224| mu2224_2(vector) = Uninitialized[ys] : &:r2224_1 -# 2224| r2224_3(glval) = FunctionAddress[vector] : -# 2224| r2224_4(int) = Constant[1] : -# 2224| v2224_5(void) = Call[vector] : func:r2224_3, this:r2224_1, 0:r2224_4 -# 2224| mu2224_6(unknown) = ^CallSideEffect : ~m? -# 2224| mu2224_7(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2224_1 -# 2224| r2224_8(glval &>) = VariableAddress[(__range)] : -# 2224| r2224_9(glval>) = VariableAddress[ys] : -# 2224| r2224_10(vector &) = CopyValue : r2224_9 -# 2224| mu2224_11(vector &) = Store[(__range)] : &:r2224_8, r2224_10 -# 2224| r2224_12(glval>) = VariableAddress[(__begin)] : -# 2224| r2224_13(glval &>) = VariableAddress[(__range)] : -# 2224| r2224_14(vector &) = Load[(__range)] : &:r2224_13, ~m? -#-----| r0_33(glval>) = CopyValue : r2224_14 +# 2219| Block 17 +# 2219| r2219_73(glval>) = VariableAddress[ys] : +# 2219| r2219_74(glval) = FunctionAddress[~vector] : +# 2219| v2219_75(void) = Call[~vector] : func:r2219_74, this:r2219_73 +# 2219| mu2219_76(unknown) = ^CallSideEffect : ~m? +# 2219| v2219_77(void) = ^IndirectReadSideEffect[-1] : &:r2219_73, ~m? +# 2219| mu2219_78(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2219_73 +# 2225| r2225_1(glval>) = VariableAddress[ys] : +# 2225| mu2225_2(vector) = Uninitialized[ys] : &:r2225_1 +# 2225| r2225_3(glval) = FunctionAddress[vector] : +# 2225| r2225_4(int) = Constant[1] : +# 2225| v2225_5(void) = Call[vector] : func:r2225_3, this:r2225_1, 0:r2225_4 +# 2225| mu2225_6(unknown) = ^CallSideEffect : ~m? +# 2225| mu2225_7(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2225_1 +# 2225| r2225_8(glval &>) = VariableAddress[(__range)] : +# 2225| r2225_9(glval>) = VariableAddress[ys] : +# 2225| r2225_10(vector &) = CopyValue : r2225_9 +# 2225| mu2225_11(vector &) = Store[(__range)] : &:r2225_8, r2225_10 +# 2225| r2225_12(glval>) = VariableAddress[(__begin)] : +# 2225| r2225_13(glval &>) = VariableAddress[(__range)] : +# 2225| r2225_14(vector &) = Load[(__range)] : &:r2225_13, ~m? +#-----| r0_33(glval>) = CopyValue : r2225_14 #-----| r0_34(glval>) = Convert : r0_33 -# 2224| r2224_15(glval) = FunctionAddress[begin] : -# 2224| r2224_16(iterator) = Call[begin] : func:r2224_15, this:r0_34 +# 2225| r2225_15(glval) = FunctionAddress[begin] : +# 2225| r2225_16(iterator) = Call[begin] : func:r2225_15, this:r0_34 #-----| v0_35(void) = ^IndirectReadSideEffect[-1] : &:r0_34, ~m? -# 2224| mu2224_17(iterator) = Store[(__begin)] : &:r2224_12, r2224_16 -# 2224| r2224_18(glval>) = VariableAddress[(__end)] : -# 2224| r2224_19(glval &>) = VariableAddress[(__range)] : -# 2224| r2224_20(vector &) = Load[(__range)] : &:r2224_19, ~m? -#-----| r0_36(glval>) = CopyValue : r2224_20 +# 2225| mu2225_17(iterator) = Store[(__begin)] : &:r2225_12, r2225_16 +# 2225| r2225_18(glval>) = VariableAddress[(__end)] : +# 2225| r2225_19(glval &>) = VariableAddress[(__range)] : +# 2225| r2225_20(vector &) = Load[(__range)] : &:r2225_19, ~m? +#-----| r0_36(glval>) = CopyValue : r2225_20 #-----| r0_37(glval>) = Convert : r0_36 -# 2224| r2224_21(glval) = FunctionAddress[end] : -# 2224| r2224_22(iterator) = Call[end] : func:r2224_21, this:r0_37 +# 2225| r2225_21(glval) = FunctionAddress[end] : +# 2225| r2225_22(iterator) = Call[end] : func:r2225_21, this:r0_37 #-----| v0_38(void) = ^IndirectReadSideEffect[-1] : &:r0_37, ~m? -# 2224| mu2224_23(iterator) = Store[(__end)] : &:r2224_18, r2224_22 -#-----| Goto -> Block 19 +# 2225| mu2225_23(iterator) = Store[(__end)] : &:r2225_18, r2225_22 +#-----| Goto -> Block 18 -# 2224| Block 19 -# 2224| r2224_24(glval>) = VariableAddress[(__begin)] : -#-----| r0_39(glval>) = Convert : r2224_24 -# 2224| r2224_25(glval) = FunctionAddress[operator!=] : +# 2225| Block 18 +# 2225| r2225_24(glval>) = VariableAddress[(__begin)] : +#-----| r0_39(glval>) = Convert : r2225_24 +# 2225| r2225_25(glval) = FunctionAddress[operator!=] : #-----| r0_40(glval>) = VariableAddress[#temp0:0] : #-----| mu0_41(iterator) = Uninitialized[#temp0:0] : &:r0_40 -# 2224| r2224_26(glval) = FunctionAddress[iterator] : -# 2224| r2224_27(glval>) = VariableAddress[(__end)] : -#-----| r0_42(glval>) = Convert : r2224_27 +# 2225| r2225_26(glval) = FunctionAddress[iterator] : +# 2225| r2225_27(glval>) = VariableAddress[(__end)] : +#-----| r0_42(glval>) = Convert : r2225_27 #-----| r0_43(iterator &) = CopyValue : r0_42 -# 2224| v2224_28(void) = Call[iterator] : func:r2224_26, this:r0_40, 0:r0_43 -# 2224| mu2224_29(unknown) = ^CallSideEffect : ~m? +# 2225| v2225_28(void) = Call[iterator] : func:r2225_26, this:r0_40, 0:r0_43 +# 2225| mu2225_29(unknown) = ^CallSideEffect : ~m? #-----| v0_44(void) = ^BufferReadSideEffect[0] : &:r0_43, ~m? -# 2224| mu2224_30(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_40 +# 2225| mu2225_30(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_40 #-----| r0_45(iterator) = Load[#temp0:0] : &:r0_40, ~m? -# 2224| r2224_31(bool) = Call[operator!=] : func:r2224_25, this:r0_39, 0:r0_45 +# 2225| r2225_31(bool) = Call[operator!=] : func:r2225_25, this:r0_39, 0:r0_45 #-----| v0_46(void) = ^IndirectReadSideEffect[-1] : &:r0_39, ~m? -# 2224| v2224_32(void) = ConditionalBranch : r2224_31 -#-----| False -> Block 23 +# 2225| v2225_32(void) = ConditionalBranch : r2225_31 +#-----| False -> Block 22 +#-----| True -> Block 20 + +# 2225| Block 19 +# 2225| r2225_33(glval>) = VariableAddress[(__begin)] : +# 2225| r2225_34(glval) = FunctionAddress[operator++] : +# 2225| r2225_35(iterator &) = Call[operator++] : func:r2225_34, this:r2225_33 +# 2225| v2225_36(void) = ^IndirectReadSideEffect[-1] : &:r2225_33, ~m? +# 2225| mu2225_37(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2225_33 +# 2225| r2225_38(glval>) = CopyValue : r2225_35 +#-----| Goto (back edge) -> Block 18 + +# 2225| Block 20 +# 2225| r2225_39(glval) = VariableAddress[y] : +# 2225| r2225_40(glval>) = VariableAddress[(__begin)] : +#-----| r0_47(glval>) = Convert : r2225_40 +# 2225| r2225_41(glval) = FunctionAddress[operator*] : +# 2225| r2225_42(int &) = Call[operator*] : func:r2225_41, this:r0_47 +#-----| v0_48(void) = ^IndirectReadSideEffect[-1] : &:r0_47, ~m? +# 2225| r2225_43(int) = Load[?] : &:r2225_42, ~m? +# 2225| mu2225_44(int) = Store[y] : &:r2225_39, r2225_43 +# 2226| r2226_1(glval) = VariableAddress[y] : +# 2226| r2226_2(int) = Load[y] : &:r2226_1, ~m? +# 2226| r2226_3(int) = Constant[1] : +# 2226| r2226_4(bool) = CompareEQ : r2226_2, r2226_3 +# 2226| v2226_5(void) = ConditionalBranch : r2226_4 +#-----| False -> Block 19 #-----| True -> Block 21 -# 2224| Block 20 -# 2224| r2224_33(glval>) = VariableAddress[(__begin)] : -# 2224| r2224_34(glval) = FunctionAddress[operator++] : -# 2224| r2224_35(iterator &) = Call[operator++] : func:r2224_34, this:r2224_33 -# 2224| v2224_36(void) = ^IndirectReadSideEffect[-1] : &:r2224_33, ~m? -# 2224| mu2224_37(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2224_33 -# 2224| r2224_38(glval>) = CopyValue : r2224_35 -#-----| Goto (back edge) -> Block 19 - -# 2224| Block 21 -# 2224| r2224_39(glval) = VariableAddress[y] : -# 2224| r2224_40(glval>) = VariableAddress[(__begin)] : -#-----| r0_47(glval>) = Convert : r2224_40 -# 2224| r2224_41(glval) = FunctionAddress[operator*] : -# 2224| r2224_42(int &) = Call[operator*] : func:r2224_41, this:r0_47 -#-----| v0_48(void) = ^IndirectReadSideEffect[-1] : &:r0_47, ~m? -# 2224| r2224_43(int) = Load[?] : &:r2224_42, ~m? -# 2224| mu2224_44(int) = Store[y] : &:r2224_39, r2224_43 -# 2225| r2225_1(glval) = VariableAddress[y] : -# 2225| r2225_2(int) = Load[y] : &:r2225_1, ~m? -# 2225| r2225_3(int) = Constant[1] : -# 2225| r2225_4(bool) = CompareEQ : r2225_2, r2225_3 -# 2225| v2225_5(void) = ConditionalBranch : r2225_4 -#-----| False -> Block 20 -#-----| True -> Block 22 - -# 2226| Block 22 -# 2226| v2226_1(void) = NoOp : -# 2224| r2224_45(glval>) = VariableAddress[ys] : -# 2224| r2224_46(glval) = FunctionAddress[~vector] : -# 2224| v2224_47(void) = Call[~vector] : func:r2224_46, this:r2224_45 -# 2224| mu2224_48(unknown) = ^CallSideEffect : ~m? -# 2224| v2224_49(void) = ^IndirectReadSideEffect[-1] : &:r2224_45, ~m? -# 2224| mu2224_50(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2224_45 -# 2233| r2233_7(glval) = VariableAddress[x] : -# 2233| r2233_8(glval) = FunctionAddress[~ClassWithDestructor] : -# 2233| v2233_9(void) = Call[~ClassWithDestructor] : func:r2233_8, this:r2233_7 -# 2233| mu2233_10(unknown) = ^CallSideEffect : ~m? -# 2233| v2233_11(void) = ^IndirectReadSideEffect[-1] : &:r2233_7, ~m? -# 2233| mu2233_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_7 +# 2227| Block 21 +# 2227| v2227_1(void) = NoOp : +# 2225| r2225_45(glval>) = VariableAddress[ys] : +# 2225| r2225_46(glval) = FunctionAddress[~vector] : +# 2225| v2225_47(void) = Call[~vector] : func:r2225_46, this:r2225_45 +# 2225| mu2225_48(unknown) = ^CallSideEffect : ~m? +# 2225| v2225_49(void) = ^IndirectReadSideEffect[-1] : &:r2225_45, ~m? +# 2225| mu2225_50(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2225_45 +# 2234| r2234_7(glval) = VariableAddress[x] : +# 2234| r2234_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2234| v2234_9(void) = Call[~ClassWithDestructor] : func:r2234_8, this:r2234_7 +# 2234| mu2234_10(unknown) = ^CallSideEffect : ~m? +# 2234| v2234_11(void) = ^IndirectReadSideEffect[-1] : &:r2234_7, ~m? +# 2234| mu2234_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2234_7 #-----| Goto -> Block 1 -# 2224| Block 23 -# 2224| r2224_51(glval>) = VariableAddress[ys] : -# 2224| r2224_52(glval) = FunctionAddress[~vector] : -# 2224| v2224_53(void) = Call[~vector] : func:r2224_52, this:r2224_51 -# 2224| mu2224_54(unknown) = ^CallSideEffect : ~m? -# 2224| v2224_55(void) = ^IndirectReadSideEffect[-1] : &:r2224_51, ~m? -# 2224| mu2224_56(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2224_51 -# 2229| r2229_1(glval>) = VariableAddress[ys] : -# 2229| mu2229_2(vector) = Uninitialized[ys] : &:r2229_1 -# 2229| r2229_3(glval) = FunctionAddress[vector] : -# 2229| r2229_4(glval) = VariableAddress[#temp2229:45] : -# 2229| r2229_5(glval) = VariableAddress[x] : -# 2229| r2229_6(ClassWithDestructor) = Load[x] : &:r2229_5, ~m? -# 2229| mu2229_7(ClassWithDestructor) = Store[#temp2229:45] : &:r2229_4, r2229_6 -# 2229| r2229_8(ClassWithDestructor) = Load[#temp2229:45] : &:r2229_4, ~m? -# 2229| v2229_9(void) = Call[vector] : func:r2229_3, this:r2229_1, 0:r2229_8 -# 2229| mu2229_10(unknown) = ^CallSideEffect : ~m? -# 2229| mu2229_11(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2229_1 -# 2229| r2229_12(glval) = CopyValue : r2229_4 -# 2229| r2229_13(glval) = FunctionAddress[~ClassWithDestructor] : -# 2229| v2229_14(void) = Call[~ClassWithDestructor] : func:r2229_13, this:r2229_12 -# 2229| mu2229_15(unknown) = ^CallSideEffect : ~m? -# 2229| v2229_16(void) = ^IndirectReadSideEffect[-1] : &:r2229_12, ~m? -# 2229| mu2229_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2229_12 -# 2229| r2229_18(glval &>) = VariableAddress[(__range)] : -# 2229| r2229_19(glval>) = VariableAddress[ys] : -# 2229| r2229_20(vector &) = CopyValue : r2229_19 -# 2229| mu2229_21(vector &) = Store[(__range)] : &:r2229_18, r2229_20 -# 2229| r2229_22(glval>) = VariableAddress[(__begin)] : -# 2229| r2229_23(glval &>) = VariableAddress[(__range)] : -# 2229| r2229_24(vector &) = Load[(__range)] : &:r2229_23, ~m? -#-----| r0_49(glval>) = CopyValue : r2229_24 +# 2225| Block 22 +# 2225| r2225_51(glval>) = VariableAddress[ys] : +# 2225| r2225_52(glval) = FunctionAddress[~vector] : +# 2225| v2225_53(void) = Call[~vector] : func:r2225_52, this:r2225_51 +# 2225| mu2225_54(unknown) = ^CallSideEffect : ~m? +# 2225| v2225_55(void) = ^IndirectReadSideEffect[-1] : &:r2225_51, ~m? +# 2225| mu2225_56(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2225_51 +# 2230| r2230_1(glval>) = VariableAddress[ys] : +# 2230| mu2230_2(vector) = Uninitialized[ys] : &:r2230_1 +# 2230| r2230_3(glval) = FunctionAddress[vector] : +# 2230| r2230_4(glval) = VariableAddress[#temp2230:45] : +# 2230| r2230_5(glval) = VariableAddress[x] : +# 2230| r2230_6(ClassWithDestructor) = Load[x] : &:r2230_5, ~m? +# 2230| mu2230_7(ClassWithDestructor) = Store[#temp2230:45] : &:r2230_4, r2230_6 +# 2230| r2230_8(ClassWithDestructor) = Load[#temp2230:45] : &:r2230_4, ~m? +# 2230| v2230_9(void) = Call[vector] : func:r2230_3, this:r2230_1, 0:r2230_8 +# 2230| mu2230_10(unknown) = ^CallSideEffect : ~m? +# 2230| mu2230_11(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2230_1 +# 2230| r2230_12(glval) = CopyValue : r2230_4 +# 2230| r2230_13(glval) = FunctionAddress[~ClassWithDestructor] : +# 2230| v2230_14(void) = Call[~ClassWithDestructor] : func:r2230_13, this:r2230_12 +# 2230| mu2230_15(unknown) = ^CallSideEffect : ~m? +# 2230| v2230_16(void) = ^IndirectReadSideEffect[-1] : &:r2230_12, ~m? +# 2230| mu2230_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2230_12 +# 2230| r2230_18(glval &>) = VariableAddress[(__range)] : +# 2230| r2230_19(glval>) = VariableAddress[ys] : +# 2230| r2230_20(vector &) = CopyValue : r2230_19 +# 2230| mu2230_21(vector &) = Store[(__range)] : &:r2230_18, r2230_20 +# 2230| r2230_22(glval>) = VariableAddress[(__begin)] : +# 2230| r2230_23(glval &>) = VariableAddress[(__range)] : +# 2230| r2230_24(vector &) = Load[(__range)] : &:r2230_23, ~m? +#-----| r0_49(glval>) = CopyValue : r2230_24 #-----| r0_50(glval>) = Convert : r0_49 -# 2229| r2229_25(glval) = FunctionAddress[begin] : -# 2229| r2229_26(iterator) = Call[begin] : func:r2229_25, this:r0_50 +# 2230| r2230_25(glval) = FunctionAddress[begin] : +# 2230| r2230_26(iterator) = Call[begin] : func:r2230_25, this:r0_50 #-----| v0_51(void) = ^IndirectReadSideEffect[-1] : &:r0_50, ~m? -# 2229| mu2229_27(iterator) = Store[(__begin)] : &:r2229_22, r2229_26 -# 2229| r2229_28(glval>) = VariableAddress[(__end)] : -# 2229| r2229_29(glval &>) = VariableAddress[(__range)] : -# 2229| r2229_30(vector &) = Load[(__range)] : &:r2229_29, ~m? -#-----| r0_52(glval>) = CopyValue : r2229_30 +# 2230| mu2230_27(iterator) = Store[(__begin)] : &:r2230_22, r2230_26 +# 2230| r2230_28(glval>) = VariableAddress[(__end)] : +# 2230| r2230_29(glval &>) = VariableAddress[(__range)] : +# 2230| r2230_30(vector &) = Load[(__range)] : &:r2230_29, ~m? +#-----| r0_52(glval>) = CopyValue : r2230_30 #-----| r0_53(glval>) = Convert : r0_52 -# 2229| r2229_31(glval) = FunctionAddress[end] : -# 2229| r2229_32(iterator) = Call[end] : func:r2229_31, this:r0_53 +# 2230| r2230_31(glval) = FunctionAddress[end] : +# 2230| r2230_32(iterator) = Call[end] : func:r2230_31, this:r0_53 #-----| v0_54(void) = ^IndirectReadSideEffect[-1] : &:r0_53, ~m? -# 2229| mu2229_33(iterator) = Store[(__end)] : &:r2229_28, r2229_32 -#-----| Goto -> Block 24 +# 2230| mu2230_33(iterator) = Store[(__end)] : &:r2230_28, r2230_32 +#-----| Goto -> Block 23 -# 2229| Block 24 -# 2229| r2229_34(glval>) = VariableAddress[(__begin)] : -#-----| r0_55(glval>) = Convert : r2229_34 -# 2229| r2229_35(glval) = FunctionAddress[operator!=] : +# 2230| Block 23 +# 2230| r2230_34(glval>) = VariableAddress[(__begin)] : +#-----| r0_55(glval>) = Convert : r2230_34 +# 2230| r2230_35(glval) = FunctionAddress[operator!=] : #-----| r0_56(glval>) = VariableAddress[#temp0:0] : #-----| mu0_57(iterator) = Uninitialized[#temp0:0] : &:r0_56 -# 2229| r2229_36(glval) = FunctionAddress[iterator] : -# 2229| r2229_37(glval>) = VariableAddress[(__end)] : -#-----| r0_58(glval>) = Convert : r2229_37 +# 2230| r2230_36(glval) = FunctionAddress[iterator] : +# 2230| r2230_37(glval>) = VariableAddress[(__end)] : +#-----| r0_58(glval>) = Convert : r2230_37 #-----| r0_59(iterator &) = CopyValue : r0_58 -# 2229| v2229_38(void) = Call[iterator] : func:r2229_36, this:r0_56, 0:r0_59 -# 2229| mu2229_39(unknown) = ^CallSideEffect : ~m? +# 2230| v2230_38(void) = Call[iterator] : func:r2230_36, this:r0_56, 0:r0_59 +# 2230| mu2230_39(unknown) = ^CallSideEffect : ~m? #-----| v0_60(void) = ^BufferReadSideEffect[0] : &:r0_59, ~m? -# 2229| mu2229_40(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_56 +# 2230| mu2230_40(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_56 #-----| r0_61(iterator) = Load[#temp0:0] : &:r0_56, ~m? -# 2229| r2229_41(bool) = Call[operator!=] : func:r2229_35, this:r0_55, 0:r0_61 +# 2230| r2230_41(bool) = Call[operator!=] : func:r2230_35, this:r0_55, 0:r0_61 #-----| v0_62(void) = ^IndirectReadSideEffect[-1] : &:r0_55, ~m? -# 2229| v2229_42(void) = ConditionalBranch : r2229_41 -#-----| False -> Block 26 -#-----| True -> Block 25 +# 2230| v2230_42(void) = ConditionalBranch : r2230_41 +#-----| False -> Block 25 +#-----| True -> Block 24 -# 2229| Block 25 -# 2229| r2229_43(glval) = VariableAddress[y] : -# 2229| r2229_44(glval>) = VariableAddress[(__begin)] : -#-----| r0_63(glval>) = Convert : r2229_44 -# 2229| r2229_45(glval) = FunctionAddress[operator*] : -# 2229| r2229_46(ClassWithDestructor &) = Call[operator*] : func:r2229_45, this:r0_63 +# 2230| Block 24 +# 2230| r2230_43(glval) = VariableAddress[y] : +# 2230| r2230_44(glval>) = VariableAddress[(__begin)] : +#-----| r0_63(glval>) = Convert : r2230_44 +# 2230| r2230_45(glval) = FunctionAddress[operator*] : +# 2230| r2230_46(ClassWithDestructor &) = Call[operator*] : func:r2230_45, this:r0_63 #-----| v0_64(void) = ^IndirectReadSideEffect[-1] : &:r0_63, ~m? -# 2229| r2229_47(ClassWithDestructor) = Load[?] : &:r2229_46, ~m? -# 2229| mu2229_48(ClassWithDestructor) = Store[y] : &:r2229_43, r2229_47 -# 2230| r2230_1(glval) = VariableAddress[z1] : -# 2230| mu2230_2(ClassWithDestructor) = Uninitialized[z1] : &:r2230_1 -# 2230| r2230_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2230| v2230_4(void) = Call[ClassWithDestructor] : func:r2230_3, this:r2230_1 -# 2230| mu2230_5(unknown) = ^CallSideEffect : ~m? -# 2230| mu2230_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2230_1 -# 2231| r2231_1(glval) = VariableAddress[z2] : -# 2231| mu2231_2(ClassWithDestructor) = Uninitialized[z2] : &:r2231_1 +# 2230| r2230_47(ClassWithDestructor) = Load[?] : &:r2230_46, ~m? +# 2230| mu2230_48(ClassWithDestructor) = Store[y] : &:r2230_43, r2230_47 +# 2231| r2231_1(glval) = VariableAddress[z1] : +# 2231| mu2231_2(ClassWithDestructor) = Uninitialized[z1] : &:r2231_1 # 2231| r2231_3(glval) = FunctionAddress[ClassWithDestructor] : # 2231| v2231_4(void) = Call[ClassWithDestructor] : func:r2231_3, this:r2231_1 # 2231| mu2231_5(unknown) = ^CallSideEffect : ~m? # 2231| mu2231_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2231_1 # 2232| r2232_1(glval) = VariableAddress[z2] : -# 2232| r2232_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2232| v2232_3(void) = Call[~ClassWithDestructor] : func:r2232_2, this:r2232_1 -# 2232| mu2232_4(unknown) = ^CallSideEffect : ~m? -# 2232| v2232_5(void) = ^IndirectReadSideEffect[-1] : &:r2232_1, ~m? +# 2232| mu2232_2(ClassWithDestructor) = Uninitialized[z2] : &:r2232_1 +# 2232| r2232_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2232| v2232_4(void) = Call[ClassWithDestructor] : func:r2232_3, this:r2232_1 +# 2232| mu2232_5(unknown) = ^CallSideEffect : ~m? # 2232| mu2232_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2232_1 -# 2232| r2232_7(glval) = VariableAddress[z1] : -# 2232| r2232_8(glval) = FunctionAddress[~ClassWithDestructor] : -# 2232| v2232_9(void) = Call[~ClassWithDestructor] : func:r2232_8, this:r2232_7 -# 2232| mu2232_10(unknown) = ^CallSideEffect : ~m? -# 2232| v2232_11(void) = ^IndirectReadSideEffect[-1] : &:r2232_7, ~m? -# 2232| mu2232_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2232_7 -# 2229| r2229_49(glval>) = VariableAddress[(__begin)] : -# 2229| r2229_50(glval) = FunctionAddress[operator++] : -# 2229| r2229_51(iterator &) = Call[operator++] : func:r2229_50, this:r2229_49 -# 2229| v2229_52(void) = ^IndirectReadSideEffect[-1] : &:r2229_49, ~m? -# 2229| mu2229_53(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2229_49 -# 2229| r2229_54(glval) = VariableAddress[y] : -# 2229| r2229_55(glval) = FunctionAddress[~ClassWithDestructor] : -# 2229| v2229_56(void) = Call[~ClassWithDestructor] : func:r2229_55, this:r2229_54 -# 2229| mu2229_57(unknown) = ^CallSideEffect : ~m? -# 2229| v2229_58(void) = ^IndirectReadSideEffect[-1] : &:r2229_54, ~m? -# 2229| mu2229_59(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2229_54 -# 2229| r2229_60(glval>) = CopyValue : r2229_51 -#-----| Goto (back edge) -> Block 24 +# 2233| r2233_1(glval) = VariableAddress[z2] : +# 2233| r2233_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2233| v2233_3(void) = Call[~ClassWithDestructor] : func:r2233_2, this:r2233_1 +# 2233| mu2233_4(unknown) = ^CallSideEffect : ~m? +# 2233| v2233_5(void) = ^IndirectReadSideEffect[-1] : &:r2233_1, ~m? +# 2233| mu2233_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_1 +# 2233| r2233_7(glval) = VariableAddress[z1] : +# 2233| r2233_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2233| v2233_9(void) = Call[~ClassWithDestructor] : func:r2233_8, this:r2233_7 +# 2233| mu2233_10(unknown) = ^CallSideEffect : ~m? +# 2233| v2233_11(void) = ^IndirectReadSideEffect[-1] : &:r2233_7, ~m? +# 2233| mu2233_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_7 +# 2230| r2230_49(glval>) = VariableAddress[(__begin)] : +# 2230| r2230_50(glval) = FunctionAddress[operator++] : +# 2230| r2230_51(iterator &) = Call[operator++] : func:r2230_50, this:r2230_49 +# 2230| v2230_52(void) = ^IndirectReadSideEffect[-1] : &:r2230_49, ~m? +# 2230| mu2230_53(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2230_49 +# 2230| r2230_54(glval) = VariableAddress[y] : +# 2230| r2230_55(glval) = FunctionAddress[~ClassWithDestructor] : +# 2230| v2230_56(void) = Call[~ClassWithDestructor] : func:r2230_55, this:r2230_54 +# 2230| mu2230_57(unknown) = ^CallSideEffect : ~m? +# 2230| v2230_58(void) = ^IndirectReadSideEffect[-1] : &:r2230_54, ~m? +# 2230| mu2230_59(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2230_54 +# 2230| r2230_60(glval>) = CopyValue : r2230_51 +#-----| Goto (back edge) -> Block 23 -# 2229| Block 26 -# 2229| r2229_61(glval>) = VariableAddress[ys] : -# 2229| r2229_62(glval) = FunctionAddress[~vector] : -# 2229| v2229_63(void) = Call[~vector] : func:r2229_62, this:r2229_61 -# 2229| mu2229_64(unknown) = ^CallSideEffect : ~m? -# 2229| v2229_65(void) = ^IndirectReadSideEffect[-1] : &:r2229_61, ~m? -# 2229| mu2229_66(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2229_61 -# 2233| v2233_13(void) = NoOp : -# 2233| r2233_14(glval) = VariableAddress[x] : -# 2233| r2233_15(glval) = FunctionAddress[~ClassWithDestructor] : -# 2233| v2233_16(void) = Call[~ClassWithDestructor] : func:r2233_15, this:r2233_14 -# 2233| mu2233_17(unknown) = ^CallSideEffect : ~m? -# 2233| v2233_18(void) = ^IndirectReadSideEffect[-1] : &:r2233_14, ~m? -# 2233| mu2233_19(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2233_14 +# 2230| Block 25 +# 2230| r2230_61(glval>) = VariableAddress[ys] : +# 2230| r2230_62(glval) = FunctionAddress[~vector] : +# 2230| v2230_63(void) = Call[~vector] : func:r2230_62, this:r2230_61 +# 2230| mu2230_64(unknown) = ^CallSideEffect : ~m? +# 2230| v2230_65(void) = ^IndirectReadSideEffect[-1] : &:r2230_61, ~m? +# 2230| mu2230_66(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2230_61 +# 2234| v2234_13(void) = NoOp : +# 2234| r2234_14(glval) = VariableAddress[x] : +# 2234| r2234_15(glval) = FunctionAddress[~ClassWithDestructor] : +# 2234| v2234_16(void) = Call[~ClassWithDestructor] : func:r2234_15, this:r2234_14 +# 2234| mu2234_17(unknown) = ^CallSideEffect : ~m? +# 2234| v2234_18(void) = ^IndirectReadSideEffect[-1] : &:r2234_14, ~m? +# 2234| mu2234_19(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2234_14 #-----| Goto -> Block 1 -# 2235| void static_variable_with_destructor_1() -# 2235| Block 0 -# 2235| v2235_1(void) = EnterFunction : -# 2235| mu2235_2(unknown) = AliasedDefinition : -# 2235| mu2235_3(unknown) = InitializeNonLocal : -# 2236| r2236_1(glval) = VariableAddress[a] : -# 2236| mu2236_2(ClassWithDestructor) = Uninitialized[a] : &:r2236_1 -# 2236| r2236_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2236| v2236_4(void) = Call[ClassWithDestructor] : func:r2236_3, this:r2236_1 -# 2236| mu2236_5(unknown) = ^CallSideEffect : ~m? -# 2236| mu2236_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2236_1 -# 2237| r2237_1(glval) = VariableAddress[b#init] : -# 2237| r2237_2(bool) = Load[b#init] : &:r2237_1, ~m? -# 2237| v2237_3(void) = ConditionalBranch : r2237_2 +# 2236| void static_variable_with_destructor_1() +# 2236| Block 0 +# 2236| v2236_1(void) = EnterFunction : +# 2236| mu2236_2(unknown) = AliasedDefinition : +# 2236| mu2236_3(unknown) = InitializeNonLocal : +# 2237| r2237_1(glval) = VariableAddress[a] : +# 2237| mu2237_2(ClassWithDestructor) = Uninitialized[a] : &:r2237_1 +# 2237| r2237_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2237| v2237_4(void) = Call[ClassWithDestructor] : func:r2237_3, this:r2237_1 +# 2237| mu2237_5(unknown) = ^CallSideEffect : ~m? +# 2237| mu2237_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2237_1 +# 2238| r2238_1(glval) = VariableAddress[b#init] : +# 2238| r2238_2(bool) = Load[b#init] : &:r2238_1, ~m? +# 2238| v2238_3(void) = ConditionalBranch : r2238_2 #-----| False -> Block 1 #-----| True -> Block 2 -# 2237| Block 1 -# 2237| r2237_4(glval) = VariableAddress[b] : +# 2238| Block 1 +# 2238| r2238_4(glval) = VariableAddress[b] : #-----| r0_1(glval) = FunctionAddress[ClassWithDestructor] : -#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2237_4 +#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2238_4 #-----| mu0_3(unknown) = ^CallSideEffect : ~m? -#-----| mu0_4(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2237_4 -# 2237| r2237_5(bool) = Constant[1] : -# 2237| mu2237_6(bool) = Store[b#init] : &:r2237_1, r2237_5 +#-----| mu0_4(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2238_4 +# 2238| r2238_5(bool) = Constant[1] : +# 2238| mu2238_6(bool) = Store[b#init] : &:r2238_1, r2238_5 #-----| Goto -> Block 2 -# 2238| Block 2 -# 2238| v2238_1(void) = NoOp : -# 2238| r2238_2(glval) = VariableAddress[a] : -# 2238| r2238_3(glval) = FunctionAddress[~ClassWithDestructor] : -# 2238| v2238_4(void) = Call[~ClassWithDestructor] : func:r2238_3, this:r2238_2 -# 2238| mu2238_5(unknown) = ^CallSideEffect : ~m? -# 2238| v2238_6(void) = ^IndirectReadSideEffect[-1] : &:r2238_2, ~m? -# 2238| mu2238_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2238_2 -# 2235| v2235_4(void) = ReturnVoid : -# 2235| v2235_5(void) = AliasedUse : ~m? -# 2235| v2235_6(void) = ExitFunction : +# 2239| Block 2 +# 2239| v2239_1(void) = NoOp : +# 2239| r2239_2(glval) = VariableAddress[a] : +# 2239| r2239_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2239| v2239_4(void) = Call[~ClassWithDestructor] : func:r2239_3, this:r2239_2 +# 2239| mu2239_5(unknown) = ^CallSideEffect : ~m? +# 2239| v2239_6(void) = ^IndirectReadSideEffect[-1] : &:r2239_2, ~m? +# 2239| mu2239_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2239_2 +# 2236| v2236_4(void) = ReturnVoid : +# 2236| v2236_5(void) = AliasedUse : ~m? +# 2236| v2236_6(void) = ExitFunction : -# 2240| void static_variable_with_destructor_2() -# 2240| Block 0 -# 2240| v2240_1(void) = EnterFunction : -# 2240| mu2240_2(unknown) = AliasedDefinition : -# 2240| mu2240_3(unknown) = InitializeNonLocal : -# 2241| r2241_1(glval) = VariableAddress[a#init] : -# 2241| r2241_2(bool) = Load[a#init] : &:r2241_1, ~m? -# 2241| v2241_3(void) = ConditionalBranch : r2241_2 +# 2241| void static_variable_with_destructor_2() +# 2241| Block 0 +# 2241| v2241_1(void) = EnterFunction : +# 2241| mu2241_2(unknown) = AliasedDefinition : +# 2241| mu2241_3(unknown) = InitializeNonLocal : +# 2242| r2242_1(glval) = VariableAddress[a#init] : +# 2242| r2242_2(bool) = Load[a#init] : &:r2242_1, ~m? +# 2242| v2242_3(void) = ConditionalBranch : r2242_2 #-----| False -> Block 1 #-----| True -> Block 2 -# 2241| Block 1 -# 2241| r2241_4(glval) = VariableAddress[a] : +# 2242| Block 1 +# 2242| r2242_4(glval) = VariableAddress[a] : #-----| r0_1(glval) = FunctionAddress[ClassWithDestructor] : -#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2241_4 +#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2242_4 #-----| mu0_3(unknown) = ^CallSideEffect : ~m? -#-----| mu0_4(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2241_4 -# 2241| r2241_5(bool) = Constant[1] : -# 2241| mu2241_6(bool) = Store[a#init] : &:r2241_1, r2241_5 +#-----| mu0_4(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2242_4 +# 2242| r2242_5(bool) = Constant[1] : +# 2242| mu2242_6(bool) = Store[a#init] : &:r2242_1, r2242_5 #-----| Goto -> Block 2 -# 2242| Block 2 -# 2242| r2242_1(glval) = VariableAddress[b] : -# 2242| mu2242_2(ClassWithDestructor) = Uninitialized[b] : &:r2242_1 -# 2242| r2242_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2242| v2242_4(void) = Call[ClassWithDestructor] : func:r2242_3, this:r2242_1 -# 2242| mu2242_5(unknown) = ^CallSideEffect : ~m? -# 2242| mu2242_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2242_1 -# 2243| v2243_1(void) = NoOp : -# 2243| r2243_2(glval) = VariableAddress[b] : -# 2243| r2243_3(glval) = FunctionAddress[~ClassWithDestructor] : -# 2243| v2243_4(void) = Call[~ClassWithDestructor] : func:r2243_3, this:r2243_2 +# 2243| Block 2 +# 2243| r2243_1(glval) = VariableAddress[b] : +# 2243| mu2243_2(ClassWithDestructor) = Uninitialized[b] : &:r2243_1 +# 2243| r2243_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2243| v2243_4(void) = Call[ClassWithDestructor] : func:r2243_3, this:r2243_1 # 2243| mu2243_5(unknown) = ^CallSideEffect : ~m? -# 2243| v2243_6(void) = ^IndirectReadSideEffect[-1] : &:r2243_2, ~m? -# 2243| mu2243_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2243_2 -# 2240| v2240_4(void) = ReturnVoid : -# 2240| v2240_5(void) = AliasedUse : ~m? -# 2240| v2240_6(void) = ExitFunction : +# 2243| mu2243_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2243_1 +# 2244| v2244_1(void) = NoOp : +# 2244| r2244_2(glval) = VariableAddress[b] : +# 2244| r2244_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2244| v2244_4(void) = Call[~ClassWithDestructor] : func:r2244_3, this:r2244_2 +# 2244| mu2244_5(unknown) = ^CallSideEffect : ~m? +# 2244| v2244_6(void) = ^IndirectReadSideEffect[-1] : &:r2244_2, ~m? +# 2244| mu2244_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2244_2 +# 2241| v2241_4(void) = ReturnVoid : +# 2241| v2241_5(void) = AliasedUse : ~m? +# 2241| v2241_6(void) = ExitFunction : -# 2245| void static_variable_with_destructor_3() -# 2245| Block 0 -# 2245| v2245_1(void) = EnterFunction : -# 2245| mu2245_2(unknown) = AliasedDefinition : -# 2245| mu2245_3(unknown) = InitializeNonLocal : -# 2246| r2246_1(glval) = VariableAddress[a] : -# 2246| mu2246_2(ClassWithDestructor) = Uninitialized[a] : &:r2246_1 -# 2246| r2246_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2246| v2246_4(void) = Call[ClassWithDestructor] : func:r2246_3, this:r2246_1 -# 2246| mu2246_5(unknown) = ^CallSideEffect : ~m? -# 2246| mu2246_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2246_1 -# 2247| r2247_1(glval) = VariableAddress[b] : -# 2247| mu2247_2(ClassWithDestructor) = Uninitialized[b] : &:r2247_1 +# 2246| void static_variable_with_destructor_3() +# 2246| Block 0 +# 2246| v2246_1(void) = EnterFunction : +# 2246| mu2246_2(unknown) = AliasedDefinition : +# 2246| mu2246_3(unknown) = InitializeNonLocal : +# 2247| r2247_1(glval) = VariableAddress[a] : +# 2247| mu2247_2(ClassWithDestructor) = Uninitialized[a] : &:r2247_1 # 2247| r2247_3(glval) = FunctionAddress[ClassWithDestructor] : # 2247| v2247_4(void) = Call[ClassWithDestructor] : func:r2247_3, this:r2247_1 # 2247| mu2247_5(unknown) = ^CallSideEffect : ~m? # 2247| mu2247_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2247_1 -# 2248| r2248_1(glval) = VariableAddress[c#init] : -# 2248| r2248_2(bool) = Load[c#init] : &:r2248_1, ~m? -# 2248| v2248_3(void) = ConditionalBranch : r2248_2 +# 2248| r2248_1(glval) = VariableAddress[b] : +# 2248| mu2248_2(ClassWithDestructor) = Uninitialized[b] : &:r2248_1 +# 2248| r2248_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2248| v2248_4(void) = Call[ClassWithDestructor] : func:r2248_3, this:r2248_1 +# 2248| mu2248_5(unknown) = ^CallSideEffect : ~m? +# 2248| mu2248_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2248_1 +# 2249| r2249_1(glval) = VariableAddress[c#init] : +# 2249| r2249_2(bool) = Load[c#init] : &:r2249_1, ~m? +# 2249| v2249_3(void) = ConditionalBranch : r2249_2 #-----| False -> Block 1 #-----| True -> Block 2 -# 2248| Block 1 -# 2248| r2248_4(glval) = VariableAddress[c] : +# 2249| Block 1 +# 2249| r2249_4(glval) = VariableAddress[c] : #-----| r0_1(glval) = FunctionAddress[ClassWithDestructor] : -#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2248_4 +#-----| v0_2(void) = Call[ClassWithDestructor] : func:r0_1, this:r2249_4 #-----| mu0_3(unknown) = ^CallSideEffect : ~m? -#-----| mu0_4(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2248_4 -# 2248| r2248_5(bool) = Constant[1] : -# 2248| mu2248_6(bool) = Store[c#init] : &:r2248_1, r2248_5 +#-----| mu0_4(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2249_4 +# 2249| r2249_5(bool) = Constant[1] : +# 2249| mu2249_6(bool) = Store[c#init] : &:r2249_1, r2249_5 #-----| Goto -> Block 2 -# 2249| Block 2 -# 2249| v2249_1(void) = NoOp : -# 2249| r2249_2(glval) = VariableAddress[b] : -# 2249| r2249_3(glval) = FunctionAddress[~ClassWithDestructor] : -# 2249| v2249_4(void) = Call[~ClassWithDestructor] : func:r2249_3, this:r2249_2 -# 2249| mu2249_5(unknown) = ^CallSideEffect : ~m? -# 2249| v2249_6(void) = ^IndirectReadSideEffect[-1] : &:r2249_2, ~m? -# 2249| mu2249_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2249_2 -# 2249| r2249_8(glval) = VariableAddress[a] : -# 2249| r2249_9(glval) = FunctionAddress[~ClassWithDestructor] : -# 2249| v2249_10(void) = Call[~ClassWithDestructor] : func:r2249_9, this:r2249_8 -# 2249| mu2249_11(unknown) = ^CallSideEffect : ~m? -# 2249| v2249_12(void) = ^IndirectReadSideEffect[-1] : &:r2249_8, ~m? -# 2249| mu2249_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2249_8 -# 2245| v2245_4(void) = ReturnVoid : -# 2245| v2245_5(void) = AliasedUse : ~m? -# 2245| v2245_6(void) = ExitFunction : +# 2250| Block 2 +# 2250| v2250_1(void) = NoOp : +# 2250| r2250_2(glval) = VariableAddress[b] : +# 2250| r2250_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2250| v2250_4(void) = Call[~ClassWithDestructor] : func:r2250_3, this:r2250_2 +# 2250| mu2250_5(unknown) = ^CallSideEffect : ~m? +# 2250| v2250_6(void) = ^IndirectReadSideEffect[-1] : &:r2250_2, ~m? +# 2250| mu2250_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2250_2 +# 2250| r2250_8(glval) = VariableAddress[a] : +# 2250| r2250_9(glval) = FunctionAddress[~ClassWithDestructor] : +# 2250| v2250_10(void) = Call[~ClassWithDestructor] : func:r2250_9, this:r2250_8 +# 2250| mu2250_11(unknown) = ^CallSideEffect : ~m? +# 2250| v2250_12(void) = ^IndirectReadSideEffect[-1] : &:r2250_8, ~m? +# 2250| mu2250_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2250_8 +# 2246| v2246_4(void) = ReturnVoid : +# 2246| v2246_5(void) = AliasedUse : ~m? +# 2246| v2246_6(void) = ExitFunction : -# 2251| ClassWithDestructor global_class_with_destructor -# 2251| Block 0 -# 2251| v2251_1(void) = EnterFunction : -# 2251| mu2251_2(unknown) = AliasedDefinition : -# 2251| r2251_3(glval) = VariableAddress[global_class_with_destructor] : -# 2251| r2251_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2251| v2251_5(void) = Call[ClassWithDestructor] : func:r2251_4, this:r2251_3 -# 2251| mu2251_6(unknown) = ^CallSideEffect : ~m? -# 2251| mu2251_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2251_3 -# 2251| v2251_8(void) = ReturnVoid : -# 2251| v2251_9(void) = AliasedUse : ~m? -# 2251| v2251_10(void) = ExitFunction : +# 2252| ClassWithDestructor global_class_with_destructor +# 2252| Block 0 +# 2252| v2252_1(void) = EnterFunction : +# 2252| mu2252_2(unknown) = AliasedDefinition : +# 2252| r2252_3(glval) = VariableAddress[global_class_with_destructor] : +# 2252| r2252_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2252| v2252_5(void) = Call[ClassWithDestructor] : func:r2252_4, this:r2252_3 +# 2252| mu2252_6(unknown) = ^CallSideEffect : ~m? +# 2252| mu2252_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2252_3 +# 2252| v2252_8(void) = ReturnVoid : +# 2252| v2252_9(void) = AliasedUse : ~m? +# 2252| v2252_10(void) = ExitFunction : -# 2255| ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) -# 2255| Block 0 -# 2255| v2255_1(void) = EnterFunction : -# 2255| mu2255_2(unknown) = AliasedDefinition : -# 2255| mu2255_3(unknown) = InitializeNonLocal : -# 2255| r2255_4(glval) = VariableAddress[t] : -# 2255| mu2255_5(ClassWithDestructor &) = InitializeParameter[t] : &:r2255_4 -# 2255| r2255_6(ClassWithDestructor &) = Load[t] : &:r2255_4, ~m? -# 2255| mu2255_7(unknown) = InitializeIndirection[t] : &:r2255_6 -# 2255| r2255_8(glval) = VariableAddress[#return] : -# 2255| r2255_9(glval) = VariableAddress[t] : -# 2255| r2255_10(ClassWithDestructor &) = Load[t] : &:r2255_9, ~m? -# 2255| r2255_11(glval) = CopyValue : r2255_10 -# 2255| r2255_12(ClassWithDestructor &) = CopyValue : r2255_11 -# 2255| mu2255_13(ClassWithDestructor &) = Store[#return] : &:r2255_8, r2255_12 -# 2255| v2255_14(void) = ReturnIndirection[t] : &:r2255_6, ~m? -# 2255| r2255_15(glval) = VariableAddress[#return] : -# 2255| v2255_16(void) = ReturnValue : &:r2255_15, ~m? -# 2255| v2255_17(void) = AliasedUse : ~m? -# 2255| v2255_18(void) = ExitFunction : +# 2256| ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) +# 2256| Block 0 +# 2256| v2256_1(void) = EnterFunction : +# 2256| mu2256_2(unknown) = AliasedDefinition : +# 2256| mu2256_3(unknown) = InitializeNonLocal : +# 2256| r2256_4(glval) = VariableAddress[t] : +# 2256| mu2256_5(ClassWithDestructor &) = InitializeParameter[t] : &:r2256_4 +# 2256| r2256_6(ClassWithDestructor &) = Load[t] : &:r2256_4, ~m? +# 2256| mu2256_7(unknown) = InitializeIndirection[t] : &:r2256_6 +# 2256| r2256_8(glval) = VariableAddress[#return] : +# 2256| r2256_9(glval) = VariableAddress[t] : +# 2256| r2256_10(ClassWithDestructor &) = Load[t] : &:r2256_9, ~m? +# 2256| r2256_11(glval) = CopyValue : r2256_10 +# 2256| r2256_12(ClassWithDestructor &) = CopyValue : r2256_11 +# 2256| mu2256_13(ClassWithDestructor &) = Store[#return] : &:r2256_8, r2256_12 +# 2256| v2256_14(void) = ReturnIndirection[t] : &:r2256_6, ~m? +# 2256| r2256_15(glval) = VariableAddress[#return] : +# 2256| v2256_16(void) = ReturnValue : &:r2256_15, ~m? +# 2256| v2256_17(void) = AliasedUse : ~m? +# 2256| v2256_18(void) = ExitFunction : -# 2255| int& vacuous_destructor_call::get(int&) -# 2255| Block 0 -# 2255| v2255_1(void) = EnterFunction : -# 2255| mu2255_2(unknown) = AliasedDefinition : -# 2255| mu2255_3(unknown) = InitializeNonLocal : -# 2255| r2255_4(glval) = VariableAddress[t] : -# 2255| mu2255_5(int &) = InitializeParameter[t] : &:r2255_4 -# 2255| r2255_6(int &) = Load[t] : &:r2255_4, ~m? -# 2255| mu2255_7(unknown) = InitializeIndirection[t] : &:r2255_6 -# 2255| r2255_8(glval) = VariableAddress[#return] : -# 2255| r2255_9(glval) = VariableAddress[t] : -# 2255| r2255_10(int &) = Load[t] : &:r2255_9, ~m? -# 2255| r2255_11(glval) = CopyValue : r2255_10 -# 2255| r2255_12(int &) = CopyValue : r2255_11 -# 2255| mu2255_13(int &) = Store[#return] : &:r2255_8, r2255_12 -# 2255| v2255_14(void) = ReturnIndirection[t] : &:r2255_6, ~m? -# 2255| r2255_15(glval) = VariableAddress[#return] : -# 2255| v2255_16(void) = ReturnValue : &:r2255_15, ~m? -# 2255| v2255_17(void) = AliasedUse : ~m? -# 2255| v2255_18(void) = ExitFunction : +# 2256| int& vacuous_destructor_call::get(int&) +# 2256| Block 0 +# 2256| v2256_1(void) = EnterFunction : +# 2256| mu2256_2(unknown) = AliasedDefinition : +# 2256| mu2256_3(unknown) = InitializeNonLocal : +# 2256| r2256_4(glval) = VariableAddress[t] : +# 2256| mu2256_5(int &) = InitializeParameter[t] : &:r2256_4 +# 2256| r2256_6(int &) = Load[t] : &:r2256_4, ~m? +# 2256| mu2256_7(unknown) = InitializeIndirection[t] : &:r2256_6 +# 2256| r2256_8(glval) = VariableAddress[#return] : +# 2256| r2256_9(glval) = VariableAddress[t] : +# 2256| r2256_10(int &) = Load[t] : &:r2256_9, ~m? +# 2256| r2256_11(glval) = CopyValue : r2256_10 +# 2256| r2256_12(int &) = CopyValue : r2256_11 +# 2256| mu2256_13(int &) = Store[#return] : &:r2256_8, r2256_12 +# 2256| v2256_14(void) = ReturnIndirection[t] : &:r2256_6, ~m? +# 2256| r2256_15(glval) = VariableAddress[#return] : +# 2256| v2256_16(void) = ReturnValue : &:r2256_15, ~m? +# 2256| v2256_17(void) = AliasedUse : ~m? +# 2256| v2256_18(void) = ExitFunction : -# 2258| void vacuous_destructor_call::call_destructor(ClassWithDestructor&) -# 2258| Block 0 -# 2258| v2258_1(void) = EnterFunction : -# 2258| mu2258_2(unknown) = AliasedDefinition : -# 2258| mu2258_3(unknown) = InitializeNonLocal : -# 2258| r2258_4(glval) = VariableAddress[t] : -# 2258| mu2258_5(ClassWithDestructor &) = InitializeParameter[t] : &:r2258_4 -# 2258| r2258_6(ClassWithDestructor &) = Load[t] : &:r2258_4, ~m? -# 2258| mu2258_7(unknown) = InitializeIndirection[t] : &:r2258_6 -# 2259| r2259_1(glval) = FunctionAddress[get] : -# 2259| r2259_2(glval) = VariableAddress[t] : -# 2259| r2259_3(ClassWithDestructor &) = Load[t] : &:r2259_2, ~m? -# 2259| r2259_4(glval) = CopyValue : r2259_3 -# 2259| r2259_5(ClassWithDestructor &) = CopyValue : r2259_4 -# 2259| r2259_6(ClassWithDestructor &) = Call[get] : func:r2259_1, 0:r2259_5 -# 2259| mu2259_7(unknown) = ^CallSideEffect : ~m? -# 2259| v2259_8(void) = ^BufferReadSideEffect[0] : &:r2259_5, ~m? -# 2259| mu2259_9(unknown) = ^BufferMayWriteSideEffect[0] : &:r2259_5 -# 2259| r2259_10(glval) = CopyValue : r2259_6 -# 2259| r2259_11(glval) = FunctionAddress[~ClassWithDestructor] : -# 2259| v2259_12(void) = Call[~ClassWithDestructor] : func:r2259_11 -# 2259| mu2259_13(unknown) = ^CallSideEffect : ~m? -# 2259| v2259_14(void) = ^IndirectReadSideEffect[-1] : &:r2259_10, ~m? -# 2259| mu2259_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2259_10 -# 2260| v2260_1(void) = NoOp : -# 2258| v2258_8(void) = ReturnIndirection[t] : &:r2258_6, ~m? -# 2258| v2258_9(void) = ReturnVoid : -# 2258| v2258_10(void) = AliasedUse : ~m? -# 2258| v2258_11(void) = ExitFunction : +# 2259| void vacuous_destructor_call::call_destructor(ClassWithDestructor&) +# 2259| Block 0 +# 2259| v2259_1(void) = EnterFunction : +# 2259| mu2259_2(unknown) = AliasedDefinition : +# 2259| mu2259_3(unknown) = InitializeNonLocal : +# 2259| r2259_4(glval) = VariableAddress[t] : +# 2259| mu2259_5(ClassWithDestructor &) = InitializeParameter[t] : &:r2259_4 +# 2259| r2259_6(ClassWithDestructor &) = Load[t] : &:r2259_4, ~m? +# 2259| mu2259_7(unknown) = InitializeIndirection[t] : &:r2259_6 +# 2260| r2260_1(glval) = FunctionAddress[get] : +# 2260| r2260_2(glval) = VariableAddress[t] : +# 2260| r2260_3(ClassWithDestructor &) = Load[t] : &:r2260_2, ~m? +# 2260| r2260_4(glval) = CopyValue : r2260_3 +# 2260| r2260_5(ClassWithDestructor &) = CopyValue : r2260_4 +# 2260| r2260_6(ClassWithDestructor &) = Call[get] : func:r2260_1, 0:r2260_5 +# 2260| mu2260_7(unknown) = ^CallSideEffect : ~m? +# 2260| v2260_8(void) = ^BufferReadSideEffect[0] : &:r2260_5, ~m? +# 2260| mu2260_9(unknown) = ^BufferMayWriteSideEffect[0] : &:r2260_5 +# 2260| r2260_10(glval) = CopyValue : r2260_6 +# 2260| r2260_11(glval) = FunctionAddress[~ClassWithDestructor] : +# 2260| v2260_12(void) = Call[~ClassWithDestructor] : func:r2260_11 +# 2260| mu2260_13(unknown) = ^CallSideEffect : ~m? +# 2260| v2260_14(void) = ^IndirectReadSideEffect[-1] : &:r2260_10, ~m? +# 2260| mu2260_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2260_10 +# 2261| v2261_1(void) = NoOp : +# 2259| v2259_8(void) = ReturnIndirection[t] : &:r2259_6, ~m? +# 2259| v2259_9(void) = ReturnVoid : +# 2259| v2259_10(void) = AliasedUse : ~m? +# 2259| v2259_11(void) = ExitFunction : -# 2258| void vacuous_destructor_call::call_destructor(int&) -# 2258| Block 0 -# 2258| v2258_1(void) = EnterFunction : -# 2258| mu2258_2(unknown) = AliasedDefinition : -# 2258| mu2258_3(unknown) = InitializeNonLocal : -# 2258| r2258_4(glval) = VariableAddress[t] : -# 2258| mu2258_5(int &) = InitializeParameter[t] : &:r2258_4 -# 2258| r2258_6(int &) = Load[t] : &:r2258_4, ~m? -# 2258| mu2258_7(unknown) = InitializeIndirection[t] : &:r2258_6 -# 2259| r2259_1(glval) = FunctionAddress[get] : -# 2259| r2259_2(glval) = VariableAddress[t] : -# 2259| r2259_3(int &) = Load[t] : &:r2259_2, ~m? -# 2259| r2259_4(glval) = CopyValue : r2259_3 -# 2259| r2259_5(int &) = CopyValue : r2259_4 -# 2259| r2259_6(int &) = Call[get] : func:r2259_1, 0:r2259_5 -# 2259| mu2259_7(unknown) = ^CallSideEffect : ~m? -# 2259| v2259_8(void) = ^BufferReadSideEffect[0] : &:r2259_5, ~m? -# 2259| mu2259_9(unknown) = ^BufferMayWriteSideEffect[0] : &:r2259_5 -# 2259| r2259_10(glval) = CopyValue : r2259_6 -# 2260| v2260_1(void) = NoOp : -# 2258| v2258_8(void) = ReturnIndirection[t] : &:r2258_6, ~m? -# 2258| v2258_9(void) = ReturnVoid : -# 2258| v2258_10(void) = AliasedUse : ~m? -# 2258| v2258_11(void) = ExitFunction : +# 2259| void vacuous_destructor_call::call_destructor(int&) +# 2259| Block 0 +# 2259| v2259_1(void) = EnterFunction : +# 2259| mu2259_2(unknown) = AliasedDefinition : +# 2259| mu2259_3(unknown) = InitializeNonLocal : +# 2259| r2259_4(glval) = VariableAddress[t] : +# 2259| mu2259_5(int &) = InitializeParameter[t] : &:r2259_4 +# 2259| r2259_6(int &) = Load[t] : &:r2259_4, ~m? +# 2259| mu2259_7(unknown) = InitializeIndirection[t] : &:r2259_6 +# 2260| r2260_1(glval) = FunctionAddress[get] : +# 2260| r2260_2(glval) = VariableAddress[t] : +# 2260| r2260_3(int &) = Load[t] : &:r2260_2, ~m? +# 2260| r2260_4(glval) = CopyValue : r2260_3 +# 2260| r2260_5(int &) = CopyValue : r2260_4 +# 2260| r2260_6(int &) = Call[get] : func:r2260_1, 0:r2260_5 +# 2260| mu2260_7(unknown) = ^CallSideEffect : ~m? +# 2260| v2260_8(void) = ^BufferReadSideEffect[0] : &:r2260_5, ~m? +# 2260| mu2260_9(unknown) = ^BufferMayWriteSideEffect[0] : &:r2260_5 +# 2260| r2260_10(glval) = CopyValue : r2260_6 +# 2261| v2261_1(void) = NoOp : +# 2259| v2259_8(void) = ReturnIndirection[t] : &:r2259_6, ~m? +# 2259| v2259_9(void) = ReturnVoid : +# 2259| v2259_10(void) = AliasedUse : ~m? +# 2259| v2259_11(void) = ExitFunction : -# 2262| void vacuous_destructor_call::non_vacuous_destructor_call() -# 2262| Block 0 -# 2262| v2262_1(void) = EnterFunction : -# 2262| mu2262_2(unknown) = AliasedDefinition : -# 2262| mu2262_3(unknown) = InitializeNonLocal : -# 2263| r2263_1(glval) = VariableAddress[c] : -# 2263| mu2263_2(ClassWithDestructor) = Uninitialized[c] : &:r2263_1 -# 2263| r2263_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2263| v2263_4(void) = Call[ClassWithDestructor] : func:r2263_3, this:r2263_1 -# 2263| mu2263_5(unknown) = ^CallSideEffect : ~m? -# 2263| mu2263_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2263_1 -# 2264| r2264_1(glval) = FunctionAddress[call_destructor] : -# 2264| r2264_2(glval) = VariableAddress[c] : -# 2264| r2264_3(ClassWithDestructor &) = CopyValue : r2264_2 -# 2264| v2264_4(void) = Call[call_destructor] : func:r2264_1, 0:r2264_3 +# 2263| void vacuous_destructor_call::non_vacuous_destructor_call() +# 2263| Block 0 +# 2263| v2263_1(void) = EnterFunction : +# 2263| mu2263_2(unknown) = AliasedDefinition : +# 2263| mu2263_3(unknown) = InitializeNonLocal : +# 2264| r2264_1(glval) = VariableAddress[c] : +# 2264| mu2264_2(ClassWithDestructor) = Uninitialized[c] : &:r2264_1 +# 2264| r2264_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2264| v2264_4(void) = Call[ClassWithDestructor] : func:r2264_3, this:r2264_1 # 2264| mu2264_5(unknown) = ^CallSideEffect : ~m? -# 2264| v2264_6(void) = ^BufferReadSideEffect[0] : &:r2264_3, ~m? -# 2264| mu2264_7(unknown) = ^BufferMayWriteSideEffect[0] : &:r2264_3 -# 2265| v2265_1(void) = NoOp : +# 2264| mu2264_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2264_1 +# 2265| r2265_1(glval) = FunctionAddress[call_destructor] : # 2265| r2265_2(glval) = VariableAddress[c] : -# 2265| r2265_3(glval) = FunctionAddress[~ClassWithDestructor] : -# 2265| v2265_4(void) = Call[~ClassWithDestructor] : func:r2265_3, this:r2265_2 +# 2265| r2265_3(ClassWithDestructor &) = CopyValue : r2265_2 +# 2265| v2265_4(void) = Call[call_destructor] : func:r2265_1, 0:r2265_3 # 2265| mu2265_5(unknown) = ^CallSideEffect : ~m? -# 2265| v2265_6(void) = ^IndirectReadSideEffect[-1] : &:r2265_2, ~m? -# 2265| mu2265_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2265_2 -# 2262| v2262_4(void) = ReturnVoid : -# 2262| v2262_5(void) = AliasedUse : ~m? -# 2262| v2262_6(void) = ExitFunction : +# 2265| v2265_6(void) = ^BufferReadSideEffect[0] : &:r2265_3, ~m? +# 2265| mu2265_7(unknown) = ^BufferMayWriteSideEffect[0] : &:r2265_3 +# 2266| v2266_1(void) = NoOp : +# 2266| r2266_2(glval) = VariableAddress[c] : +# 2266| r2266_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2266| v2266_4(void) = Call[~ClassWithDestructor] : func:r2266_3, this:r2266_2 +# 2266| mu2266_5(unknown) = ^CallSideEffect : ~m? +# 2266| v2266_6(void) = ^IndirectReadSideEffect[-1] : &:r2266_2, ~m? +# 2266| mu2266_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2266_2 +# 2263| v2263_4(void) = ReturnVoid : +# 2263| v2263_5(void) = AliasedUse : ~m? +# 2263| v2263_6(void) = ExitFunction : -# 2267| void vacuous_destructor_call::vacuous_destructor_call() -# 2267| Block 0 -# 2267| v2267_1(void) = EnterFunction : -# 2267| mu2267_2(unknown) = AliasedDefinition : -# 2267| mu2267_3(unknown) = InitializeNonLocal : -# 2268| r2268_1(glval) = VariableAddress[i] : -# 2268| mu2268_2(int) = Uninitialized[i] : &:r2268_1 -# 2269| r2269_1(glval) = FunctionAddress[call_destructor] : -# 2269| r2269_2(glval) = VariableAddress[i] : -# 2269| r2269_3(int &) = CopyValue : r2269_2 -# 2269| v2269_4(void) = Call[call_destructor] : func:r2269_1, 0:r2269_3 -# 2269| mu2269_5(unknown) = ^CallSideEffect : ~m? -# 2269| v2269_6(void) = ^BufferReadSideEffect[0] : &:r2269_3, ~m? -# 2269| mu2269_7(unknown) = ^BufferMayWriteSideEffect[0] : &:r2269_3 -# 2270| v2270_1(void) = NoOp : -# 2267| v2267_4(void) = ReturnVoid : -# 2267| v2267_5(void) = AliasedUse : ~m? -# 2267| v2267_6(void) = ExitFunction : +# 2268| void vacuous_destructor_call::vacuous_destructor_call() +# 2268| Block 0 +# 2268| v2268_1(void) = EnterFunction : +# 2268| mu2268_2(unknown) = AliasedDefinition : +# 2268| mu2268_3(unknown) = InitializeNonLocal : +# 2269| r2269_1(glval) = VariableAddress[i] : +# 2269| mu2269_2(int) = Uninitialized[i] : &:r2269_1 +# 2270| r2270_1(glval) = FunctionAddress[call_destructor] : +# 2270| r2270_2(glval) = VariableAddress[i] : +# 2270| r2270_3(int &) = CopyValue : r2270_2 +# 2270| v2270_4(void) = Call[call_destructor] : func:r2270_1, 0:r2270_3 +# 2270| mu2270_5(unknown) = ^CallSideEffect : ~m? +# 2270| v2270_6(void) = ^BufferReadSideEffect[0] : &:r2270_3, ~m? +# 2270| mu2270_7(unknown) = ^BufferMayWriteSideEffect[0] : &:r2270_3 +# 2271| v2271_1(void) = NoOp : +# 2268| v2268_4(void) = ReturnVoid : +# 2268| v2268_5(void) = AliasedUse : ~m? +# 2268| v2268_6(void) = ExitFunction : -# 2273| void TryCatchDestructors(bool) -# 2273| Block 0 -# 2273| v2273_1(void) = EnterFunction : -# 2273| mu2273_2(unknown) = AliasedDefinition : -# 2273| mu2273_3(unknown) = InitializeNonLocal : -# 2273| r2273_4(glval) = VariableAddress[b] : -# 2273| mu2273_5(bool) = InitializeParameter[b] : &:r2273_4 -# 2275| r2275_1(glval) = VariableAddress[s] : -# 2275| mu2275_2(String) = Uninitialized[s] : &:r2275_1 -# 2275| r2275_3(glval) = FunctionAddress[String] : -# 2275| v2275_4(void) = Call[String] : func:r2275_3, this:r2275_1 -# 2275| mu2275_5(unknown) = ^CallSideEffect : ~m? -# 2275| mu2275_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2275_1 -# 2276| r2276_1(glval) = VariableAddress[b] : -# 2276| r2276_2(bool) = Load[b] : &:r2276_1, ~m? -# 2276| v2276_3(void) = ConditionalBranch : r2276_2 +# 2274| void TryCatchDestructors(bool) +# 2274| Block 0 +# 2274| v2274_1(void) = EnterFunction : +# 2274| mu2274_2(unknown) = AliasedDefinition : +# 2274| mu2274_3(unknown) = InitializeNonLocal : +# 2274| r2274_4(glval) = VariableAddress[b] : +# 2274| mu2274_5(bool) = InitializeParameter[b] : &:r2274_4 +# 2276| r2276_1(glval) = VariableAddress[s] : +# 2276| mu2276_2(String) = Uninitialized[s] : &:r2276_1 +# 2276| r2276_3(glval) = FunctionAddress[String] : +# 2276| v2276_4(void) = Call[String] : func:r2276_3, this:r2276_1 +# 2276| mu2276_5(unknown) = ^CallSideEffect : ~m? +# 2276| mu2276_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2276_1 +# 2277| r2277_1(glval) = VariableAddress[b] : +# 2277| r2277_2(bool) = Load[b] : &:r2277_1, ~m? +# 2277| v2277_3(void) = ConditionalBranch : r2277_2 #-----| False -> Block 4 #-----| True -> Block 3 -# 2273| Block 1 -# 2273| v2273_6(void) = AliasedUse : ~m? -# 2273| v2273_7(void) = ExitFunction : +# 2274| Block 1 +# 2274| v2274_6(void) = AliasedUse : ~m? +# 2274| v2274_7(void) = ExitFunction : -# 2273| Block 2 -# 2273| v2273_8(void) = Unwind : +# 2274| Block 2 +# 2274| v2274_8(void) = Unwind : #-----| Goto -> Block 1 -# 2277| Block 3 -# 2277| r2277_1(glval) = VariableAddress[#throw2277:7] : -# 2277| r2277_2(glval) = StringConstant["string literal"] : -# 2277| r2277_3(char *) = Convert : r2277_2 -# 2277| mu2277_4(char *) = Store[#throw2277:7] : &:r2277_1, r2277_3 -# 2277| v2277_5(void) = ThrowValue : &:r2277_1, ~m? -# 2280| r2280_1(glval) = VariableAddress[s] : -# 2280| r2280_2(glval) = FunctionAddress[~String] : -# 2280| v2280_3(void) = Call[~String] : func:r2280_2, this:r2280_1 -# 2280| mu2280_4(unknown) = ^CallSideEffect : ~m? -# 2280| v2280_5(void) = ^IndirectReadSideEffect[-1] : &:r2280_1, ~m? -# 2280| mu2280_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 +# 2278| Block 3 +# 2278| r2278_1(glval) = VariableAddress[#throw2278:7] : +# 2278| r2278_2(glval) = StringConstant["string literal"] : +# 2278| r2278_3(char *) = Convert : r2278_2 +# 2278| mu2278_4(char *) = Store[#throw2278:7] : &:r2278_1, r2278_3 +# 2278| v2278_5(void) = ThrowValue : &:r2278_1, ~m? +# 2281| r2281_1(glval) = VariableAddress[s] : +# 2281| r2281_2(glval) = FunctionAddress[~String] : +# 2281| v2281_3(void) = Call[~String] : func:r2281_2, this:r2281_1 +# 2281| mu2281_4(unknown) = ^CallSideEffect : ~m? +# 2281| v2281_5(void) = ^IndirectReadSideEffect[-1] : &:r2281_1, ~m? +# 2281| mu2281_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_1 #-----| Exception -> Block 5 -# 2279| Block 4 -# 2279| r2279_1(glval) = VariableAddress[s2] : -# 2279| mu2279_2(String) = Uninitialized[s2] : &:r2279_1 -# 2279| r2279_3(glval) = FunctionAddress[String] : -# 2279| v2279_4(void) = Call[String] : func:r2279_3, this:r2279_1 -# 2279| mu2279_5(unknown) = ^CallSideEffect : ~m? -# 2279| mu2279_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2279_1 -# 2280| r2280_7(glval) = VariableAddress[s2] : -# 2280| r2280_8(glval) = FunctionAddress[~String] : -# 2280| v2280_9(void) = Call[~String] : func:r2280_8, this:r2280_7 -# 2280| mu2280_10(unknown) = ^CallSideEffect : ~m? -# 2280| v2280_11(void) = ^IndirectReadSideEffect[-1] : &:r2280_7, ~m? -# 2280| mu2280_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_7 -# 2280| r2280_13(glval) = VariableAddress[s] : -# 2280| r2280_14(glval) = FunctionAddress[~String] : -# 2280| v2280_15(void) = Call[~String] : func:r2280_14, this:r2280_13 -# 2280| mu2280_16(unknown) = ^CallSideEffect : ~m? -# 2280| v2280_17(void) = ^IndirectReadSideEffect[-1] : &:r2280_13, ~m? -# 2280| mu2280_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_13 +# 2280| Block 4 +# 2280| r2280_1(glval) = VariableAddress[s2] : +# 2280| mu2280_2(String) = Uninitialized[s2] : &:r2280_1 +# 2280| r2280_3(glval) = FunctionAddress[String] : +# 2280| v2280_4(void) = Call[String] : func:r2280_3, this:r2280_1 +# 2280| mu2280_5(unknown) = ^CallSideEffect : ~m? +# 2280| mu2280_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 +# 2281| r2281_7(glval) = VariableAddress[s2] : +# 2281| r2281_8(glval) = FunctionAddress[~String] : +# 2281| v2281_9(void) = Call[~String] : func:r2281_8, this:r2281_7 +# 2281| mu2281_10(unknown) = ^CallSideEffect : ~m? +# 2281| v2281_11(void) = ^IndirectReadSideEffect[-1] : &:r2281_7, ~m? +# 2281| mu2281_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_7 +# 2281| r2281_13(glval) = VariableAddress[s] : +# 2281| r2281_14(glval) = FunctionAddress[~String] : +# 2281| v2281_15(void) = Call[~String] : func:r2281_14, this:r2281_13 +# 2281| mu2281_16(unknown) = ^CallSideEffect : ~m? +# 2281| v2281_17(void) = ^IndirectReadSideEffect[-1] : &:r2281_13, ~m? +# 2281| mu2281_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r2281_13 #-----| Goto -> Block 10 -# 2281| Block 5 -# 2281| v2281_1(void) = CatchByType[const char *] : +# 2282| Block 5 +# 2282| v2282_1(void) = CatchByType[const char *] : #-----| Exception -> Block 7 #-----| Goto -> Block 6 -# 2281| Block 6 -# 2281| r2281_2(glval) = VariableAddress[s] : -# 2281| mu2281_3(char *) = InitializeParameter[s] : &:r2281_2 -# 2281| r2281_4(char *) = Load[s] : &:r2281_2, ~m? -# 2281| mu2281_5(unknown) = InitializeIndirection[s] : &:r2281_4 -# 2282| r2282_1(glval) = VariableAddress[#throw2282:5] : -# 2282| mu2282_2(String) = Uninitialized[#throw2282:5] : &:r2282_1 -# 2282| r2282_3(glval) = FunctionAddress[String] : -# 2282| r2282_4(glval) = VariableAddress[s] : -# 2282| r2282_5(char *) = Load[s] : &:r2282_4, ~m? -# 2282| v2282_6(void) = Call[String] : func:r2282_3, this:r2282_1, 0:r2282_5 -# 2282| mu2282_7(unknown) = ^CallSideEffect : ~m? -# 2282| v2282_8(void) = ^BufferReadSideEffect[0] : &:r2282_5, ~m? -# 2282| mu2282_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2282_1 -# 2282| v2282_10(void) = ThrowValue : &:r2282_1, ~m? +# 2282| Block 6 +# 2282| r2282_2(glval) = VariableAddress[s] : +# 2282| mu2282_3(char *) = InitializeParameter[s] : &:r2282_2 +# 2282| r2282_4(char *) = Load[s] : &:r2282_2, ~m? +# 2282| mu2282_5(unknown) = InitializeIndirection[s] : &:r2282_4 +# 2283| r2283_1(glval) = VariableAddress[#throw2283:5] : +# 2283| mu2283_2(String) = Uninitialized[#throw2283:5] : &:r2283_1 +# 2283| r2283_3(glval) = FunctionAddress[String] : +# 2283| r2283_4(glval) = VariableAddress[s] : +# 2283| r2283_5(char *) = Load[s] : &:r2283_4, ~m? +# 2283| v2283_6(void) = Call[String] : func:r2283_3, this:r2283_1, 0:r2283_5 +# 2283| mu2283_7(unknown) = ^CallSideEffect : ~m? +# 2283| v2283_8(void) = ^BufferReadSideEffect[0] : &:r2283_5, ~m? +# 2283| mu2283_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2283_1 +# 2283| v2283_10(void) = ThrowValue : &:r2283_1, ~m? #-----| Exception -> Block 2 -# 2284| Block 7 -# 2284| v2284_1(void) = CatchByType[const String &] : +# 2285| Block 7 +# 2285| v2285_1(void) = CatchByType[const String &] : #-----| Exception -> Block 9 #-----| Goto -> Block 8 -# 2284| Block 8 -# 2284| r2284_2(glval) = VariableAddress[e] : -# 2284| mu2284_3(String &) = InitializeParameter[e] : &:r2284_2 -# 2284| r2284_4(String &) = Load[e] : &:r2284_2, ~m? -# 2284| mu2284_5(unknown) = InitializeIndirection[e] : &:r2284_4 -# 2284| v2284_6(void) = NoOp : +# 2285| Block 8 +# 2285| r2285_2(glval) = VariableAddress[e] : +# 2285| mu2285_3(String &) = InitializeParameter[e] : &:r2285_2 +# 2285| r2285_4(String &) = Load[e] : &:r2285_2, ~m? +# 2285| mu2285_5(unknown) = InitializeIndirection[e] : &:r2285_4 +# 2285| v2285_6(void) = NoOp : #-----| Goto -> Block 10 -# 2286| Block 9 -# 2286| v2286_1(void) = CatchAny : -# 2287| v2287_1(void) = ReThrow : +# 2287| Block 9 +# 2287| v2287_1(void) = CatchAny : +# 2288| v2288_1(void) = ReThrow : #-----| Exception -> Block 2 -# 2289| Block 10 -# 2289| v2289_1(void) = NoOp : -# 2273| v2273_9(void) = ReturnVoid : +# 2290| Block 10 +# 2290| v2290_1(void) = NoOp : +# 2274| v2274_9(void) = ReturnVoid : #-----| Goto -> Block 1 -# 2291| void IfDestructors(bool) -# 2291| Block 0 -# 2291| v2291_1(void) = EnterFunction : -# 2291| mu2291_2(unknown) = AliasedDefinition : -# 2291| mu2291_3(unknown) = InitializeNonLocal : -# 2291| r2291_4(glval) = VariableAddress[b] : -# 2291| mu2291_5(bool) = InitializeParameter[b] : &:r2291_4 -# 2292| r2292_1(glval) = VariableAddress[s1] : -# 2292| mu2292_2(String) = Uninitialized[s1] : &:r2292_1 -# 2292| r2292_3(glval) = FunctionAddress[String] : -# 2292| v2292_4(void) = Call[String] : func:r2292_3, this:r2292_1 -# 2292| mu2292_5(unknown) = ^CallSideEffect : ~m? -# 2292| mu2292_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2292_1 -# 2293| r2293_1(glval) = VariableAddress[b] : -# 2293| r2293_2(bool) = Load[b] : &:r2293_1, ~m? -# 2293| v2293_3(void) = ConditionalBranch : r2293_2 +# 2292| void IfDestructors(bool) +# 2292| Block 0 +# 2292| v2292_1(void) = EnterFunction : +# 2292| mu2292_2(unknown) = AliasedDefinition : +# 2292| mu2292_3(unknown) = InitializeNonLocal : +# 2292| r2292_4(glval) = VariableAddress[b] : +# 2292| mu2292_5(bool) = InitializeParameter[b] : &:r2292_4 +# 2293| r2293_1(glval) = VariableAddress[s1] : +# 2293| mu2293_2(String) = Uninitialized[s1] : &:r2293_1 +# 2293| r2293_3(glval) = FunctionAddress[String] : +# 2293| v2293_4(void) = Call[String] : func:r2293_3, this:r2293_1 +# 2293| mu2293_5(unknown) = ^CallSideEffect : ~m? +# 2293| mu2293_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2293_1 +# 2294| r2294_1(glval) = VariableAddress[b] : +# 2294| r2294_2(bool) = Load[b] : &:r2294_1, ~m? +# 2294| v2294_3(void) = ConditionalBranch : r2294_2 #-----| False -> Block 2 #-----| True -> Block 1 -# 2294| Block 1 -# 2294| r2294_1(glval) = VariableAddress[s2] : -# 2294| mu2294_2(String) = Uninitialized[s2] : &:r2294_1 -# 2294| r2294_3(glval) = FunctionAddress[String] : -# 2294| v2294_4(void) = Call[String] : func:r2294_3, this:r2294_1 -# 2294| mu2294_5(unknown) = ^CallSideEffect : ~m? -# 2294| mu2294_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2294_1 +# 2295| Block 1 # 2295| r2295_1(glval) = VariableAddress[s2] : -# 2295| r2295_2(glval) = FunctionAddress[~String] : -# 2295| v2295_3(void) = Call[~String] : func:r2295_2, this:r2295_1 -# 2295| mu2295_4(unknown) = ^CallSideEffect : ~m? -# 2295| v2295_5(void) = ^IndirectReadSideEffect[-1] : &:r2295_1, ~m? +# 2295| mu2295_2(String) = Uninitialized[s2] : &:r2295_1 +# 2295| r2295_3(glval) = FunctionAddress[String] : +# 2295| v2295_4(void) = Call[String] : func:r2295_3, this:r2295_1 +# 2295| mu2295_5(unknown) = ^CallSideEffect : ~m? # 2295| mu2295_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2295_1 -#-----| Goto -> Block 3 - -# 2296| Block 2 -# 2296| r2296_1(glval) = VariableAddress[s3] : -# 2296| mu2296_2(String) = Uninitialized[s3] : &:r2296_1 -# 2296| r2296_3(glval) = FunctionAddress[String] : -# 2296| v2296_4(void) = Call[String] : func:r2296_3, this:r2296_1 -# 2296| mu2296_5(unknown) = ^CallSideEffect : ~m? +# 2296| r2296_1(glval) = VariableAddress[s2] : +# 2296| r2296_2(glval) = FunctionAddress[~String] : +# 2296| v2296_3(void) = Call[~String] : func:r2296_2, this:r2296_1 +# 2296| mu2296_4(unknown) = ^CallSideEffect : ~m? +# 2296| v2296_5(void) = ^IndirectReadSideEffect[-1] : &:r2296_1, ~m? # 2296| mu2296_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2296_1 -# 2297| r2297_1(glval) = VariableAddress[s3] : -# 2297| r2297_2(glval) = FunctionAddress[~String] : -# 2297| v2297_3(void) = Call[~String] : func:r2297_2, this:r2297_1 -# 2297| mu2297_4(unknown) = ^CallSideEffect : ~m? -# 2297| v2297_5(void) = ^IndirectReadSideEffect[-1] : &:r2297_1, ~m? -# 2297| mu2297_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2297_1 #-----| Goto -> Block 3 -# 2298| Block 3 -# 2298| r2298_1(glval) = VariableAddress[s4] : -# 2298| mu2298_2(String) = Uninitialized[s4] : &:r2298_1 -# 2298| r2298_3(glval) = FunctionAddress[String] : -# 2298| v2298_4(void) = Call[String] : func:r2298_3, this:r2298_1 -# 2298| mu2298_5(unknown) = ^CallSideEffect : ~m? +# 2297| Block 2 +# 2297| r2297_1(glval) = VariableAddress[s3] : +# 2297| mu2297_2(String) = Uninitialized[s3] : &:r2297_1 +# 2297| r2297_3(glval) = FunctionAddress[String] : +# 2297| v2297_4(void) = Call[String] : func:r2297_3, this:r2297_1 +# 2297| mu2297_5(unknown) = ^CallSideEffect : ~m? +# 2297| mu2297_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2297_1 +# 2298| r2298_1(glval) = VariableAddress[s3] : +# 2298| r2298_2(glval) = FunctionAddress[~String] : +# 2298| v2298_3(void) = Call[~String] : func:r2298_2, this:r2298_1 +# 2298| mu2298_4(unknown) = ^CallSideEffect : ~m? +# 2298| v2298_5(void) = ^IndirectReadSideEffect[-1] : &:r2298_1, ~m? # 2298| mu2298_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2298_1 -# 2299| v2299_1(void) = NoOp : -# 2299| r2299_2(glval) = VariableAddress[s4] : -# 2299| r2299_3(glval) = FunctionAddress[~String] : -# 2299| v2299_4(void) = Call[~String] : func:r2299_3, this:r2299_2 -# 2299| mu2299_5(unknown) = ^CallSideEffect : ~m? -# 2299| v2299_6(void) = ^IndirectReadSideEffect[-1] : &:r2299_2, ~m? -# 2299| mu2299_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2299_2 -# 2299| r2299_8(glval) = VariableAddress[s1] : -# 2299| r2299_9(glval) = FunctionAddress[~String] : -# 2299| v2299_10(void) = Call[~String] : func:r2299_9, this:r2299_8 -# 2299| mu2299_11(unknown) = ^CallSideEffect : ~m? -# 2299| v2299_12(void) = ^IndirectReadSideEffect[-1] : &:r2299_8, ~m? -# 2299| mu2299_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r2299_8 -# 2291| v2291_6(void) = ReturnVoid : -# 2291| v2291_7(void) = AliasedUse : ~m? -# 2291| v2291_8(void) = ExitFunction : +#-----| Goto -> Block 3 -# 2301| void ForDestructors() -# 2301| Block 0 -# 2301| v2301_1(void) = EnterFunction : -# 2301| mu2301_2(unknown) = AliasedDefinition : -# 2301| mu2301_3(unknown) = InitializeNonLocal : -# 2302| r2302_1(glval) = VariableAddress[c] : -# 2302| r2302_2(char) = Constant[97] : -# 2302| mu2302_3(char) = Store[c] : &:r2302_1, r2302_2 -# 2303| r2303_1(glval) = VariableAddress[s] : -# 2303| mu2303_2(String) = Uninitialized[s] : &:r2303_1 -# 2303| r2303_3(glval) = FunctionAddress[String] : -# 2303| r2303_4(glval) = StringConstant["hello"] : -# 2303| r2303_5(char *) = Convert : r2303_4 -# 2303| v2303_6(void) = Call[String] : func:r2303_3, this:r2303_1, 0:r2303_5 -# 2303| mu2303_7(unknown) = ^CallSideEffect : ~m? -# 2303| v2303_8(void) = ^BufferReadSideEffect[0] : &:r2303_5, ~m? -# 2303| mu2303_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2303_1 +# 2299| Block 3 +# 2299| r2299_1(glval) = VariableAddress[s4] : +# 2299| mu2299_2(String) = Uninitialized[s4] : &:r2299_1 +# 2299| r2299_3(glval) = FunctionAddress[String] : +# 2299| v2299_4(void) = Call[String] : func:r2299_3, this:r2299_1 +# 2299| mu2299_5(unknown) = ^CallSideEffect : ~m? +# 2299| mu2299_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2299_1 +# 2300| v2300_1(void) = NoOp : +# 2300| r2300_2(glval) = VariableAddress[s4] : +# 2300| r2300_3(glval) = FunctionAddress[~String] : +# 2300| v2300_4(void) = Call[~String] : func:r2300_3, this:r2300_2 +# 2300| mu2300_5(unknown) = ^CallSideEffect : ~m? +# 2300| v2300_6(void) = ^IndirectReadSideEffect[-1] : &:r2300_2, ~m? +# 2300| mu2300_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2300_2 +# 2300| r2300_8(glval) = VariableAddress[s1] : +# 2300| r2300_9(glval) = FunctionAddress[~String] : +# 2300| v2300_10(void) = Call[~String] : func:r2300_9, this:r2300_8 +# 2300| mu2300_11(unknown) = ^CallSideEffect : ~m? +# 2300| v2300_12(void) = ^IndirectReadSideEffect[-1] : &:r2300_8, ~m? +# 2300| mu2300_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r2300_8 +# 2292| v2292_6(void) = ReturnVoid : +# 2292| v2292_7(void) = AliasedUse : ~m? +# 2292| v2292_8(void) = ExitFunction : + +# 2302| void ForDestructors() +# 2302| Block 0 +# 2302| v2302_1(void) = EnterFunction : +# 2302| mu2302_2(unknown) = AliasedDefinition : +# 2302| mu2302_3(unknown) = InitializeNonLocal : +# 2303| r2303_1(glval) = VariableAddress[c] : +# 2303| r2303_2(char) = Constant[97] : +# 2303| mu2303_3(char) = Store[c] : &:r2303_1, r2303_2 +# 2304| r2304_1(glval) = VariableAddress[s] : +# 2304| mu2304_2(String) = Uninitialized[s] : &:r2304_1 +# 2304| r2304_3(glval) = FunctionAddress[String] : +# 2304| r2304_4(glval) = StringConstant["hello"] : +# 2304| r2304_5(char *) = Convert : r2304_4 +# 2304| v2304_6(void) = Call[String] : func:r2304_3, this:r2304_1, 0:r2304_5 +# 2304| mu2304_7(unknown) = ^CallSideEffect : ~m? +# 2304| v2304_8(void) = ^BufferReadSideEffect[0] : &:r2304_5, ~m? +# 2304| mu2304_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_1 #-----| Goto -> Block 1 -# 2303| Block 1 -# 2303| r2303_10(glval) = VariableAddress[c] : -# 2303| r2303_11(char) = Load[c] : &:r2303_10, ~m? -# 2303| r2303_12(int) = Convert : r2303_11 -# 2303| r2303_13(int) = Constant[0] : -# 2303| r2303_14(bool) = CompareNE : r2303_12, r2303_13 -# 2303| v2303_15(void) = ConditionalBranch : r2303_14 +# 2304| Block 1 +# 2304| r2304_10(glval) = VariableAddress[c] : +# 2304| r2304_11(char) = Load[c] : &:r2304_10, ~m? +# 2304| r2304_12(int) = Convert : r2304_11 +# 2304| r2304_13(int) = Constant[0] : +# 2304| r2304_14(bool) = CompareNE : r2304_12, r2304_13 +# 2304| v2304_15(void) = ConditionalBranch : r2304_14 #-----| False -> Block 3 #-----| True -> Block 2 -# 2304| Block 2 -# 2304| r2304_1(glval) = VariableAddress[s2] : -# 2304| mu2304_2(String) = Uninitialized[s2] : &:r2304_1 -# 2304| r2304_3(glval) = FunctionAddress[String] : -# 2304| v2304_4(void) = Call[String] : func:r2304_3, this:r2304_1 -# 2304| mu2304_5(unknown) = ^CallSideEffect : ~m? -# 2304| mu2304_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_1 +# 2305| Block 2 # 2305| r2305_1(glval) = VariableAddress[s2] : -# 2305| r2305_2(glval) = FunctionAddress[~String] : -# 2305| v2305_3(void) = Call[~String] : func:r2305_2, this:r2305_1 -# 2305| mu2305_4(unknown) = ^CallSideEffect : ~m? -# 2305| v2305_5(void) = ^IndirectReadSideEffect[-1] : &:r2305_1, ~m? +# 2305| mu2305_2(String) = Uninitialized[s2] : &:r2305_1 +# 2305| r2305_3(glval) = FunctionAddress[String] : +# 2305| v2305_4(void) = Call[String] : func:r2305_3, this:r2305_1 +# 2305| mu2305_5(unknown) = ^CallSideEffect : ~m? # 2305| mu2305_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2305_1 -# 2303| r2303_16(glval) = VariableAddress[s] : -# 2303| r2303_17(glval) = FunctionAddress[pop_back] : -# 2303| r2303_18(char) = Call[pop_back] : func:r2303_17, this:r2303_16 -# 2303| mu2303_19(unknown) = ^CallSideEffect : ~m? -# 2303| v2303_20(void) = ^IndirectReadSideEffect[-1] : &:r2303_16, ~m? -# 2303| mu2303_21(String) = ^IndirectMayWriteSideEffect[-1] : &:r2303_16 -# 2303| r2303_22(glval) = VariableAddress[c] : -# 2303| mu2303_23(char) = Store[c] : &:r2303_22, r2303_18 +# 2306| r2306_1(glval) = VariableAddress[s2] : +# 2306| r2306_2(glval) = FunctionAddress[~String] : +# 2306| v2306_3(void) = Call[~String] : func:r2306_2, this:r2306_1 +# 2306| mu2306_4(unknown) = ^CallSideEffect : ~m? +# 2306| v2306_5(void) = ^IndirectReadSideEffect[-1] : &:r2306_1, ~m? +# 2306| mu2306_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2306_1 +# 2304| r2304_16(glval) = VariableAddress[s] : +# 2304| r2304_17(glval) = FunctionAddress[pop_back] : +# 2304| r2304_18(char) = Call[pop_back] : func:r2304_17, this:r2304_16 +# 2304| mu2304_19(unknown) = ^CallSideEffect : ~m? +# 2304| v2304_20(void) = ^IndirectReadSideEffect[-1] : &:r2304_16, ~m? +# 2304| mu2304_21(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_16 +# 2304| r2304_22(glval) = VariableAddress[c] : +# 2304| mu2304_23(char) = Store[c] : &:r2304_22, r2304_18 #-----| Goto (back edge) -> Block 1 -# 2303| Block 3 -# 2303| r2303_24(glval) = VariableAddress[s] : -# 2303| r2303_25(glval) = FunctionAddress[~String] : -# 2303| v2303_26(void) = Call[~String] : func:r2303_25, this:r2303_24 -# 2303| mu2303_27(unknown) = ^CallSideEffect : ~m? -# 2303| v2303_28(void) = ^IndirectReadSideEffect[-1] : &:r2303_24, ~m? -# 2303| mu2303_29(String) = ^IndirectMayWriteSideEffect[-1] : &:r2303_24 -# 2307| r2307_1(glval &&>) = VariableAddress[(__range)] : -# 2307| r2307_2(glval>) = VariableAddress[#temp2307:20] : -# 2307| mu2307_3(vector) = Uninitialized[#temp2307:20] : &:r2307_2 -# 2307| r2307_4(glval) = FunctionAddress[vector] : -# 2307| r2307_5(glval) = VariableAddress[#temp2307:40] : -# 2307| mu2307_6(String) = Uninitialized[#temp2307:40] : &:r2307_5 -# 2307| r2307_7(glval) = FunctionAddress[String] : -# 2307| r2307_8(glval) = StringConstant["hello"] : -# 2307| r2307_9(char *) = Convert : r2307_8 -# 2307| v2307_10(void) = Call[String] : func:r2307_7, this:r2307_5, 0:r2307_9 -# 2307| mu2307_11(unknown) = ^CallSideEffect : ~m? -# 2307| v2307_12(void) = ^BufferReadSideEffect[0] : &:r2307_9, ~m? -# 2307| mu2307_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_5 -# 2307| r2307_14(String) = Load[#temp2307:40] : &:r2307_5, ~m? -# 2307| v2307_15(void) = Call[vector] : func:r2307_4, this:r2307_2, 0:r2307_14 -# 2307| mu2307_16(unknown) = ^CallSideEffect : ~m? -# 2307| mu2307_17(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2307_2 -# 2307| r2307_18(glval) = CopyValue : r2307_5 -# 2307| r2307_19(glval) = FunctionAddress[~String] : -# 2307| v2307_20(void) = Call[~String] : func:r2307_19, this:r2307_18 -# 2307| mu2307_21(unknown) = ^CallSideEffect : ~m? -# 2307| v2307_22(void) = ^IndirectReadSideEffect[-1] : &:r2307_18, ~m? -# 2307| mu2307_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_18 -# 2307| r2307_24(vector &) = CopyValue : r2307_2 -# 2307| mu2307_25(vector &&) = Store[(__range)] : &:r2307_1, r2307_24 -# 2307| r2307_26(glval>) = VariableAddress[(__begin)] : -# 2307| r2307_27(glval &&>) = VariableAddress[(__range)] : -# 2307| r2307_28(vector &&) = Load[(__range)] : &:r2307_27, ~m? -#-----| r0_1(glval>) = CopyValue : r2307_28 +# 2304| Block 3 +# 2304| r2304_24(glval) = VariableAddress[s] : +# 2304| r2304_25(glval) = FunctionAddress[~String] : +# 2304| v2304_26(void) = Call[~String] : func:r2304_25, this:r2304_24 +# 2304| mu2304_27(unknown) = ^CallSideEffect : ~m? +# 2304| v2304_28(void) = ^IndirectReadSideEffect[-1] : &:r2304_24, ~m? +# 2304| mu2304_29(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_24 +# 2308| r2308_1(glval &&>) = VariableAddress[(__range)] : +# 2308| r2308_2(glval>) = VariableAddress[#temp2308:20] : +# 2308| mu2308_3(vector) = Uninitialized[#temp2308:20] : &:r2308_2 +# 2308| r2308_4(glval) = FunctionAddress[vector] : +# 2308| r2308_5(glval) = VariableAddress[#temp2308:40] : +# 2308| mu2308_6(String) = Uninitialized[#temp2308:40] : &:r2308_5 +# 2308| r2308_7(glval) = FunctionAddress[String] : +# 2308| r2308_8(glval) = StringConstant["hello"] : +# 2308| r2308_9(char *) = Convert : r2308_8 +# 2308| v2308_10(void) = Call[String] : func:r2308_7, this:r2308_5, 0:r2308_9 +# 2308| mu2308_11(unknown) = ^CallSideEffect : ~m? +# 2308| v2308_12(void) = ^BufferReadSideEffect[0] : &:r2308_9, ~m? +# 2308| mu2308_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_5 +# 2308| r2308_14(String) = Load[#temp2308:40] : &:r2308_5, ~m? +# 2308| v2308_15(void) = Call[vector] : func:r2308_4, this:r2308_2, 0:r2308_14 +# 2308| mu2308_16(unknown) = ^CallSideEffect : ~m? +# 2308| mu2308_17(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2308_2 +# 2308| r2308_18(glval) = CopyValue : r2308_5 +# 2308| r2308_19(glval) = FunctionAddress[~String] : +# 2308| v2308_20(void) = Call[~String] : func:r2308_19, this:r2308_18 +# 2308| mu2308_21(unknown) = ^CallSideEffect : ~m? +# 2308| v2308_22(void) = ^IndirectReadSideEffect[-1] : &:r2308_18, ~m? +# 2308| mu2308_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_18 +# 2308| r2308_24(vector &) = CopyValue : r2308_2 +# 2308| mu2308_25(vector &&) = Store[(__range)] : &:r2308_1, r2308_24 +# 2308| r2308_26(glval>) = VariableAddress[(__begin)] : +# 2308| r2308_27(glval &&>) = VariableAddress[(__range)] : +# 2308| r2308_28(vector &&) = Load[(__range)] : &:r2308_27, ~m? +#-----| r0_1(glval>) = CopyValue : r2308_28 #-----| r0_2(glval>) = Convert : r0_1 -# 2307| r2307_29(glval) = FunctionAddress[begin] : -# 2307| r2307_30(iterator) = Call[begin] : func:r2307_29, this:r0_2 +# 2308| r2308_29(glval) = FunctionAddress[begin] : +# 2308| r2308_30(iterator) = Call[begin] : func:r2308_29, this:r0_2 #-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m? -# 2307| mu2307_31(iterator) = Store[(__begin)] : &:r2307_26, r2307_30 -# 2307| r2307_32(glval>) = VariableAddress[(__end)] : -# 2307| r2307_33(glval &&>) = VariableAddress[(__range)] : -# 2307| r2307_34(vector &&) = Load[(__range)] : &:r2307_33, ~m? -#-----| r0_4(glval>) = CopyValue : r2307_34 +# 2308| mu2308_31(iterator) = Store[(__begin)] : &:r2308_26, r2308_30 +# 2308| r2308_32(glval>) = VariableAddress[(__end)] : +# 2308| r2308_33(glval &&>) = VariableAddress[(__range)] : +# 2308| r2308_34(vector &&) = Load[(__range)] : &:r2308_33, ~m? +#-----| r0_4(glval>) = CopyValue : r2308_34 #-----| r0_5(glval>) = Convert : r0_4 -# 2307| r2307_35(glval) = FunctionAddress[end] : -# 2307| r2307_36(iterator) = Call[end] : func:r2307_35, this:r0_5 +# 2308| r2308_35(glval) = FunctionAddress[end] : +# 2308| r2308_36(iterator) = Call[end] : func:r2308_35, this:r0_5 #-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? -# 2307| mu2307_37(iterator) = Store[(__end)] : &:r2307_32, r2307_36 +# 2308| mu2308_37(iterator) = Store[(__end)] : &:r2308_32, r2308_36 #-----| Goto -> Block 4 -# 2307| Block 4 -# 2307| r2307_38(glval>) = VariableAddress[(__begin)] : -#-----| r0_7(glval>) = Convert : r2307_38 -# 2307| r2307_39(glval) = FunctionAddress[operator!=] : +# 2308| Block 4 +# 2308| r2308_38(glval>) = VariableAddress[(__begin)] : +#-----| r0_7(glval>) = Convert : r2308_38 +# 2308| r2308_39(glval) = FunctionAddress[operator!=] : #-----| r0_8(glval>) = VariableAddress[#temp0:0] : #-----| mu0_9(iterator) = Uninitialized[#temp0:0] : &:r0_8 -# 2307| r2307_40(glval) = FunctionAddress[iterator] : -# 2307| r2307_41(glval>) = VariableAddress[(__end)] : -#-----| r0_10(glval>) = Convert : r2307_41 +# 2308| r2308_40(glval) = FunctionAddress[iterator] : +# 2308| r2308_41(glval>) = VariableAddress[(__end)] : +#-----| r0_10(glval>) = Convert : r2308_41 #-----| r0_11(iterator &) = CopyValue : r0_10 -# 2307| v2307_42(void) = Call[iterator] : func:r2307_40, this:r0_8, 0:r0_11 -# 2307| mu2307_43(unknown) = ^CallSideEffect : ~m? +# 2308| v2308_42(void) = Call[iterator] : func:r2308_40, this:r0_8, 0:r0_11 +# 2308| mu2308_43(unknown) = ^CallSideEffect : ~m? #-----| v0_12(void) = ^BufferReadSideEffect[0] : &:r0_11, ~m? -# 2307| mu2307_44(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 +# 2308| mu2308_44(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 #-----| r0_13(iterator) = Load[#temp0:0] : &:r0_8, ~m? -# 2307| r2307_45(bool) = Call[operator!=] : func:r2307_39, this:r0_7, 0:r0_13 +# 2308| r2308_45(bool) = Call[operator!=] : func:r2308_39, this:r0_7, 0:r0_13 #-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_7, ~m? -# 2307| v2307_46(void) = ConditionalBranch : r2307_45 +# 2308| v2308_46(void) = ConditionalBranch : r2308_45 #-----| False -> Block 6 #-----| True -> Block 5 -# 2307| Block 5 -# 2307| r2307_47(glval) = VariableAddress[s] : -# 2307| mu2307_48(String) = Uninitialized[s] : &:r2307_47 -# 2307| r2307_49(glval) = FunctionAddress[String] : -# 2307| r2307_50(glval>) = VariableAddress[(__begin)] : -#-----| r0_15(glval>) = Convert : r2307_50 -# 2307| r2307_51(glval) = FunctionAddress[operator*] : -# 2307| r2307_52(String &) = Call[operator*] : func:r2307_51, this:r0_15 +# 2308| Block 5 +# 2308| r2308_47(glval) = VariableAddress[s] : +# 2308| mu2308_48(String) = Uninitialized[s] : &:r2308_47 +# 2308| r2308_49(glval) = FunctionAddress[String] : +# 2308| r2308_50(glval>) = VariableAddress[(__begin)] : +#-----| r0_15(glval>) = Convert : r2308_50 +# 2308| r2308_51(glval) = FunctionAddress[operator*] : +# 2308| r2308_52(String &) = Call[operator*] : func:r2308_51, this:r0_15 #-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m? -# 2307| r2307_53(glval) = CopyValue : r2307_52 -# 2307| r2307_54(glval) = Convert : r2307_53 -# 2307| r2307_55(String &) = CopyValue : r2307_54 -# 2307| v2307_56(void) = Call[String] : func:r2307_49, this:r2307_47, 0:r2307_55 -# 2307| mu2307_57(unknown) = ^CallSideEffect : ~m? -# 2307| v2307_58(void) = ^BufferReadSideEffect[0] : &:r2307_55, ~m? -# 2307| mu2307_59(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_47 -# 2308| r2308_1(glval) = VariableAddress[s2] : -# 2308| mu2308_2(String) = Uninitialized[s2] : &:r2308_1 -# 2308| r2308_3(glval) = FunctionAddress[String] : -# 2308| v2308_4(void) = Call[String] : func:r2308_3, this:r2308_1 -# 2308| mu2308_5(unknown) = ^CallSideEffect : ~m? -# 2308| mu2308_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_1 +# 2308| r2308_53(glval) = CopyValue : r2308_52 +# 2308| r2308_54(glval) = Convert : r2308_53 +# 2308| r2308_55(String &) = CopyValue : r2308_54 +# 2308| v2308_56(void) = Call[String] : func:r2308_49, this:r2308_47, 0:r2308_55 +# 2308| mu2308_57(unknown) = ^CallSideEffect : ~m? +# 2308| v2308_58(void) = ^BufferReadSideEffect[0] : &:r2308_55, ~m? +# 2308| mu2308_59(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_47 # 2309| r2309_1(glval) = VariableAddress[s2] : -# 2309| r2309_2(glval) = FunctionAddress[~String] : -# 2309| v2309_3(void) = Call[~String] : func:r2309_2, this:r2309_1 -# 2309| mu2309_4(unknown) = ^CallSideEffect : ~m? -# 2309| v2309_5(void) = ^IndirectReadSideEffect[-1] : &:r2309_1, ~m? +# 2309| mu2309_2(String) = Uninitialized[s2] : &:r2309_1 +# 2309| r2309_3(glval) = FunctionAddress[String] : +# 2309| v2309_4(void) = Call[String] : func:r2309_3, this:r2309_1 +# 2309| mu2309_5(unknown) = ^CallSideEffect : ~m? # 2309| mu2309_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2309_1 -# 2307| r2307_60(glval>) = VariableAddress[(__begin)] : -# 2307| r2307_61(glval) = FunctionAddress[operator++] : -# 2307| r2307_62(iterator &) = Call[operator++] : func:r2307_61, this:r2307_60 -# 2307| v2307_63(void) = ^IndirectReadSideEffect[-1] : &:r2307_60, ~m? -# 2307| mu2307_64(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2307_60 -# 2307| r2307_65(glval) = VariableAddress[s] : -# 2307| r2307_66(glval) = FunctionAddress[~String] : -# 2307| v2307_67(void) = Call[~String] : func:r2307_66, this:r2307_65 -# 2307| mu2307_68(unknown) = ^CallSideEffect : ~m? -# 2307| v2307_69(void) = ^IndirectReadSideEffect[-1] : &:r2307_65, ~m? -# 2307| mu2307_70(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_65 -# 2307| r2307_71(glval>) = CopyValue : r2307_62 +# 2310| r2310_1(glval) = VariableAddress[s2] : +# 2310| r2310_2(glval) = FunctionAddress[~String] : +# 2310| v2310_3(void) = Call[~String] : func:r2310_2, this:r2310_1 +# 2310| mu2310_4(unknown) = ^CallSideEffect : ~m? +# 2310| v2310_5(void) = ^IndirectReadSideEffect[-1] : &:r2310_1, ~m? +# 2310| mu2310_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2310_1 +# 2308| r2308_60(glval>) = VariableAddress[(__begin)] : +# 2308| r2308_61(glval) = FunctionAddress[operator++] : +# 2308| r2308_62(iterator &) = Call[operator++] : func:r2308_61, this:r2308_60 +# 2308| v2308_63(void) = ^IndirectReadSideEffect[-1] : &:r2308_60, ~m? +# 2308| mu2308_64(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2308_60 +# 2308| r2308_65(glval) = VariableAddress[s] : +# 2308| r2308_66(glval) = FunctionAddress[~String] : +# 2308| v2308_67(void) = Call[~String] : func:r2308_66, this:r2308_65 +# 2308| mu2308_68(unknown) = ^CallSideEffect : ~m? +# 2308| v2308_69(void) = ^IndirectReadSideEffect[-1] : &:r2308_65, ~m? +# 2308| mu2308_70(String) = ^IndirectMayWriteSideEffect[-1] : &:r2308_65 +# 2308| r2308_71(glval>) = CopyValue : r2308_62 #-----| Goto (back edge) -> Block 4 -# 2311| Block 6 -# 2311| r2311_1(glval) = VariableAddress[s] : -# 2311| mu2311_2(String) = Uninitialized[s] : &:r2311_1 -# 2311| r2311_3(glval) = FunctionAddress[String] : -# 2311| r2311_4(glval) = StringConstant["hello"] : -# 2311| r2311_5(char *) = Convert : r2311_4 -# 2311| v2311_6(void) = Call[String] : func:r2311_3, this:r2311_1, 0:r2311_5 -# 2311| mu2311_7(unknown) = ^CallSideEffect : ~m? -# 2311| v2311_8(void) = ^BufferReadSideEffect[0] : &:r2311_5, ~m? -# 2311| mu2311_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_1 -# 2311| r2311_10(glval) = VariableAddress[s2] : -# 2311| mu2311_11(String) = Uninitialized[s2] : &:r2311_10 -# 2311| r2311_12(glval) = FunctionAddress[String] : -# 2311| r2311_13(glval) = StringConstant["world"] : -# 2311| r2311_14(char *) = Convert : r2311_13 -# 2311| v2311_15(void) = Call[String] : func:r2311_12, this:r2311_10, 0:r2311_14 -# 2311| mu2311_16(unknown) = ^CallSideEffect : ~m? -# 2311| v2311_17(void) = ^BufferReadSideEffect[0] : &:r2311_14, ~m? -# 2311| mu2311_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_10 +# 2308| Block 6 +# 2308| r2308_72(glval>) = CopyValue : r2308_2 +# 2308| r2308_73(glval) = FunctionAddress[~vector] : +# 2308| v2308_74(void) = Call[~vector] : func:r2308_73, this:r2308_72 +# 2308| mu2308_75(unknown) = ^CallSideEffect : ~m? +# 2308| v2308_76(void) = ^IndirectReadSideEffect[-1] : &:r2308_72, ~m? +# 2308| mu2308_77(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2308_72 +# 2312| r2312_1(glval) = VariableAddress[s] : +# 2312| mu2312_2(String) = Uninitialized[s] : &:r2312_1 +# 2312| r2312_3(glval) = FunctionAddress[String] : +# 2312| r2312_4(glval) = StringConstant["hello"] : +# 2312| r2312_5(char *) = Convert : r2312_4 +# 2312| v2312_6(void) = Call[String] : func:r2312_3, this:r2312_1, 0:r2312_5 +# 2312| mu2312_7(unknown) = ^CallSideEffect : ~m? +# 2312| v2312_8(void) = ^BufferReadSideEffect[0] : &:r2312_5, ~m? +# 2312| mu2312_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_1 +# 2312| r2312_10(glval) = VariableAddress[s2] : +# 2312| mu2312_11(String) = Uninitialized[s2] : &:r2312_10 +# 2312| r2312_12(glval) = FunctionAddress[String] : +# 2312| r2312_13(glval) = StringConstant["world"] : +# 2312| r2312_14(char *) = Convert : r2312_13 +# 2312| v2312_15(void) = Call[String] : func:r2312_12, this:r2312_10, 0:r2312_14 +# 2312| mu2312_16(unknown) = ^CallSideEffect : ~m? +# 2312| v2312_17(void) = ^BufferReadSideEffect[0] : &:r2312_14, ~m? +# 2312| mu2312_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_10 #-----| Goto -> Block 7 -# 2311| Block 7 -# 2311| r2311_19(glval) = VariableAddress[c] : -# 2311| r2311_20(char) = Load[c] : &:r2311_19, ~m? -# 2311| r2311_21(int) = Convert : r2311_20 -# 2311| r2311_22(int) = Constant[0] : -# 2311| r2311_23(bool) = CompareNE : r2311_21, r2311_22 -# 2311| v2311_24(void) = ConditionalBranch : r2311_23 +# 2312| Block 7 +# 2312| r2312_19(glval) = VariableAddress[c] : +# 2312| r2312_20(char) = Load[c] : &:r2312_19, ~m? +# 2312| r2312_21(int) = Convert : r2312_20 +# 2312| r2312_22(int) = Constant[0] : +# 2312| r2312_23(bool) = CompareNE : r2312_21, r2312_22 +# 2312| v2312_24(void) = ConditionalBranch : r2312_23 #-----| False -> Block 9 #-----| True -> Block 8 -# 2312| Block 8 -# 2312| r2312_1(char) = Constant[0] : -# 2312| r2312_2(glval) = VariableAddress[c] : -# 2312| mu2312_3(char) = Store[c] : &:r2312_2, r2312_1 -# 2311| r2311_25(glval) = VariableAddress[s] : -# 2311| r2311_26(glval) = FunctionAddress[pop_back] : -# 2311| r2311_27(char) = Call[pop_back] : func:r2311_26, this:r2311_25 -# 2311| mu2311_28(unknown) = ^CallSideEffect : ~m? -# 2311| v2311_29(void) = ^IndirectReadSideEffect[-1] : &:r2311_25, ~m? -# 2311| mu2311_30(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_25 -# 2311| r2311_31(glval) = VariableAddress[c] : -# 2311| mu2311_32(char) = Store[c] : &:r2311_31, r2311_27 +# 2313| Block 8 +# 2313| r2313_1(char) = Constant[0] : +# 2313| r2313_2(glval) = VariableAddress[c] : +# 2313| mu2313_3(char) = Store[c] : &:r2313_2, r2313_1 +# 2312| r2312_25(glval) = VariableAddress[s] : +# 2312| r2312_26(glval) = FunctionAddress[pop_back] : +# 2312| r2312_27(char) = Call[pop_back] : func:r2312_26, this:r2312_25 +# 2312| mu2312_28(unknown) = ^CallSideEffect : ~m? +# 2312| v2312_29(void) = ^IndirectReadSideEffect[-1] : &:r2312_25, ~m? +# 2312| mu2312_30(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_25 +# 2312| r2312_31(glval) = VariableAddress[c] : +# 2312| mu2312_32(char) = Store[c] : &:r2312_31, r2312_27 #-----| Goto (back edge) -> Block 7 -# 2311| Block 9 -# 2311| r2311_33(glval) = VariableAddress[s2] : -# 2311| r2311_34(glval) = FunctionAddress[~String] : -# 2311| v2311_35(void) = Call[~String] : func:r2311_34, this:r2311_33 -# 2311| mu2311_36(unknown) = ^CallSideEffect : ~m? -# 2311| v2311_37(void) = ^IndirectReadSideEffect[-1] : &:r2311_33, ~m? -# 2311| mu2311_38(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_33 -# 2311| r2311_39(glval) = VariableAddress[s] : -# 2311| r2311_40(glval) = FunctionAddress[~String] : -# 2311| v2311_41(void) = Call[~String] : func:r2311_40, this:r2311_39 -# 2311| mu2311_42(unknown) = ^CallSideEffect : ~m? -# 2311| v2311_43(void) = ^IndirectReadSideEffect[-1] : &:r2311_39, ~m? -# 2311| mu2311_44(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_39 -# 2314| v2314_1(void) = NoOp : -# 2301| v2301_4(void) = ReturnVoid : -# 2301| v2301_5(void) = AliasedUse : ~m? -# 2301| v2301_6(void) = ExitFunction : +# 2312| Block 9 +# 2312| r2312_33(glval) = VariableAddress[s2] : +# 2312| r2312_34(glval) = FunctionAddress[~String] : +# 2312| v2312_35(void) = Call[~String] : func:r2312_34, this:r2312_33 +# 2312| mu2312_36(unknown) = ^CallSideEffect : ~m? +# 2312| v2312_37(void) = ^IndirectReadSideEffect[-1] : &:r2312_33, ~m? +# 2312| mu2312_38(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_33 +# 2312| r2312_39(glval) = VariableAddress[s] : +# 2312| r2312_40(glval) = FunctionAddress[~String] : +# 2312| v2312_41(void) = Call[~String] : func:r2312_40, this:r2312_39 +# 2312| mu2312_42(unknown) = ^CallSideEffect : ~m? +# 2312| v2312_43(void) = ^IndirectReadSideEffect[-1] : &:r2312_39, ~m? +# 2312| mu2312_44(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_39 +# 2315| v2315_1(void) = NoOp : +# 2302| v2302_4(void) = ReturnVoid : +# 2302| v2302_5(void) = AliasedUse : ~m? +# 2302| v2302_6(void) = ExitFunction : -# 2316| void IfDestructors2(bool) -# 2316| Block 0 -# 2316| v2316_1(void) = EnterFunction : -# 2316| mu2316_2(unknown) = AliasedDefinition : -# 2316| mu2316_3(unknown) = InitializeNonLocal : -# 2316| r2316_4(glval) = VariableAddress[b] : -# 2316| mu2316_5(bool) = InitializeParameter[b] : &:r2316_4 -# 2317| r2317_1(glval) = VariableAddress[s] : -# 2317| mu2317_2(String) = Uninitialized[s] : &:r2317_1 -# 2317| r2317_3(glval) = FunctionAddress[String] : -# 2317| r2317_4(glval) = StringConstant["hello"] : -# 2317| r2317_5(char *) = Convert : r2317_4 -# 2317| v2317_6(void) = Call[String] : func:r2317_3, this:r2317_1, 0:r2317_5 -# 2317| mu2317_7(unknown) = ^CallSideEffect : ~m? -# 2317| v2317_8(void) = ^BufferReadSideEffect[0] : &:r2317_5, ~m? -# 2317| mu2317_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2317_1 -# 2317| r2317_10(glval) = VariableAddress[b] : -# 2317| r2317_11(bool) = Load[b] : &:r2317_10, ~m? -# 2317| v2317_12(void) = ConditionalBranch : r2317_11 +# 2317| void IfDestructors2(bool) +# 2317| Block 0 +# 2317| v2317_1(void) = EnterFunction : +# 2317| mu2317_2(unknown) = AliasedDefinition : +# 2317| mu2317_3(unknown) = InitializeNonLocal : +# 2317| r2317_4(glval) = VariableAddress[b] : +# 2317| mu2317_5(bool) = InitializeParameter[b] : &:r2317_4 +# 2318| r2318_1(glval) = VariableAddress[s] : +# 2318| mu2318_2(String) = Uninitialized[s] : &:r2318_1 +# 2318| r2318_3(glval) = FunctionAddress[String] : +# 2318| r2318_4(glval) = StringConstant["hello"] : +# 2318| r2318_5(char *) = Convert : r2318_4 +# 2318| v2318_6(void) = Call[String] : func:r2318_3, this:r2318_1, 0:r2318_5 +# 2318| mu2318_7(unknown) = ^CallSideEffect : ~m? +# 2318| v2318_8(void) = ^BufferReadSideEffect[0] : &:r2318_5, ~m? +# 2318| mu2318_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2318_1 +# 2318| r2318_10(glval) = VariableAddress[b] : +# 2318| r2318_11(bool) = Load[b] : &:r2318_10, ~m? +# 2318| v2318_12(void) = ConditionalBranch : r2318_11 #-----| False -> Block 2 #-----| True -> Block 1 -# 2318| Block 1 -# 2318| r2318_1(glval) = VariableAddress[x] : -# 2318| r2318_2(int) = Constant[0] : -# 2318| mu2318_3(int) = Store[x] : &:r2318_1, r2318_2 +# 2319| Block 1 +# 2319| r2319_1(glval) = VariableAddress[x] : +# 2319| r2319_2(int) = Constant[0] : +# 2319| mu2319_3(int) = Store[x] : &:r2319_1, r2319_2 #-----| Goto -> Block 3 -# 2320| Block 2 -# 2320| r2320_1(glval) = VariableAddress[y] : -# 2320| r2320_2(int) = Constant[0] : -# 2320| mu2320_3(int) = Store[y] : &:r2320_1, r2320_2 +# 2321| Block 2 +# 2321| r2321_1(glval) = VariableAddress[y] : +# 2321| r2321_2(int) = Constant[0] : +# 2321| mu2321_3(int) = Store[y] : &:r2321_1, r2321_2 #-----| Goto -> Block 3 -# 2321| Block 3 -# 2321| r2321_1(glval) = VariableAddress[s] : -# 2321| r2321_2(glval) = FunctionAddress[~String] : -# 2321| v2321_3(void) = Call[~String] : func:r2321_2, this:r2321_1 -# 2321| mu2321_4(unknown) = ^CallSideEffect : ~m? -# 2321| v2321_5(void) = ^IndirectReadSideEffect[-1] : &:r2321_1, ~m? -# 2321| mu2321_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2321_1 -# 2322| v2322_1(void) = NoOp : -# 2316| v2316_6(void) = ReturnVoid : -# 2316| v2316_7(void) = AliasedUse : ~m? -# 2316| v2316_8(void) = ExitFunction : +# 2322| Block 3 +# 2322| r2322_1(glval) = VariableAddress[s] : +# 2322| r2322_2(glval) = FunctionAddress[~String] : +# 2322| v2322_3(void) = Call[~String] : func:r2322_2, this:r2322_1 +# 2322| mu2322_4(unknown) = ^CallSideEffect : ~m? +# 2322| v2322_5(void) = ^IndirectReadSideEffect[-1] : &:r2322_1, ~m? +# 2322| mu2322_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2322_1 +# 2323| v2323_1(void) = NoOp : +# 2317| v2317_6(void) = ReturnVoid : +# 2317| v2317_7(void) = AliasedUse : ~m? +# 2317| v2317_8(void) = ExitFunction : -# 2331| void IfDestructors3(bool) -# 2331| Block 0 -# 2331| v2331_1(void) = EnterFunction : -# 2331| mu2331_2(unknown) = AliasedDefinition : -# 2331| mu2331_3(unknown) = InitializeNonLocal : -# 2331| r2331_4(glval) = VariableAddress[b] : -# 2331| mu2331_5(bool) = InitializeParameter[b] : &:r2331_4 -# 2332| r2332_1(glval) = VariableAddress[B] : -# 2332| mu2332_2(Bool) = Uninitialized[B] : &:r2332_1 -# 2332| r2332_3(glval) = FunctionAddress[Bool] : +# 2332| void IfDestructors3(bool) +# 2332| Block 0 +# 2332| v2332_1(void) = EnterFunction : +# 2332| mu2332_2(unknown) = AliasedDefinition : +# 2332| mu2332_3(unknown) = InitializeNonLocal : # 2332| r2332_4(glval) = VariableAddress[b] : -# 2332| r2332_5(bool) = Load[b] : &:r2332_4, ~m? -# 2332| v2332_6(void) = Call[Bool] : func:r2332_3, this:r2332_1, 0:r2332_5 -# 2332| mu2332_7(unknown) = ^CallSideEffect : ~m? -# 2332| mu2332_8(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2332_1 -# 2332| r2332_9(glval) = VariableAddress[B] : -# 2332| r2332_10(glval) = FunctionAddress[operator bool] : -# 2332| r2332_11(bool) = Call[operator bool] : func:r2332_10, this:r2332_9 -# 2332| mu2332_12(unknown) = ^CallSideEffect : ~m? -# 2332| v2332_13(void) = ^IndirectReadSideEffect[-1] : &:r2332_9, ~m? -# 2332| mu2332_14(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2332_9 -# 2332| r2332_15(bool) = CopyValue : r2332_11 -# 2332| v2332_16(void) = ConditionalBranch : r2332_15 +# 2332| mu2332_5(bool) = InitializeParameter[b] : &:r2332_4 +# 2333| r2333_1(glval) = VariableAddress[B] : +# 2333| mu2333_2(Bool) = Uninitialized[B] : &:r2333_1 +# 2333| r2333_3(glval) = FunctionAddress[Bool] : +# 2333| r2333_4(glval) = VariableAddress[b] : +# 2333| r2333_5(bool) = Load[b] : &:r2333_4, ~m? +# 2333| v2333_6(void) = Call[Bool] : func:r2333_3, this:r2333_1, 0:r2333_5 +# 2333| mu2333_7(unknown) = ^CallSideEffect : ~m? +# 2333| mu2333_8(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2333_1 +# 2333| r2333_9(glval) = VariableAddress[B] : +# 2333| r2333_10(glval) = FunctionAddress[operator bool] : +# 2333| r2333_11(bool) = Call[operator bool] : func:r2333_10, this:r2333_9 +# 2333| mu2333_12(unknown) = ^CallSideEffect : ~m? +# 2333| v2333_13(void) = ^IndirectReadSideEffect[-1] : &:r2333_9, ~m? +# 2333| mu2333_14(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2333_9 +# 2333| r2333_15(bool) = CopyValue : r2333_11 +# 2333| v2333_16(void) = ConditionalBranch : r2333_15 #-----| False -> Block 2 #-----| True -> Block 1 -# 2333| Block 1 -# 2333| r2333_1(glval) = VariableAddress[s1] : -# 2333| mu2333_2(String) = Uninitialized[s1] : &:r2333_1 -# 2333| r2333_3(glval) = FunctionAddress[String] : -# 2333| v2333_4(void) = Call[String] : func:r2333_3, this:r2333_1 -# 2333| mu2333_5(unknown) = ^CallSideEffect : ~m? -# 2333| mu2333_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2333_1 +# 2334| Block 1 # 2334| r2334_1(glval) = VariableAddress[s1] : -# 2334| r2334_2(glval) = FunctionAddress[~String] : -# 2334| v2334_3(void) = Call[~String] : func:r2334_2, this:r2334_1 -# 2334| mu2334_4(unknown) = ^CallSideEffect : ~m? -# 2334| v2334_5(void) = ^IndirectReadSideEffect[-1] : &:r2334_1, ~m? +# 2334| mu2334_2(String) = Uninitialized[s1] : &:r2334_1 +# 2334| r2334_3(glval) = FunctionAddress[String] : +# 2334| v2334_4(void) = Call[String] : func:r2334_3, this:r2334_1 +# 2334| mu2334_5(unknown) = ^CallSideEffect : ~m? # 2334| mu2334_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2334_1 -#-----| Goto -> Block 3 - -# 2335| Block 2 -# 2335| r2335_1(glval) = VariableAddress[s2] : -# 2335| mu2335_2(String) = Uninitialized[s2] : &:r2335_1 -# 2335| r2335_3(glval) = FunctionAddress[String] : -# 2335| v2335_4(void) = Call[String] : func:r2335_3, this:r2335_1 -# 2335| mu2335_5(unknown) = ^CallSideEffect : ~m? +# 2335| r2335_1(glval) = VariableAddress[s1] : +# 2335| r2335_2(glval) = FunctionAddress[~String] : +# 2335| v2335_3(void) = Call[~String] : func:r2335_2, this:r2335_1 +# 2335| mu2335_4(unknown) = ^CallSideEffect : ~m? +# 2335| v2335_5(void) = ^IndirectReadSideEffect[-1] : &:r2335_1, ~m? # 2335| mu2335_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2335_1 -# 2336| r2336_1(glval) = VariableAddress[s2] : -# 2336| r2336_2(glval) = FunctionAddress[~String] : -# 2336| v2336_3(void) = Call[~String] : func:r2336_2, this:r2336_1 -# 2336| mu2336_4(unknown) = ^CallSideEffect : ~m? -# 2336| v2336_5(void) = ^IndirectReadSideEffect[-1] : &:r2336_1, ~m? -# 2336| mu2336_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2336_1 #-----| Goto -> Block 3 -# 2336| Block 3 -# 2336| r2336_7(glval) = VariableAddress[B] : -# 2336| r2336_8(glval) = FunctionAddress[~Bool] : -# 2336| v2336_9(void) = Call[~Bool] : func:r2336_8, this:r2336_7 -# 2336| mu2336_10(unknown) = ^CallSideEffect : ~m? -# 2336| v2336_11(void) = ^IndirectReadSideEffect[-1] : &:r2336_7, ~m? -# 2336| mu2336_12(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2336_7 -# 2337| v2337_1(void) = NoOp : -# 2331| v2331_6(void) = ReturnVoid : -# 2331| v2331_7(void) = AliasedUse : ~m? -# 2331| v2331_8(void) = ExitFunction : +# 2336| Block 2 +# 2336| r2336_1(glval) = VariableAddress[s2] : +# 2336| mu2336_2(String) = Uninitialized[s2] : &:r2336_1 +# 2336| r2336_3(glval) = FunctionAddress[String] : +# 2336| v2336_4(void) = Call[String] : func:r2336_3, this:r2336_1 +# 2336| mu2336_5(unknown) = ^CallSideEffect : ~m? +# 2336| mu2336_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2336_1 +# 2337| r2337_1(glval) = VariableAddress[s2] : +# 2337| r2337_2(glval) = FunctionAddress[~String] : +# 2337| v2337_3(void) = Call[~String] : func:r2337_2, this:r2337_1 +# 2337| mu2337_4(unknown) = ^CallSideEffect : ~m? +# 2337| v2337_5(void) = ^IndirectReadSideEffect[-1] : &:r2337_1, ~m? +# 2337| mu2337_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2337_1 +#-----| Goto -> Block 3 -# 2339| void WhileLoopDestructors(bool) -# 2339| Block 0 -# 2339| v2339_1(void) = EnterFunction : -# 2339| mu2339_2(unknown) = AliasedDefinition : -# 2339| mu2339_3(unknown) = InitializeNonLocal : -# 2339| r2339_4(glval) = VariableAddress[b] : -# 2339| mu2339_5(bool) = InitializeParameter[b] : &:r2339_4 -# 2341| r2341_1(glval) = VariableAddress[s] : -# 2341| mu2341_2(String) = Uninitialized[s] : &:r2341_1 -# 2341| r2341_3(glval) = FunctionAddress[String] : -# 2341| v2341_4(void) = Call[String] : func:r2341_3, this:r2341_1 -# 2341| mu2341_5(unknown) = ^CallSideEffect : ~m? -# 2341| mu2341_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2341_1 +# 2337| Block 3 +# 2337| r2337_7(glval) = VariableAddress[B] : +# 2337| r2337_8(glval) = FunctionAddress[~Bool] : +# 2337| v2337_9(void) = Call[~Bool] : func:r2337_8, this:r2337_7 +# 2337| mu2337_10(unknown) = ^CallSideEffect : ~m? +# 2337| v2337_11(void) = ^IndirectReadSideEffect[-1] : &:r2337_7, ~m? +# 2337| mu2337_12(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2337_7 +# 2338| v2338_1(void) = NoOp : +# 2332| v2332_6(void) = ReturnVoid : +# 2332| v2332_7(void) = AliasedUse : ~m? +# 2332| v2332_8(void) = ExitFunction : + +# 2340| void WhileLoopDestructors(bool) +# 2340| Block 0 +# 2340| v2340_1(void) = EnterFunction : +# 2340| mu2340_2(unknown) = AliasedDefinition : +# 2340| mu2340_3(unknown) = InitializeNonLocal : +# 2340| r2340_4(glval) = VariableAddress[b] : +# 2340| mu2340_5(bool) = InitializeParameter[b] : &:r2340_4 +# 2342| r2342_1(glval) = VariableAddress[s] : +# 2342| mu2342_2(String) = Uninitialized[s] : &:r2342_1 +# 2342| r2342_3(glval) = FunctionAddress[String] : +# 2342| v2342_4(void) = Call[String] : func:r2342_3, this:r2342_1 +# 2342| mu2342_5(unknown) = ^CallSideEffect : ~m? +# 2342| mu2342_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2342_1 #-----| Goto -> Block 1 -# 2342| Block 1 -# 2342| r2342_1(glval) = VariableAddress[b] : -# 2342| r2342_2(bool) = Load[b] : &:r2342_1, ~m? -# 2342| v2342_3(void) = ConditionalBranch : r2342_2 +# 2343| Block 1 +# 2343| r2343_1(glval) = VariableAddress[b] : +# 2343| r2343_2(bool) = Load[b] : &:r2343_1, ~m? +# 2343| v2343_3(void) = ConditionalBranch : r2343_2 #-----| False -> Block 3 #-----| True -> Block 2 -# 2343| Block 2 -# 2343| r2343_1(bool) = Constant[0] : -# 2343| r2343_2(glval) = VariableAddress[b] : -# 2343| mu2343_3(bool) = Store[b] : &:r2343_2, r2343_1 +# 2344| Block 2 +# 2344| r2344_1(bool) = Constant[0] : +# 2344| r2344_2(glval) = VariableAddress[b] : +# 2344| mu2344_3(bool) = Store[b] : &:r2344_2, r2344_1 #-----| Goto (back edge) -> Block 1 -# 2345| Block 3 -# 2345| r2345_1(glval) = VariableAddress[s] : -# 2345| r2345_2(glval) = FunctionAddress[~String] : -# 2345| v2345_3(void) = Call[~String] : func:r2345_2, this:r2345_1 -# 2345| mu2345_4(unknown) = ^CallSideEffect : ~m? -# 2345| v2345_5(void) = ^IndirectReadSideEffect[-1] : &:r2345_1, ~m? -# 2345| mu2345_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2345_1 +# 2346| Block 3 +# 2346| r2346_1(glval) = VariableAddress[s] : +# 2346| r2346_2(glval) = FunctionAddress[~String] : +# 2346| v2346_3(void) = Call[~String] : func:r2346_2, this:r2346_1 +# 2346| mu2346_4(unknown) = ^CallSideEffect : ~m? +# 2346| v2346_5(void) = ^IndirectReadSideEffect[-1] : &:r2346_1, ~m? +# 2346| mu2346_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2346_1 #-----| Goto -> Block 4 -# 2348| Block 4 -# 2348| r2348_1(glval) = VariableAddress[B] : -# 2348| mu2348_2(Bool) = Uninitialized[B] : &:r2348_1 -# 2348| r2348_3(glval) = FunctionAddress[Bool] : -# 2348| r2348_4(glval) = VariableAddress[b] : -# 2348| r2348_5(bool) = Load[b] : &:r2348_4, ~m? -# 2348| v2348_6(void) = Call[Bool] : func:r2348_3, this:r2348_1, 0:r2348_5 -# 2348| mu2348_7(unknown) = ^CallSideEffect : ~m? -# 2348| mu2348_8(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2348_1 -# 2348| r2348_9(glval) = VariableAddress[B] : -# 2348| r2348_10(glval) = FunctionAddress[operator bool] : -# 2348| r2348_11(bool) = Call[operator bool] : func:r2348_10, this:r2348_9 -# 2348| mu2348_12(unknown) = ^CallSideEffect : ~m? -# 2348| v2348_13(void) = ^IndirectReadSideEffect[-1] : &:r2348_9, ~m? -# 2348| mu2348_14(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2348_9 -# 2348| r2348_15(bool) = CopyValue : r2348_11 -# 2348| v2348_16(void) = ConditionalBranch : r2348_15 +# 2349| Block 4 +# 2349| r2349_1(glval) = VariableAddress[B] : +# 2349| mu2349_2(Bool) = Uninitialized[B] : &:r2349_1 +# 2349| r2349_3(glval) = FunctionAddress[Bool] : +# 2349| r2349_4(glval) = VariableAddress[b] : +# 2349| r2349_5(bool) = Load[b] : &:r2349_4, ~m? +# 2349| v2349_6(void) = Call[Bool] : func:r2349_3, this:r2349_1, 0:r2349_5 +# 2349| mu2349_7(unknown) = ^CallSideEffect : ~m? +# 2349| mu2349_8(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2349_1 +# 2349| r2349_9(glval) = VariableAddress[B] : +# 2349| r2349_10(glval) = FunctionAddress[operator bool] : +# 2349| r2349_11(bool) = Call[operator bool] : func:r2349_10, this:r2349_9 +# 2349| mu2349_12(unknown) = ^CallSideEffect : ~m? +# 2349| v2349_13(void) = ^IndirectReadSideEffect[-1] : &:r2349_9, ~m? +# 2349| mu2349_14(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2349_9 +# 2349| r2349_15(bool) = CopyValue : r2349_11 +# 2349| v2349_16(void) = ConditionalBranch : r2349_15 #-----| False -> Block 6 #-----| True -> Block 5 -# 2349| Block 5 -# 2349| r2349_1(bool) = Constant[0] : -# 2349| r2349_2(glval) = VariableAddress[b] : -# 2349| mu2349_3(bool) = Store[b] : &:r2349_2, r2349_1 -# 2350| r2350_1(glval) = VariableAddress[B] : -# 2350| r2350_2(glval) = FunctionAddress[~Bool] : -# 2350| v2350_3(void) = Call[~Bool] : func:r2350_2, this:r2350_1 -# 2350| mu2350_4(unknown) = ^CallSideEffect : ~m? -# 2350| v2350_5(void) = ^IndirectReadSideEffect[-1] : &:r2350_1, ~m? -# 2350| mu2350_6(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2350_1 +# 2350| Block 5 +# 2350| r2350_1(bool) = Constant[0] : +# 2350| r2350_2(glval) = VariableAddress[b] : +# 2350| mu2350_3(bool) = Store[b] : &:r2350_2, r2350_1 +# 2351| r2351_1(glval) = VariableAddress[B] : +# 2351| r2351_2(glval) = FunctionAddress[~Bool] : +# 2351| v2351_3(void) = Call[~Bool] : func:r2351_2, this:r2351_1 +# 2351| mu2351_4(unknown) = ^CallSideEffect : ~m? +# 2351| v2351_5(void) = ^IndirectReadSideEffect[-1] : &:r2351_1, ~m? +# 2351| mu2351_6(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2351_1 #-----| Goto (back edge) -> Block 4 -# 2350| Block 6 -# 2350| r2350_7(glval) = VariableAddress[B] : -# 2350| r2350_8(glval) = FunctionAddress[~Bool] : -# 2350| v2350_9(void) = Call[~Bool] : func:r2350_8, this:r2350_7 -# 2350| mu2350_10(unknown) = ^CallSideEffect : ~m? -# 2350| v2350_11(void) = ^IndirectReadSideEffect[-1] : &:r2350_7, ~m? -# 2350| mu2350_12(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2350_7 -# 2352| v2352_1(void) = NoOp : -# 2339| v2339_6(void) = ReturnVoid : -# 2339| v2339_7(void) = AliasedUse : ~m? -# 2339| v2339_8(void) = ExitFunction : +# 2351| Block 6 +# 2351| r2351_7(glval) = VariableAddress[B] : +# 2351| r2351_8(glval) = FunctionAddress[~Bool] : +# 2351| v2351_9(void) = Call[~Bool] : func:r2351_8, this:r2351_7 +# 2351| mu2351_10(unknown) = ^CallSideEffect : ~m? +# 2351| v2351_11(void) = ^IndirectReadSideEffect[-1] : &:r2351_7, ~m? +# 2351| mu2351_12(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2351_7 +# 2353| v2353_1(void) = NoOp : +# 2340| v2340_6(void) = ReturnVoid : +# 2340| v2340_7(void) = AliasedUse : ~m? +# 2340| v2340_8(void) = ExitFunction : -# 2354| void VoidFunc() -# 2354| Block 0 -# 2354| v2354_1(void) = EnterFunction : -# 2354| mu2354_2(unknown) = AliasedDefinition : -# 2354| mu2354_3(unknown) = InitializeNonLocal : -# 2354| v2354_4(void) = NoOp : -# 2354| v2354_5(void) = ReturnVoid : -# 2354| v2354_6(void) = AliasedUse : ~m? -# 2354| v2354_7(void) = ExitFunction : +# 2355| void VoidFunc() +# 2355| Block 0 +# 2355| v2355_1(void) = EnterFunction : +# 2355| mu2355_2(unknown) = AliasedDefinition : +# 2355| mu2355_3(unknown) = InitializeNonLocal : +# 2355| v2355_4(void) = NoOp : +# 2355| v2355_5(void) = ReturnVoid : +# 2355| v2355_6(void) = AliasedUse : ~m? +# 2355| v2355_7(void) = ExitFunction : -# 2356| void IfReturnDestructors(bool) -# 2356| Block 0 -# 2356| v2356_1(void) = EnterFunction : -# 2356| mu2356_2(unknown) = AliasedDefinition : -# 2356| mu2356_3(unknown) = InitializeNonLocal : -# 2356| r2356_4(glval) = VariableAddress[b] : -# 2356| mu2356_5(bool) = InitializeParameter[b] : &:r2356_4 -# 2357| r2357_1(glval) = VariableAddress[s] : -# 2357| mu2357_2(String) = Uninitialized[s] : &:r2357_1 -# 2357| r2357_3(glval) = FunctionAddress[String] : -# 2357| v2357_4(void) = Call[String] : func:r2357_3, this:r2357_1 -# 2357| mu2357_5(unknown) = ^CallSideEffect : ~m? -# 2357| mu2357_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2357_1 -# 2358| r2358_1(glval) = VariableAddress[b] : -# 2358| r2358_2(bool) = Load[b] : &:r2358_1, ~m? -# 2358| v2358_3(void) = ConditionalBranch : r2358_2 +# 2357| void IfReturnDestructors(bool) +# 2357| Block 0 +# 2357| v2357_1(void) = EnterFunction : +# 2357| mu2357_2(unknown) = AliasedDefinition : +# 2357| mu2357_3(unknown) = InitializeNonLocal : +# 2357| r2357_4(glval) = VariableAddress[b] : +# 2357| mu2357_5(bool) = InitializeParameter[b] : &:r2357_4 +# 2358| r2358_1(glval) = VariableAddress[s] : +# 2358| mu2358_2(String) = Uninitialized[s] : &:r2358_1 +# 2358| r2358_3(glval) = FunctionAddress[String] : +# 2358| v2358_4(void) = Call[String] : func:r2358_3, this:r2358_1 +# 2358| mu2358_5(unknown) = ^CallSideEffect : ~m? +# 2358| mu2358_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2358_1 +# 2359| r2359_1(glval) = VariableAddress[b] : +# 2359| r2359_2(bool) = Load[b] : &:r2359_1, ~m? +# 2359| v2359_3(void) = ConditionalBranch : r2359_2 #-----| False -> Block 3 #-----| True -> Block 2 -# 2356| Block 1 -# 2356| v2356_6(void) = ReturnVoid : -# 2356| v2356_7(void) = AliasedUse : ~m? -# 2356| v2356_8(void) = ExitFunction : +# 2357| Block 1 +# 2357| v2357_6(void) = ReturnVoid : +# 2357| v2357_7(void) = AliasedUse : ~m? +# 2357| v2357_8(void) = ExitFunction : -# 2359| Block 2 -# 2359| v2359_1(void) = NoOp : -# 2365| r2365_1(glval) = VariableAddress[s] : -# 2365| r2365_2(glval) = FunctionAddress[~String] : -# 2365| v2365_3(void) = Call[~String] : func:r2365_2, this:r2365_1 -# 2365| mu2365_4(unknown) = ^CallSideEffect : ~m? -# 2365| v2365_5(void) = ^IndirectReadSideEffect[-1] : &:r2365_1, ~m? -# 2365| mu2365_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2365_1 +# 2360| Block 2 +# 2360| v2360_1(void) = NoOp : +# 2366| r2366_1(glval) = VariableAddress[s] : +# 2366| r2366_2(glval) = FunctionAddress[~String] : +# 2366| v2366_3(void) = Call[~String] : func:r2366_2, this:r2366_1 +# 2366| mu2366_4(unknown) = ^CallSideEffect : ~m? +# 2366| v2366_5(void) = ^IndirectReadSideEffect[-1] : &:r2366_1, ~m? +# 2366| mu2366_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2366_1 #-----| Goto -> Block 1 -# 2361| Block 3 -# 2361| r2361_1(glval) = VariableAddress[b] : -# 2361| r2361_2(bool) = Load[b] : &:r2361_1, ~m? -# 2361| v2361_3(void) = ConditionalBranch : r2361_2 +# 2362| Block 3 +# 2362| r2362_1(glval) = VariableAddress[b] : +# 2362| r2362_2(bool) = Load[b] : &:r2362_1, ~m? +# 2362| v2362_3(void) = ConditionalBranch : r2362_2 #-----| False -> Block 5 #-----| True -> Block 4 -# 2362| Block 4 -# 2362| r2362_1(glval) = FunctionAddress[VoidFunc] : -# 2362| v2362_2(void) = Call[VoidFunc] : func:r2362_1 -# 2362| mu2362_3(unknown) = ^CallSideEffect : ~m? -# 2362| v2362_4(void) = NoOp : -# 2365| r2365_7(glval) = VariableAddress[s] : -# 2365| r2365_8(glval) = FunctionAddress[~String] : -# 2365| v2365_9(void) = Call[~String] : func:r2365_8, this:r2365_7 -# 2365| mu2365_10(unknown) = ^CallSideEffect : ~m? -# 2365| v2365_11(void) = ^IndirectReadSideEffect[-1] : &:r2365_7, ~m? -# 2365| mu2365_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2365_7 +# 2363| Block 4 +# 2363| r2363_1(glval) = FunctionAddress[VoidFunc] : +# 2363| v2363_2(void) = Call[VoidFunc] : func:r2363_1 +# 2363| mu2363_3(unknown) = ^CallSideEffect : ~m? +# 2363| v2363_4(void) = NoOp : +# 2366| r2366_7(glval) = VariableAddress[s] : +# 2366| r2366_8(glval) = FunctionAddress[~String] : +# 2366| v2366_9(void) = Call[~String] : func:r2366_8, this:r2366_7 +# 2366| mu2366_10(unknown) = ^CallSideEffect : ~m? +# 2366| v2366_11(void) = ^IndirectReadSideEffect[-1] : &:r2366_7, ~m? +# 2366| mu2366_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2366_7 #-----| Goto -> Block 1 -# 2364| Block 5 -# 2364| r2364_1(glval) = VariableAddress[s] : -# 2365| v2365_13(void) = NoOp : -# 2365| r2365_14(glval) = VariableAddress[s] : -# 2365| r2365_15(glval) = FunctionAddress[~String] : -# 2365| v2365_16(void) = Call[~String] : func:r2365_15, this:r2365_14 -# 2365| mu2365_17(unknown) = ^CallSideEffect : ~m? -# 2365| v2365_18(void) = ^IndirectReadSideEffect[-1] : &:r2365_14, ~m? -# 2365| mu2365_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r2365_14 +# 2365| Block 5 +# 2365| r2365_1(glval) = VariableAddress[s] : +# 2366| v2366_13(void) = NoOp : +# 2366| r2366_14(glval) = VariableAddress[s] : +# 2366| r2366_15(glval) = FunctionAddress[~String] : +# 2366| v2366_16(void) = Call[~String] : func:r2366_15, this:r2366_14 +# 2366| mu2366_17(unknown) = ^CallSideEffect : ~m? +# 2366| v2366_18(void) = ^IndirectReadSideEffect[-1] : &:r2366_14, ~m? +# 2366| mu2366_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r2366_14 #-----| Goto -> Block 1 -# 2367| int IfReturnDestructors3(bool) -# 2367| Block 0 -# 2367| v2367_1(void) = EnterFunction : -# 2367| mu2367_2(unknown) = AliasedDefinition : -# 2367| mu2367_3(unknown) = InitializeNonLocal : -# 2367| r2367_4(glval) = VariableAddress[b] : -# 2367| mu2367_5(bool) = InitializeParameter[b] : &:r2367_4 -# 2368| r2368_1(glval) = VariableAddress[s] : -# 2368| mu2368_2(String) = Uninitialized[s] : &:r2368_1 -# 2368| r2368_3(glval) = FunctionAddress[String] : -# 2368| v2368_4(void) = Call[String] : func:r2368_3, this:r2368_1 -# 2368| mu2368_5(unknown) = ^CallSideEffect : ~m? -# 2368| mu2368_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2368_1 -# 2369| r2369_1(glval) = VariableAddress[b] : -# 2369| r2369_2(bool) = Load[b] : &:r2369_1, ~m? -# 2369| v2369_3(void) = ConditionalBranch : r2369_2 +# 2368| int IfReturnDestructors3(bool) +# 2368| Block 0 +# 2368| v2368_1(void) = EnterFunction : +# 2368| mu2368_2(unknown) = AliasedDefinition : +# 2368| mu2368_3(unknown) = InitializeNonLocal : +# 2368| r2368_4(glval) = VariableAddress[b] : +# 2368| mu2368_5(bool) = InitializeParameter[b] : &:r2368_4 +# 2369| r2369_1(glval) = VariableAddress[s] : +# 2369| mu2369_2(String) = Uninitialized[s] : &:r2369_1 +# 2369| r2369_3(glval) = FunctionAddress[String] : +# 2369| v2369_4(void) = Call[String] : func:r2369_3, this:r2369_1 +# 2369| mu2369_5(unknown) = ^CallSideEffect : ~m? +# 2369| mu2369_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2369_1 +# 2370| r2370_1(glval) = VariableAddress[b] : +# 2370| r2370_2(bool) = Load[b] : &:r2370_1, ~m? +# 2370| v2370_3(void) = ConditionalBranch : r2370_2 #-----| False -> Block 3 #-----| True -> Block 2 -# 2367| Block 1 -# 2367| r2367_6(glval) = VariableAddress[#return] : -# 2367| v2367_7(void) = ReturnValue : &:r2367_6, ~m? -# 2367| v2367_8(void) = AliasedUse : ~m? -# 2367| v2367_9(void) = ExitFunction : +# 2368| Block 1 +# 2368| r2368_6(glval) = VariableAddress[#return] : +# 2368| v2368_7(void) = ReturnValue : &:r2368_6, ~m? +# 2368| v2368_8(void) = AliasedUse : ~m? +# 2368| v2368_9(void) = ExitFunction : -# 2370| Block 2 -# 2370| r2370_1(glval) = VariableAddress[#return] : -# 2370| r2370_2(int) = Constant[1] : -# 2370| mu2370_3(int) = Store[#return] : &:r2370_1, r2370_2 -# 2373| r2373_1(glval) = VariableAddress[s] : -# 2373| r2373_2(glval) = FunctionAddress[~String] : -# 2373| v2373_3(void) = Call[~String] : func:r2373_2, this:r2373_1 -# 2373| mu2373_4(unknown) = ^CallSideEffect : ~m? -# 2373| v2373_5(void) = ^IndirectReadSideEffect[-1] : &:r2373_1, ~m? -# 2373| mu2373_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2373_1 +# 2371| Block 2 +# 2371| r2371_1(glval) = VariableAddress[#return] : +# 2371| r2371_2(int) = Constant[1] : +# 2371| mu2371_3(int) = Store[#return] : &:r2371_1, r2371_2 +# 2374| r2374_1(glval) = VariableAddress[s] : +# 2374| r2374_2(glval) = FunctionAddress[~String] : +# 2374| v2374_3(void) = Call[~String] : func:r2374_2, this:r2374_1 +# 2374| mu2374_4(unknown) = ^CallSideEffect : ~m? +# 2374| v2374_5(void) = ^IndirectReadSideEffect[-1] : &:r2374_1, ~m? +# 2374| mu2374_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2374_1 #-----| Goto -> Block 1 -# 2372| Block 3 -# 2372| r2372_1(glval) = VariableAddress[#return] : -# 2372| r2372_2(int) = Constant[0] : -# 2372| mu2372_3(int) = Store[#return] : &:r2372_1, r2372_2 -# 2373| r2373_7(glval) = VariableAddress[s] : -# 2373| r2373_8(glval) = FunctionAddress[~String] : -# 2373| v2373_9(void) = Call[~String] : func:r2373_8, this:r2373_7 -# 2373| mu2373_10(unknown) = ^CallSideEffect : ~m? -# 2373| v2373_11(void) = ^IndirectReadSideEffect[-1] : &:r2373_7, ~m? -# 2373| mu2373_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2373_7 +# 2373| Block 3 +# 2373| r2373_1(glval) = VariableAddress[#return] : +# 2373| r2373_2(int) = Constant[0] : +# 2373| mu2373_3(int) = Store[#return] : &:r2373_1, r2373_2 +# 2374| r2374_7(glval) = VariableAddress[s] : +# 2374| r2374_8(glval) = FunctionAddress[~String] : +# 2374| v2374_9(void) = Call[~String] : func:r2374_8, this:r2374_7 +# 2374| mu2374_10(unknown) = ^CallSideEffect : ~m? +# 2374| v2374_11(void) = ^IndirectReadSideEffect[-1] : &:r2374_7, ~m? +# 2374| mu2374_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2374_7 #-----| Goto -> Block 1 -# 2375| void VoidReturnDestructors() -# 2375| Block 0 -# 2375| v2375_1(void) = EnterFunction : -# 2375| mu2375_2(unknown) = AliasedDefinition : -# 2375| mu2375_3(unknown) = InitializeNonLocal : -# 2376| r2376_1(glval) = VariableAddress[s] : -# 2376| mu2376_2(String) = Uninitialized[s] : &:r2376_1 -# 2376| r2376_3(glval) = FunctionAddress[String] : -# 2376| v2376_4(void) = Call[String] : func:r2376_3, this:r2376_1 -# 2376| mu2376_5(unknown) = ^CallSideEffect : ~m? -# 2376| mu2376_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2376_1 -# 2377| r2377_1(glval) = FunctionAddress[VoidFunc] : -# 2377| v2377_2(void) = Call[VoidFunc] : func:r2377_1 -# 2377| mu2377_3(unknown) = ^CallSideEffect : ~m? -# 2377| v2377_4(void) = NoOp : -# 2378| r2378_1(glval) = VariableAddress[s] : -# 2378| r2378_2(glval) = FunctionAddress[~String] : -# 2378| v2378_3(void) = Call[~String] : func:r2378_2, this:r2378_1 -# 2378| mu2378_4(unknown) = ^CallSideEffect : ~m? -# 2378| v2378_5(void) = ^IndirectReadSideEffect[-1] : &:r2378_1, ~m? -# 2378| mu2378_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2378_1 -# 2375| v2375_4(void) = ReturnVoid : -# 2375| v2375_5(void) = AliasedUse : ~m? -# 2375| v2375_6(void) = ExitFunction : +# 2376| void VoidReturnDestructors() +# 2376| Block 0 +# 2376| v2376_1(void) = EnterFunction : +# 2376| mu2376_2(unknown) = AliasedDefinition : +# 2376| mu2376_3(unknown) = InitializeNonLocal : +# 2377| r2377_1(glval) = VariableAddress[s] : +# 2377| mu2377_2(String) = Uninitialized[s] : &:r2377_1 +# 2377| r2377_3(glval) = FunctionAddress[String] : +# 2377| v2377_4(void) = Call[String] : func:r2377_3, this:r2377_1 +# 2377| mu2377_5(unknown) = ^CallSideEffect : ~m? +# 2377| mu2377_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2377_1 +# 2378| r2378_1(glval) = FunctionAddress[VoidFunc] : +# 2378| v2378_2(void) = Call[VoidFunc] : func:r2378_1 +# 2378| mu2378_3(unknown) = ^CallSideEffect : ~m? +# 2378| v2378_4(void) = NoOp : +# 2379| r2379_1(glval) = VariableAddress[s] : +# 2379| r2379_2(glval) = FunctionAddress[~String] : +# 2379| v2379_3(void) = Call[~String] : func:r2379_2, this:r2379_1 +# 2379| mu2379_4(unknown) = ^CallSideEffect : ~m? +# 2379| v2379_5(void) = ^IndirectReadSideEffect[-1] : &:r2379_1, ~m? +# 2379| mu2379_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2379_1 +# 2376| v2376_4(void) = ReturnVoid : +# 2376| v2376_5(void) = AliasedUse : ~m? +# 2376| v2376_6(void) = ExitFunction : -# 2388| return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() -# 2388| Block 0 -# 2388| v2388_1(void) = EnterFunction : -# 2388| mu2388_2(unknown) = AliasedDefinition : -# 2388| mu2388_3(unknown) = InitializeNonLocal : -# 2390| r2390_1(glval<..:: *>) = VariableAddress[#return] : -# 2390| r2390_2(..()(..)) = FunctionAddress[VoidToInt] : -# 2390| mu2390_3(..:: *) = Store[#return] : &:r2390_1, r2390_2 -# 2388| r2388_4(glval<..:: *>) = VariableAddress[#return] : -# 2388| v2388_5(void) = ReturnValue : &:r2388_4, ~m? -# 2388| v2388_6(void) = AliasedUse : ~m? -# 2388| v2388_7(void) = ExitFunction : +# 2389| return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() +# 2389| Block 0 +# 2389| v2389_1(void) = EnterFunction : +# 2389| mu2389_2(unknown) = AliasedDefinition : +# 2389| mu2389_3(unknown) = InitializeNonLocal : +# 2391| r2391_1(glval<..:: *>) = VariableAddress[#return] : +# 2391| r2391_2(..()(..)) = FunctionAddress[VoidToInt] : +# 2391| mu2391_3(..:: *) = Store[#return] : &:r2391_1, r2391_2 +# 2389| r2389_4(glval<..:: *>) = VariableAddress[#return] : +# 2389| v2389_5(void) = ReturnValue : &:r2389_4, ~m? +# 2389| v2389_6(void) = AliasedUse : ~m? +# 2389| v2389_7(void) = ExitFunction : -# 2395| int small_operation_should_not_be_constant_folded() -# 2395| Block 0 -# 2395| v2395_1(void) = EnterFunction : -# 2395| mu2395_2(unknown) = AliasedDefinition : -# 2395| mu2395_3(unknown) = InitializeNonLocal : -# 2396| r2396_1(glval) = VariableAddress[#return] : -# 2396| r2396_2(int) = Constant[1] : -# 2396| r2396_3(int) = Constant[2] : -# 2396| r2396_4(int) = BitXor : r2396_2, r2396_3 -# 2396| mu2396_5(int) = Store[#return] : &:r2396_1, r2396_4 -# 2395| r2395_4(glval) = VariableAddress[#return] : -# 2395| v2395_5(void) = ReturnValue : &:r2395_4, ~m? -# 2395| v2395_6(void) = AliasedUse : ~m? -# 2395| v2395_7(void) = ExitFunction : +# 2396| int small_operation_should_not_be_constant_folded() +# 2396| Block 0 +# 2396| v2396_1(void) = EnterFunction : +# 2396| mu2396_2(unknown) = AliasedDefinition : +# 2396| mu2396_3(unknown) = InitializeNonLocal : +# 2397| r2397_1(glval) = VariableAddress[#return] : +# 2397| r2397_2(int) = Constant[1] : +# 2397| r2397_3(int) = Constant[2] : +# 2397| r2397_4(int) = BitXor : r2397_2, r2397_3 +# 2397| mu2397_5(int) = Store[#return] : &:r2397_1, r2397_4 +# 2396| r2396_4(glval) = VariableAddress[#return] : +# 2396| v2396_5(void) = ReturnValue : &:r2396_4, ~m? +# 2396| v2396_6(void) = AliasedUse : ~m? +# 2396| v2396_7(void) = ExitFunction : -# 2406| int large_operation_should_be_constant_folded() -# 2406| Block 0 -# 2406| v2406_1(void) = EnterFunction : -# 2406| mu2406_2(unknown) = AliasedDefinition : -# 2406| mu2406_3(unknown) = InitializeNonLocal : -# 2407| r2407_1(glval) = VariableAddress[#return] : -# 2407| r2407_2(int) = Constant[0] : -# 2407| mu2407_3(int) = Store[#return] : &:r2407_1, r2407_2 -# 2406| r2406_4(glval) = VariableAddress[#return] : -# 2406| v2406_5(void) = ReturnValue : &:r2406_4, ~m? -# 2406| v2406_6(void) = AliasedUse : ~m? -# 2406| v2406_7(void) = ExitFunction : +# 2407| int large_operation_should_be_constant_folded() +# 2407| Block 0 +# 2407| v2407_1(void) = EnterFunction : +# 2407| mu2407_2(unknown) = AliasedDefinition : +# 2407| mu2407_3(unknown) = InitializeNonLocal : +# 2408| r2408_1(glval) = VariableAddress[#return] : +# 2408| r2408_2(int) = Constant[0] : +# 2408| mu2408_3(int) = Store[#return] : &:r2408_1, r2408_2 +# 2407| r2407_4(glval) = VariableAddress[#return] : +# 2407| v2407_5(void) = ReturnValue : &:r2407_4, ~m? +# 2407| v2407_6(void) = AliasedUse : ~m? +# 2407| v2407_7(void) = ExitFunction : -# 2410| void initialization_with_temp_destructor() -# 2410| Block 0 -# 2410| v2410_1(void) = EnterFunction : -# 2410| mu2410_2(unknown) = AliasedDefinition : -# 2410| mu2410_3(unknown) = InitializeNonLocal : -# 2411| r2411_1(glval) = VariableAddress[x] : -# 2411| r2411_2(glval) = VariableAddress[#temp2411:18] : -# 2411| mu2411_3(ClassWithDestructor) = Uninitialized[#temp2411:18] : &:r2411_2 -# 2411| r2411_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2411| v2411_5(void) = Call[ClassWithDestructor] : func:r2411_4, this:r2411_2 -# 2411| mu2411_6(unknown) = ^CallSideEffect : ~m? -# 2411| mu2411_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2411_2 -# 2411| r2411_8(glval) = FunctionAddress[get_x] : -# 2411| r2411_9(char) = Call[get_x] : func:r2411_8, this:r2411_2 -# 2411| mu2411_10(unknown) = ^CallSideEffect : ~m? -# 2411| v2411_11(void) = ^IndirectReadSideEffect[-1] : &:r2411_2, ~m? -# 2411| mu2411_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2411_2 -# 2411| r2411_13(glval) = CopyValue : r2411_2 -# 2411| r2411_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2411| v2411_15(void) = Call[~ClassWithDestructor] : func:r2411_14, this:r2411_13 -# 2411| mu2411_16(unknown) = ^CallSideEffect : ~m? -# 2411| v2411_17(void) = ^IndirectReadSideEffect[-1] : &:r2411_13, ~m? -# 2411| mu2411_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2411_13 -# 2411| mu2411_19(char) = Store[x] : &:r2411_1, r2411_9 -# 2411| r2411_20(glval) = VariableAddress[x] : -# 2411| r2411_21(char) = Load[x] : &:r2411_20, ~m? -# 2411| r2411_22(char) = Constant[0] : -# 2411| r2411_23(bool) = CompareNE : r2411_21, r2411_22 -# 2411| r2411_24(bool) = CopyValue : r2411_23 -# 2411| v2411_25(void) = ConditionalBranch : r2411_24 +# 2411| void initialization_with_temp_destructor() +# 2411| Block 0 +# 2411| v2411_1(void) = EnterFunction : +# 2411| mu2411_2(unknown) = AliasedDefinition : +# 2411| mu2411_3(unknown) = InitializeNonLocal : +# 2412| r2412_1(glval) = VariableAddress[x] : +# 2412| r2412_2(glval) = VariableAddress[#temp2412:18] : +# 2412| mu2412_3(ClassWithDestructor) = Uninitialized[#temp2412:18] : &:r2412_2 +# 2412| r2412_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2412| v2412_5(void) = Call[ClassWithDestructor] : func:r2412_4, this:r2412_2 +# 2412| mu2412_6(unknown) = ^CallSideEffect : ~m? +# 2412| mu2412_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2412_2 +# 2412| r2412_8(glval) = FunctionAddress[get_x] : +# 2412| r2412_9(char) = Call[get_x] : func:r2412_8, this:r2412_2 +# 2412| mu2412_10(unknown) = ^CallSideEffect : ~m? +# 2412| v2412_11(void) = ^IndirectReadSideEffect[-1] : &:r2412_2, ~m? +# 2412| mu2412_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2412_2 +# 2412| r2412_13(glval) = CopyValue : r2412_2 +# 2412| r2412_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2412| v2412_15(void) = Call[~ClassWithDestructor] : func:r2412_14, this:r2412_13 +# 2412| mu2412_16(unknown) = ^CallSideEffect : ~m? +# 2412| v2412_17(void) = ^IndirectReadSideEffect[-1] : &:r2412_13, ~m? +# 2412| mu2412_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2412_13 +# 2412| mu2412_19(char) = Store[x] : &:r2412_1, r2412_9 +# 2412| r2412_20(glval) = VariableAddress[x] : +# 2412| r2412_21(char) = Load[x] : &:r2412_20, ~m? +# 2412| r2412_22(char) = Constant[0] : +# 2412| r2412_23(bool) = CompareNE : r2412_21, r2412_22 +# 2412| r2412_24(bool) = CopyValue : r2412_23 +# 2412| v2412_25(void) = ConditionalBranch : r2412_24 #-----| False -> Block 2 #-----| True -> Block 1 -# 2412| Block 1 -# 2412| r2412_1(glval) = VariableAddress[x] : -# 2412| r2412_2(char) = Load[x] : &:r2412_1, ~m? -# 2412| r2412_3(char) = Constant[1] : -# 2412| r2412_4(char) = Add : r2412_2, r2412_3 -# 2412| mu2412_5(char) = Store[x] : &:r2412_1, r2412_4 +# 2413| Block 1 +# 2413| r2413_1(glval) = VariableAddress[x] : +# 2413| r2413_2(char) = Load[x] : &:r2413_1, ~m? +# 2413| r2413_3(char) = Constant[1] : +# 2413| r2413_4(char) = Add : r2413_2, r2413_3 +# 2413| mu2413_5(char) = Store[x] : &:r2413_1, r2413_4 #-----| Goto -> Block 2 -# 2414| Block 2 -# 2414| r2414_1(glval) = VariableAddress[x] : -# 2414| r2414_2(glval) = VariableAddress[#temp2414:18] : -# 2414| mu2414_3(ClassWithDestructor) = Uninitialized[#temp2414:18] : &:r2414_2 -# 2414| r2414_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2414| v2414_5(void) = Call[ClassWithDestructor] : func:r2414_4, this:r2414_2 -# 2414| mu2414_6(unknown) = ^CallSideEffect : ~m? -# 2414| mu2414_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2414_2 -# 2414| r2414_8(glval) = FunctionAddress[get_x] : -# 2414| r2414_9(char) = Call[get_x] : func:r2414_8, this:r2414_2 -# 2414| mu2414_10(unknown) = ^CallSideEffect : ~m? -# 2414| v2414_11(void) = ^IndirectReadSideEffect[-1] : &:r2414_2, ~m? -# 2414| mu2414_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2414_2 -# 2414| r2414_13(glval) = CopyValue : r2414_2 -# 2414| r2414_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2414| v2414_15(void) = Call[~ClassWithDestructor] : func:r2414_14, this:r2414_13 -# 2414| mu2414_16(unknown) = ^CallSideEffect : ~m? -# 2414| v2414_17(void) = ^IndirectReadSideEffect[-1] : &:r2414_13, ~m? -# 2414| mu2414_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2414_13 -# 2414| mu2414_19(char) = Store[x] : &:r2414_1, r2414_9 -# 2414| r2414_20(glval) = VariableAddress[x] : -# 2414| r2414_21(char) = Load[x] : &:r2414_20, ~m? -# 2414| r2414_22(char) = Constant[0] : -# 2414| r2414_23(bool) = CompareNE : r2414_21, r2414_22 -# 2414| v2414_24(void) = ConditionalBranch : r2414_23 +# 2415| Block 2 +# 2415| r2415_1(glval) = VariableAddress[x] : +# 2415| r2415_2(glval) = VariableAddress[#temp2415:18] : +# 2415| mu2415_3(ClassWithDestructor) = Uninitialized[#temp2415:18] : &:r2415_2 +# 2415| r2415_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2415| v2415_5(void) = Call[ClassWithDestructor] : func:r2415_4, this:r2415_2 +# 2415| mu2415_6(unknown) = ^CallSideEffect : ~m? +# 2415| mu2415_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2415_2 +# 2415| r2415_8(glval) = FunctionAddress[get_x] : +# 2415| r2415_9(char) = Call[get_x] : func:r2415_8, this:r2415_2 +# 2415| mu2415_10(unknown) = ^CallSideEffect : ~m? +# 2415| v2415_11(void) = ^IndirectReadSideEffect[-1] : &:r2415_2, ~m? +# 2415| mu2415_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2415_2 +# 2415| r2415_13(glval) = CopyValue : r2415_2 +# 2415| r2415_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2415| v2415_15(void) = Call[~ClassWithDestructor] : func:r2415_14, this:r2415_13 +# 2415| mu2415_16(unknown) = ^CallSideEffect : ~m? +# 2415| v2415_17(void) = ^IndirectReadSideEffect[-1] : &:r2415_13, ~m? +# 2415| mu2415_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2415_13 +# 2415| mu2415_19(char) = Store[x] : &:r2415_1, r2415_9 +# 2415| r2415_20(glval) = VariableAddress[x] : +# 2415| r2415_21(char) = Load[x] : &:r2415_20, ~m? +# 2415| r2415_22(char) = Constant[0] : +# 2415| r2415_23(bool) = CompareNE : r2415_21, r2415_22 +# 2415| v2415_24(void) = ConditionalBranch : r2415_23 #-----| False -> Block 4 #-----| True -> Block 3 -# 2415| Block 3 -# 2415| r2415_1(glval) = VariableAddress[x] : -# 2415| r2415_2(char) = Load[x] : &:r2415_1, ~m? -# 2415| r2415_3(char) = Constant[1] : -# 2415| r2415_4(char) = Add : r2415_2, r2415_3 -# 2415| mu2415_5(char) = Store[x] : &:r2415_1, r2415_4 +# 2416| Block 3 +# 2416| r2416_1(glval) = VariableAddress[x] : +# 2416| r2416_2(char) = Load[x] : &:r2416_1, ~m? +# 2416| r2416_3(char) = Constant[1] : +# 2416| r2416_4(char) = Add : r2416_2, r2416_3 +# 2416| mu2416_5(char) = Store[x] : &:r2416_1, r2416_4 #-----| Goto -> Block 4 -# 2417| Block 4 -# 2417| r2417_1(glval) = VariableAddress[x] : -# 2417| r2417_2(glval) = VariableAddress[#temp2417:28] : -# 2417| mu2417_3(ClassWithDestructor) = Uninitialized[#temp2417:28] : &:r2417_2 -# 2417| r2417_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2417| v2417_5(void) = Call[ClassWithDestructor] : func:r2417_4, this:r2417_2 -# 2417| mu2417_6(unknown) = ^CallSideEffect : ~m? -# 2417| mu2417_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2417_2 -# 2417| r2417_8(glval) = FunctionAddress[get_x] : -# 2417| r2417_9(char) = Call[get_x] : func:r2417_8, this:r2417_2 -# 2417| mu2417_10(unknown) = ^CallSideEffect : ~m? -# 2417| v2417_11(void) = ^IndirectReadSideEffect[-1] : &:r2417_2, ~m? -# 2417| mu2417_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2417_2 -# 2417| r2417_13(glval) = CopyValue : r2417_2 -# 2417| r2417_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2417| v2417_15(void) = Call[~ClassWithDestructor] : func:r2417_14, this:r2417_13 -# 2417| mu2417_16(unknown) = ^CallSideEffect : ~m? -# 2417| v2417_17(void) = ^IndirectReadSideEffect[-1] : &:r2417_13, ~m? -# 2417| mu2417_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2417_13 -# 2417| mu2417_19(char) = Store[x] : &:r2417_1, r2417_9 -# 2417| r2417_20(bool) = Constant[1] : -# 2417| v2417_21(void) = ConditionalBranch : r2417_20 +# 2418| Block 4 +# 2418| r2418_1(glval) = VariableAddress[x] : +# 2418| r2418_2(glval) = VariableAddress[#temp2418:28] : +# 2418| mu2418_3(ClassWithDestructor) = Uninitialized[#temp2418:28] : &:r2418_2 +# 2418| r2418_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2418| v2418_5(void) = Call[ClassWithDestructor] : func:r2418_4, this:r2418_2 +# 2418| mu2418_6(unknown) = ^CallSideEffect : ~m? +# 2418| mu2418_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2418_2 +# 2418| r2418_8(glval) = FunctionAddress[get_x] : +# 2418| r2418_9(char) = Call[get_x] : func:r2418_8, this:r2418_2 +# 2418| mu2418_10(unknown) = ^CallSideEffect : ~m? +# 2418| v2418_11(void) = ^IndirectReadSideEffect[-1] : &:r2418_2, ~m? +# 2418| mu2418_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2418_2 +# 2418| r2418_13(glval) = CopyValue : r2418_2 +# 2418| r2418_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2418| v2418_15(void) = Call[~ClassWithDestructor] : func:r2418_14, this:r2418_13 +# 2418| mu2418_16(unknown) = ^CallSideEffect : ~m? +# 2418| v2418_17(void) = ^IndirectReadSideEffect[-1] : &:r2418_13, ~m? +# 2418| mu2418_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2418_13 +# 2418| mu2418_19(char) = Store[x] : &:r2418_1, r2418_9 +# 2418| r2418_20(bool) = Constant[1] : +# 2418| v2418_21(void) = ConditionalBranch : r2418_20 #-----| False -> Block 6 #-----| True -> Block 5 -# 2418| Block 5 -# 2418| r2418_1(glval) = VariableAddress[x] : -# 2418| r2418_2(char) = Load[x] : &:r2418_1, ~m? -# 2418| r2418_3(char) = Constant[1] : -# 2418| r2418_4(char) = Add : r2418_2, r2418_3 -# 2418| mu2418_5(char) = Store[x] : &:r2418_1, r2418_4 +# 2419| Block 5 +# 2419| r2419_1(glval) = VariableAddress[x] : +# 2419| r2419_2(char) = Load[x] : &:r2419_1, ~m? +# 2419| r2419_3(char) = Constant[1] : +# 2419| r2419_4(char) = Add : r2419_2, r2419_3 +# 2419| mu2419_5(char) = Store[x] : &:r2419_1, r2419_4 #-----| Goto -> Block 6 -# 2420| Block 6 -# 2420| r2420_1(glval) = VariableAddress[x] : -# 2420| r2420_2(glval) = VariableAddress[#temp2420:21] : -# 2420| mu2420_3(ClassWithDestructor) = Uninitialized[#temp2420:21] : &:r2420_2 -# 2420| r2420_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2420| v2420_5(void) = Call[ClassWithDestructor] : func:r2420_4, this:r2420_2 -# 2420| mu2420_6(unknown) = ^CallSideEffect : ~m? -# 2420| mu2420_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2420_2 -# 2420| r2420_8(glval) = FunctionAddress[get_x] : -# 2420| r2420_9(char) = Call[get_x] : func:r2420_8, this:r2420_2 -# 2420| mu2420_10(unknown) = ^CallSideEffect : ~m? -# 2420| v2420_11(void) = ^IndirectReadSideEffect[-1] : &:r2420_2, ~m? -# 2420| mu2420_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2420_2 -# 2420| r2420_13(glval) = CopyValue : r2420_2 -# 2420| r2420_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2420| v2420_15(void) = Call[~ClassWithDestructor] : func:r2420_14, this:r2420_13 -# 2420| mu2420_16(unknown) = ^CallSideEffect : ~m? -# 2420| v2420_17(void) = ^IndirectReadSideEffect[-1] : &:r2420_13, ~m? -# 2420| mu2420_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2420_13 -# 2420| mu2420_19(char) = Store[x] : &:r2420_1, r2420_9 -# 2420| r2420_20(glval) = VariableAddress[x] : -# 2420| r2420_21(char) = Load[x] : &:r2420_20, ~m? -# 2420| r2420_22(int) = Convert : r2420_21 -# 2420| r2420_23(int) = CopyValue : r2420_22 -# 2420| v2420_24(void) = Switch : r2420_23 +# 2421| Block 6 +# 2421| r2421_1(glval) = VariableAddress[x] : +# 2421| r2421_2(glval) = VariableAddress[#temp2421:21] : +# 2421| mu2421_3(ClassWithDestructor) = Uninitialized[#temp2421:21] : &:r2421_2 +# 2421| r2421_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2421| v2421_5(void) = Call[ClassWithDestructor] : func:r2421_4, this:r2421_2 +# 2421| mu2421_6(unknown) = ^CallSideEffect : ~m? +# 2421| mu2421_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2421_2 +# 2421| r2421_8(glval) = FunctionAddress[get_x] : +# 2421| r2421_9(char) = Call[get_x] : func:r2421_8, this:r2421_2 +# 2421| mu2421_10(unknown) = ^CallSideEffect : ~m? +# 2421| v2421_11(void) = ^IndirectReadSideEffect[-1] : &:r2421_2, ~m? +# 2421| mu2421_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2421_2 +# 2421| r2421_13(glval) = CopyValue : r2421_2 +# 2421| r2421_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2421| v2421_15(void) = Call[~ClassWithDestructor] : func:r2421_14, this:r2421_13 +# 2421| mu2421_16(unknown) = ^CallSideEffect : ~m? +# 2421| v2421_17(void) = ^IndirectReadSideEffect[-1] : &:r2421_13, ~m? +# 2421| mu2421_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2421_13 +# 2421| mu2421_19(char) = Store[x] : &:r2421_1, r2421_9 +# 2421| r2421_20(glval) = VariableAddress[x] : +# 2421| r2421_21(char) = Load[x] : &:r2421_20, ~m? +# 2421| r2421_22(int) = Convert : r2421_21 +# 2421| r2421_23(int) = CopyValue : r2421_22 +# 2421| v2421_24(void) = Switch : r2421_23 #-----| Case[97] -> Block 7 #-----| Default -> Block 8 -# 2421| Block 7 -# 2421| v2421_1(void) = NoOp : -# 2422| r2422_1(glval) = VariableAddress[x] : -# 2422| r2422_2(char) = Load[x] : &:r2422_1, ~m? -# 2422| r2422_3(char) = Constant[1] : -# 2422| r2422_4(char) = Add : r2422_2, r2422_3 -# 2422| mu2422_5(char) = Store[x] : &:r2422_1, r2422_4 +# 2422| Block 7 +# 2422| v2422_1(void) = NoOp : +# 2423| r2423_1(glval) = VariableAddress[x] : +# 2423| r2423_2(char) = Load[x] : &:r2423_1, ~m? +# 2423| r2423_3(char) = Constant[1] : +# 2423| r2423_4(char) = Add : r2423_2, r2423_3 +# 2423| mu2423_5(char) = Store[x] : &:r2423_1, r2423_4 #-----| Goto -> Block 8 -# 2425| Block 8 -# 2425| r2425_1(glval) = VariableAddress[x] : -# 2425| r2425_2(glval) = VariableAddress[#temp2425:21] : -# 2425| mu2425_3(ClassWithDestructor) = Uninitialized[#temp2425:21] : &:r2425_2 -# 2425| r2425_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2425| v2425_5(void) = Call[ClassWithDestructor] : func:r2425_4, this:r2425_2 -# 2425| mu2425_6(unknown) = ^CallSideEffect : ~m? -# 2425| mu2425_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2425_2 -# 2425| r2425_8(glval) = FunctionAddress[get_x] : -# 2425| r2425_9(char) = Call[get_x] : func:r2425_8, this:r2425_2 -# 2425| mu2425_10(unknown) = ^CallSideEffect : ~m? -# 2425| v2425_11(void) = ^IndirectReadSideEffect[-1] : &:r2425_2, ~m? -# 2425| mu2425_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2425_2 -# 2425| r2425_13(glval) = CopyValue : r2425_2 -# 2425| r2425_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2425| v2425_15(void) = Call[~ClassWithDestructor] : func:r2425_14, this:r2425_13 -# 2425| mu2425_16(unknown) = ^CallSideEffect : ~m? -# 2425| v2425_17(void) = ^IndirectReadSideEffect[-1] : &:r2425_13, ~m? -# 2425| mu2425_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2425_13 -# 2425| mu2425_19(char) = Store[x] : &:r2425_1, r2425_9 -# 2425| r2425_20(glval) = VariableAddress[x] : -# 2425| r2425_21(char) = Load[x] : &:r2425_20, ~m? -# 2425| r2425_22(int) = Convert : r2425_21 -# 2425| v2425_23(void) = Switch : r2425_22 +# 2426| Block 8 +# 2426| r2426_1(glval) = VariableAddress[x] : +# 2426| r2426_2(glval) = VariableAddress[#temp2426:21] : +# 2426| mu2426_3(ClassWithDestructor) = Uninitialized[#temp2426:21] : &:r2426_2 +# 2426| r2426_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2426| v2426_5(void) = Call[ClassWithDestructor] : func:r2426_4, this:r2426_2 +# 2426| mu2426_6(unknown) = ^CallSideEffect : ~m? +# 2426| mu2426_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2426_2 +# 2426| r2426_8(glval) = FunctionAddress[get_x] : +# 2426| r2426_9(char) = Call[get_x] : func:r2426_8, this:r2426_2 +# 2426| mu2426_10(unknown) = ^CallSideEffect : ~m? +# 2426| v2426_11(void) = ^IndirectReadSideEffect[-1] : &:r2426_2, ~m? +# 2426| mu2426_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2426_2 +# 2426| r2426_13(glval) = CopyValue : r2426_2 +# 2426| r2426_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2426| v2426_15(void) = Call[~ClassWithDestructor] : func:r2426_14, this:r2426_13 +# 2426| mu2426_16(unknown) = ^CallSideEffect : ~m? +# 2426| v2426_17(void) = ^IndirectReadSideEffect[-1] : &:r2426_13, ~m? +# 2426| mu2426_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2426_13 +# 2426| mu2426_19(char) = Store[x] : &:r2426_1, r2426_9 +# 2426| r2426_20(glval) = VariableAddress[x] : +# 2426| r2426_21(char) = Load[x] : &:r2426_20, ~m? +# 2426| r2426_22(int) = Convert : r2426_21 +# 2426| v2426_23(void) = Switch : r2426_22 #-----| Case[97] -> Block 9 #-----| Default -> Block 10 -# 2426| Block 9 -# 2426| v2426_1(void) = NoOp : -# 2427| r2427_1(glval) = VariableAddress[x] : -# 2427| r2427_2(char) = Load[x] : &:r2427_1, ~m? -# 2427| r2427_3(char) = Constant[1] : -# 2427| r2427_4(char) = Add : r2427_2, r2427_3 -# 2427| mu2427_5(char) = Store[x] : &:r2427_1, r2427_4 +# 2427| Block 9 +# 2427| v2427_1(void) = NoOp : +# 2428| r2428_1(glval) = VariableAddress[x] : +# 2428| r2428_2(char) = Load[x] : &:r2428_1, ~m? +# 2428| r2428_3(char) = Constant[1] : +# 2428| r2428_4(char) = Add : r2428_2, r2428_3 +# 2428| mu2428_5(char) = Store[x] : &:r2428_1, r2428_4 #-----| Goto -> Block 10 -# 2430| Block 10 -# 2430| r2430_1(glval) = VariableAddress[x] : -# 2430| r2430_2(glval) = VariableAddress[#temp2430:18] : -# 2430| mu2430_3(ClassWithDestructor) = Uninitialized[#temp2430:18] : &:r2430_2 -# 2430| r2430_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2430| v2430_5(void) = Call[ClassWithDestructor] : func:r2430_4, this:r2430_2 -# 2430| mu2430_6(unknown) = ^CallSideEffect : ~m? -# 2430| mu2430_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2430_2 -# 2430| r2430_8(glval) = FunctionAddress[get_x] : -# 2430| r2430_9(char) = Call[get_x] : func:r2430_8, this:r2430_2 -# 2430| mu2430_10(unknown) = ^CallSideEffect : ~m? -# 2430| v2430_11(void) = ^IndirectReadSideEffect[-1] : &:r2430_2, ~m? -# 2430| mu2430_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2430_2 -# 2430| r2430_13(glval) = CopyValue : r2430_2 -# 2430| r2430_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2430| v2430_15(void) = Call[~ClassWithDestructor] : func:r2430_14, this:r2430_13 -# 2430| mu2430_16(unknown) = ^CallSideEffect : ~m? -# 2430| v2430_17(void) = ^IndirectReadSideEffect[-1] : &:r2430_13, ~m? -# 2430| mu2430_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2430_13 -# 2430| mu2430_19(char) = Store[x] : &:r2430_1, r2430_9 -# 2430| r2430_20(glval &&>) = VariableAddress[(__range)] : -# 2430| r2430_21(glval>) = VariableAddress[#temp2430:58] : -# 2430| mu2430_22(vector) = Uninitialized[#temp2430:58] : &:r2430_21 -# 2430| r2430_23(glval) = FunctionAddress[vector] : -# 2430| r2430_24(glval) = VariableAddress[x] : -# 2430| r2430_25(char) = Load[x] : &:r2430_24, ~m? -# 2430| v2430_26(void) = Call[vector] : func:r2430_23, this:r2430_21, 0:r2430_25 -# 2430| mu2430_27(unknown) = ^CallSideEffect : ~m? -# 2430| mu2430_28(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2430_21 -# 2430| r2430_29(vector &) = CopyValue : r2430_21 -# 2430| mu2430_30(vector &&) = Store[(__range)] : &:r2430_20, r2430_29 -# 2430| r2430_31(glval>) = VariableAddress[(__begin)] : -# 2430| r2430_32(glval &&>) = VariableAddress[(__range)] : -# 2430| r2430_33(vector &&) = Load[(__range)] : &:r2430_32, ~m? -#-----| r0_1(glval>) = CopyValue : r2430_33 +# 2431| Block 10 +# 2431| r2431_1(glval) = VariableAddress[x] : +# 2431| r2431_2(glval) = VariableAddress[#temp2431:18] : +# 2431| mu2431_3(ClassWithDestructor) = Uninitialized[#temp2431:18] : &:r2431_2 +# 2431| r2431_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2431| v2431_5(void) = Call[ClassWithDestructor] : func:r2431_4, this:r2431_2 +# 2431| mu2431_6(unknown) = ^CallSideEffect : ~m? +# 2431| mu2431_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2431_2 +# 2431| r2431_8(glval) = FunctionAddress[get_x] : +# 2431| r2431_9(char) = Call[get_x] : func:r2431_8, this:r2431_2 +# 2431| mu2431_10(unknown) = ^CallSideEffect : ~m? +# 2431| v2431_11(void) = ^IndirectReadSideEffect[-1] : &:r2431_2, ~m? +# 2431| mu2431_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2431_2 +# 2431| r2431_13(glval) = CopyValue : r2431_2 +# 2431| r2431_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2431| v2431_15(void) = Call[~ClassWithDestructor] : func:r2431_14, this:r2431_13 +# 2431| mu2431_16(unknown) = ^CallSideEffect : ~m? +# 2431| v2431_17(void) = ^IndirectReadSideEffect[-1] : &:r2431_13, ~m? +# 2431| mu2431_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2431_13 +# 2431| mu2431_19(char) = Store[x] : &:r2431_1, r2431_9 +# 2431| r2431_20(glval &&>) = VariableAddress[(__range)] : +# 2431| r2431_21(glval>) = VariableAddress[#temp2431:58] : +# 2431| mu2431_22(vector) = Uninitialized[#temp2431:58] : &:r2431_21 +# 2431| r2431_23(glval) = FunctionAddress[vector] : +# 2431| r2431_24(glval) = VariableAddress[x] : +# 2431| r2431_25(char) = Load[x] : &:r2431_24, ~m? +# 2431| v2431_26(void) = Call[vector] : func:r2431_23, this:r2431_21, 0:r2431_25 +# 2431| mu2431_27(unknown) = ^CallSideEffect : ~m? +# 2431| mu2431_28(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2431_21 +# 2431| r2431_29(vector &) = CopyValue : r2431_21 +# 2431| mu2431_30(vector &&) = Store[(__range)] : &:r2431_20, r2431_29 +# 2431| r2431_31(glval>) = VariableAddress[(__begin)] : +# 2431| r2431_32(glval &&>) = VariableAddress[(__range)] : +# 2431| r2431_33(vector &&) = Load[(__range)] : &:r2431_32, ~m? +#-----| r0_1(glval>) = CopyValue : r2431_33 #-----| r0_2(glval>) = Convert : r0_1 -# 2430| r2430_34(glval) = FunctionAddress[begin] : -# 2430| r2430_35(iterator) = Call[begin] : func:r2430_34, this:r0_2 +# 2431| r2431_34(glval) = FunctionAddress[begin] : +# 2431| r2431_35(iterator) = Call[begin] : func:r2431_34, this:r0_2 #-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m? -# 2430| mu2430_36(iterator) = Store[(__begin)] : &:r2430_31, r2430_35 -# 2430| r2430_37(glval>) = VariableAddress[(__end)] : -# 2430| r2430_38(glval &&>) = VariableAddress[(__range)] : -# 2430| r2430_39(vector &&) = Load[(__range)] : &:r2430_38, ~m? -#-----| r0_4(glval>) = CopyValue : r2430_39 +# 2431| mu2431_36(iterator) = Store[(__begin)] : &:r2431_31, r2431_35 +# 2431| r2431_37(glval>) = VariableAddress[(__end)] : +# 2431| r2431_38(glval &&>) = VariableAddress[(__range)] : +# 2431| r2431_39(vector &&) = Load[(__range)] : &:r2431_38, ~m? +#-----| r0_4(glval>) = CopyValue : r2431_39 #-----| r0_5(glval>) = Convert : r0_4 -# 2430| r2430_40(glval) = FunctionAddress[end] : -# 2430| r2430_41(iterator) = Call[end] : func:r2430_40, this:r0_5 +# 2431| r2431_40(glval) = FunctionAddress[end] : +# 2431| r2431_41(iterator) = Call[end] : func:r2431_40, this:r0_5 #-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? -# 2430| mu2430_42(iterator) = Store[(__end)] : &:r2430_37, r2430_41 +# 2431| mu2431_42(iterator) = Store[(__end)] : &:r2431_37, r2431_41 #-----| Goto -> Block 11 -# 2430| Block 11 -# 2430| r2430_43(glval>) = VariableAddress[(__begin)] : -#-----| r0_7(glval>) = Convert : r2430_43 -# 2430| r2430_44(glval) = FunctionAddress[operator!=] : +# 2431| Block 11 +# 2431| r2431_43(glval>) = VariableAddress[(__begin)] : +#-----| r0_7(glval>) = Convert : r2431_43 +# 2431| r2431_44(glval) = FunctionAddress[operator!=] : #-----| r0_8(glval>) = VariableAddress[#temp0:0] : #-----| mu0_9(iterator) = Uninitialized[#temp0:0] : &:r0_8 -# 2430| r2430_45(glval) = FunctionAddress[iterator] : -# 2430| r2430_46(glval>) = VariableAddress[(__end)] : -#-----| r0_10(glval>) = Convert : r2430_46 +# 2431| r2431_45(glval) = FunctionAddress[iterator] : +# 2431| r2431_46(glval>) = VariableAddress[(__end)] : +#-----| r0_10(glval>) = Convert : r2431_46 #-----| r0_11(iterator &) = CopyValue : r0_10 -# 2430| v2430_47(void) = Call[iterator] : func:r2430_45, this:r0_8, 0:r0_11 -# 2430| mu2430_48(unknown) = ^CallSideEffect : ~m? +# 2431| v2431_47(void) = Call[iterator] : func:r2431_45, this:r0_8, 0:r0_11 +# 2431| mu2431_48(unknown) = ^CallSideEffect : ~m? #-----| v0_12(void) = ^BufferReadSideEffect[0] : &:r0_11, ~m? -# 2430| mu2430_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 +# 2431| mu2431_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r0_8 #-----| r0_13(iterator) = Load[#temp0:0] : &:r0_8, ~m? -# 2430| r2430_50(bool) = Call[operator!=] : func:r2430_44, this:r0_7, 0:r0_13 +# 2431| r2431_50(bool) = Call[operator!=] : func:r2431_44, this:r0_7, 0:r0_13 #-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_7, ~m? -# 2430| v2430_51(void) = ConditionalBranch : r2430_50 +# 2431| v2431_51(void) = ConditionalBranch : r2431_50 #-----| False -> Block 13 #-----| True -> Block 12 -# 2430| Block 12 -# 2430| r2430_52(glval) = VariableAddress[y] : -# 2430| r2430_53(glval>) = VariableAddress[(__begin)] : -#-----| r0_15(glval>) = Convert : r2430_53 -# 2430| r2430_54(glval) = FunctionAddress[operator*] : -# 2430| r2430_55(char &) = Call[operator*] : func:r2430_54, this:r0_15 +# 2431| Block 12 +# 2431| r2431_52(glval) = VariableAddress[y] : +# 2431| r2431_53(glval>) = VariableAddress[(__begin)] : +#-----| r0_15(glval>) = Convert : r2431_53 +# 2431| r2431_54(glval) = FunctionAddress[operator*] : +# 2431| r2431_55(char &) = Call[operator*] : func:r2431_54, this:r0_15 #-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m? -# 2430| r2430_56(char) = Load[?] : &:r2430_55, ~m? -# 2430| mu2430_57(char) = Store[y] : &:r2430_52, r2430_56 -# 2431| r2431_1(glval) = VariableAddress[x] : -# 2431| r2431_2(char) = Load[x] : &:r2431_1, ~m? -# 2431| r2431_3(int) = Convert : r2431_2 -# 2431| r2431_4(glval) = VariableAddress[y] : -# 2431| r2431_5(char) = Load[y] : &:r2431_4, ~m? -# 2431| r2431_6(int) = Convert : r2431_5 -# 2431| r2431_7(int) = Add : r2431_6, r2431_3 -# 2431| r2431_8(char) = Convert : r2431_7 -# 2431| mu2431_9(char) = Store[y] : &:r2431_4, r2431_8 -# 2430| r2430_58(glval>) = VariableAddress[(__begin)] : -# 2430| r2430_59(glval) = FunctionAddress[operator++] : -# 2430| r2430_60(iterator &) = Call[operator++] : func:r2430_59, this:r2430_58 -# 2430| v2430_61(void) = ^IndirectReadSideEffect[-1] : &:r2430_58, ~m? -# 2430| mu2430_62(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2430_58 -# 2430| r2430_63(glval>) = CopyValue : r2430_60 +# 2431| r2431_56(char) = Load[?] : &:r2431_55, ~m? +# 2431| mu2431_57(char) = Store[y] : &:r2431_52, r2431_56 +# 2432| r2432_1(glval) = VariableAddress[x] : +# 2432| r2432_2(char) = Load[x] : &:r2432_1, ~m? +# 2432| r2432_3(int) = Convert : r2432_2 +# 2432| r2432_4(glval) = VariableAddress[y] : +# 2432| r2432_5(char) = Load[y] : &:r2432_4, ~m? +# 2432| r2432_6(int) = Convert : r2432_5 +# 2432| r2432_7(int) = Add : r2432_6, r2432_3 +# 2432| r2432_8(char) = Convert : r2432_7 +# 2432| mu2432_9(char) = Store[y] : &:r2432_4, r2432_8 +# 2431| r2431_58(glval>) = VariableAddress[(__begin)] : +# 2431| r2431_59(glval) = FunctionAddress[operator++] : +# 2431| r2431_60(iterator &) = Call[operator++] : func:r2431_59, this:r2431_58 +# 2431| v2431_61(void) = ^IndirectReadSideEffect[-1] : &:r2431_58, ~m? +# 2431| mu2431_62(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2431_58 +# 2431| r2431_63(glval>) = CopyValue : r2431_60 #-----| Goto (back edge) -> Block 11 -# 2432| Block 13 -# 2432| v2432_1(void) = NoOp : -# 2410| v2410_4(void) = ReturnVoid : -# 2410| v2410_5(void) = AliasedUse : ~m? -# 2410| v2410_6(void) = ExitFunction : +# 2431| Block 13 +# 2431| r2431_64(glval>) = CopyValue : r2431_21 +# 2431| r2431_65(glval) = FunctionAddress[~vector] : +# 2431| v2431_66(void) = Call[~vector] : func:r2431_65, this:r2431_64 +# 2431| mu2431_67(unknown) = ^CallSideEffect : ~m? +# 2431| v2431_68(void) = ^IndirectReadSideEffect[-1] : &:r2431_64, ~m? +# 2431| mu2431_69(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2431_64 +# 2433| v2433_1(void) = NoOp : +# 2411| v2411_4(void) = ReturnVoid : +# 2411| v2411_5(void) = AliasedUse : ~m? +# 2411| v2411_6(void) = ExitFunction : -# 2434| void param_with_destructor_by_value(ClassWithDestructor) -# 2434| Block 0 -# 2434| v2434_1(void) = EnterFunction : -# 2434| mu2434_2(unknown) = AliasedDefinition : -# 2434| mu2434_3(unknown) = InitializeNonLocal : -# 2434| r2434_4(glval) = VariableAddress[c] : -# 2434| mu2434_5(ClassWithDestructor) = InitializeParameter[c] : &:r2434_4 -# 2436| v2436_1(void) = NoOp : -# 2434| v2434_6(void) = ReturnVoid : -# 2434| v2434_7(void) = AliasedUse : ~m? -# 2434| v2434_8(void) = ExitFunction : +# 2435| void param_with_destructor_by_value(ClassWithDestructor) +# 2435| Block 0 +# 2435| v2435_1(void) = EnterFunction : +# 2435| mu2435_2(unknown) = AliasedDefinition : +# 2435| mu2435_3(unknown) = InitializeNonLocal : +# 2435| r2435_4(glval) = VariableAddress[c] : +# 2435| mu2435_5(ClassWithDestructor) = InitializeParameter[c] : &:r2435_4 +# 2437| v2437_1(void) = NoOp : +# 2435| v2435_6(void) = ReturnVoid : +# 2435| v2435_7(void) = AliasedUse : ~m? +# 2435| v2435_8(void) = ExitFunction : -# 2438| void param_with_destructor_by_pointer(ClassWithDestructor*) -# 2438| Block 0 -# 2438| v2438_1(void) = EnterFunction : -# 2438| mu2438_2(unknown) = AliasedDefinition : -# 2438| mu2438_3(unknown) = InitializeNonLocal : -# 2438| r2438_4(glval) = VariableAddress[c] : -# 2438| mu2438_5(ClassWithDestructor *) = InitializeParameter[c] : &:r2438_4 -# 2438| r2438_6(ClassWithDestructor *) = Load[c] : &:r2438_4, ~m? -# 2438| mu2438_7(unknown) = InitializeIndirection[c] : &:r2438_6 -# 2440| v2440_1(void) = NoOp : -# 2438| v2438_8(void) = ReturnIndirection[c] : &:r2438_6, ~m? -# 2438| v2438_9(void) = ReturnVoid : -# 2438| v2438_10(void) = AliasedUse : ~m? -# 2438| v2438_11(void) = ExitFunction : +# 2439| void param_with_destructor_by_pointer(ClassWithDestructor*) +# 2439| Block 0 +# 2439| v2439_1(void) = EnterFunction : +# 2439| mu2439_2(unknown) = AliasedDefinition : +# 2439| mu2439_3(unknown) = InitializeNonLocal : +# 2439| r2439_4(glval) = VariableAddress[c] : +# 2439| mu2439_5(ClassWithDestructor *) = InitializeParameter[c] : &:r2439_4 +# 2439| r2439_6(ClassWithDestructor *) = Load[c] : &:r2439_4, ~m? +# 2439| mu2439_7(unknown) = InitializeIndirection[c] : &:r2439_6 +# 2441| v2441_1(void) = NoOp : +# 2439| v2439_8(void) = ReturnIndirection[c] : &:r2439_6, ~m? +# 2439| v2439_9(void) = ReturnVoid : +# 2439| v2439_10(void) = AliasedUse : ~m? +# 2439| v2439_11(void) = ExitFunction : -# 2442| void param_with_destructor_by_ref(ClassWithDestructor&) -# 2442| Block 0 -# 2442| v2442_1(void) = EnterFunction : -# 2442| mu2442_2(unknown) = AliasedDefinition : -# 2442| mu2442_3(unknown) = InitializeNonLocal : -# 2442| r2442_4(glval) = VariableAddress[c] : -# 2442| mu2442_5(ClassWithDestructor &) = InitializeParameter[c] : &:r2442_4 -# 2442| r2442_6(ClassWithDestructor &) = Load[c] : &:r2442_4, ~m? -# 2442| mu2442_7(unknown) = InitializeIndirection[c] : &:r2442_6 -# 2444| v2444_1(void) = NoOp : -# 2442| v2442_8(void) = ReturnIndirection[c] : &:r2442_6, ~m? -# 2442| v2442_9(void) = ReturnVoid : -# 2442| v2442_10(void) = AliasedUse : ~m? -# 2442| v2442_11(void) = ExitFunction : +# 2443| void param_with_destructor_by_ref(ClassWithDestructor&) +# 2443| Block 0 +# 2443| v2443_1(void) = EnterFunction : +# 2443| mu2443_2(unknown) = AliasedDefinition : +# 2443| mu2443_3(unknown) = InitializeNonLocal : +# 2443| r2443_4(glval) = VariableAddress[c] : +# 2443| mu2443_5(ClassWithDestructor &) = InitializeParameter[c] : &:r2443_4 +# 2443| r2443_6(ClassWithDestructor &) = Load[c] : &:r2443_4, ~m? +# 2443| mu2443_7(unknown) = InitializeIndirection[c] : &:r2443_6 +# 2445| v2445_1(void) = NoOp : +# 2443| v2443_8(void) = ReturnIndirection[c] : &:r2443_6, ~m? +# 2443| v2443_9(void) = ReturnVoid : +# 2443| v2443_10(void) = AliasedUse : ~m? +# 2443| v2443_11(void) = ExitFunction : -# 2446| void param_with_destructor_by_rref(ClassWithDestructor&&) -# 2446| Block 0 -# 2446| v2446_1(void) = EnterFunction : -# 2446| mu2446_2(unknown) = AliasedDefinition : -# 2446| mu2446_3(unknown) = InitializeNonLocal : -# 2446| r2446_4(glval) = VariableAddress[c] : -# 2446| mu2446_5(ClassWithDestructor &&) = InitializeParameter[c] : &:r2446_4 -# 2446| r2446_6(ClassWithDestructor &&) = Load[c] : &:r2446_4, ~m? -# 2446| mu2446_7(unknown) = InitializeIndirection[c] : &:r2446_6 -# 2448| v2448_1(void) = NoOp : -# 2446| v2446_8(void) = ReturnIndirection[c] : &:r2446_6, ~m? -# 2446| v2446_9(void) = ReturnVoid : -# 2446| v2446_10(void) = AliasedUse : ~m? -# 2446| v2446_11(void) = ExitFunction : +# 2447| void param_with_destructor_by_rref(ClassWithDestructor&&) +# 2447| Block 0 +# 2447| v2447_1(void) = EnterFunction : +# 2447| mu2447_2(unknown) = AliasedDefinition : +# 2447| mu2447_3(unknown) = InitializeNonLocal : +# 2447| r2447_4(glval) = VariableAddress[c] : +# 2447| mu2447_5(ClassWithDestructor &&) = InitializeParameter[c] : &:r2447_4 +# 2447| r2447_6(ClassWithDestructor &&) = Load[c] : &:r2447_4, ~m? +# 2447| mu2447_7(unknown) = InitializeIndirection[c] : &:r2447_6 +# 2449| v2449_1(void) = NoOp : +# 2447| v2447_8(void) = ReturnIndirection[c] : &:r2447_6, ~m? +# 2447| v2447_9(void) = ReturnVoid : +# 2447| v2447_10(void) = AliasedUse : ~m? +# 2447| v2447_11(void) = ExitFunction : -# 2450| void rethrow_with_destruction(int) -# 2450| Block 0 -# 2450| v2450_1(void) = EnterFunction : -# 2450| mu2450_2(unknown) = AliasedDefinition : -# 2450| mu2450_3(unknown) = InitializeNonLocal : -# 2450| r2450_4(glval) = VariableAddress[x] : -# 2450| mu2450_5(int) = InitializeParameter[x] : &:r2450_4 -# 2451| r2451_1(glval) = VariableAddress[c] : -# 2451| mu2451_2(ClassWithDestructor) = Uninitialized[c] : &:r2451_1 -# 2451| r2451_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2451| v2451_4(void) = Call[ClassWithDestructor] : func:r2451_3, this:r2451_1 -# 2451| mu2451_5(unknown) = ^CallSideEffect : ~m? -# 2451| mu2451_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2451_1 -# 2452| v2452_1(void) = ReThrow : -# 2453| r2453_1(glval) = VariableAddress[c] : -# 2453| r2453_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2453| v2453_3(void) = Call[~ClassWithDestructor] : func:r2453_2, this:r2453_1 -# 2453| mu2453_4(unknown) = ^CallSideEffect : ~m? -# 2453| v2453_5(void) = ^IndirectReadSideEffect[-1] : &:r2453_1, ~m? -# 2453| mu2453_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2453_1 +# 2451| void rethrow_with_destruction(int) +# 2451| Block 0 +# 2451| v2451_1(void) = EnterFunction : +# 2451| mu2451_2(unknown) = AliasedDefinition : +# 2451| mu2451_3(unknown) = InitializeNonLocal : +# 2451| r2451_4(glval) = VariableAddress[x] : +# 2451| mu2451_5(int) = InitializeParameter[x] : &:r2451_4 +# 2452| r2452_1(glval) = VariableAddress[c] : +# 2452| mu2452_2(ClassWithDestructor) = Uninitialized[c] : &:r2452_1 +# 2452| r2452_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2452| v2452_4(void) = Call[ClassWithDestructor] : func:r2452_3, this:r2452_1 +# 2452| mu2452_5(unknown) = ^CallSideEffect : ~m? +# 2452| mu2452_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2452_1 +# 2453| v2453_1(void) = ReThrow : +# 2454| r2454_1(glval) = VariableAddress[c] : +# 2454| r2454_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2454| v2454_3(void) = Call[~ClassWithDestructor] : func:r2454_2, this:r2454_1 +# 2454| mu2454_4(unknown) = ^CallSideEffect : ~m? +# 2454| v2454_5(void) = ^IndirectReadSideEffect[-1] : &:r2454_1, ~m? +# 2454| mu2454_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2454_1 #-----| Exception -> Block 3 -# 2450| Block 1 -# 2450| v2450_6(void) = AliasedUse : ~m? -# 2450| v2450_7(void) = ExitFunction : +# 2451| Block 1 +# 2451| v2451_6(void) = AliasedUse : ~m? +# 2451| v2451_7(void) = ExitFunction : -# 2450| Block 2 -# 2450| v2450_8(void) = ReturnVoid : +# 2451| Block 2 +# 2451| v2451_8(void) = ReturnVoid : #-----| Goto -> Block 1 -# 2450| Block 3 -# 2450| v2450_9(void) = Unwind : +# 2451| Block 3 +# 2451| v2451_9(void) = Unwind : #-----| Goto -> Block 1 -# 2459| void new_with_destructor(ClassWithDestructor) -# 2459| Block 0 -# 2459| v2459_1(void) = EnterFunction : -# 2459| mu2459_2(unknown) = AliasedDefinition : -# 2459| mu2459_3(unknown) = InitializeNonLocal : -# 2459| r2459_4(glval) = VariableAddress[a] : -# 2459| mu2459_5(ClassWithDestructor) = InitializeParameter[a] : &:r2459_4 -# 2461| r2461_1(glval) = VariableAddress[b] : -# 2461| r2461_2(glval) = FunctionAddress[operator new] : -# 2461| r2461_3(unsigned long) = Constant[1] : -# 2461| r2461_4(void *) = Call[operator new] : func:r2461_2, 0:r2461_3 -# 2461| mu2461_5(unknown) = ^CallSideEffect : ~m? -# 2461| mu2461_6(unknown) = ^InitializeDynamicAllocation : &:r2461_4 -# 2461| r2461_7(ByValueConstructor *) = Convert : r2461_4 -# 2461| r2461_8(glval) = FunctionAddress[ByValueConstructor] : -# 2461| r2461_9(glval) = VariableAddress[#temp2461:52] : -# 2461| r2461_10(glval) = VariableAddress[a] : -# 2461| r2461_11(ClassWithDestructor) = Load[a] : &:r2461_10, ~m? -# 2461| mu2461_12(ClassWithDestructor) = Store[#temp2461:52] : &:r2461_9, r2461_11 -# 2461| r2461_13(ClassWithDestructor) = Load[#temp2461:52] : &:r2461_9, ~m? -# 2461| v2461_14(void) = Call[ByValueConstructor] : func:r2461_8, this:r2461_7, 0:r2461_13 -# 2461| mu2461_15(unknown) = ^CallSideEffect : ~m? -# 2461| mu2461_16(ByValueConstructor) = ^IndirectMayWriteSideEffect[-1] : &:r2461_7 -# 2461| r2461_17(glval) = CopyValue : r2461_9 -# 2461| r2461_18(glval) = FunctionAddress[~ClassWithDestructor] : -# 2461| v2461_19(void) = Call[~ClassWithDestructor] : func:r2461_18, this:r2461_17 -# 2461| mu2461_20(unknown) = ^CallSideEffect : ~m? -# 2461| v2461_21(void) = ^IndirectReadSideEffect[-1] : &:r2461_17, ~m? -# 2461| mu2461_22(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2461_17 -# 2461| mu2461_23(ByValueConstructor *) = Store[b] : &:r2461_1, r2461_7 -# 2462| v2462_1(void) = NoOp : -# 2459| v2459_6(void) = ReturnVoid : -# 2459| v2459_7(void) = AliasedUse : ~m? -# 2459| v2459_8(void) = ExitFunction : +# 2460| void new_with_destructor(ClassWithDestructor) +# 2460| Block 0 +# 2460| v2460_1(void) = EnterFunction : +# 2460| mu2460_2(unknown) = AliasedDefinition : +# 2460| mu2460_3(unknown) = InitializeNonLocal : +# 2460| r2460_4(glval) = VariableAddress[a] : +# 2460| mu2460_5(ClassWithDestructor) = InitializeParameter[a] : &:r2460_4 +# 2462| r2462_1(glval) = VariableAddress[b] : +# 2462| r2462_2(glval) = FunctionAddress[operator new] : +# 2462| r2462_3(unsigned long) = Constant[1] : +# 2462| r2462_4(void *) = Call[operator new] : func:r2462_2, 0:r2462_3 +# 2462| mu2462_5(unknown) = ^CallSideEffect : ~m? +# 2462| mu2462_6(unknown) = ^InitializeDynamicAllocation : &:r2462_4 +# 2462| r2462_7(ByValueConstructor *) = Convert : r2462_4 +# 2462| r2462_8(glval) = FunctionAddress[ByValueConstructor] : +# 2462| r2462_9(glval) = VariableAddress[#temp2462:52] : +# 2462| r2462_10(glval) = VariableAddress[a] : +# 2462| r2462_11(ClassWithDestructor) = Load[a] : &:r2462_10, ~m? +# 2462| mu2462_12(ClassWithDestructor) = Store[#temp2462:52] : &:r2462_9, r2462_11 +# 2462| r2462_13(ClassWithDestructor) = Load[#temp2462:52] : &:r2462_9, ~m? +# 2462| v2462_14(void) = Call[ByValueConstructor] : func:r2462_8, this:r2462_7, 0:r2462_13 +# 2462| mu2462_15(unknown) = ^CallSideEffect : ~m? +# 2462| mu2462_16(ByValueConstructor) = ^IndirectMayWriteSideEffect[-1] : &:r2462_7 +# 2462| r2462_17(glval) = CopyValue : r2462_9 +# 2462| r2462_18(glval) = FunctionAddress[~ClassWithDestructor] : +# 2462| v2462_19(void) = Call[~ClassWithDestructor] : func:r2462_18, this:r2462_17 +# 2462| mu2462_20(unknown) = ^CallSideEffect : ~m? +# 2462| v2462_21(void) = ^IndirectReadSideEffect[-1] : &:r2462_17, ~m? +# 2462| mu2462_22(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2462_17 +# 2462| mu2462_23(ByValueConstructor *) = Store[b] : &:r2462_1, r2462_7 +# 2463| v2463_1(void) = NoOp : +# 2460| v2460_6(void) = ReturnVoid : +# 2460| v2460_7(void) = AliasedUse : ~m? +# 2460| v2460_8(void) = ExitFunction : -# 2478| void rvalue_conversion_with_destructor::test() -# 2478| Block 0 -# 2478| v2478_1(void) = EnterFunction : -# 2478| mu2478_2(unknown) = AliasedDefinition : -# 2478| mu2478_3(unknown) = InitializeNonLocal : -# 2480| r2480_1(glval) = VariableAddress[a] : -# 2480| r2480_2(glval) = VariableAddress[#temp2480:18] : -# 2480| r2480_3(glval) = FunctionAddress[get] : -# 2480| r2480_4(B) = Call[get] : func:r2480_3 -# 2480| mu2480_5(unknown) = ^CallSideEffect : ~m? -# 2480| mu2480_6(B) = Store[#temp2480:18] : &:r2480_2, r2480_4 -# 2480| r2480_7(glval) = Convert : r2480_2 -# 2480| r2480_8(glval) = FunctionAddress[operator->] : -# 2480| r2480_9(A *) = Call[operator->] : func:r2480_8, this:r2480_7 -# 2480| mu2480_10(unknown) = ^CallSideEffect : ~m? -# 2480| v2480_11(void) = ^IndirectReadSideEffect[-1] : &:r2480_7, ~m? -# 2480| r2480_12(glval) = FieldAddress[a] : r2480_9 -# 2480| r2480_13(glval) = CopyValue : r2480_2 -# 2480| r2480_14(glval) = FunctionAddress[~B] : -# 2480| v2480_15(void) = Call[~B] : func:r2480_14, this:r2480_13 -# 2480| mu2480_16(unknown) = ^CallSideEffect : ~m? -# 2480| v2480_17(void) = ^IndirectReadSideEffect[-1] : &:r2480_13, ~m? -# 2480| mu2480_18(B) = ^IndirectMayWriteSideEffect[-1] : &:r2480_13 -# 2480| r2480_19(unsigned int) = Load[?] : &:r2480_12, ~m? -# 2480| mu2480_20(unsigned int) = Store[a] : &:r2480_1, r2480_19 -# 2481| v2481_1(void) = NoOp : -# 2478| v2478_4(void) = ReturnVoid : -# 2478| v2478_5(void) = AliasedUse : ~m? -# 2478| v2478_6(void) = ExitFunction : +# 2479| void rvalue_conversion_with_destructor::test() +# 2479| Block 0 +# 2479| v2479_1(void) = EnterFunction : +# 2479| mu2479_2(unknown) = AliasedDefinition : +# 2479| mu2479_3(unknown) = InitializeNonLocal : +# 2481| r2481_1(glval) = VariableAddress[a] : +# 2481| r2481_2(glval) = VariableAddress[#temp2481:18] : +# 2481| r2481_3(glval) = FunctionAddress[get] : +# 2481| r2481_4(B) = Call[get] : func:r2481_3 +# 2481| mu2481_5(unknown) = ^CallSideEffect : ~m? +# 2481| mu2481_6(B) = Store[#temp2481:18] : &:r2481_2, r2481_4 +# 2481| r2481_7(glval) = Convert : r2481_2 +# 2481| r2481_8(glval) = FunctionAddress[operator->] : +# 2481| r2481_9(A *) = Call[operator->] : func:r2481_8, this:r2481_7 +# 2481| mu2481_10(unknown) = ^CallSideEffect : ~m? +# 2481| v2481_11(void) = ^IndirectReadSideEffect[-1] : &:r2481_7, ~m? +# 2481| r2481_12(glval) = FieldAddress[a] : r2481_9 +# 2481| r2481_13(glval) = CopyValue : r2481_2 +# 2481| r2481_14(glval) = FunctionAddress[~B] : +# 2481| v2481_15(void) = Call[~B] : func:r2481_14, this:r2481_13 +# 2481| mu2481_16(unknown) = ^CallSideEffect : ~m? +# 2481| v2481_17(void) = ^IndirectReadSideEffect[-1] : &:r2481_13, ~m? +# 2481| mu2481_18(B) = ^IndirectMayWriteSideEffect[-1] : &:r2481_13 +# 2481| r2481_19(unsigned int) = Load[?] : &:r2481_12, ~m? +# 2481| mu2481_20(unsigned int) = Store[a] : &:r2481_1, r2481_19 +# 2482| v2482_1(void) = NoOp : +# 2479| v2479_4(void) = ReturnVoid : +# 2479| v2479_5(void) = AliasedUse : ~m? +# 2479| v2479_6(void) = ExitFunction : -# 2484| void destructor_without_block(bool) -# 2484| Block 0 -# 2484| v2484_1(void) = EnterFunction : -# 2484| mu2484_2(unknown) = AliasedDefinition : -# 2484| mu2484_3(unknown) = InitializeNonLocal : -# 2484| r2484_4(glval) = VariableAddress[b] : -# 2484| mu2484_5(bool) = InitializeParameter[b] : &:r2484_4 -# 2486| r2486_1(glval) = VariableAddress[b] : -# 2486| r2486_2(bool) = Load[b] : &:r2486_1, ~m? -# 2486| v2486_3(void) = ConditionalBranch : r2486_2 +# 2485| void destructor_without_block(bool) +# 2485| Block 0 +# 2485| v2485_1(void) = EnterFunction : +# 2485| mu2485_2(unknown) = AliasedDefinition : +# 2485| mu2485_3(unknown) = InitializeNonLocal : +# 2485| r2485_4(glval) = VariableAddress[b] : +# 2485| mu2485_5(bool) = InitializeParameter[b] : &:r2485_4 +# 2487| r2487_1(glval) = VariableAddress[b] : +# 2487| r2487_2(bool) = Load[b] : &:r2487_1, ~m? +# 2487| v2487_3(void) = ConditionalBranch : r2487_2 #-----| False -> Block 2 #-----| True -> Block 1 -# 2487| Block 1 -# 2487| r2487_1(glval) = VariableAddress[c] : -# 2487| mu2487_2(ClassWithDestructor) = Uninitialized[c] : &:r2487_1 -# 2487| r2487_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2487| v2487_4(void) = Call[ClassWithDestructor] : func:r2487_3, this:r2487_1 -# 2487| mu2487_5(unknown) = ^CallSideEffect : ~m? -# 2487| mu2487_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2487_1 +# 2488| Block 1 +# 2488| r2488_1(glval) = VariableAddress[c] : +# 2488| mu2488_2(ClassWithDestructor) = Uninitialized[c] : &:r2488_1 +# 2488| r2488_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2488| v2488_4(void) = Call[ClassWithDestructor] : func:r2488_3, this:r2488_1 +# 2488| mu2488_5(unknown) = ^CallSideEffect : ~m? +# 2488| mu2488_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2488_1 #-----| r0_1(glval) = VariableAddress[c] : #-----| r0_2(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_3(void) = Call[~ClassWithDestructor] : func:r0_2, this:r0_1 @@ -16272,20 +16281,20 @@ ir.cpp: #-----| mu0_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_1 #-----| Goto -> Block 2 -# 2489| Block 2 -# 2489| r2489_1(glval) = VariableAddress[b] : -# 2489| r2489_2(bool) = Load[b] : &:r2489_1, ~m? -# 2489| v2489_3(void) = ConditionalBranch : r2489_2 +# 2490| Block 2 +# 2490| r2490_1(glval) = VariableAddress[b] : +# 2490| r2490_2(bool) = Load[b] : &:r2490_1, ~m? +# 2490| v2490_3(void) = ConditionalBranch : r2490_2 #-----| False -> Block 4 #-----| True -> Block 3 -# 2490| Block 3 -# 2490| r2490_1(glval) = VariableAddress[d] : -# 2490| mu2490_2(ClassWithDestructor) = Uninitialized[d] : &:r2490_1 -# 2490| r2490_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2490| v2490_4(void) = Call[ClassWithDestructor] : func:r2490_3, this:r2490_1 -# 2490| mu2490_5(unknown) = ^CallSideEffect : ~m? -# 2490| mu2490_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2490_1 +# 2491| Block 3 +# 2491| r2491_1(glval) = VariableAddress[d] : +# 2491| mu2491_2(ClassWithDestructor) = Uninitialized[d] : &:r2491_1 +# 2491| r2491_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2491| v2491_4(void) = Call[ClassWithDestructor] : func:r2491_3, this:r2491_1 +# 2491| mu2491_5(unknown) = ^CallSideEffect : ~m? +# 2491| mu2491_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2491_1 #-----| r0_7(glval) = VariableAddress[d] : #-----| r0_8(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_9(void) = Call[~ClassWithDestructor] : func:r0_8, this:r0_7 @@ -16294,13 +16303,13 @@ ir.cpp: #-----| mu0_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_7 #-----| Goto -> Block 5 -# 2492| Block 4 -# 2492| r2492_1(glval) = VariableAddress[e] : -# 2492| mu2492_2(ClassWithDestructor) = Uninitialized[e] : &:r2492_1 -# 2492| r2492_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2492| v2492_4(void) = Call[ClassWithDestructor] : func:r2492_3, this:r2492_1 -# 2492| mu2492_5(unknown) = ^CallSideEffect : ~m? -# 2492| mu2492_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2492_1 +# 2493| Block 4 +# 2493| r2493_1(glval) = VariableAddress[e] : +# 2493| mu2493_2(ClassWithDestructor) = Uninitialized[e] : &:r2493_1 +# 2493| r2493_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2493| v2493_4(void) = Call[ClassWithDestructor] : func:r2493_3, this:r2493_1 +# 2493| mu2493_5(unknown) = ^CallSideEffect : ~m? +# 2493| mu2493_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2493_1 #-----| r0_13(glval) = VariableAddress[e] : #-----| r0_14(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_15(void) = Call[~ClassWithDestructor] : func:r0_14, this:r0_13 @@ -16309,20 +16318,20 @@ ir.cpp: #-----| mu0_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_13 #-----| Goto -> Block 5 -# 2494| Block 5 -# 2494| r2494_1(glval) = VariableAddress[b] : -# 2494| r2494_2(bool) = Load[b] : &:r2494_1, ~m? -# 2494| v2494_3(void) = ConditionalBranch : r2494_2 +# 2495| Block 5 +# 2495| r2495_1(glval) = VariableAddress[b] : +# 2495| r2495_2(bool) = Load[b] : &:r2495_1, ~m? +# 2495| v2495_3(void) = ConditionalBranch : r2495_2 #-----| False -> Block 7 #-----| True -> Block 6 -# 2495| Block 6 -# 2495| r2495_1(glval) = VariableAddress[f] : -# 2495| mu2495_2(ClassWithDestructor) = Uninitialized[f] : &:r2495_1 -# 2495| r2495_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2495| v2495_4(void) = Call[ClassWithDestructor] : func:r2495_3, this:r2495_1 -# 2495| mu2495_5(unknown) = ^CallSideEffect : ~m? -# 2495| mu2495_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2495_1 +# 2496| Block 6 +# 2496| r2496_1(glval) = VariableAddress[f] : +# 2496| mu2496_2(ClassWithDestructor) = Uninitialized[f] : &:r2496_1 +# 2496| r2496_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2496| v2496_4(void) = Call[ClassWithDestructor] : func:r2496_3, this:r2496_1 +# 2496| mu2496_5(unknown) = ^CallSideEffect : ~m? +# 2496| mu2496_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2496_1 #-----| r0_19(glval) = VariableAddress[f] : #-----| r0_20(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_21(void) = Call[~ClassWithDestructor] : func:r0_20, this:r0_19 @@ -16331,227 +16340,358 @@ ir.cpp: #-----| mu0_24(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_19 #-----| Goto (back edge) -> Block 5 -# 2497| Block 7 -# 2497| r2497_1(glval) = VariableAddress[i] : -# 2497| r2497_2(int) = Constant[0] : -# 2497| mu2497_3(int) = Store[i] : &:r2497_1, r2497_2 +# 2498| Block 7 +# 2498| r2498_1(glval) = VariableAddress[i] : +# 2498| r2498_2(int) = Constant[0] : +# 2498| mu2498_3(int) = Store[i] : &:r2498_1, r2498_2 #-----| Goto -> Block 8 -# 2497| Block 8 -# 2497| r2497_4(glval) = VariableAddress[i] : -# 2497| r2497_5(int) = Load[i] : &:r2497_4, ~m? -# 2497| r2497_6(int) = Constant[42] : -# 2497| r2497_7(bool) = CompareLT : r2497_5, r2497_6 -# 2497| v2497_8(void) = ConditionalBranch : r2497_7 +# 2498| Block 8 +# 2498| r2498_4(glval) = VariableAddress[i] : +# 2498| r2498_5(int) = Load[i] : &:r2498_4, ~m? +# 2498| r2498_6(int) = Constant[42] : +# 2498| r2498_7(bool) = CompareLT : r2498_5, r2498_6 +# 2498| v2498_8(void) = ConditionalBranch : r2498_7 #-----| False -> Block 10 #-----| True -> Block 9 -# 2498| Block 9 -# 2498| r2498_1(glval) = VariableAddress[g] : -# 2498| mu2498_2(ClassWithDestructor) = Uninitialized[g] : &:r2498_1 -# 2498| r2498_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2498| v2498_4(void) = Call[ClassWithDestructor] : func:r2498_3, this:r2498_1 -# 2498| mu2498_5(unknown) = ^CallSideEffect : ~m? -# 2498| mu2498_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2498_1 +# 2499| Block 9 +# 2499| r2499_1(glval) = VariableAddress[g] : +# 2499| mu2499_2(ClassWithDestructor) = Uninitialized[g] : &:r2499_1 +# 2499| r2499_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2499| v2499_4(void) = Call[ClassWithDestructor] : func:r2499_3, this:r2499_1 +# 2499| mu2499_5(unknown) = ^CallSideEffect : ~m? +# 2499| mu2499_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2499_1 #-----| r0_25(glval) = VariableAddress[g] : #-----| r0_26(glval) = FunctionAddress[~ClassWithDestructor] : #-----| v0_27(void) = Call[~ClassWithDestructor] : func:r0_26, this:r0_25 #-----| mu0_28(unknown) = ^CallSideEffect : ~m? #-----| v0_29(void) = ^IndirectReadSideEffect[-1] : &:r0_25, ~m? #-----| mu0_30(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r0_25 -# 2497| r2497_9(glval) = VariableAddress[i] : -# 2497| r2497_10(int) = Load[i] : &:r2497_9, ~m? -# 2497| r2497_11(int) = Constant[1] : -# 2497| r2497_12(int) = Add : r2497_10, r2497_11 -# 2497| mu2497_13(int) = Store[i] : &:r2497_9, r2497_12 +# 2498| r2498_9(glval) = VariableAddress[i] : +# 2498| r2498_10(int) = Load[i] : &:r2498_9, ~m? +# 2498| r2498_11(int) = Constant[1] : +# 2498| r2498_12(int) = Add : r2498_10, r2498_11 +# 2498| mu2498_13(int) = Store[i] : &:r2498_9, r2498_12 #-----| Goto (back edge) -> Block 8 -# 2499| Block 10 -# 2499| v2499_1(void) = NoOp : -# 2484| v2484_6(void) = ReturnVoid : -# 2484| v2484_7(void) = AliasedUse : ~m? -# 2484| v2484_8(void) = ExitFunction : +# 2500| Block 10 +# 2500| v2500_1(void) = NoOp : +# 2485| v2485_6(void) = ReturnVoid : +# 2485| v2485_7(void) = AliasedUse : ~m? +# 2485| v2485_8(void) = ExitFunction : -# 2501| void destruction_in_switch_1(int) -# 2501| Block 0 -# 2501| v2501_1(void) = EnterFunction : -# 2501| mu2501_2(unknown) = AliasedDefinition : -# 2501| mu2501_3(unknown) = InitializeNonLocal : -# 2501| r2501_4(glval) = VariableAddress[c] : -# 2501| mu2501_5(int) = InitializeParameter[c] : &:r2501_4 -# 2502| r2502_1(glval) = VariableAddress[c] : -# 2502| r2502_2(int) = Load[c] : &:r2502_1, ~m? -# 2502| v2502_3(void) = Switch : r2502_2 +# 2502| void destruction_in_switch_1(int) +# 2502| Block 0 +# 2502| v2502_1(void) = EnterFunction : +# 2502| mu2502_2(unknown) = AliasedDefinition : +# 2502| mu2502_3(unknown) = InitializeNonLocal : +# 2502| r2502_4(glval) = VariableAddress[c] : +# 2502| mu2502_5(int) = InitializeParameter[c] : &:r2502_4 +# 2503| r2503_1(glval) = VariableAddress[c] : +# 2503| r2503_2(int) = Load[c] : &:r2503_1, ~m? +# 2503| v2503_3(void) = Switch : r2503_2 #-----| Case[0] -> Block 1 #-----| Default -> Block 3 -# 2503| Block 1 -# 2503| v2503_1(void) = NoOp : -# 2504| r2504_1(glval) = VariableAddress[x] : -# 2504| mu2504_2(ClassWithDestructor) = Uninitialized[x] : &:r2504_1 -# 2504| r2504_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2504| v2504_4(void) = Call[ClassWithDestructor] : func:r2504_3, this:r2504_1 -# 2504| mu2504_5(unknown) = ^CallSideEffect : ~m? -# 2504| mu2504_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2504_1 -# 2506| r2506_1(glval) = VariableAddress[x] : -# 2506| r2506_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2506| v2506_3(void) = Call[~ClassWithDestructor] : func:r2506_2, this:r2506_1 -# 2506| mu2506_4(unknown) = ^CallSideEffect : ~m? -# 2506| v2506_5(void) = ^IndirectReadSideEffect[-1] : &:r2506_1, ~m? -# 2506| mu2506_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2506_1 -# 2505| v2505_1(void) = NoOp : +# 2504| Block 1 +# 2504| v2504_1(void) = NoOp : +# 2505| r2505_1(glval) = VariableAddress[x] : +# 2505| mu2505_2(ClassWithDestructor) = Uninitialized[x] : &:r2505_1 +# 2505| r2505_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2505| v2505_4(void) = Call[ClassWithDestructor] : func:r2505_3, this:r2505_1 +# 2505| mu2505_5(unknown) = ^CallSideEffect : ~m? +# 2505| mu2505_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2505_1 +# 2507| r2507_1(glval) = VariableAddress[x] : +# 2507| r2507_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2507| v2507_3(void) = Call[~ClassWithDestructor] : func:r2507_2, this:r2507_1 +# 2507| mu2507_4(unknown) = ^CallSideEffect : ~m? +# 2507| v2507_5(void) = ^IndirectReadSideEffect[-1] : &:r2507_1, ~m? +# 2507| mu2507_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2507_1 +# 2506| v2506_1(void) = NoOp : #-----| Goto -> Block 3 -# 2506| Block 2 -# 2506| r2506_7(glval) = VariableAddress[x] : -# 2506| r2506_8(glval) = FunctionAddress[~ClassWithDestructor] : -# 2506| v2506_9(void) = Call[~ClassWithDestructor] : func:r2506_8, this:r2506_7 -# 2506| mu2506_10(unknown) = ^CallSideEffect : ~m? -# 2506| v2506_11(void) = ^IndirectReadSideEffect[-1] : &:r2506_7, ~m? -# 2506| mu2506_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2506_7 +# 2507| Block 2 +# 2507| r2507_7(glval) = VariableAddress[x] : +# 2507| r2507_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2507| v2507_9(void) = Call[~ClassWithDestructor] : func:r2507_8, this:r2507_7 +# 2507| mu2507_10(unknown) = ^CallSideEffect : ~m? +# 2507| v2507_11(void) = ^IndirectReadSideEffect[-1] : &:r2507_7, ~m? +# 2507| mu2507_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2507_7 #-----| Goto -> Block 3 -# 2507| Block 3 -# 2507| v2507_1(void) = NoOp : +# 2508| Block 3 # 2508| v2508_1(void) = NoOp : -# 2501| v2501_6(void) = ReturnVoid : -# 2501| v2501_7(void) = AliasedUse : ~m? -# 2501| v2501_8(void) = ExitFunction : +# 2509| v2509_1(void) = NoOp : +# 2502| v2502_6(void) = ReturnVoid : +# 2502| v2502_7(void) = AliasedUse : ~m? +# 2502| v2502_8(void) = ExitFunction : -# 2510| void destruction_in_switch_2(int) -# 2510| Block 0 -# 2510| v2510_1(void) = EnterFunction : -# 2510| mu2510_2(unknown) = AliasedDefinition : -# 2510| mu2510_3(unknown) = InitializeNonLocal : -# 2510| r2510_4(glval) = VariableAddress[c] : -# 2510| mu2510_5(int) = InitializeParameter[c] : &:r2510_4 -# 2511| r2511_1(glval) = VariableAddress[y] : -# 2511| mu2511_2(ClassWithDestructor) = Uninitialized[y] : &:r2511_1 -# 2511| r2511_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2511| v2511_4(void) = Call[ClassWithDestructor] : func:r2511_3, this:r2511_1 -# 2511| mu2511_5(unknown) = ^CallSideEffect : ~m? -# 2511| mu2511_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2511_1 -# 2511| r2511_7(glval) = VariableAddress[c] : -# 2511| r2511_8(int) = Load[c] : &:r2511_7, ~m? -# 2511| v2511_9(void) = Switch : r2511_8 +# 2511| void destruction_in_switch_2(int) +# 2511| Block 0 +# 2511| v2511_1(void) = EnterFunction : +# 2511| mu2511_2(unknown) = AliasedDefinition : +# 2511| mu2511_3(unknown) = InitializeNonLocal : +# 2511| r2511_4(glval) = VariableAddress[c] : +# 2511| mu2511_5(int) = InitializeParameter[c] : &:r2511_4 +# 2512| r2512_1(glval) = VariableAddress[y] : +# 2512| mu2512_2(ClassWithDestructor) = Uninitialized[y] : &:r2512_1 +# 2512| r2512_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2512| v2512_4(void) = Call[ClassWithDestructor] : func:r2512_3, this:r2512_1 +# 2512| mu2512_5(unknown) = ^CallSideEffect : ~m? +# 2512| mu2512_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2512_1 +# 2512| r2512_7(glval) = VariableAddress[c] : +# 2512| r2512_8(int) = Load[c] : &:r2512_7, ~m? +# 2512| v2512_9(void) = Switch : r2512_8 #-----| Case[0] -> Block 1 #-----| Default -> Block 2 -# 2512| Block 1 -# 2512| v2512_1(void) = NoOp : -# 2518| r2518_1(glval) = VariableAddress[y] : -# 2518| r2518_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2518| v2518_3(void) = Call[~ClassWithDestructor] : func:r2518_2, this:r2518_1 -# 2518| mu2518_4(unknown) = ^CallSideEffect : ~m? -# 2518| v2518_5(void) = ^IndirectReadSideEffect[-1] : &:r2518_1, ~m? -# 2518| mu2518_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2518_1 +# 2513| Block 1 # 2513| v2513_1(void) = NoOp : +# 2519| r2519_1(glval) = VariableAddress[y] : +# 2519| r2519_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2519| v2519_3(void) = Call[~ClassWithDestructor] : func:r2519_2, this:r2519_1 +# 2519| mu2519_4(unknown) = ^CallSideEffect : ~m? +# 2519| v2519_5(void) = ^IndirectReadSideEffect[-1] : &:r2519_1, ~m? +# 2519| mu2519_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2519_1 +# 2514| v2514_1(void) = NoOp : #-----| Goto -> Block 4 -# 2515| Block 2 -# 2515| v2515_1(void) = NoOp : -# 2518| r2518_7(glval) = VariableAddress[y] : -# 2518| r2518_8(glval) = FunctionAddress[~ClassWithDestructor] : -# 2518| v2518_9(void) = Call[~ClassWithDestructor] : func:r2518_8, this:r2518_7 -# 2518| mu2518_10(unknown) = ^CallSideEffect : ~m? -# 2518| v2518_11(void) = ^IndirectReadSideEffect[-1] : &:r2518_7, ~m? -# 2518| mu2518_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2518_7 +# 2516| Block 2 # 2516| v2516_1(void) = NoOp : +# 2519| r2519_7(glval) = VariableAddress[y] : +# 2519| r2519_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2519| v2519_9(void) = Call[~ClassWithDestructor] : func:r2519_8, this:r2519_7 +# 2519| mu2519_10(unknown) = ^CallSideEffect : ~m? +# 2519| v2519_11(void) = ^IndirectReadSideEffect[-1] : &:r2519_7, ~m? +# 2519| mu2519_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2519_7 +# 2517| v2517_1(void) = NoOp : #-----| Goto -> Block 4 -# 2518| Block 3 -# 2518| r2518_13(glval) = VariableAddress[y] : -# 2518| r2518_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2518| v2518_15(void) = Call[~ClassWithDestructor] : func:r2518_14, this:r2518_13 -# 2518| mu2518_16(unknown) = ^CallSideEffect : ~m? -# 2518| v2518_17(void) = ^IndirectReadSideEffect[-1] : &:r2518_13, ~m? -# 2518| mu2518_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2518_13 +# 2519| Block 3 +# 2519| r2519_13(glval) = VariableAddress[y] : +# 2519| r2519_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2519| v2519_15(void) = Call[~ClassWithDestructor] : func:r2519_14, this:r2519_13 +# 2519| mu2519_16(unknown) = ^CallSideEffect : ~m? +# 2519| v2519_17(void) = ^IndirectReadSideEffect[-1] : &:r2519_13, ~m? +# 2519| mu2519_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2519_13 #-----| Goto -> Block 4 -# 2518| Block 4 -# 2518| v2518_19(void) = NoOp : -# 2519| v2519_1(void) = NoOp : -# 2510| v2510_6(void) = ReturnVoid : -# 2510| v2510_7(void) = AliasedUse : ~m? -# 2510| v2510_8(void) = ExitFunction : +# 2519| Block 4 +# 2519| v2519_19(void) = NoOp : +# 2520| v2520_1(void) = NoOp : +# 2511| v2511_6(void) = ReturnVoid : +# 2511| v2511_7(void) = AliasedUse : ~m? +# 2511| v2511_8(void) = ExitFunction : -# 2521| void destruction_in_switch_3(int) -# 2521| Block 0 -# 2521| v2521_1(void) = EnterFunction : -# 2521| mu2521_2(unknown) = AliasedDefinition : -# 2521| mu2521_3(unknown) = InitializeNonLocal : -# 2521| r2521_4(glval) = VariableAddress[c] : -# 2521| mu2521_5(int) = InitializeParameter[c] : &:r2521_4 -# 2522| r2522_1(glval) = VariableAddress[y] : -# 2522| mu2522_2(ClassWithDestructor) = Uninitialized[y] : &:r2522_1 -# 2522| r2522_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2522| v2522_4(void) = Call[ClassWithDestructor] : func:r2522_3, this:r2522_1 -# 2522| mu2522_5(unknown) = ^CallSideEffect : ~m? -# 2522| mu2522_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2522_1 -# 2522| r2522_7(glval) = VariableAddress[c] : -# 2522| r2522_8(int) = Load[c] : &:r2522_7, ~m? -# 2522| v2522_9(void) = Switch : r2522_8 +# 2522| void destruction_in_switch_3(int) +# 2522| Block 0 +# 2522| v2522_1(void) = EnterFunction : +# 2522| mu2522_2(unknown) = AliasedDefinition : +# 2522| mu2522_3(unknown) = InitializeNonLocal : +# 2522| r2522_4(glval) = VariableAddress[c] : +# 2522| mu2522_5(int) = InitializeParameter[c] : &:r2522_4 +# 2523| r2523_1(glval) = VariableAddress[y] : +# 2523| mu2523_2(ClassWithDestructor) = Uninitialized[y] : &:r2523_1 +# 2523| r2523_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2523| v2523_4(void) = Call[ClassWithDestructor] : func:r2523_3, this:r2523_1 +# 2523| mu2523_5(unknown) = ^CallSideEffect : ~m? +# 2523| mu2523_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2523_1 +# 2523| r2523_7(glval) = VariableAddress[c] : +# 2523| r2523_8(int) = Load[c] : &:r2523_7, ~m? +# 2523| v2523_9(void) = Switch : r2523_8 #-----| Case[0] -> Block 1 #-----| Default -> Block 3 -# 2523| Block 1 -# 2523| v2523_1(void) = NoOp : -# 2524| r2524_1(glval) = VariableAddress[x] : -# 2524| mu2524_2(ClassWithDestructor) = Uninitialized[x] : &:r2524_1 -# 2524| r2524_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2524| v2524_4(void) = Call[ClassWithDestructor] : func:r2524_3, this:r2524_1 -# 2524| mu2524_5(unknown) = ^CallSideEffect : ~m? -# 2524| mu2524_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2524_1 -# 2526| r2526_1(glval) = VariableAddress[x] : -# 2526| r2526_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2526| v2526_3(void) = Call[~ClassWithDestructor] : func:r2526_2, this:r2526_1 -# 2526| mu2526_4(unknown) = ^CallSideEffect : ~m? -# 2526| v2526_5(void) = ^IndirectReadSideEffect[-1] : &:r2526_1, ~m? -# 2526| mu2526_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2526_1 -# 2530| r2530_1(glval) = VariableAddress[y] : -# 2530| r2530_2(glval) = FunctionAddress[~ClassWithDestructor] : -# 2530| v2530_3(void) = Call[~ClassWithDestructor] : func:r2530_2, this:r2530_1 -# 2530| mu2530_4(unknown) = ^CallSideEffect : ~m? -# 2530| v2530_5(void) = ^IndirectReadSideEffect[-1] : &:r2530_1, ~m? -# 2530| mu2530_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2530_1 -# 2525| v2525_1(void) = NoOp : +# 2524| Block 1 +# 2524| v2524_1(void) = NoOp : +# 2525| r2525_1(glval) = VariableAddress[x] : +# 2525| mu2525_2(ClassWithDestructor) = Uninitialized[x] : &:r2525_1 +# 2525| r2525_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2525| v2525_4(void) = Call[ClassWithDestructor] : func:r2525_3, this:r2525_1 +# 2525| mu2525_5(unknown) = ^CallSideEffect : ~m? +# 2525| mu2525_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2525_1 +# 2527| r2527_1(glval) = VariableAddress[x] : +# 2527| r2527_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2527| v2527_3(void) = Call[~ClassWithDestructor] : func:r2527_2, this:r2527_1 +# 2527| mu2527_4(unknown) = ^CallSideEffect : ~m? +# 2527| v2527_5(void) = ^IndirectReadSideEffect[-1] : &:r2527_1, ~m? +# 2527| mu2527_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2527_1 +# 2531| r2531_1(glval) = VariableAddress[y] : +# 2531| r2531_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2531| v2531_3(void) = Call[~ClassWithDestructor] : func:r2531_2, this:r2531_1 +# 2531| mu2531_4(unknown) = ^CallSideEffect : ~m? +# 2531| v2531_5(void) = ^IndirectReadSideEffect[-1] : &:r2531_1, ~m? +# 2531| mu2531_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2531_1 +# 2526| v2526_1(void) = NoOp : #-----| Goto -> Block 5 -# 2526| Block 2 -# 2526| r2526_7(glval) = VariableAddress[x] : -# 2526| r2526_8(glval) = FunctionAddress[~ClassWithDestructor] : -# 2526| v2526_9(void) = Call[~ClassWithDestructor] : func:r2526_8, this:r2526_7 -# 2526| mu2526_10(unknown) = ^CallSideEffect : ~m? -# 2526| v2526_11(void) = ^IndirectReadSideEffect[-1] : &:r2526_7, ~m? -# 2526| mu2526_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2526_7 +# 2527| Block 2 +# 2527| r2527_7(glval) = VariableAddress[x] : +# 2527| r2527_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2527| v2527_9(void) = Call[~ClassWithDestructor] : func:r2527_8, this:r2527_7 +# 2527| mu2527_10(unknown) = ^CallSideEffect : ~m? +# 2527| v2527_11(void) = ^IndirectReadSideEffect[-1] : &:r2527_7, ~m? +# 2527| mu2527_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2527_7 #-----| Goto -> Block 3 -# 2527| Block 3 -# 2527| v2527_1(void) = NoOp : -# 2530| r2530_7(glval) = VariableAddress[y] : -# 2530| r2530_8(glval) = FunctionAddress[~ClassWithDestructor] : -# 2530| v2530_9(void) = Call[~ClassWithDestructor] : func:r2530_8, this:r2530_7 -# 2530| mu2530_10(unknown) = ^CallSideEffect : ~m? -# 2530| v2530_11(void) = ^IndirectReadSideEffect[-1] : &:r2530_7, ~m? -# 2530| mu2530_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2530_7 +# 2528| Block 3 # 2528| v2528_1(void) = NoOp : +# 2531| r2531_7(glval) = VariableAddress[y] : +# 2531| r2531_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2531| v2531_9(void) = Call[~ClassWithDestructor] : func:r2531_8, this:r2531_7 +# 2531| mu2531_10(unknown) = ^CallSideEffect : ~m? +# 2531| v2531_11(void) = ^IndirectReadSideEffect[-1] : &:r2531_7, ~m? +# 2531| mu2531_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2531_7 +# 2529| v2529_1(void) = NoOp : #-----| Goto -> Block 5 -# 2530| Block 4 -# 2530| r2530_13(glval) = VariableAddress[y] : -# 2530| r2530_14(glval) = FunctionAddress[~ClassWithDestructor] : -# 2530| v2530_15(void) = Call[~ClassWithDestructor] : func:r2530_14, this:r2530_13 -# 2530| mu2530_16(unknown) = ^CallSideEffect : ~m? -# 2530| v2530_17(void) = ^IndirectReadSideEffect[-1] : &:r2530_13, ~m? -# 2530| mu2530_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2530_13 +# 2531| Block 4 +# 2531| r2531_13(glval) = VariableAddress[y] : +# 2531| r2531_14(glval) = FunctionAddress[~ClassWithDestructor] : +# 2531| v2531_15(void) = Call[~ClassWithDestructor] : func:r2531_14, this:r2531_13 +# 2531| mu2531_16(unknown) = ^CallSideEffect : ~m? +# 2531| v2531_17(void) = ^IndirectReadSideEffect[-1] : &:r2531_13, ~m? +# 2531| mu2531_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2531_13 #-----| Goto -> Block 5 -# 2530| Block 5 -# 2530| v2530_19(void) = NoOp : -# 2531| v2531_1(void) = NoOp : -# 2521| v2521_6(void) = ReturnVoid : -# 2521| v2521_7(void) = AliasedUse : ~m? -# 2521| v2521_8(void) = ExitFunction : +# 2531| Block 5 +# 2531| v2531_19(void) = NoOp : +# 2532| v2532_1(void) = NoOp : +# 2522| v2522_6(void) = ReturnVoid : +# 2522| v2522_7(void) = AliasedUse : ~m? +# 2522| v2522_8(void) = ExitFunction : + +# 2534| void destructor_possibly_not_handled() +# 2534| Block 0 +# 2534| v2534_1(void) = EnterFunction : +# 2534| mu2534_2(unknown) = AliasedDefinition : +# 2534| mu2534_3(unknown) = InitializeNonLocal : +# 2535| r2535_1(glval) = VariableAddress[x] : +# 2535| mu2535_2(ClassWithDestructor) = Uninitialized[x] : &:r2535_1 +# 2535| r2535_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2535| v2535_4(void) = Call[ClassWithDestructor] : func:r2535_3, this:r2535_1 +# 2535| mu2535_5(unknown) = ^CallSideEffect : ~m? +# 2535| mu2535_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2535_1 +# 2537| r2537_1(glval) = VariableAddress[#throw2537:5] : +# 2537| r2537_2(int) = Constant[42] : +# 2537| mu2537_3(int) = Store[#throw2537:5] : &:r2537_1, r2537_2 +# 2537| v2537_4(void) = ThrowValue : &:r2537_1, ~m? +#-----| Exception -> Block 2 + +# 2534| Block 1 +# 2534| v2534_4(void) = AliasedUse : ~m? +# 2534| v2534_5(void) = ExitFunction : + +# 2539| Block 2 +# 2539| v2539_1(void) = CatchByType[char] : +#-----| Exception -> Block 4 +#-----| Goto -> Block 3 + +# 2539| Block 3 +# 2539| r2539_2(glval) = VariableAddress[(unnamed parameter 0)] : +# 2539| mu2539_3(char) = InitializeParameter[(unnamed parameter 0)] : &:r2539_2 +# 2539| v2539_4(void) = NoOp : +# 2541| v2541_1(void) = NoOp : +# 2541| r2541_2(glval) = VariableAddress[x] : +# 2541| r2541_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2541| v2541_4(void) = Call[~ClassWithDestructor] : func:r2541_3, this:r2541_2 +# 2541| mu2541_5(unknown) = ^CallSideEffect : ~m? +# 2541| v2541_6(void) = ^IndirectReadSideEffect[-1] : &:r2541_2, ~m? +# 2541| mu2541_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2541_2 +# 2534| v2534_6(void) = ReturnVoid : +#-----| Goto -> Block 1 + +# 2541| Block 4 +# 2541| r2541_8(glval) = VariableAddress[x] : +# 2541| r2541_9(glval) = FunctionAddress[~ClassWithDestructor] : +# 2541| v2541_10(void) = Call[~ClassWithDestructor] : func:r2541_9, this:r2541_8 +# 2541| mu2541_11(unknown) = ^CallSideEffect : ~m? +# 2541| v2541_12(void) = ^IndirectReadSideEffect[-1] : &:r2541_8, ~m? +# 2541| mu2541_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2541_8 +# 2534| v2534_7(void) = Unwind : +#-----| Goto -> Block 1 + +# 2545| void this_inconsistency(bool) +# 2545| Block 0 +# 2545| v2545_1(void) = EnterFunction : +# 2545| mu2545_2(unknown) = AliasedDefinition : +# 2545| mu2545_3(unknown) = InitializeNonLocal : +# 2545| r2545_4(glval) = VariableAddress[b] : +# 2545| mu2545_5(bool) = InitializeParameter[b] : &:r2545_4 +# 2546| r2546_1(glval) = VariableAddress[a] : +# 2546| r2546_2(glval) = VariableAddress[#temp2546:38] : +# 2546| r2546_3(glval) = FunctionAddress[getClassWithDestructor] : +# 2546| r2546_4(ClassWithDestructor) = Call[getClassWithDestructor] : func:r2546_3 +# 2546| mu2546_5(unknown) = ^CallSideEffect : ~m? +# 2546| mu2546_6(ClassWithDestructor) = Store[#temp2546:38] : &:r2546_2, r2546_4 +# 2546| r2546_7(glval) = Convert : r2546_2 +# 2546| r2546_8(ClassWithDestructor &) = CopyValue : r2546_7 +# 2546| mu2546_9(ClassWithDestructor &) = Store[a] : &:r2546_1, r2546_8 +# 2546| r2546_10(glval) = VariableAddress[a] : +# 2546| r2546_11(ClassWithDestructor &) = Load[a] : &:r2546_10, ~m? +# 2546| r2546_12(ClassWithDestructor) = CopyValue : r2546_11 +# 2546| r2546_13(glval) = FunctionAddress[operator bool] : +# 2546| r2546_14(bool) = Call[operator bool] : func:r2546_13, this:r2546_12 +# 2546| mu2546_15(unknown) = ^CallSideEffect : ~m? +# 2546| v2546_16(void) = ^IndirectReadSideEffect[-1] : &:r2546_12, ~m? +# 2546| r2546_17(bool) = CopyValue : r2546_14 +# 2546| v2546_18(void) = ConditionalBranch : r2546_17 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2547| Block 1 +# 2547| v2547_1(void) = NoOp : +#-----| Goto -> Block 2 + +# 2547| Block 2 +# 2547| r2547_2(glval) = CopyValue : r2546_2 +# 2547| r2547_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2547| v2547_4(void) = Call[~ClassWithDestructor] : func:r2547_3, this:r2547_2 +# 2547| mu2547_5(unknown) = ^CallSideEffect : ~m? +# 2547| v2547_6(void) = ^IndirectReadSideEffect[-1] : &:r2547_2, ~m? +# 2547| mu2547_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2547_2 +# 2548| v2548_1(void) = NoOp : +# 2545| v2545_6(void) = ReturnVoid : +# 2545| v2545_7(void) = AliasedUse : ~m? +# 2545| v2545_8(void) = ExitFunction : + +# 2550| void constexpr_inconsistency(bool) +# 2550| Block 0 +# 2550| v2550_1(void) = EnterFunction : +# 2550| mu2550_2(unknown) = AliasedDefinition : +# 2550| mu2550_3(unknown) = InitializeNonLocal : +# 2550| r2550_4(glval) = VariableAddress[b] : +# 2550| mu2550_5(bool) = InitializeParameter[b] : &:r2550_4 +# 2551| r2551_1(glval) = VariableAddress[a] : +# 2551| r2551_2(glval) = VariableAddress[#temp2551:48] : +# 2551| r2551_3(glval) = FunctionAddress[getClassWithDestructor] : +# 2551| r2551_4(ClassWithDestructor) = Call[getClassWithDestructor] : func:r2551_3 +# 2551| mu2551_5(unknown) = ^CallSideEffect : ~m? +# 2551| mu2551_6(ClassWithDestructor) = Store[#temp2551:48] : &:r2551_2, r2551_4 +# 2551| r2551_7(glval) = Convert : r2551_2 +# 2551| r2551_8(ClassWithDestructor &) = CopyValue : r2551_7 +# 2551| mu2551_9(ClassWithDestructor &) = Store[a] : &:r2551_1, r2551_8 +# 2551| r2551_10(bool) = Constant[1] : +# 2551| v2551_11(void) = ConditionalBranch : r2551_10 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2552| Block 1 +# 2552| v2552_1(void) = NoOp : +#-----| Goto -> Block 2 + +# 2552| Block 2 +# 2552| r2552_2(glval) = CopyValue : r2551_2 +# 2552| r2552_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2552| v2552_4(void) = Call[~ClassWithDestructor] : func:r2552_3, this:r2552_2 +# 2552| mu2552_5(unknown) = ^CallSideEffect : ~m? +# 2552| v2552_6(void) = ^IndirectReadSideEffect[-1] : &:r2552_2, ~m? +# 2552| mu2552_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2552_2 +# 2553| v2553_1(void) = NoOp : +# 2550| v2550_6(void) = ReturnVoid : +# 2550| v2550_7(void) = AliasedUse : ~m? +# 2550| v2550_8(void) = ExitFunction : perf-regression.cpp: # 6| void Big::Big() diff --git a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected index 8f472b49f27..5a0234a4cc4 100644 --- a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected @@ -27,6 +27,7 @@ invalidOverlap nonUniqueEnclosingIRFunction fieldAddressOnNonPointer thisArgumentIsNonPointer +| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | diff --git a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected index 8f472b49f27..5a0234a4cc4 100644 --- a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected @@ -27,6 +27,7 @@ invalidOverlap nonUniqueEnclosingIRFunction fieldAddressOnNonPointer thisArgumentIsNonPointer +| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | diff --git a/cpp/ql/test/query-tests/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage/IncorrectNotOperatorUsage.cpp b/cpp/ql/test/query-tests/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage/IncorrectNotOperatorUsage.cpp index 90c21ca90f3..ac3f1ab3ed5 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage/IncorrectNotOperatorUsage.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage/IncorrectNotOperatorUsage.cpp @@ -3,7 +3,7 @@ void C6317_positive(int i) { - if (i & !FLAGS) // BUG + if (i & !FLAGS) // BUG { } } @@ -71,3 +71,22 @@ void macroUsage(unsigned int arg1, unsigned int arg2) } } + +void bool_examples(bool a, bool b) +{ + if (a & !b) // dubious (confusing intent, but shouldn't produce a wrong result) + { + } + + if (a & ~b) + { + } + + if (a && ~b) + { + } + + if (a && !b) + { + } +} diff --git a/cpp/ql/test/query-tests/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage/IncorrectNotOperatorUsage.expected b/cpp/ql/test/query-tests/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage/IncorrectNotOperatorUsage.expected index a5bbea858da..9c6d4154bf5 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage/IncorrectNotOperatorUsage.expected +++ b/cpp/ql/test/query-tests/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage/IncorrectNotOperatorUsage.expected @@ -14,3 +14,4 @@ | IncorrectNotOperatorUsage.cpp:48:9:48:18 | ... \| ... | Usage of a logical not (!) expression as a bitwise operator. | | IncorrectNotOperatorUsage.cpp:49:9:49:20 | ... \| ... | Usage of a logical not (!) expression as a bitwise operator. | | IncorrectNotOperatorUsage.cpp:70:10:70:34 | ... \| ... | Usage of a logical not (!) expression as a bitwise operator. | +| IncorrectNotOperatorUsage.cpp:77:9:77:14 | ... & ... | Usage of a logical not (!) expression as a bitwise operator. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/TaintedPath.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/TaintedPath.expected index f8b96c81b1e..948de8316e4 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/TaintedPath.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/TaintedPath.expected @@ -2,6 +2,8 @@ edges | test.c:8:27:8:30 | **argv | test.c:9:23:9:29 | *access to array | provenance | | | test.c:8:27:8:30 | **argv | test.c:31:22:31:28 | *access to array | provenance | | | test.c:8:27:8:30 | **argv | test.c:69:14:69:20 | *access to array | provenance | | +| test.c:8:27:8:30 | **argv | test.c:80:25:80:31 | *access to array | provenance | | +| test.c:8:27:8:30 | **argv | test.c:88:22:88:28 | *access to array | provenance | | | test.c:9:23:9:29 | *access to array | test.c:17:11:17:18 | *fileName | provenance | TaintFunction | | test.c:31:22:31:28 | *access to array | test.c:32:11:32:18 | *fileName | provenance | | | test.c:37:17:37:24 | scanf output argument | test.c:38:11:38:18 | *fileName | provenance | | @@ -11,6 +13,8 @@ edges | test.c:54:21:54:26 | *call to getenv | test.c:55:11:55:16 | *buffer | provenance | TaintFunction | | test.c:74:13:74:18 | read output argument | test.c:76:11:76:16 | *buffer | provenance | | | test.c:75:13:75:18 | read output argument | test.c:76:11:76:16 | *buffer | provenance | | +| test.c:80:25:80:31 | *access to array | test.c:84:11:84:20 | *fileBuffer | provenance | TaintFunction | +| test.c:88:22:88:28 | *access to array | test.c:98:24:98:33 | *fileBuffer | provenance | TaintFunction | nodes | test.c:8:27:8:30 | **argv | semmle.label | **argv | | test.c:9:23:9:29 | *access to array | semmle.label | *access to array | @@ -30,6 +34,10 @@ nodes | test.c:74:13:74:18 | read output argument | semmle.label | read output argument | | test.c:75:13:75:18 | read output argument | semmle.label | read output argument | | test.c:76:11:76:16 | *buffer | semmle.label | *buffer | +| test.c:80:25:80:31 | *access to array | semmle.label | *access to array | +| test.c:84:11:84:20 | *fileBuffer | semmle.label | *fileBuffer | +| test.c:88:22:88:28 | *access to array | semmle.label | *access to array | +| test.c:98:24:98:33 | *fileBuffer | semmle.label | *fileBuffer | subpaths #select | test.c:17:11:17:18 | fileName | test.c:8:27:8:30 | **argv | test.c:17:11:17:18 | *fileName | This argument to a file access function is derived from $@ and then passed to fopen(filename). | test.c:8:27:8:30 | **argv | user input (a command-line argument) | @@ -41,3 +49,5 @@ subpaths | test.c:69:14:69:20 | access to array | test.c:8:27:8:30 | **argv | test.c:69:14:69:20 | *access to array | This argument to a file access function is derived from $@ and then passed to readFile(fileName), which calls fopen(filename). | test.c:8:27:8:30 | **argv | user input (a command-line argument) | | test.c:76:11:76:16 | buffer | test.c:74:13:74:18 | read output argument | test.c:76:11:76:16 | *buffer | This argument to a file access function is derived from $@ and then passed to fopen(filename). | test.c:74:13:74:18 | read output argument | user input (buffer read by read) | | test.c:76:11:76:16 | buffer | test.c:75:13:75:18 | read output argument | test.c:76:11:76:16 | *buffer | This argument to a file access function is derived from $@ and then passed to fopen(filename). | test.c:75:13:75:18 | read output argument | user input (buffer read by read) | +| test.c:84:11:84:20 | fileBuffer | test.c:8:27:8:30 | **argv | test.c:84:11:84:20 | *fileBuffer | This argument to a file access function is derived from $@ and then passed to fopen(filename). | test.c:8:27:8:30 | **argv | user input (a command-line argument) | +| test.c:98:24:98:33 | fileBuffer | test.c:8:27:8:30 | **argv | test.c:98:24:98:33 | *fileBuffer | This argument to a file access function is derived from $@ and then passed to fopen(filename). | test.c:8:27:8:30 | **argv | user input (a command-line argument) | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/test.c b/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/test.c index 4c478275832..4324f269df6 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/test.c +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/test.c @@ -2,7 +2,7 @@ // Associated with CWE-022: Improper Limitation of a Pathname to a Restricted Directory. http://cwe.mitre.org/data/definitions/22.html #include "stdlib.h" - +#define PATH_MAX 4096 ///// Test code ///// int main(int argc, char** argv) { @@ -75,6 +75,55 @@ int main(int argc, char** argv) { read(0, buffer, 1024); fopen(buffer, "wb+"); // BAD [duplicated with both sources] } + + { + char *userAndFile = argv[2]; + char fileBuffer[PATH_MAX]; + snprintf(fileBuffer, sizeof(fileBuffer), "/home/%s", userAndFile); + // BAD: a string from the user is used in a filename + fopen(fileBuffer, "wb+"); + } + + { + char *fileName = argv[2]; + // Check for invalid sequences in the user input + if (strstr(fileName , "..") || strchr(fileName , '/') || strchr(fileName , '\\')) { + printf("Invalid filename.\n"); + return 1; + } + + char fileBuffer[PATH_MAX]; + snprintf(fileBuffer, sizeof(fileBuffer), "/home/user/files/%s", fileName); + // GOOD: We know that the filename is safe and stays within the public folder. But we currently get an FP here. + FILE *file = fopen(fileBuffer, "wb+"); + } + + { + char *userAndFile = argv[2]; + const char *baseDir = "/home/user/public/"; + char fullPath[PATH_MAX]; + + // Attempt to concatenate the base directory and the user-supplied path + snprintf(fullPath, sizeof(fullPath), "%s%s", baseDir, userAndFile); + + // Resolve the absolute path, normalizing any ".." or "." + char *resolvedPath = realpath(fullPath, 0); // <- we're using `NULL` in the example, but 0 here to get it to compile. Same for next line. + if (resolvedPath == 0) { + perror("Error resolving path"); + return 1; + } + + // Check if the resolved path starts with the base directory + if (strncmp(baseDir, resolvedPath, strlen(baseDir)) != 0) { + free(resolvedPath); + return 1; + } + + // GOOD: Path is within the intended directory + FILE *file = fopen(resolvedPath, "wb+"); + free(resolvedPath); + + } } void readFile(char *fileName) { diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/IteratorToExpiredContainer.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/IteratorToExpiredContainer.expected index f47e5d655b9..126f1e8f4f7 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/IteratorToExpiredContainer.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/IteratorToExpiredContainer.expected @@ -1,6 +1,5 @@ | test.cpp:680:30:680:30 | call to operator[] | This object is destroyed at the end of the full-expression. | | test.cpp:683:31:683:32 | call to at | This object is destroyed at the end of the full-expression. | -| test.cpp:689:46:689:58 | pointer to ~vector output argument | This object is destroyed at the end of the full-expression. | | test.cpp:702:27:702:27 | call to operator[] | This object is destroyed at the end of the full-expression. | | test.cpp:727:23:727:23 | call to operator[] | This object is destroyed at the end of the full-expression. | | test.cpp:735:23:735:23 | call to operator[] | This object is destroyed at the end of the full-expression. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/test.cpp index 85d9c4b57ad..bab492796f3 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/test.cpp @@ -686,7 +686,7 @@ void test() { for (auto x : returnRef()[0]) {} // GOOD for (auto x : returnRef().at(0)) {} // GOOD - for(auto it = returnValue().begin(); it != returnValue().end(); ++it) {} // BAD + for(auto it = returnValue().begin(); it != returnValue().end(); ++it) {} // BAD [NOT DETECTED] { auto v = returnValue(); @@ -792,4 +792,13 @@ void test4() { // function we may end up in the destructor call `chunk.~A()`in `A.foo`. This destructor // call can flow to `begin` through the back-edge and cause a strange FP. auto zero = A().size(); +} + +void test5(int i) +{ + while(i < 10) { + const auto& vvs = returnValue(); + for(const auto& vs : vvs) { } + ++i; + } // GOOD } \ No newline at end of file diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/LoopConditionsConst.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/LoopConditionsConst.expected index 01dbbaa2e65..07ca32b1718 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/LoopConditionsConst.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/LoopConditionsConst.expected @@ -22,3 +22,4 @@ | test.cpp:416:2:418:2 | for(...;...;...) ... | test.cpp:416:18:416:23 | ... < ... | 1 | i | { ... } | i | return ... | | test.cpp:424:2:425:2 | for(...;...;...) ... | test.cpp:424:18:424:23 | ... < ... | 1 | i | { ... } | i | return ... | | test.cpp:433:2:434:2 | for(...;...;...) ... | test.cpp:433:18:433:22 | 0 | 0 | | { ... } | 0 | return ... | +| test.cpp:559:3:564:3 | while (...) ... | test.cpp:559:9:559:15 | call to getBool | | call to getBool | { ... } | call to getBool | ExprStmt | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/UninitializedLocal.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/UninitializedLocal.expected index d27b2c996b3..94d01d0e6c1 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/UninitializedLocal.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/UninitializedLocal.expected @@ -13,6 +13,7 @@ nodes | test.cpp:458:6:458:6 | definition of x | semmle.label | definition of x | | test.cpp:464:6:464:6 | definition of x | semmle.label | definition of x | | test.cpp:471:6:471:6 | definition of x | semmle.label | definition of x | +| test.cpp:557:15:557:15 | definition of r | semmle.label | definition of r | #select | test.cpp:12:6:12:8 | foo | test.cpp:11:6:11:8 | definition of foo | test.cpp:11:6:11:8 | definition of foo | The variable $@ may not be initialized at this access. | test.cpp:11:6:11:8 | foo | foo | | test.cpp:113:6:113:8 | foo | test.cpp:111:6:111:8 | definition of foo | test.cpp:111:6:111:8 | definition of foo | The variable $@ may not be initialized at this access. | test.cpp:111:6:111:8 | foo | foo | @@ -27,3 +28,4 @@ nodes | test.cpp:460:7:460:7 | x | test.cpp:458:6:458:6 | definition of x | test.cpp:458:6:458:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:458:6:458:6 | x | x | | test.cpp:467:2:467:2 | x | test.cpp:464:6:464:6 | definition of x | test.cpp:464:6:464:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:464:6:464:6 | x | x | | test.cpp:474:7:474:7 | x | test.cpp:471:6:471:6 | definition of x | test.cpp:471:6:471:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:471:6:471:6 | x | x | +| test.cpp:567:7:567:7 | r | test.cpp:557:15:557:15 | definition of r | test.cpp:557:15:557:15 | definition of r | The variable $@ may not be initialized at this access. | test.cpp:557:15:557:15 | r | r | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/test.cpp index e3489cee4cc..4f56ab1259a 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/test.cpp @@ -1,6 +1,6 @@ // Semmle test cases for rule CWE-457. -void use(int data); +void use(...); void test1() { int foo = 1; @@ -544,4 +544,25 @@ class StaticMethodClass{ int static_method_false_positive(){ StaticMethodClass *t; int i = t->get(); // GOOD: the `get` method is static and this is equivalent to StaticMethodClass::get() +} + +struct LinkedList +{ + LinkedList* next; +}; + +bool getBool(); + +void test45() { + LinkedList *r, *s, **rP = &r; + + while(getBool()) + { + s = new LinkedList; + *rP = s; + rP = &s->next; + } + + *rP = NULL; + use(r); // GOOD [FALSE POSITIVE] } \ No newline at end of file diff --git a/csharp/.config/dotnet-tools.json b/csharp/.config/dotnet-tools.json new file mode 100644 index 00000000000..b9052bc027d --- /dev/null +++ b/csharp/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "paket": { + "version": "8.0.3", + "commands": [ + "paket" + ] + } + } +} \ No newline at end of file diff --git a/csharp/.gitignore b/csharp/.gitignore index a030c9444fe..de2e4b63e18 100644 --- a/csharp/.gitignore +++ b/csharp/.gitignore @@ -14,4 +14,5 @@ csharp.log .vscode/launch.json extractor/Semmle.Extraction.CSharp.Driver/Properties/launchSettings.json -extractor-pack \ No newline at end of file +extractor-pack +paket-files/ diff --git a/csharp/.paket/Paket.Restore.targets b/csharp/.paket/Paket.Restore.targets new file mode 100644 index 00000000000..bbeec153f50 --- /dev/null +++ b/csharp/.paket/Paket.Restore.targets @@ -0,0 +1,560 @@ + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(MSBuildVersion) + 15.0.0 + false + true + + true + $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory)..\ + $(PaketRootPath)paket-files\paket.restore.cached + $(PaketRootPath)paket.lock + classic + proj + assembly + native + /Library/Frameworks/Mono.framework/Commands/mono + mono + + + $(PaketRootPath)paket.bootstrapper.exe + $(PaketToolsPath)paket.bootstrapper.exe + $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ + + "$(PaketBootStrapperExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + + + + + true + true + + + True + + + False + + $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) + + + + + + + + + $(PaketRootPath)paket + $(PaketToolsPath)paket + + + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + + + + + + <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) + <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) + <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false + + + + + + + + + + + <_PaketCommand>dotnet paket + + + + + + $(PaketToolsPath)paket + $(PaketBootStrapperExeDir)paket + + + paket + + + + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" + + + + + + + + + + + + + + + + + + + + + true + $(NoWarn);NU1603;NU1604;NU1605;NU1608 + false + true + + + + + + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + + + + + + + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) + + + + + %(PaketRestoreCachedKeyValue.Value) + %(PaketRestoreCachedKeyValue.Value) + + + + + true + false + true + + + + + true + + + + + + + + + + + + + + + + + + + $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached + + $(MSBuildProjectFullPath).paket.references + + $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references + + $(MSBuildProjectDirectory)\paket.references + + false + true + true + references-file-or-cache-not-found + + + + + $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)')) + $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)')) + references-file + false + + + + + false + + + + + true + target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) + + + + + + + + + + + false + true + + + + + + + + + + + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8]) + + + %(PaketReferencesFileLinesInfo.PackageVersion) + All + runtime + $(ExcludeAssets);contentFiles + $(ExcludeAssets);build;buildMultitargeting;buildTransitive + %(PaketReferencesFileLinesInfo.Aliases) + true + true + + + + + + $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools + + + + + + + + + $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1]) + + + %(PaketCliToolFileLinesInfo.PackageVersion) + + + + + + + + + + false + + + + + + <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> + + + + + + $(MSBuildProjectDirectory)/$(MSBuildProjectFile) + true + false + true + false + true + false + true + false + true + false + true + $(PaketIntermediateOutputPath)\$(Configuration) + $(PaketIntermediateOutputPath) + + + + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> + + + + + + + + + + + + + + + + + + + + + + + diff --git a/csharp/CSharp.sln b/csharp/CSharp.sln index 0578b5b8810..bfab79f56cc 100644 --- a/csharp/CSharp.sln +++ b/csharp/CSharp.sln @@ -30,9 +30,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Autobuild.CSharp.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Extraction.CSharp.DependencyStubGenerator", "extractor\Semmle.Extraction.CSharp.DependencyStubGenerator\Semmle.Extraction.CSharp.DependencyStubGenerator.csproj", "{0EDA21A3-ADD8-4C10-B494-58B12B526B76}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Autobuild.Cpp", "..\cpp\autobuilder\Semmle.Autobuild.Cpp\Semmle.Autobuild.Cpp.csproj", "{125C4FB7-34DA-442A-9095-3EA1514270CD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Autobuild.Cpp", "\autobuilder\Semmle.Autobuild.Cpp\Semmle.Autobuild.Cpp.csproj", "{125C4FB7-34DA-442A-9095-3EA1514270CD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Autobuild.Cpp.Tests", "..\cpp\autobuilder\Semmle.Autobuild.Cpp.Tests\Semmle.Autobuild.Cpp.Tests.csproj", "{72F369B7-0707-401A-802F-D526F272F9EE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Autobuild.Cpp.Tests", "autobuilder\Semmle.Autobuild.Cpp.Tests\Semmle.Autobuild.Cpp.Tests.csproj", "{72F369B7-0707-401A-802F-D526F272F9EE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/csharp/Directory.Build.targets b/csharp/Directory.Build.targets new file mode 100644 index 00000000000..1126b23dd32 --- /dev/null +++ b/csharp/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/Semmle.Autobuild.CSharp.Tests.csproj b/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/Semmle.Autobuild.CSharp.Tests.csproj index 06db1a3b722..e4af017614f 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/Semmle.Autobuild.CSharp.Tests.csproj +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/Semmle.Autobuild.CSharp.Tests.csproj @@ -5,16 +5,6 @@ win-x64;linux-x64;osx-x64 enable - - - - - - all - runtime; build; native; contentfiles; analyzers - - - diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/paket.references b/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/paket.references new file mode 100644 index 00000000000..83bb87685b1 --- /dev/null +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/paket.references @@ -0,0 +1,4 @@ +System.IO.FileSystem +xunit +xunit.runner.visualstudio +Microsoft.NET.Test.Sdk diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj b/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj index 911e71bfdc9..bc9df0a9628 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj @@ -1,26 +1,23 @@ + - - net8.0 - Semmle.Autobuild.CSharp - Semmle.Autobuild.CSharp - - Exe - - false - win-x64;linux-x64;osx-x64 - enable - - - - - - - - - - - - - - - + + net8.0 + Semmle.Autobuild.CSharp + Semmle.Autobuild.CSharp + + Exe + + false + win-x64;linux-x64;osx-x64 + enable + + + + + + + + + + + \ No newline at end of file diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/paket.references b/csharp/autobuilder/Semmle.Autobuild.CSharp/paket.references new file mode 100644 index 00000000000..53fe17d215e --- /dev/null +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/paket.references @@ -0,0 +1,2 @@ +Newtonsoft.Json +Microsoft.Build diff --git a/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs b/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs similarity index 100% rename from cpp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs rename to csharp/autobuilder/Semmle.Autobuild.Cpp.Tests/BuildScripts.cs diff --git a/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests/Semmle.Autobuild.Cpp.Tests.csproj b/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests/Semmle.Autobuild.Cpp.Tests.csproj new file mode 100644 index 00000000000..ed83fdd681d --- /dev/null +++ b/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests/Semmle.Autobuild.Cpp.Tests.csproj @@ -0,0 +1,15 @@ + + + + Exe + net8.0 + false + win-x64;linux-x64;osx-x64 + enable + + + + + + + diff --git a/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests/paket.references b/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests/paket.references new file mode 100644 index 00000000000..83bb87685b1 --- /dev/null +++ b/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests/paket.references @@ -0,0 +1,4 @@ +System.IO.FileSystem +xunit +xunit.runner.visualstudio +Microsoft.NET.Test.Sdk diff --git a/cpp/autobuilder/Semmle.Autobuild.Cpp/CppAutobuilder.cs b/csharp/autobuilder/Semmle.Autobuild.Cpp/CppAutobuilder.cs similarity index 100% rename from cpp/autobuilder/Semmle.Autobuild.Cpp/CppAutobuilder.cs rename to csharp/autobuilder/Semmle.Autobuild.Cpp/CppAutobuilder.cs diff --git a/cpp/autobuilder/Semmle.Autobuild.Cpp/Program.cs b/csharp/autobuilder/Semmle.Autobuild.Cpp/Program.cs similarity index 100% rename from cpp/autobuilder/Semmle.Autobuild.Cpp/Program.cs rename to csharp/autobuilder/Semmle.Autobuild.Cpp/Program.cs diff --git a/cpp/autobuilder/Semmle.Autobuild.Cpp/Properties/AssemblyInfo.cs b/csharp/autobuilder/Semmle.Autobuild.Cpp/Properties/AssemblyInfo.cs similarity index 100% rename from cpp/autobuilder/Semmle.Autobuild.Cpp/Properties/AssemblyInfo.cs rename to csharp/autobuilder/Semmle.Autobuild.Cpp/Properties/AssemblyInfo.cs diff --git a/cpp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj b/csharp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj similarity index 64% rename from cpp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj rename to csharp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj index 99e49a2f0a7..cab361363bf 100644 --- a/cpp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj +++ b/csharp/autobuilder/Semmle.Autobuild.Cpp/Semmle.Autobuild.Cpp.csproj @@ -17,12 +17,7 @@ - + + - - - - - - diff --git a/csharp/autobuilder/Semmle.Autobuild.Cpp/paket.references b/csharp/autobuilder/Semmle.Autobuild.Cpp/paket.references new file mode 100644 index 00000000000..ec65ce95b91 --- /dev/null +++ b/csharp/autobuilder/Semmle.Autobuild.Cpp/paket.references @@ -0,0 +1 @@ +Microsoft.Build diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/Semmle.Autobuild.Shared.csproj b/csharp/autobuilder/Semmle.Autobuild.Shared/Semmle.Autobuild.Shared.csproj index 79c652a8a4e..e5a5e779177 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/Semmle.Autobuild.Shared.csproj +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/Semmle.Autobuild.Shared.csproj @@ -10,9 +10,6 @@ - - - diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/paket.references b/csharp/autobuilder/Semmle.Autobuild.Shared/paket.references new file mode 100644 index 00000000000..ec65ce95b91 --- /dev/null +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/paket.references @@ -0,0 +1 @@ +Microsoft.Build diff --git a/csharp/before.CSharp.sln.targets b/csharp/before.CSharp.sln.targets new file mode 100644 index 00000000000..4a5ba8ca6b0 --- /dev/null +++ b/csharp/before.CSharp.sln.targets @@ -0,0 +1,6 @@ + + + + + + diff --git a/csharp/downgrades/ab09ac8287516082b7a7367f8fda1862b1be47c5/upgrade.properties b/csharp/downgrades/ab09ac8287516082b7a7367f8fda1862b1be47c5/upgrade.properties index 520f175692e..bdd9f3ceb83 100644 --- a/csharp/downgrades/ab09ac8287516082b7a7367f8fda1862b1be47c5/upgrade.properties +++ b/csharp/downgrades/ab09ac8287516082b7a7367f8fda1862b1be47c5/upgrade.properties @@ -1,3 +1,3 @@ description: Remove 'kind' from 'attributes'. compatability: full -attributes.rel: reorder attributes.rel (int id, int kind, int type_id, int target) id type_id target \ No newline at end of file +attributes.rel: reorder attributes.rel (@attribute id, int kind, @type_or_ref type_id, @attributable target) id type_id target \ No newline at end of file diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Semmle.Extraction.CSharp.DependencyFetching.csproj b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Semmle.Extraction.CSharp.DependencyFetching.csproj index 785ae5fd665..78a18d3d075 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Semmle.Extraction.CSharp.DependencyFetching.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Semmle.Extraction.CSharp.DependencyFetching.csproj @@ -19,5 +19,4 @@ - diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/paket.references b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/paket.references new file mode 100644 index 00000000000..e69de29bb2d diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj b/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj index b4840bf1737..68acba971f8 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Semmle.Extraction.CSharp.DependencyStubGenerator.csproj @@ -14,5 +14,4 @@ - diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/paket.references b/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/paket.references new file mode 100644 index 00000000000..e69de29bb2d diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Driver/Semmle.Extraction.CSharp.Driver.csproj b/csharp/extractor/Semmle.Extraction.CSharp.Driver/Semmle.Extraction.CSharp.Driver.csproj index 7713b45c00c..c31833d8f5f 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Driver/Semmle.Extraction.CSharp.Driver.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp.Driver/Semmle.Extraction.CSharp.Driver.csproj @@ -12,5 +12,4 @@ - diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Driver/paket.references b/csharp/extractor/Semmle.Extraction.CSharp.Driver/paket.references new file mode 100644 index 00000000000..e69de29bb2d diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Semmle.Extraction.CSharp.Standalone.csproj b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Semmle.Extraction.CSharp.Standalone.csproj index c2d37b414d6..4fd92fd9523 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Semmle.Extraction.CSharp.Standalone.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Semmle.Extraction.CSharp.Standalone.csproj @@ -18,11 +18,4 @@ - - - - - - - diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/paket.references b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/paket.references new file mode 100644 index 00000000000..9a2eede6b35 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/paket.references @@ -0,0 +1,5 @@ +Microsoft.Build +Microsoft.Win32.Primitives +System.Net.Primitives +System.Security.Principal +System.Threading.ThreadPool diff --git a/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/Semmle.Extraction.CSharp.StubGenerator.csproj b/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/Semmle.Extraction.CSharp.StubGenerator.csproj index 5788fff3476..74d4e01ae6a 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/Semmle.Extraction.CSharp.StubGenerator.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/Semmle.Extraction.CSharp.StubGenerator.csproj @@ -12,7 +12,4 @@ - - - diff --git a/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/paket.references b/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/paket.references new file mode 100644 index 00000000000..f01722271b9 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/paket.references @@ -0,0 +1 @@ +Microsoft.CodeAnalysis.CSharp diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Util/Semmle.Extraction.CSharp.Util.csproj b/csharp/extractor/Semmle.Extraction.CSharp.Util/Semmle.Extraction.CSharp.Util.csproj index 67c8a9da34c..3346143eb2d 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Util/Semmle.Extraction.CSharp.Util.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp.Util/Semmle.Extraction.CSharp.Util.csproj @@ -11,7 +11,4 @@ - - - diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Util/paket.references b/csharp/extractor/Semmle.Extraction.CSharp.Util/paket.references new file mode 100644 index 00000000000..f01722271b9 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp.Util/paket.references @@ -0,0 +1 @@ +Microsoft.CodeAnalysis.CSharp diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj b/csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj index 2a59f3716ce..f798d829913 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj @@ -16,8 +16,4 @@ - - - - diff --git a/csharp/extractor/Semmle.Extraction.CSharp/paket.references b/csharp/extractor/Semmle.Extraction.CSharp/paket.references new file mode 100644 index 00000000000..70cd7de8821 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp/paket.references @@ -0,0 +1,3 @@ +Microsoft.Build +Microsoft.CodeAnalysis.CSharp + diff --git a/csharp/extractor/Semmle.Extraction.Tests/Semmle.Extraction.Tests.csproj b/csharp/extractor/Semmle.Extraction.Tests/Semmle.Extraction.Tests.csproj index 930747bb8c0..b4f6477f088 100644 --- a/csharp/extractor/Semmle.Extraction.Tests/Semmle.Extraction.Tests.csproj +++ b/csharp/extractor/Semmle.Extraction.Tests/Semmle.Extraction.Tests.csproj @@ -5,16 +5,6 @@ win-x64;linux-x64;osx-x64 enable - - - - - - all - runtime; build; native; contentfiles; analyzers - - - diff --git a/csharp/extractor/Semmle.Extraction.Tests/paket.references b/csharp/extractor/Semmle.Extraction.Tests/paket.references new file mode 100644 index 00000000000..83bb87685b1 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.Tests/paket.references @@ -0,0 +1,4 @@ +System.IO.FileSystem +xunit +xunit.runner.visualstudio +Microsoft.NET.Test.Sdk diff --git a/csharp/extractor/Semmle.Extraction/Semmle.Extraction.csproj b/csharp/extractor/Semmle.Extraction/Semmle.Extraction.csproj index 2c70eccbafd..a474bdba974 100644 --- a/csharp/extractor/Semmle.Extraction/Semmle.Extraction.csproj +++ b/csharp/extractor/Semmle.Extraction/Semmle.Extraction.csproj @@ -11,14 +11,6 @@ TRACE;DEBUG;DEBUG_LABELS - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - diff --git a/csharp/extractor/Semmle.Extraction/paket.references b/csharp/extractor/Semmle.Extraction/paket.references new file mode 100644 index 00000000000..6873b65bafc --- /dev/null +++ b/csharp/extractor/Semmle.Extraction/paket.references @@ -0,0 +1,3 @@ +Microsoft.Build +Microsoft.CodeAnalysis +GitInfo diff --git a/csharp/extractor/Semmle.Util.Tests/Semmle.Util.Tests.csproj b/csharp/extractor/Semmle.Util.Tests/Semmle.Util.Tests.csproj index 8ec1bc9030b..1ec682ef442 100644 --- a/csharp/extractor/Semmle.Util.Tests/Semmle.Util.Tests.csproj +++ b/csharp/extractor/Semmle.Util.Tests/Semmle.Util.Tests.csproj @@ -5,14 +5,6 @@ win-x64;linux-x64;osx-x64 enable - - - - all - runtime; build; native; contentfiles; analyzers - - - diff --git a/csharp/extractor/Semmle.Util.Tests/paket.references b/csharp/extractor/Semmle.Util.Tests/paket.references new file mode 100644 index 00000000000..0582094502a --- /dev/null +++ b/csharp/extractor/Semmle.Util.Tests/paket.references @@ -0,0 +1,3 @@ +xunit +xunit.runner.visualstudio +Microsoft.NET.Test.Sdk diff --git a/csharp/extractor/Semmle.Util/Semmle.Util.csproj b/csharp/extractor/Semmle.Util/Semmle.Util.csproj index a3c7a5aba55..e8de5e69da5 100644 --- a/csharp/extractor/Semmle.Util/Semmle.Util.csproj +++ b/csharp/extractor/Semmle.Util/Semmle.Util.csproj @@ -12,10 +12,4 @@ - - - - - - diff --git a/csharp/extractor/Semmle.Util/paket.references b/csharp/extractor/Semmle.Util/paket.references new file mode 100644 index 00000000000..0ea3a5c1334 --- /dev/null +++ b/csharp/extractor/Semmle.Util/paket.references @@ -0,0 +1,2 @@ +Mono.Posix.NETStandard +Newtonsoft.Json diff --git a/csharp/paket.dependencies b/csharp/paket.dependencies new file mode 100644 index 00000000000..800739979aa --- /dev/null +++ b/csharp/paket.dependencies @@ -0,0 +1,20 @@ +framework: net8.0 +storage: none +source https://api.nuget.org/v3/index.json +# behave like nuget in choosing transitive dependency versions +strategy: min + +nuget Mono.Posix.NETStandard 1.0.0 +nuget Newtonsoft.Json 13.0.3 +nuget xunit 2.6.2 +nuget xunit.runner.visualstudio 2.5.4 +nuget Microsoft.NET.Test.Sdk 17.8.0 +nuget Microsoft.CodeAnalysis.CSharp 4.8.0 +nuget Microsoft.CodeAnalysis 4.8.0 +nuget Microsoft.Build 17.8.3 +nuget Microsoft.Win32.Primitives 4.3.0 +nuget System.Net.Primitives 4.3.1 +nuget System.Security.Principal 4.3.0 +nuget System.Threading.ThreadPool 4.3.0 +nuget System.IO.FileSystem 4.3.0 +nuget GitInfo 3.3.3 diff --git a/csharp/paket.lock b/csharp/paket.lock new file mode 100644 index 00000000000..84e4153f75a --- /dev/null +++ b/csharp/paket.lock @@ -0,0 +1,611 @@ +STORAGE: NONE +STRATEGY: MIN +RESTRICTION: == net8.0 +NUGET + remote: https://api.nuget.org/v3/index.json + GitInfo (3.3.3) + ThisAssembly.Constants (>= 1.4.1) + Humanizer.Core (2.14.1) + Microsoft.Bcl.AsyncInterfaces (7.0) + Microsoft.Build (17.8.3) + Microsoft.Build.Framework (>= 17.8.3) + Microsoft.NET.StringTools (>= 17.8.3) + System.Collections.Immutable (>= 7.0) + System.Configuration.ConfigurationManager (>= 7.0) + System.Reflection.Metadata (>= 7.0) + System.Reflection.MetadataLoadContext (>= 7.0) + System.Security.Principal.Windows (>= 5.0) + System.Threading.Tasks.Dataflow (>= 7.0) + Microsoft.Build.Framework (17.8.3) + Microsoft.CodeAnalysis (4.8) + Microsoft.CodeAnalysis.CSharp.Workspaces (4.8) + Microsoft.CodeAnalysis.VisualBasic.Workspaces (4.8) + Microsoft.CodeAnalysis.Analyzers (3.3.4) + Microsoft.CodeAnalysis.Common (4.8) + Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) + System.Collections.Immutable (>= 7.0) + System.Reflection.Metadata (>= 7.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) + Microsoft.CodeAnalysis.CSharp (4.8) + Microsoft.CodeAnalysis.Common (4.8) + Microsoft.CodeAnalysis.CSharp.Workspaces (4.8) + Humanizer.Core (>= 2.14.1) + Microsoft.CodeAnalysis.Common (4.8) + Microsoft.CodeAnalysis.CSharp (4.8) + Microsoft.CodeAnalysis.Workspaces.Common (4.8) + Microsoft.CodeAnalysis.VisualBasic (4.8) + Microsoft.CodeAnalysis.Common (4.8) + Microsoft.CodeAnalysis.VisualBasic.Workspaces (4.8) + Microsoft.CodeAnalysis.Common (4.8) + Microsoft.CodeAnalysis.VisualBasic (4.8) + Microsoft.CodeAnalysis.Workspaces.Common (4.8) + Microsoft.CodeAnalysis.Workspaces.Common (4.8) + Humanizer.Core (>= 2.14.1) + Microsoft.Bcl.AsyncInterfaces (>= 7.0) + Microsoft.CodeAnalysis.Common (4.8) + System.Composition (>= 7.0) + System.IO.Pipelines (>= 7.0) + System.Threading.Channels (>= 7.0) + Microsoft.CodeCoverage (17.8) + Microsoft.CSharp (4.7) + Microsoft.NET.StringTools (17.8.3) + Microsoft.NET.Test.Sdk (17.8) + Microsoft.CodeCoverage (>= 17.8) + Microsoft.TestPlatform.TestHost (>= 17.8) + Microsoft.NETCore.Platforms (1.1.1) + Microsoft.NETCore.Targets (1.1.3) + Microsoft.TestPlatform.ObjectModel (17.8) + NuGet.Frameworks (>= 6.5) + System.Reflection.Metadata (>= 1.6) + Microsoft.TestPlatform.TestHost (17.8) + Microsoft.TestPlatform.ObjectModel (>= 17.8) + Newtonsoft.Json (>= 13.0.1) + Microsoft.Win32.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + Microsoft.Win32.SystemEvents (7.0) + Mono.Posix.NETStandard (1.0) + NETStandard.Library (1.6.1) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.Win32.Primitives (>= 4.3) + System.AppContext (>= 4.3) + System.Collections (>= 4.3) + System.Collections.Concurrent (>= 4.3) + System.Console (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tools (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Globalization (>= 4.3) + System.Globalization.Calendars (>= 4.3) + System.IO (>= 4.3) + System.IO.Compression (>= 4.3) + System.IO.Compression.ZipFile (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Linq (>= 4.3) + System.Linq.Expressions (>= 4.3) + System.Net.Http (>= 4.3) + System.Net.Primitives (>= 4.3) + System.Net.Sockets (>= 4.3) + System.ObjectModel (>= 4.3) + System.Reflection (>= 4.3) + System.Reflection.Extensions (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Runtime.InteropServices.RuntimeInformation (>= 4.3) + System.Runtime.Numerics (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Security.Cryptography.X509Certificates (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.Encoding.Extensions (>= 4.3) + System.Text.RegularExpressions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Timer (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + System.Xml.XDocument (>= 4.3) + Newtonsoft.Json (13.0.3) + NuGet.Frameworks (6.5) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.native.System (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + runtime.native.System.IO.Compression (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + runtime.native.System.Net.Http (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + runtime.native.System.Security.Cryptography.Apple (4.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3) + runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3) + System.AppContext (4.3) + System.Runtime (>= 4.3) + System.Buffers (4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Collections (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Collections.Concurrent (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Collections.Immutable (7.0) + System.Composition (7.0) + System.Composition.AttributedModel (>= 7.0) + System.Composition.Convention (>= 7.0) + System.Composition.Hosting (>= 7.0) + System.Composition.Runtime (>= 7.0) + System.Composition.TypedParts (>= 7.0) + System.Composition.AttributedModel (7.0) + System.Composition.Convention (7.0) + System.Composition.AttributedModel (>= 7.0) + System.Composition.Hosting (7.0) + System.Composition.Runtime (>= 7.0) + System.Composition.Runtime (7.0) + System.Composition.TypedParts (7.0) + System.Composition.AttributedModel (>= 7.0) + System.Composition.Hosting (>= 7.0) + System.Composition.Runtime (>= 7.0) + System.Configuration.ConfigurationManager (7.0) + System.Diagnostics.EventLog (>= 7.0) + System.Security.Cryptography.ProtectedData (>= 7.0) + System.Security.Permissions (>= 7.0) + System.Console (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Diagnostics.Debug (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Diagnostics.DiagnosticSource (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Diagnostics.EventLog (7.0) + System.Diagnostics.Tools (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Diagnostics.Tracing (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Drawing.Common (7.0) + Microsoft.Win32.SystemEvents (>= 7.0) + System.Globalization (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Globalization.Calendars (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Globalization (>= 4.3) + System.Runtime (>= 4.3) + System.Globalization.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.IO (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.Compression (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System (>= 4.3) + runtime.native.System.IO.Compression (>= 4.3) + System.Buffers (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.Compression.ZipFile (4.3) + System.Buffers (>= 4.3) + System.IO (>= 4.3) + System.IO.Compression (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Text.Encoding (>= 4.3) + System.IO.FileSystem (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.FileSystem.Primitives (4.3) + System.Runtime (>= 4.3) + System.IO.Pipelines (7.0) + System.Linq (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Linq.Expressions (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Linq (>= 4.3) + System.ObjectModel (>= 4.3) + System.Reflection (>= 4.3) + System.Reflection.Emit (>= 4.3) + System.Reflection.Emit.ILGeneration (>= 4.3) + System.Reflection.Emit.Lightweight (>= 4.3) + System.Reflection.Extensions (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Reflection.TypeExtensions (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Net.Http (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System (>= 4.3) + runtime.native.System.Net.Http (>= 4.3) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.DiagnosticSource (>= 4.3) + System.Diagnostics.Tracing (>= 4.3) + System.Globalization (>= 4.3) + System.Globalization.Extensions (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.Net.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.OpenSsl (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Security.Cryptography.X509Certificates (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Net.Primitives (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime (>= 4.3.1) + System.Runtime.Handles (>= 4.3) + System.Net.Sockets (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.Net.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.ObjectModel (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Reflection (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Emit (4.3) + System.IO (>= 4.3) + System.Reflection (>= 4.3) + System.Reflection.Emit.ILGeneration (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Emit.ILGeneration (4.3) + System.Reflection (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Emit.Lightweight (4.3) + System.Reflection (>= 4.3) + System.Reflection.Emit.ILGeneration (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Metadata (7.0) + System.Collections.Immutable (>= 7.0) + System.Reflection.MetadataLoadContext (7.0) + System.Collections.Immutable (>= 7.0) + System.Reflection.Metadata (>= 7.0) + System.Reflection.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Reflection.TypeExtensions (4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Resources.ResourceManager (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime.CompilerServices.Unsafe (6.0) + System.Runtime.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Runtime.Handles (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Runtime.InteropServices (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Reflection (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices.RuntimeInformation (4.3) + runtime.native.System (>= 4.3) + System.Reflection (>= 4.3) + System.Reflection.Extensions (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Threading (>= 4.3) + System.Runtime.Numerics (4.3) + System.Globalization (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Security.Cryptography.Algorithms (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System.Security.Cryptography.Apple (>= 4.3) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Collections (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Runtime.Numerics (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.Cng (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.Csp (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + System.IO (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Security.Cryptography.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Collections (>= 4.3) + System.Collections.Concurrent (>= 4.3) + System.Linq (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.OpenSsl (4.3) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Collections (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Runtime.Numerics (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Security.Cryptography.Primitives (4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Security.Cryptography.ProtectedData (7.0) + System.Security.Cryptography.X509Certificates (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System (>= 4.3) + runtime.native.System.Net.Http (>= 4.3) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.Globalization.Calendars (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Runtime.Numerics (>= 4.3) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Cng (>= 4.3) + System.Security.Cryptography.Csp (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) + System.Security.Cryptography.OpenSsl (>= 4.3) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Security.Permissions (7.0) + System.Windows.Extensions (>= 7.0) + System.Security.Principal (4.3) + System.Runtime (>= 4.3) + System.Security.Principal.Windows (5.0) + System.Text.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.RegularExpressions (4.3) + System.Runtime (>= 4.3) + System.Threading (4.3) + System.Runtime (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Channels (7.0) + System.Threading.Tasks (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Threading.Tasks.Dataflow (7.0) + System.Threading.Tasks.Extensions (4.5.4) + System.Threading.ThreadPool (4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Threading.Timer (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Windows.Extensions (7.0) + System.Drawing.Common (>= 7.0) + System.Xml.ReaderWriter (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.Encoding.Extensions (>= 4.3) + System.Text.RegularExpressions (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Tasks.Extensions (>= 4.3) + System.Xml.XDocument (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Diagnostics.Tools (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Reflection (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Xml.ReaderWriter (>= 4.3) + ThisAssembly.Constants (1.4.1) + Microsoft.CSharp (>= 4.7) + System.Threading.Tasks.Extensions (>= 4.5.4) + xunit (2.6.2) + xunit.analyzers (>= 1.6) + xunit.assert (>= 2.6.2) + xunit.core (2.6.2) + xunit.abstractions (2.0.3) + xunit.analyzers (1.6) + xunit.assert (2.6.2) + xunit.core (2.6.2) + xunit.extensibility.core (2.6.2) + xunit.extensibility.execution (2.6.2) + xunit.extensibility.core (2.6.2) + NETStandard.Library (>= 1.6.1) + xunit.abstractions (>= 2.0.3) + xunit.extensibility.execution (2.6.2) + NETStandard.Library (>= 1.6.1) + xunit.extensibility.core (2.6.2) + xunit.runner.visualstudio (2.5.4) diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md index a1fa7465047..78b1cb40f64 100644 --- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.16 + +No user-facing changes. + ## 1.7.15 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.16.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.16.md new file mode 100644 index 00000000000..7fa1f796658 --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.16.md @@ -0,0 +1,3 @@ +## 1.7.16 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml index 07b34a2aaf7..15756b8a4c7 100644 --- a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.15 +lastReleaseVersion: 1.7.16 diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index 4129c2ad6fd..4402f8c610e 100644 --- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-all -version: 1.7.16-dev +version: 1.7.17-dev groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md index a1fa7465047..78b1cb40f64 100644 --- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.16 + +No user-facing changes. + ## 1.7.15 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.16.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.16.md new file mode 100644 index 00000000000..7fa1f796658 --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.16.md @@ -0,0 +1,3 @@ +## 1.7.16 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml index 07b34a2aaf7..15756b8a4c7 100644 --- a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.15 +lastReleaseVersion: 1.7.16 diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index 033c39775dd..427e14d4a6f 100644 --- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-queries -version: 1.7.16-dev +version: 1.7.17-dev groups: - csharp - solorigate diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/XSS.expected b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/XSS.expected index c5e1e6db6d6..42257faeb50 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/XSS.expected +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/XSS.expected @@ -1 +1 @@ -| Views/Test/Test.cshtml:7:27:7:36 | access to property Name | Controllers/TestController.cs:13:40:13:47 | tainted1 : UserData | Views/Test/Test.cshtml:7:27:7:36 | access to property Name | $@ flows to here and is written to HTML or JavaScript: Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.Raw() method. | Controllers/TestController.cs:13:40:13:47 | tainted1 : UserData | User-provided value | +| Views/Test/Test.cshtml:7:26:7:35 | access to property Name | Controllers/TestController.cs:13:40:13:47 | tainted1 : UserData | Views/Test/Test.cshtml:7:26:7:35 | access to property Name | $@ flows to here and is written to HTML or JavaScript: Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.Raw() method. | Controllers/TestController.cs:13:40:13:47 | tainted1 : UserData | User-provided value | diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/global.json b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/global.json new file mode 100644 index 00000000000..b11f794bfce --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "8.0.300" + } +} \ No newline at end of file diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md index c136a082889..01a389d99e2 100644 --- a/csharp/ql/lib/CHANGELOG.md +++ b/csharp/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.10.1 + +No user-facing changes. + ## 0.10.0 ### Breaking Changes diff --git a/csharp/ql/lib/change-notes/released/0.10.1.md b/csharp/ql/lib/change-notes/released/0.10.1.md new file mode 100644 index 00000000000..ca00f64cde4 --- /dev/null +++ b/csharp/ql/lib/change-notes/released/0.10.1.md @@ -0,0 +1,3 @@ +## 0.10.1 + +No user-facing changes. diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml index b21db623245..af7510b3cd6 100644 --- a/csharp/ql/lib/codeql-pack.release.yml +++ b/csharp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.10.0 +lastReleaseVersion: 0.10.1 diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index 13ddf66ad75..5b3d0b3348c 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 0.10.1-dev +version: 0.10.2-dev groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll index 1256ae5a7ee..e33c4e37d28 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll @@ -3,6 +3,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.codedom.Compiler private import semmle.code.csharp.security.Sanitizers @@ -16,7 +17,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for user input treated as code vulnerabilities. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for user input treated as code vulnerabilities. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll index a8938ecc6c9..cd7119a36af 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll @@ -6,6 +6,7 @@ import csharp private import semmle.code.csharp.controlflow.Guards private import semmle.code.csharp.controlflow.BasicBlocks +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.frameworks.system.Net @@ -14,12 +15,12 @@ private import semmle.code.csharp.security.SensitiveActions /** * A data flow source for user-controlled bypass of sensitive method. */ -abstract class Source extends DataFlow::Node { } +abstract class Source extends ApiSourceNode { } /** * A data flow sink for user-controlled bypass of sensitive method. */ -abstract class Sink extends DataFlow::ExprNode { +abstract class Sink extends ApiSinkExprNode { /** Gets the 'MethodCall' which is considered sensitive. */ abstract MethodCall getSensitiveMethodCall(); } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll index 03db7fadf81..1e5f5ae8256 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll @@ -3,6 +3,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.security.dataflow.flowsinks.ExternalLocationSink private import semmle.code.csharp.security.PrivateData @@ -15,7 +16,7 @@ abstract class Source extends DataFlow::ExprNode { } /** * A data flow sink for private information flowing unencrypted to an external location. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for private information flowing unencrypted to an external location. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/HardcodedCredentialsQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/HardcodedCredentialsQuery.qll index dd6669579e1..63a0bb50732 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/HardcodedCredentialsQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/HardcodedCredentialsQuery.qll @@ -9,6 +9,7 @@ private import semmle.code.csharp.frameworks.Moq private import semmle.code.csharp.frameworks.system.web.Security private import semmle.code.csharp.frameworks.system.security.cryptography.X509Certificates private import semmle.code.csharp.frameworks.Test +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks /** * A data flow source for hard coded credentials. @@ -18,7 +19,7 @@ abstract class Source extends DataFlow::ExprNode { } /** * A data flow sink for hard coded credentials. */ -abstract class Sink extends DataFlow::ExprNode { +abstract class Sink extends ApiSinkExprNode { /** * Gets a description of this sink, including a placeholder for the sink and a placeholder for * the supplementary element. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll index 58a34f7604b..78800f39209 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll @@ -4,6 +4,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.DirectoryServices private import semmle.code.csharp.frameworks.system.directoryservices.Protocols @@ -18,7 +19,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for unvalidated user input that is used to construct LDAP queries. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for unvalidated user input that is used to construct LDAP queries. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll index ed6e69f0709..f0153fea2d4 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll @@ -3,6 +3,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.frameworks.system.text.RegularExpressions @@ -18,7 +19,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for untrusted user input used in log entries. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for untrusted user input used in log entries. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll index 914239bf7d5..b2934d31eda 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll @@ -4,6 +4,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.Xml private import semmle.code.csharp.security.Sanitizers @@ -18,7 +19,7 @@ abstract class Source extends DataFlow::Node { } * A data flow sink for untrusted user input processed as XML without validation against a known * schema. */ -abstract class Sink extends DataFlow::ExprNode { +abstract class Sink extends ApiSinkExprNode { /** Gets a string describing the reason why this is a sink. */ abstract string getReason(); } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll index 84d12fca0cc..bf4fbd99323 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll @@ -5,6 +5,7 @@ import csharp private import semmle.code.csharp.dataflow.DataFlow2 +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.text.RegularExpressions private import semmle.code.csharp.security.Sanitizers @@ -17,7 +18,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for untrusted user input used in dangerous regular expression operations. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for untrusted user input used in dangerous regular expression operations. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll index 501ede13f29..1a053c29f24 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll @@ -4,6 +4,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.text.RegularExpressions private import semmle.code.csharp.security.Sanitizers @@ -16,7 +17,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for untrusted user input used to construct regular expressions. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for untrusted user input used to construct regular expressions. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll index a66283de02a..fb016dcddae 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll @@ -3,6 +3,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.Data private import semmle.code.csharp.security.Sanitizers @@ -15,7 +16,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for untrusted user input used in resource descriptors. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for untrusted user input used in resource descriptors. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll index b7b198bbca0..6473aa58e1c 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll @@ -3,6 +3,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.Sql private import semmle.code.csharp.security.Sanitizers @@ -16,7 +17,7 @@ abstract class Source extends DataFlow::Node { } /** * A sink for SQL injection vulnerabilities. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for SQL injection vulnerabilities. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll index bbd32b58353..ca2b13439ce 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll @@ -5,6 +5,7 @@ import csharp private import semmle.code.csharp.controlflow.Guards +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.IO private import semmle.code.csharp.frameworks.system.Web @@ -18,7 +19,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for uncontrolled data in path expression vulnerabilities. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for uncontrolled data in path expression vulnerabilities. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll index 6de1305a11d..a5341aca42f 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll @@ -6,6 +6,7 @@ import csharp private import semmle.code.csharp.serialization.Deserializers private import semmle.code.csharp.dataflow.TaintTracking2 +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources /** @@ -16,7 +17,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for unsafe deserialization vulnerabilities. */ -abstract class Sink extends DataFlow::Node { } +abstract class Sink extends ApiSinkNode { } /** * A data flow sink for unsafe deserialization vulnerabilities to an instance method. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll index 9a5ec46cb37..b21d5846bf5 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll @@ -3,6 +3,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.controlflow.Guards private import semmle.code.csharp.frameworks.Format @@ -20,7 +21,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for unvalidated URL redirect vulnerabilities. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for unvalidated URL redirect vulnerabilities. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll index 7e7fd61fb1c..0bb842adf79 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll @@ -3,6 +3,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.frameworks.system.text.RegularExpressions @@ -19,7 +20,7 @@ private class ThreatModelSource extends Source instanceof ThreatModelFlowSource /** * A data flow sink for untrusted user input used in XML processing. */ -abstract class Sink extends DataFlow::ExprNode { +abstract class Sink extends ApiSinkExprNode { /** * Gets the reason for the insecurity of this sink. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll index 1edddf45f56..c471a432425 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll @@ -3,6 +3,7 @@ */ import csharp +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.xml.XPath private import semmle.code.csharp.frameworks.system.Xml @@ -16,7 +17,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for untrusted user input used in XPath expression. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for untrusted user input used in XPath expression. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll index a83bb8b4f5a..93e7b601585 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll @@ -4,6 +4,7 @@ import csharp private import semmle.code.csharp.controlflow.Guards +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks /** * A data flow source for unsafe zip extraction. @@ -13,7 +14,7 @@ abstract class Source extends DataFlow::Node { } /** * A data flow sink for unsafe zip extraction. */ -abstract class Sink extends DataFlow::ExprNode { } +abstract class Sink extends ApiSinkExprNode { } /** * A sanitizer for unsafe zip extraction. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/AllSinks.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/AllSinks.qll deleted file mode 100644 index bf601bdf9b6..00000000000 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/AllSinks.qll +++ /dev/null @@ -1,84 +0,0 @@ -/** Provides classes representing various flow sinks for data flow / taint tracking. */ - -private import semmle.code.csharp.dataflow.internal.ExternalFlow - -/** - * A data flow sink node. - */ -abstract class SinkNode extends DataFlow::Node { } - -/** - * Module that adds all sinks to `SinkNode`, excluding sinks for cryptography based - * queries, and queries where sinks are not succifiently explicit. - */ -private module AllSinks { - private import ParallelSink as ParallelSink - private import Remote as Remote - private import semmle.code.csharp.security.dataflow.CodeInjectionQuery as CodeInjectionQuery - private import semmle.code.csharp.security.dataflow.ConditionalBypassQuery as ConditionalBypassQuery - private import semmle.code.csharp.security.dataflow.ExposureOfPrivateInformationQuery as ExposureOfPrivateInformationQuery - private import semmle.code.csharp.security.dataflow.HardcodedCredentialsQuery as HardcodedCredentialsQuery - private import semmle.code.csharp.security.dataflow.LDAPInjectionQuery as LdapInjectionQuery - private import semmle.code.csharp.security.dataflow.LogForgingQuery as LogForgingQuery - private import semmle.code.csharp.security.dataflow.MissingXMLValidationQuery as MissingXmlValidationQuery - private import semmle.code.csharp.security.dataflow.ReDoSQuery as ReDosQuery - private import semmle.code.csharp.security.dataflow.RegexInjectionQuery as RegexInjectionQuery - private import semmle.code.csharp.security.dataflow.ResourceInjectionQuery as ResourceInjectionQuery - private import semmle.code.csharp.security.dataflow.SqlInjectionQuery as SqlInjectionQuery - private import semmle.code.csharp.security.dataflow.TaintedPathQuery as TaintedPathQuery - private import semmle.code.csharp.security.dataflow.UnsafeDeserializationQuery as UnsafeDeserializationQuery - private import semmle.code.csharp.security.dataflow.UrlRedirectQuery as UrlRedirectQuery - private import semmle.code.csharp.security.dataflow.XMLEntityInjectionQuery as XmlEntityInjectionQuery - private import semmle.code.csharp.security.dataflow.XPathInjectionQuery as XpathInjectionQuery - private import semmle.code.csharp.security.dataflow.XSSSinks as XssSinks - private import semmle.code.csharp.security.dataflow.ZipSlipQuery as ZipSlipQuery - - private class ParallelSink extends SinkNode instanceof ParallelSink::ParallelSink { } - - private class RemoteSinkFlowSinks extends SinkNode instanceof Remote::RemoteFlowSink { } - - private class CodeInjectionSink extends SinkNode instanceof CodeInjectionQuery::Sink { } - - private class ConditionalBypassSink extends SinkNode instanceof ConditionalBypassQuery::Sink { } - - private class ExposureOfPrivateInformationSink extends SinkNode instanceof ExposureOfPrivateInformationQuery::Sink - { } - - private class HardcodedCredentialsSink extends SinkNode instanceof HardcodedCredentialsQuery::Sink - { } - - private class LdapInjectionSink extends SinkNode instanceof LdapInjectionQuery::Sink { } - - private class LogForgingSink extends SinkNode instanceof LogForgingQuery::Sink { } - - private class MissingXmlValidationSink extends SinkNode instanceof MissingXmlValidationQuery::Sink - { } - - private class ReDosSink extends SinkNode instanceof ReDosQuery::Sink { } - - private class RegexInjectionSink extends SinkNode instanceof RegexInjectionQuery::Sink { } - - private class ResourceInjectionSink extends SinkNode instanceof ResourceInjectionQuery::Sink { } - - private class SqlInjectionSink extends SinkNode instanceof SqlInjectionQuery::Sink { } - - private class TaintedPathSink extends SinkNode instanceof TaintedPathQuery::Sink { } - - private class UnsafeDeserializationSink extends SinkNode instanceof UnsafeDeserializationQuery::Sink - { } - - private class UrlRedirectSink extends SinkNode instanceof UrlRedirectQuery::Sink { } - - private class XmlEntityInjectionSink extends SinkNode instanceof XmlEntityInjectionQuery::Sink { } - - private class XpathInjectionSink extends SinkNode instanceof XpathInjectionQuery::Sink { } - - private class XssSink extends SinkNode instanceof XssSinks::Sink { } - - /** - * Add all models as data sinks. - */ - private class SinkNodeExternal extends SinkNode { - SinkNodeExternal() { sinkNode(this, _) } - } -} diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ApiSinks.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ApiSinks.qll new file mode 100644 index 00000000000..15c64b45ca0 --- /dev/null +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ApiSinks.qll @@ -0,0 +1,35 @@ +/** Provides classes representing various flow sinks for data flow / taint tracking. */ + +private import semmle.code.csharp.dataflow.internal.ExternalFlow +private import semmle.code.csharp.security.dataflow.flowsinks.FlowSinks + +/** + * A data flow sink node. + */ +final class SinkNode = ApiSinkNode; + +/** + * Module that adds all API like sinks to `SinkNode`, excluding sinks for cryptography based + * queries, and queries where sinks are not sufficiently defined (eg. using broad method name matching). + */ +private module AllApiSinks { + private import ParallelSink + private import Remote + private import semmle.code.csharp.security.dataflow.CodeInjectionQuery as CodeInjectionQuery + private import semmle.code.csharp.security.dataflow.ConditionalBypassQuery as ConditionalBypassQuery + private import semmle.code.csharp.security.dataflow.ExposureOfPrivateInformationQuery as ExposureOfPrivateInformationQuery + private import semmle.code.csharp.security.dataflow.HardcodedCredentialsQuery as HardcodedCredentialsQuery + private import semmle.code.csharp.security.dataflow.LDAPInjectionQuery as LdapInjectionQuery + private import semmle.code.csharp.security.dataflow.LogForgingQuery as LogForgingQuery + private import semmle.code.csharp.security.dataflow.MissingXMLValidationQuery as MissingXmlValidationQuery + private import semmle.code.csharp.security.dataflow.ReDoSQuery as ReDosQuery + private import semmle.code.csharp.security.dataflow.RegexInjectionQuery as RegexInjectionQuery + private import semmle.code.csharp.security.dataflow.ResourceInjectionQuery as ResourceInjectionQuery + private import semmle.code.csharp.security.dataflow.SqlInjectionQuery as SqlInjectionQuery + private import semmle.code.csharp.security.dataflow.TaintedPathQuery as TaintedPathQuery + private import semmle.code.csharp.security.dataflow.UnsafeDeserializationQuery as UnsafeDeserializationQuery + private import semmle.code.csharp.security.dataflow.UrlRedirectQuery as UrlRedirectQuery + private import semmle.code.csharp.security.dataflow.XMLEntityInjectionQuery as XmlEntityInjectionQuery + private import semmle.code.csharp.security.dataflow.XPathInjectionQuery as XpathInjectionQuery + private import semmle.code.csharp.security.dataflow.ZipSlipQuery as ZipSlipQuery +} diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ExternalLocationSink.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ExternalLocationSink.qll index abd1ad92733..3bcfdde669a 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ExternalLocationSink.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ExternalLocationSink.qll @@ -3,6 +3,7 @@ */ import csharp +private import FlowSinks private import Remote private import semmle.code.csharp.commons.Loggers private import semmle.code.csharp.frameworks.system.Web @@ -16,7 +17,7 @@ private import semmle.code.csharp.dataflow.internal.ExternalFlow * which the application may have no access control. For example, files on a local or remote * filesystem (including log files and cookies). */ -abstract class ExternalLocationSink extends DataFlow::ExprNode { } +abstract class ExternalLocationSink extends ApiSinkExprNode { } private class ExternalModelSink extends ExternalLocationSink { ExternalModelSink() { sinkNode(this, "file-content-store") } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/FlowSinks.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/FlowSinks.qll new file mode 100644 index 00000000000..0c5bf14e65c --- /dev/null +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/FlowSinks.qll @@ -0,0 +1,23 @@ +/** Provides classes representing various flow sinks for data flow / taint tracking. */ + +private import csharp +private import semmle.code.csharp.dataflow.internal.ExternalFlow + +/** + * A data flow sink node for an API, which should be considered + * supported from a modeling perspective. + */ +abstract class ApiSinkNode extends DataFlow::Node { } + +/** + * A data flow sink expression node for an API, which should be considered + * supported from a modeling perspective. + */ +abstract class ApiSinkExprNode extends ApiSinkNode, DataFlow::ExprNode { } + +/** + * Add all sink models as data sinks. + */ +private class ApiSinkNodeExternal extends ApiSinkNode { + ApiSinkNodeExternal() { sinkNode(this, _) } +} diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ParallelSink.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ParallelSink.qll index 5e53c9bd8fd..1546d72887d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ParallelSink.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ParallelSink.qll @@ -3,11 +3,12 @@ */ import csharp +private import FlowSinks /** * A data flow sink node for parallel execution. */ -abstract class ParallelSink extends DataFlow::Node { } +abstract class ParallelSink extends ApiSinkNode { } /** * A data flow sink node for lambda parallel sink. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Remote.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Remote.qll index 0770a948b09..b58beb38ca5 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Remote.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Remote.qll @@ -5,12 +5,13 @@ import csharp private import Email::Email private import ExternalLocationSink +private import FlowSinks private import Html private import semmle.code.csharp.security.dataflow.XSSSinks as XssSinks private import semmle.code.csharp.frameworks.system.web.UI /** A data flow sink of remote user output. */ -abstract class RemoteFlowSink extends DataFlow::Node { } +abstract class RemoteFlowSink extends ApiSinkNode { } /** * A value written to the `[Inner]Text` property of an object defined in the diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/AllSources.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/AllSources.qll deleted file mode 100644 index 7d05500446a..00000000000 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/AllSources.qll +++ /dev/null @@ -1,77 +0,0 @@ -/** Provides classes representing various flow sources for data flow / taint tracking. */ - -private import semmle.code.csharp.dataflow.internal.ExternalFlow - -/** - * A data flow source node. - */ -abstract class SourceNode extends DataFlow::Node { } - -/** - * Module that adds all sources to `SourceNode`, excluding source for cryptography based - * queries, and queries where sources are not succifiently explicit or mainly hardcoded constants. - */ -private module AllSources { - private import FlowSources as FlowSources - private import semmle.code.csharp.security.cryptography.HardcodedSymmetricEncryptionKey - private import semmle.code.csharp.security.dataflow.CleartextStorageQuery as CleartextStorageQuery - private import semmle.code.csharp.security.dataflow.CodeInjectionQuery as CodeInjectionQuery - private import semmle.code.csharp.security.dataflow.ConditionalBypassQuery as ConditionalBypassQuery - private import semmle.code.csharp.security.dataflow.ExposureOfPrivateInformationQuery as ExposureOfPrivateInformationQuery - private import semmle.code.csharp.security.dataflow.HardcodedCredentialsQuery as HardcodedCredentialsQuery - private import semmle.code.csharp.security.dataflow.LDAPInjectionQuery as LdapInjectionQuery - private import semmle.code.csharp.security.dataflow.LogForgingQuery as LogForgingQuery - private import semmle.code.csharp.security.dataflow.MissingXMLValidationQuery as MissingXmlValidationQuery - private import semmle.code.csharp.security.dataflow.ReDoSQuery as ReDosQuery - private import semmle.code.csharp.security.dataflow.RegexInjectionQuery as RegexInjectionQuery - private import semmle.code.csharp.security.dataflow.ResourceInjectionQuery as ResourceInjectionQuery - private import semmle.code.csharp.security.dataflow.SqlInjectionQuery as SqlInjectionQuery - private import semmle.code.csharp.security.dataflow.TaintedPathQuery as TaintedPathQuery - private import semmle.code.csharp.security.dataflow.UnsafeDeserializationQuery as UnsafeDeserializationQuery - private import semmle.code.csharp.security.dataflow.UrlRedirectQuery as UrlRedirectQuery - private import semmle.code.csharp.security.dataflow.XMLEntityInjectionQuery as XmlEntityInjectionQuery - private import semmle.code.csharp.security.dataflow.XPathInjectionQuery as XpathInjectionQuery - private import semmle.code.csharp.security.dataflow.ZipSlipQuery as ZipSlipQuery - - private class FlowSourcesSources extends SourceNode instanceof FlowSources::SourceNode { } - - private class CodeInjectionSource extends SourceNode instanceof CodeInjectionQuery::Source { } - - private class ConditionalBypassSource extends SourceNode instanceof ConditionalBypassQuery::Source - { } - - private class LdapInjectionSource extends SourceNode instanceof LdapInjectionQuery::Source { } - - private class LogForgingSource extends SourceNode instanceof LogForgingQuery::Source { } - - private class MissingXmlValidationSource extends SourceNode instanceof MissingXmlValidationQuery::Source - { } - - private class ReDosSource extends SourceNode instanceof ReDosQuery::Source { } - - private class RegexInjectionSource extends SourceNode instanceof RegexInjectionQuery::Source { } - - private class ResourceInjectionSource extends SourceNode instanceof ResourceInjectionQuery::Source - { } - - private class SqlInjectionSource extends SourceNode instanceof SqlInjectionQuery::Source { } - - private class TaintedPathSource extends SourceNode instanceof TaintedPathQuery::Source { } - - private class UnsafeDeserializationSource extends SourceNode instanceof UnsafeDeserializationQuery::Source - { } - - private class UrlRedirectSource extends SourceNode instanceof UrlRedirectQuery::Source { } - - private class XmlEntityInjectionSource extends SourceNode instanceof XmlEntityInjectionQuery::Source - { } - - private class XpathInjectionSource extends SourceNode instanceof XpathInjectionQuery::Source { } - - /** - * Add all models as data sources. - */ - private class SourceNodeExternal extends SourceNode { - SourceNodeExternal() { sourceNode(this, _) } - } -} diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/ApiSources.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/ApiSources.qll new file mode 100644 index 00000000000..2aa451831aa --- /dev/null +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/ApiSources.qll @@ -0,0 +1,14 @@ +/** Provides classes representing various flow sources for data flow / taint tracking. */ + +private import FlowSources as FlowSources + +final class SourceNode = FlowSources::SourceNode; + +/** + * Module that adds all API like sources to `SourceNode`, excluding some sources for cryptography based + * queries, and queries where sources are not sufficiently defined (eg. using broad method name matching). + */ +private module AllApiSources { + private import semmle.code.csharp.security.dataflow.ConditionalBypassQuery as ConditionalBypassQuery + private import semmle.code.csharp.security.dataflow.ZipSlipQuery as ZipSlipQuery +} diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll index a5ada1cbaf8..c610b3de4c7 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll @@ -32,3 +32,18 @@ class ThreatModelFlowSource extends DataFlow::Node { ) } } + +/** + * A data flow source node for an API, which should be considered + * supported from a modeling perspective. + */ +abstract class ApiSourceNode extends DataFlow::Node { } + +private class AddSourceNodes extends ApiSourceNode instanceof SourceNode { } + +/** + * Add all source models as data sources. + */ +private class ApiSourceNodeExternal extends ApiSourceNode { + ApiSourceNodeExternal() { sourceNode(this, _) } +} diff --git a/csharp/ql/lib/upgrades/0f562410898f4d4afab2da91f5aaece660ebfa88/upgrade.properties b/csharp/ql/lib/upgrades/0f562410898f4d4afab2da91f5aaece660ebfa88/upgrade.properties index a0c4ba602a1..3e361d800fb 100644 --- a/csharp/ql/lib/upgrades/0f562410898f4d4afab2da91f5aaece660ebfa88/upgrade.properties +++ b/csharp/ql/lib/upgrades/0f562410898f4d4afab2da91f5aaece660ebfa88/upgrade.properties @@ -1,4 +1,4 @@ description: Removed unused column from the `folders` and `files` relations compatibility: full -files.rel: reorder files.rel (int id, string name, string simple, string ext, int fromSource) id name -folders.rel: reorder folders.rel (int id, string name, string simple) id name \ No newline at end of file +files.rel: reorder files.rel (@file id, string name, string simple, string ext, int fromSource) id name +folders.rel: reorder folders.rel (@folder id, string name, string simple) id name \ No newline at end of file diff --git a/csharp/ql/paket.dependencies b/csharp/ql/paket.dependencies new file mode 100644 index 00000000000..8d29d220d3c --- /dev/null +++ b/csharp/ql/paket.dependencies @@ -0,0 +1,2 @@ + +# empty paket.dependencies, so that the top-level paket invocations don't recurse into this directory diff --git a/csharp/ql/src/CHANGELOG.md b/csharp/ql/src/CHANGELOG.md index 7954eef127f..ceae06c80f2 100644 --- a/csharp/ql/src/CHANGELOG.md +++ b/csharp/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.16 + +No user-facing changes. + ## 0.8.15 No user-facing changes. diff --git a/csharp/ql/src/Input Validation/ValueShadowing.ql b/csharp/ql/src/Input Validation/ValueShadowing.ql index 8a9a14fc554..e514aec9a47 100644 --- a/csharp/ql/src/Input Validation/ValueShadowing.ql +++ b/csharp/ql/src/Input Validation/ValueShadowing.ql @@ -8,6 +8,7 @@ * @tags security * maintainability * frameworks/asp.net + * external/cwe/cwe-348 */ import csharp diff --git a/csharp/ql/src/Input Validation/ValueShadowingServerVariable.ql b/csharp/ql/src/Input Validation/ValueShadowingServerVariable.ql index ed13a3cca7a..06956586fb5 100644 --- a/csharp/ql/src/Input Validation/ValueShadowingServerVariable.ql +++ b/csharp/ql/src/Input Validation/ValueShadowingServerVariable.ql @@ -8,6 +8,7 @@ * @tags security * maintainability * frameworks/asp.net + * external/cwe/cwe-348 */ import csharp diff --git a/csharp/ql/src/Telemetry/ExternalApi.qll b/csharp/ql/src/Telemetry/ExternalApi.qll index a710cdf7cfd..270db8b0d19 100644 --- a/csharp/ql/src/Telemetry/ExternalApi.qll +++ b/csharp/ql/src/Telemetry/ExternalApi.qll @@ -8,8 +8,8 @@ private import semmle.code.csharp.dataflow.internal.DataFlowDispatch as DataFlow private import semmle.code.csharp.dataflow.internal.ExternalFlow private import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl private import semmle.code.csharp.dataflow.internal.TaintTrackingPrivate -private import semmle.code.csharp.security.dataflow.flowsources.AllSources -private import semmle.code.csharp.security.dataflow.flowsinks.AllSinks +private import semmle.code.csharp.security.dataflow.flowsources.ApiSources as ApiSources +private import semmle.code.csharp.security.dataflow.flowsinks.ApiSinks as ApiSinks private import TestLibrary /** Holds if the given callable is not worth supporting. */ @@ -85,11 +85,11 @@ class ExternalApi extends Callable { /** Holds if this API is a known source. */ pragma[nomagic] - predicate isSource() { this.getAnOutput() instanceof SourceNode } + predicate isSource() { this.getAnOutput() instanceof ApiSources::SourceNode } /** Holds if this API is a known sink. */ pragma[nomagic] - predicate isSink() { this.getAnInput() instanceof SinkNode } + predicate isSink() { this.getAnInput() instanceof ApiSinks::SinkNode } /** Holds if this API is a known neutral. */ pragma[nomagic] diff --git a/csharp/ql/src/change-notes/released/0.8.16.md b/csharp/ql/src/change-notes/released/0.8.16.md new file mode 100644 index 00000000000..f11c58a3b38 --- /dev/null +++ b/csharp/ql/src/change-notes/released/0.8.16.md @@ -0,0 +1,3 @@ +## 0.8.16 + +No user-facing changes. diff --git a/csharp/ql/src/codeql-pack.release.yml b/csharp/ql/src/codeql-pack.release.yml index 2e3c183bb7a..c735422e23a 100644 --- a/csharp/ql/src/codeql-pack.release.yml +++ b/csharp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.8.15 +lastReleaseVersion: 0.8.16 diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml index 3e7180240ed..314aae55874 100644 --- a/csharp/ql/src/qlpack.yml +++ b/csharp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-queries -version: 0.8.16-dev +version: 0.8.17-dev groups: - csharp - queries diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll index 0a22178d108..295d022889f 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -7,7 +7,7 @@ private import CaptureModelsSpecific private import CaptureModelsPrinting class DataFlowTargetApi extends TargetApiSpecific { - DataFlowTargetApi() { isRelevantForDataFlowModels(this) } + DataFlowTargetApi() { not isUninterestingForDataFlowModels(this) } } private module Printing implements PrintingSig { diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll index 95253f46d22..b1c2475729c 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll @@ -51,16 +51,18 @@ private predicate isRelevantForModels(CS::Callable api) { } /** - * Holds if it is relevant to generate models for `api` based on data flow analysis. + * Holds if it is irrelevant to generate models for `api` based on data flow analysis. + * + * This serves as an extra filter for the `relevant` predicate. */ -predicate isRelevantForDataFlowModels(CS::Callable api) { - isRelevantForModels(api) and not isHigherOrder(api) -} +predicate isUninterestingForDataFlowModels(CS::Callable api) { isHigherOrder(api) } /** - * Holds if it is relevant to generate models for `api` based on its type. + * Holds if it is irrelevant to generate models for `api` based on type-based analysis. + * + * This serves as an extra filter for the `relevant` predicate. */ -predicate isRelevantForTypeBasedFlowModels = isRelevantForModels/1; +predicate isUninterestingForTypeBasedFlowModels(CS::Callable api) { none() } /** * A class of callables that are relevant generating summary, source and sinks models for. @@ -71,7 +73,8 @@ predicate isRelevantForTypeBasedFlowModels = isRelevantForModels/1; class TargetApiSpecific extends CS::Callable { TargetApiSpecific() { this.fromSource() and - this.isUnboundDeclaration() + this.isUnboundDeclaration() and + isRelevantForModels(this) } } diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll index dfb4c210edc..769215d091d 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll @@ -190,7 +190,7 @@ private module ModelPrinting = PrintingImpl; * on the Theorems for Free approach. */ class TypeBasedFlowTargetApi extends Specific::TargetApiSpecific { - TypeBasedFlowTargetApi() { Specific::isRelevantForTypeBasedFlowModels(this) } + TypeBasedFlowTargetApi() { not Specific::isUninterestingForTypeBasedFlowModels(this) } /** * Gets the string representation of all type based summaries for `this` diff --git a/csharp/scripts/create-extractor-pack.sh b/csharp/scripts/create-extractor-pack.sh index 4b39d7c7dd5..7eb2b753471 100755 --- a/csharp/scripts/create-extractor-pack.sh +++ b/csharp/scripts/create-extractor-pack.sh @@ -24,6 +24,7 @@ function dotnet_publish { dotnet publish --self-contained --configuration Release --runtime ${dotnet_platform} -p:RuntimeFrameworkVersion=8.0.1 $1 --output extractor-pack/tools/${platform} } +dotnet tool restore dotnet_publish extractor/Semmle.Extraction.CSharp.Standalone dotnet_publish extractor/Semmle.Extraction.CSharp.Driver dotnet_publish autobuilder/Semmle.Autobuild.CSharp diff --git a/docs/codeql/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code.rst b/docs/codeql/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code.rst index 72e2756ea5c..c763092ddac 100644 --- a/docs/codeql/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code.rst @@ -5,6 +5,8 @@ About CodeQL for Visual Studio Code ================================================= +.. include:: ../reusables/vs-code-deprecation-note.rst + CodeQL for Visual Studio Code is an extension that lets you write, run, and test CodeQL queries in Visual Studio Code. Features diff --git a/docs/codeql/codeql-for-visual-studio-code/about-telemetry-in-codeql-for-visual-studio-code.rst b/docs/codeql/codeql-for-visual-studio-code/about-telemetry-in-codeql-for-visual-studio-code.rst index f3258e013f7..03af3e675c3 100644 --- a/docs/codeql/codeql-for-visual-studio-code/about-telemetry-in-codeql-for-visual-studio-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/about-telemetry-in-codeql-for-visual-studio-code.rst @@ -5,6 +5,8 @@ About telemetry in CodeQL for Visual Studio Code ================================================= +.. include:: ../reusables/vs-code-deprecation-note.rst + If you specifically opt in to permit GitHub to do so, GitHub will collect usage data and metrics for the purposes of helping the core developers to improve the CodeQL extension for VS Code. This data will not be shared with any parties outside of GitHub. IP addresses and installation IDs will be retained for a maximum of 30 days. Anonymous data will be retained for a maximum of 180 days. diff --git a/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst b/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst index 62d48c6fbd8..4dca293308b 100644 --- a/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst +++ b/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst @@ -5,6 +5,8 @@ Analyzing your projects ================================================= +.. include:: ../reusables/vs-code-deprecation-note.rst + You can run queries on CodeQL databases and view the results in Visual Studio Code. This article explains how to get a CodeQL database and analyze it on your local machine. For information on running analysis at scale across many CodeQL databases, see ":ref:`Running CodeQL queries at scale with multi-repository variant analysis `." Choosing a database diff --git a/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst b/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst index 88ad273a3d6..4a5f6e324de 100644 --- a/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst +++ b/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst @@ -5,6 +5,8 @@ Customizing settings ==================== +.. include:: ../reusables/vs-code-deprecation-note.rst + You can edit the settings for the CodeQL extension to suit your needs. About CodeQL extension settings diff --git a/docs/codeql/codeql-for-visual-studio-code/exploring-data-flow-with-path-queries.rst b/docs/codeql/codeql-for-visual-studio-code/exploring-data-flow-with-path-queries.rst index dec599829ed..26f48dd561c 100644 --- a/docs/codeql/codeql-for-visual-studio-code/exploring-data-flow-with-path-queries.rst +++ b/docs/codeql/codeql-for-visual-studio-code/exploring-data-flow-with-path-queries.rst @@ -5,6 +5,8 @@ Exploring data flow with path queries ===================================== +.. include:: ../reusables/vs-code-deprecation-note.rst + You can run CodeQL queries in VS Code to help you track the flow of data through a program, highlighting areas that are potential security vulnerabilities. About path queries diff --git a/docs/codeql/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code.rst b/docs/codeql/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code.rst index 708b2f0cc0c..51056f8d2e7 100644 --- a/docs/codeql/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code.rst @@ -5,6 +5,8 @@ Exploring the structure of your source code ================================================= +.. include:: ../reusables/vs-code-deprecation-note.rst + You can use the AST viewer to display the abstract syntax tree of a CodeQL database. About the abstract syntax tree diff --git a/docs/codeql/codeql-for-visual-studio-code/index.rst b/docs/codeql/codeql-for-visual-studio-code/index.rst index fc615f932f8..36089de079c 100644 --- a/docs/codeql/codeql-for-visual-studio-code/index.rst +++ b/docs/codeql/codeql-for-visual-studio-code/index.rst @@ -3,6 +3,8 @@ CodeQL for Visual Studio Code ============================= +.. include:: ../reusables/vs-code-deprecation-note.rst + The CodeQL extension for Visual Studio Code adds rich language support for CodeQL and allows you to easily find problems in codebases. - :doc:`About CodeQL for Visual Studio Code diff --git a/docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst b/docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst index dad191274de..19d44312a5e 100644 --- a/docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst +++ b/docs/codeql/codeql-for-visual-studio-code/running-codeql-queries-at-scale-with-mrva.rst @@ -5,6 +5,8 @@ Running CodeQL queries at scale with multi-repository variant analysis ====================================================================== +.. include:: ../reusables/vs-code-deprecation-note.rst + .. include:: ../reusables/beta-note-mrva.rst About multi-repository variant analysis diff --git a/docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst b/docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst index ac67d31afde..94b291a69b8 100644 --- a/docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst @@ -5,6 +5,8 @@ Setting up CodeQL in Visual Studio Code ================================================= +.. include:: ../reusables/vs-code-deprecation-note.rst + You can install and configure the CodeQL extension in Visual Studio Code. .. include:: ../reusables/license-note.rst diff --git a/docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst b/docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst index 7e19e78bd42..67f45203b47 100644 --- a/docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst @@ -5,6 +5,8 @@ Testing CodeQL queries in Visual Studio Code ============================================ +.. include:: ../reusables/vs-code-deprecation-note.rst + You can run unit tests for CodeQL queries using the Visual Studio Code extension. When you are sure that your query finds the results you want to identify, you can use variant analysis to run it at scale. For information on running analysis at scale across many CodeQL databases, see ":ref:`Running CodeQL queries at scale with multi-repository variant analysis `." About testing queries in VS Code diff --git a/docs/codeql/codeql-for-visual-studio-code/troubleshooting-codeql-for-visual-studio-code.rst b/docs/codeql/codeql-for-visual-studio-code/troubleshooting-codeql-for-visual-studio-code.rst index 2eecc28f0fb..6b81bd5bd83 100644 --- a/docs/codeql/codeql-for-visual-studio-code/troubleshooting-codeql-for-visual-studio-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/troubleshooting-codeql-for-visual-studio-code.rst @@ -5,6 +5,8 @@ Troubleshooting CodeQL for Visual Studio Code ============================================= +.. include:: ../reusables/vs-code-deprecation-note.rst + This article explains how to debug problems with the analysis of CodeQL databases that are stored on your local machine. For information on troubleshooting variant analysis, which runs on GitHub.com, see ":ref:`Troubleshooting variant analysis `." diff --git a/docs/codeql/codeql-for-visual-studio-code/troubleshooting-variant-analysis.rst b/docs/codeql/codeql-for-visual-studio-code/troubleshooting-variant-analysis.rst index 5d9137dee5c..1b0613accf1 100644 --- a/docs/codeql/codeql-for-visual-studio-code/troubleshooting-variant-analysis.rst +++ b/docs/codeql/codeql-for-visual-studio-code/troubleshooting-variant-analysis.rst @@ -5,6 +5,8 @@ Troubleshooting variant analysis ================================ +.. include:: ../reusables/vs-code-deprecation-note.rst + .. include:: ../reusables/beta-note-mrva.rst This article explains how to debug problems with variant analysis, that is, analysis run using GitHub Actions diff --git a/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst b/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst index d1dce1a6771..c74fc247e00 100644 --- a/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst +++ b/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst @@ -5,6 +5,8 @@ Using the CodeQL model editor ============================= +.. include:: ../reusables/vs-code-deprecation-note.rst + .. include:: ../reusables/beta-note-model-pack-editor-vsc.rst You can view, write, and edit CodeQL packs in Visual Studio Code using the CodeQL extension. The model editor is designed to help you model external dependencies of your codebase that are not supported by the standard CodeQL Libraries. diff --git a/docs/codeql/codeql-for-visual-studio-code/working-with-codeql-packs-in-visual-studio-code.rst b/docs/codeql/codeql-for-visual-studio-code/working-with-codeql-packs-in-visual-studio-code.rst index fe1e9a0bbdd..11b866cf78c 100644 --- a/docs/codeql/codeql-for-visual-studio-code/working-with-codeql-packs-in-visual-studio-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/working-with-codeql-packs-in-visual-studio-code.rst @@ -5,6 +5,8 @@ Working with CodeQL packs in Visual Studio Code =============================================== +.. include:: ../reusables/vs-code-deprecation-note.rst + .. include:: ../reusables/beta-note-package-management.rst You can view, write, and edit all types of CodeQL packs in Visual Studio Code using the CodeQL extension. diff --git a/docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst b/docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst index 7db0028eb03..2ff7a62b2ac 100644 --- a/docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst +++ b/docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst @@ -73,7 +73,7 @@ The CodeQL examples in this article are only excerpts and are not meant to repre Abstract syntax --------------- -The abstract syntax tree (AST) represents the elements of the source code organized into a tree. The `AST viewer `__ +The abstract syntax tree (AST) represents the elements of the source code organized into a tree. The `AST viewer `__ in Visual Studio Code shows the AST nodes, including the relevant CodeQL classes and predicates. All CodeQL AST classes inherit from the `AstNode` class, which provides the following member predicates diff --git a/docs/codeql/codeql-overview/about-codeql.rst b/docs/codeql/codeql-overview/about-codeql.rst index 1392e1c7330..eccc81c8754 100644 --- a/docs/codeql/codeql-overview/about-codeql.rst +++ b/docs/codeql/codeql-overview/about-codeql.rst @@ -70,8 +70,8 @@ Query execution After you've created a CodeQL database, one or more queries are executed against it. CodeQL queries are written in a specially-designed object-oriented query language called QL. You can run the queries checked out from the CodeQL -repo (or custom queries that you've written yourself) using the :ref:`CodeQL -for VS Code extension ` or the `CodeQL CLI +repo (or custom queries that you've written yourself) using the `CodeQL +for VS Code extension `__ or the `CodeQL CLI `__. For more information about queries, see ":ref:`About CodeQL queries `." .. _interpret-query-results: diff --git a/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.8.1.rst b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.8.1.rst index 7c76c396073..c59a3e6498e 100644 --- a/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.8.1.rst +++ b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.8.1.rst @@ -82,7 +82,7 @@ Bug Fixes Python """""" -* The `View AST functionality `__ no longer prints detailed information about regular expressions, greatly improving performance. +* The `View AST functionality `__ no longer prints detailed information about regular expressions, greatly improving performance. Minor Analysis Improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/codeql/codeql-overview/codeql-tools.rst b/docs/codeql/codeql-overview/codeql-tools.rst index c6df9d8882d..d58730e4702 100644 --- a/docs/codeql/codeql-overview/codeql-tools.rst +++ b/docs/codeql/codeql-overview/codeql-tools.rst @@ -53,5 +53,5 @@ CodeQL for Visual Studio Code You can analyze CodeQL databases in Visual Studio Code using the CodeQL extension, which provides an enhanced environment for writing and running custom -queries and viewing the results. For more information, see ":ref:`CodeQL -for Visual Studio Code `." \ No newline at end of file +queries and viewing the results. For more information, see "`CodeQL +for Visual Studio Code `__." \ No newline at end of file diff --git a/docs/codeql/ql-training/cpp/bad-overflow-guard.rst b/docs/codeql/ql-training/cpp/bad-overflow-guard.rst index 55657871b4f..b2e6883dcae 100644 --- a/docs/codeql/ql-training/cpp/bad-overflow-guard.rst +++ b/docs/codeql/ql-training/cpp/bad-overflow-guard.rst @@ -9,7 +9,7 @@ CodeQL for C/C++ Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `ChakraCore `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `ChakraCore `__ from GitHub. Checking for overflow in C ========================== diff --git a/docs/codeql/ql-training/cpp/control-flow-cpp.rst b/docs/codeql/ql-training/cpp/control-flow-cpp.rst index b18348509c2..6c6905576e5 100644 --- a/docs/codeql/ql-training/cpp/control-flow-cpp.rst +++ b/docs/codeql/ql-training/cpp/control-flow-cpp.rst @@ -11,7 +11,7 @@ CodeQL for C/C++ Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `ChakraCore `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `ChakraCore `__ from GitHub. .. rst-class:: agenda diff --git a/docs/codeql/ql-training/cpp/data-flow-cpp.rst b/docs/codeql/ql-training/cpp/data-flow-cpp.rst index da4f287b392..8a22db69463 100644 --- a/docs/codeql/ql-training/cpp/data-flow-cpp.rst +++ b/docs/codeql/ql-training/cpp/data-flow-cpp.rst @@ -9,7 +9,7 @@ Finding string formatting vulnerabilities in C/C++ Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `dotnet/coreclr `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `dotnet/coreclr `__ from GitHub. .. rst-class:: agenda diff --git a/docs/codeql/ql-training/cpp/global-data-flow-cpp.rst b/docs/codeql/ql-training/cpp/global-data-flow-cpp.rst index a2391e40332..62c235b7696 100644 --- a/docs/codeql/ql-training/cpp/global-data-flow-cpp.rst +++ b/docs/codeql/ql-training/cpp/global-data-flow-cpp.rst @@ -9,7 +9,7 @@ CodeQL for C/C++ Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `dotnet/coreclr `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `dotnet/coreclr `__ from GitHub. .. rst-class:: agenda diff --git a/docs/codeql/ql-training/cpp/intro-ql-cpp.rst b/docs/codeql/ql-training/cpp/intro-ql-cpp.rst index dff2c50ec0c..2511669a731 100644 --- a/docs/codeql/ql-training/cpp/intro-ql-cpp.rst +++ b/docs/codeql/ql-training/cpp/intro-ql-cpp.rst @@ -9,7 +9,7 @@ CodeQL for C/C++ Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `exiv2 `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `exiv2 `__ from GitHub. .. Include language-agnostic section here diff --git a/docs/codeql/ql-training/cpp/snprintf.rst b/docs/codeql/ql-training/cpp/snprintf.rst index 58b2c31d2e4..86c963fa1f2 100644 --- a/docs/codeql/ql-training/cpp/snprintf.rst +++ b/docs/codeql/ql-training/cpp/snprintf.rst @@ -9,7 +9,7 @@ CodeQL for C/C++ Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `rsyslog `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `rsyslog `__ from GitHub. ``snprintf`` ============ diff --git a/docs/codeql/ql-training/java/apache-struts-java.rst b/docs/codeql/ql-training/java/apache-struts-java.rst index 24186bda48f..503dfad5450 100644 --- a/docs/codeql/ql-training/java/apache-struts-java.rst +++ b/docs/codeql/ql-training/java/apache-struts-java.rst @@ -13,7 +13,7 @@ Exercise: Apache Struts Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `Apache Struts `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `Apache Struts `__ from GitHub. Unsafe deserialization in Struts ================================ diff --git a/docs/codeql/ql-training/java/data-flow-java.rst b/docs/codeql/ql-training/java/data-flow-java.rst index f55b25ff5ab..1648589f5a5 100644 --- a/docs/codeql/ql-training/java/data-flow-java.rst +++ b/docs/codeql/ql-training/java/data-flow-java.rst @@ -9,7 +9,7 @@ Finding SPARQL injection vulnerabilities in Java Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `VIVO Vitro `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `VIVO Vitro `__ from GitHub. .. rst-class:: agenda diff --git a/docs/codeql/ql-training/java/global-data-flow-java.rst b/docs/codeql/ql-training/java/global-data-flow-java.rst index ddee9645d17..0b6d4c08b90 100644 --- a/docs/codeql/ql-training/java/global-data-flow-java.rst +++ b/docs/codeql/ql-training/java/global-data-flow-java.rst @@ -9,7 +9,7 @@ CodeQL for Java Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `Apache Struts `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `Apache Struts `__ from GitHub. .. rst-class:: agenda diff --git a/docs/codeql/ql-training/java/intro-ql-java.rst b/docs/codeql/ql-training/java/intro-ql-java.rst index fec966e2fe4..9d546b62b37 100644 --- a/docs/codeql/ql-training/java/intro-ql-java.rst +++ b/docs/codeql/ql-training/java/intro-ql-java.rst @@ -9,7 +9,7 @@ CodeQL for Java Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `Apache Struts `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `Apache Struts `__ from GitHub. .. Include language-agnostic section here diff --git a/docs/codeql/ql-training/java/query-injection-java.rst b/docs/codeql/ql-training/java/query-injection-java.rst index a16ac49b6a3..028b26bfab6 100644 --- a/docs/codeql/ql-training/java/query-injection-java.rst +++ b/docs/codeql/ql-training/java/query-injection-java.rst @@ -9,7 +9,7 @@ CodeQL for Java Setup ===== -For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `VIVO Vitro `__ from GitHub. +For this example you need to set up `CodeQL for Visual Studio Code `__ and download the CodeQL database for `VIVO Vitro `__ from GitHub. SQL injection ============= diff --git a/docs/codeql/ql-training/template.rst b/docs/codeql/ql-training/template.rst index 503ac757fdb..761d5b36235 100644 --- a/docs/codeql/ql-training/template.rst +++ b/docs/codeql/ql-training/template.rst @@ -36,7 +36,7 @@ Setup For this example you should download: -- `CodeQL for Visual Studio Code `__ +- `CodeQL for Visual Studio Code `__ - A CodeQL database .. note:: diff --git a/docs/codeql/reusables/supported-frameworks.rst b/docs/codeql/reusables/supported-frameworks.rst index 5ab3b605834..ebc17dd90cc 100644 --- a/docs/codeql/reusables/supported-frameworks.rst +++ b/docs/codeql/reusables/supported-frameworks.rst @@ -202,6 +202,7 @@ and the CodeQL library pack ``codeql/python-all`` (`changelog `." \ No newline at end of file + If you want to move your experimental query somewhere more permanent, you need to move the whole ``Quick Queries`` directory. The directory is a CodeQL pack with a ``qlpack.yml`` file that defines the content as queries for |language-text| CodeQL databases. For more information about CodeQL packs, see "`Managing CodeQL query packs and library packs `__." diff --git a/docs/codeql/reusables/vs-code-basic-instructions/setup-to-run-queries.rst b/docs/codeql/reusables/vs-code-basic-instructions/setup-to-run-queries.rst index 4e6ecf8daf2..3fe9e27013d 100644 --- a/docs/codeql/reusables/vs-code-basic-instructions/setup-to-run-queries.rst +++ b/docs/codeql/reusables/vs-code-basic-instructions/setup-to-run-queries.rst @@ -1 +1 @@ -For information about installing the CodeQL extension for Visual Studio code, see ":ref:`Setting up CodeQL in Visual Studio Code `." \ No newline at end of file +For information about installing the CodeQL extension for Visual Studio code, see "`Installing CodeQL for Visual Studio Code `__." diff --git a/docs/codeql/reusables/vs-code-deprecation-note.rst b/docs/codeql/reusables/vs-code-deprecation-note.rst new file mode 100644 index 00000000000..51e70e00d5e --- /dev/null +++ b/docs/codeql/reusables/vs-code-deprecation-note.rst @@ -0,0 +1,5 @@ +.. pull-quote:: + + Note + + This documentation `was migrated `__ to ``docs.github.com/en/code-security/codeql-for-vs-code`` on 2024/05/08, and this version is no longer maintained. diff --git a/docs/codeql/writing-codeql-queries/creating-path-queries.rst b/docs/codeql/writing-codeql-queries/creating-path-queries.rst index 1e1b8d1f7a6..41f0683594c 100644 --- a/docs/codeql/writing-codeql-queries/creating-path-queries.rst +++ b/docs/codeql/writing-codeql-queries/creating-path-queries.rst @@ -20,7 +20,7 @@ This topic provides information on how to structure a path query file so you can Note - The alerts generated by path queries are included in the results generated using the `CodeQL CLI `__ and in `code scanning `__. You can also view the path explanations generated by your path query in the :ref:`CodeQL extension for VS Code `. + The alerts generated by path queries are included in the results generated using the `CodeQL CLI `__ and in `code scanning `__. You can also view the path explanations generated by your path query in the `CodeQL extension for VS Code `__. To learn more about modeling data flow with CodeQL, see ":doc:`About data flow analysis `." @@ -171,7 +171,7 @@ Select clauses for path queries consist of four 'columns', with the following st select element, source, sink, string The ``element`` and ``string`` columns represent the location of the alert and the alert message respectively, as explained in ":doc:`About CodeQL queries `." The second and third columns, ``source`` and ``sink``, are nodes on the path graph selected by the query. -Each result generated by your query is displayed at a single location in the same way as an alert query. Additionally, each result also has an associated path, which can be viewed in the :ref:`CodeQL extension for VS Code `. +Each result generated by your query is displayed at a single location in the same way as an alert query. Additionally, each result also has an associated path, which can be viewed in the `CodeQL extension for VS Code `__. The ``element`` that you select in the first column depends on the purpose of the query and the type of issue that it is designed to find. This is particularly important for security issues. For example, if you believe the ``source`` value to be globally invalid or malicious it may be best to display the alert at the ``source``. In contrast, you should consider displaying the alert at the ``sink`` if you believe it is the element that requires sanitization. diff --git a/docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst b/docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst index 4e074bc411d..560505506f2 100644 --- a/docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst +++ b/docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst @@ -9,7 +9,7 @@ About query results ------------------- The information contained in the results of a query is controlled by the ``select`` statement. Part of the process of developing a useful query is to make the results clear and easy for other users to understand. -When you write your own queries in the CodeQL :ref:`extension for VS Code ` there are no constraints on what can be selected. +When you write your own queries in the CodeQL `extension for VS Code `__ there are no constraints on what can be selected. However, if you want to use a query to create alerts for code scanning or generate valid analysis results using the `CodeQL CLI `__, you'll need to make the ``select`` statement report results in the required format. You must also ensure that the query has the appropriate metadata properties defined. This topic explains how to write your select statement to generate helpful analysis results. diff --git a/docs/codeql/writing-codeql-queries/introduction-to-ql.rst b/docs/codeql/writing-codeql-queries/introduction-to-ql.rst index 04dccfc98b6..203f590f761 100644 --- a/docs/codeql/writing-codeql-queries/introduction-to-ql.rst +++ b/docs/codeql/writing-codeql-queries/introduction-to-ql.rst @@ -19,7 +19,7 @@ QL also supports recursion and aggregates. This allows you to write complex recu Running a query --------------- -You can try out the following examples and exercises using :ref:`CodeQL for VS Code ` or the `CodeQL template `__ on GitHub Codespaces. +You can try out the following examples and exercises using `CodeQL for VS Code `__ or the `CodeQL template `__ on GitHub Codespaces. Here is an example of a basic query: @@ -114,7 +114,7 @@ The following example queries *do* use these databases and give you an idea of h Queries using the CodeQL libraries can find errors and uncover variants of important security vulnerabilities in codebases. Visit `GitHub Security Lab `__ to read about examples of vulnerabilities that we have recently found in open source projects. -Before you can run the following examples, you will need to install the CodeQL extension for Visual Studio Code. For more information, see :ref:`Setting up CodeQL in Visual Studio Code `. You will also need to import and select a database in the corresponding programming language. For more information about obtaining CodeQL databases, see `Analyzing your projects `__ in the CodeQL for VS Code documentation. +Before you can run the following examples, you will need to install the CodeQL extension for Visual Studio Code. For more information, see :ref:`Setting up CodeQL in Visual Studio Code `. You will also need to import and select a database in the corresponding programming language. For more information about obtaining CodeQL databases, see `Managing CodeQL databases `__ in the CodeQL for VS Code documentation. To import the CodeQL library for a specific programming language, type ``import `` at the start of the query. diff --git a/docs/codeql/writing-codeql-queries/metadata-for-codeql-queries.rst b/docs/codeql/writing-codeql-queries/metadata-for-codeql-queries.rst index 16a0eba56c2..34907e3910c 100644 --- a/docs/codeql/writing-codeql-queries/metadata-for-codeql-queries.rst +++ b/docs/codeql/writing-codeql-queries/metadata-for-codeql-queries.rst @@ -9,7 +9,7 @@ About query metadata -------------------- Any query that is run as part of an analysis includes a number of properties, known as query metadata. Metadata is included at the top of each query file as the content of a QLDoc comment. -This metadata tells the CodeQL :ref:`extension for VS Code ` and the `Code scanning feature in GitHub `__ how to handle the query and display its results correctly. +This metadata tells the CodeQL `extension for VS Code `__ and the `Code scanning feature in GitHub `__ how to handle the query and display its results correctly. It also gives other users information about what the query results mean. For more information on query metadata, see the `query metadata style guide `__ in our `open source repository `__ on GitHub. .. pull-quote:: diff --git a/docs/ql-style-guide.md b/docs/ql-style-guide.md index 29a427fdfae..7018719bb13 100644 --- a/docs/ql-style-guide.md +++ b/docs/ql-style-guide.md @@ -3,7 +3,7 @@ ## Introduction This document describes how to format the code you contribute to this repository. It covers aspects such as layout, white-space, naming, and documentation. Adhering to consistent standards makes code easier to read and maintain. Of course, these are only guidelines, and can be overridden as the need arises on a case-by-case basis. Where existing code deviates from these guidelines, prefer consistency with the surrounding code. -Note, if you use [CodeQL for Visual Studio Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code/), you can autoformat your query in the editor. +Note, if you use [CodeQL for Visual Studio Code](https://docs.github.com/en/code-security/codeql-for-vs-code/), you can autoformat your query in the editor. Words in *italic* are defined in the [Glossary](#glossary). diff --git a/docs/supported-queries.md b/docs/supported-queries.md index 3529866d461..fa4cf1ea5d8 100644 --- a/docs/supported-queries.md +++ b/docs/supported-queries.md @@ -45,7 +45,7 @@ The process must begin with the first step and must conclude with the final step - Understand [the evaluation model of QL](https://codeql.github.com/docs/ql-language-reference/evaluation-of-ql-programs/). It's more similar to SQL than to any mainstream programming language. - Most performance tuning in QL boils down to computing as few tuples (rows of data) as possible. As a mental model, think of predicate evaluation as enumerating all combinations of parameters that satisfy the predicate body. This includes the implicit parameters `this` and `result`. - The major libraries in CodeQL are _cached_ and will only be computed once for the entire suite of queries. The first query that needs a cached _stage_ will trigger its evaluation. This means that query authors should usually only look at the run time of the last stage of evaluation. - - In [the settings for the VSCode extension](https://codeql.github.com/docs/codeql-for-visual-studio-code/customizing-settings/), check the box "Running Queries: Debug" (`codeQL.runningQueries.debug`). Then find "CodeQL Query Server" in the VSCode Output panel (View -> Output) and capture the output when running the query. That output contains timing and tuple counts for all computed predicates. + - In [the settings for the VSCode extension](https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/customizing-settings/), check the box "Running Queries: Debug" (`codeQL.runningQueries.debug`). Then find "CodeQL Query Server" in the VSCode Output panel (View -> Output) and capture the output when running the query. That output contains timing and tuple counts for all computed predicates. - To clear the entire cache, invoke "CodeQL: Clear Cache" from the VSCode command palette. 6. **Make sure your query has the correct metadata** diff --git a/go/CONTRIBUTING.md b/go/CONTRIBUTING.md index 801d856e53e..38dffd1d754 100644 --- a/go/CONTRIBUTING.md +++ b/go/CONTRIBUTING.md @@ -33,7 +33,7 @@ Follow the steps below to help other users understand what your query does, and 2. **Format your code correctly** - All of the standard CodeQL queries and libraries are uniformly formatted for clarity and consistency, so we strongly recommend that all contributions follow the same formatting guidelines. If you use the CodeQL extension for Visual Studio Code, you can auto-format your query using the [Format Document command](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code/). For more information, see the [QL style guide](https://github.com/github/codeql/blob/main/docs/ql-style-guide.md). + All of the standard CodeQL queries and libraries are uniformly formatted for clarity and consistency, so we strongly recommend that all contributions follow the same formatting guidelines. If you use the CodeQL extension for Visual Studio Code, you can auto-format your query using the [Format Document command](https://docs.github.com/en/code-security/codeql-for-vs-code/). For more information, see the [QL style guide](https://github.com/github/codeql/blob/main/docs/ql-style-guide.md). 3. **Make sure your query has the correct metadata** diff --git a/go/Makefile b/go/Makefile index d0289a093a5..3ebeb69fcaf 100644 --- a/go/Makefile +++ b/go/Makefile @@ -1,30 +1,10 @@ -all: extractor ql/lib/go.dbscheme - -ifeq ($(OS),Windows_NT) -EXE = .exe -CODEQL_PLATFORM = win64 -else -EXE = -UNAME_S := $(shell uname -s) -ifeq ($(UNAME_S),Linux) -CODEQL_PLATFORM = linux64 -endif -ifeq ($(UNAME_S),Darwin) -CODEQL_PLATFORM = osx64 -endif -endif - -CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh baseline-config-empty.json baseline-config-vendor.json configure-baseline.cmd configure-baseline.sh identify-environment.cmd identify-environment.sh index.cmd index.sh pre-finalize.cmd pre-finalize.sh tracing-config.lua) +all: gen extractor EXTRACTOR_PACK_OUT = build/codeql-extractor-go -BINARIES = go-extractor go-tokenizer go-autobuilder go-build-runner go-bootstrap go-gen-dbscheme - -.PHONY: tools tools-codeql tools-codeql-full clean autoformat \ - tools-linux64 tools-osx64 tools-win64 check-formatting +.PHONY: extractor gen clean autoformat check-formatting clean: - rm -rf tools/bin tools/linux64 tools/osx64 tools/win64 tools/net tools/opencsv rm -rf $(EXTRACTOR_PACK_OUT) build/stats build/testdb autoformat: @@ -47,66 +27,11 @@ endif qhelp-to-markdown: scripts/qhelp-to-markdown.sh ql/src "$(QHELP_OUT_DIR)" -tools: tools-codeql tools/tokenizer.jar +extractor: + bazel run :create-extractor-pack -.PHONY: $(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES))) -$(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES))): - go build -C extractor -mod=vendor -o ../$@ ./cli/$(basename $(@F)) - -tools-codeql: tools-$(CODEQL_PLATFORM) - -tools-codeql-full: tools-linux64 tools-osx64 tools-win64 - -tools-linux64: $(addprefix tools/linux64/,$(BINARIES)) - -.PHONY: $(addprefix tools/linux64/,$(BINARIES)) -$(addprefix tools/linux64/,$(BINARIES)): - GOOS=linux GOARCH=amd64 go build -C extractor -mod=vendor -o ../$@ ./cli/$(@F) - -tools-osx64: $(addprefix tools/osx64/,$(BINARIES)) - -.PHONY: $(addprefix tools/osx64/,$(BINARIES)) -$(addprefix tools/osx64/,$(BINARIES)): - GOOS=darwin GOARCH=amd64 go build -C extractor -mod=vendor -o ../$@.amd64 ./cli/$(@F) - GOOS=darwin GOARCH=arm64 go build -C extractor -mod=vendor -o ../$@.arm64 ./cli/$(@F) - lipo -create $@.amd64 $@.arm64 -output $@ - rm $@.amd64 $@.arm64 - -tools-win64: $(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES))) - -.PHONY: $(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES))) -$(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES))): - env GOOS=windows GOARCH=amd64 go build -C extractor -mod=vendor -o ../$@ ./cli/$(basename $(@F)) - -.PHONY: extractor-common extractor extractor-full -extractor-common: codeql-extractor.yml LICENSE ql/lib/go.dbscheme \ - tools/tokenizer.jar $(CODEQL_TOOLS) - rm -rf $(EXTRACTOR_PACK_OUT) - mkdir -p $(EXTRACTOR_PACK_OUT) - cp codeql-extractor.yml LICENSE ql/lib/go.dbscheme ql/lib/go.dbscheme.stats $(EXTRACTOR_PACK_OUT) - mkdir $(EXTRACTOR_PACK_OUT)/tools - cp -r tools/tokenizer.jar $(CODEQL_TOOLS) $(EXTRACTOR_PACK_OUT)/tools - cp -r downgrades $(EXTRACTOR_PACK_OUT) - -extractor: extractor-common tools-codeql - cp -r tools/$(CODEQL_PLATFORM) $(EXTRACTOR_PACK_OUT)/tools - -extractor-full: extractor-common tools-codeql-full - cp -r $(addprefix tools/,linux64 osx64 win64) $(EXTRACTOR_PACK_OUT)/tools - -tools/tokenizer.jar: tools/net/sourceforge/pmd/cpd/GoLanguage.class - jar cf $@ -C tools net - jar uf $@ -C tools opencsv - -tools/net/sourceforge/pmd/cpd/GoLanguage.class: extractor/net/sourceforge/pmd/cpd/GoLanguage.java - javac -cp extractor -d tools $< - rm tools/net/sourceforge/pmd/cpd/AbstractLanguage.class - rm tools/net/sourceforge/pmd/cpd/SourceCode.class - rm tools/net/sourceforge/pmd/cpd/TokenEntry.class - rm tools/net/sourceforge/pmd/cpd/Tokenizer.class - -ql/lib/go.dbscheme: tools/$(CODEQL_PLATFORM)/go-gen-dbscheme$(EXE) - $< $@ +gen: + bazel run :gen build/stats/src.stamp: mkdir -p $(@D)/src @@ -123,7 +48,7 @@ test: all build/testdb/check-upgrade-path codeql test run -j0 ql/test --search-path build/codeql-extractor-go --consistency-queries ql/test/consistency --compilation-cache=$(cache) # use GOOS=linux because GOOS=darwin GOARCH=386 is no longer supported env GOOS=linux GOARCH=386 codeql$(EXE) test run -j0 ql/test/query-tests/Security/CWE-681 --search-path build/codeql-extractor-go --consistency-queries ql/test/consistency --compilation-cache=$(cache) - cd extractor; go test -mod=vendor ./... + cd extractor; bazel test ... bash extractor-smoke-test/test.sh || (echo "Extractor smoke test FAILED"; exit 1) .PHONY: build/testdb/check-upgrade-path diff --git a/go/actions/test/action.yml b/go/actions/test/action.yml new file mode 100644 index 00000000000..7648d2ea2e8 --- /dev/null +++ b/go/actions/test/action.yml @@ -0,0 +1,77 @@ +name: Test Go extractor +description: Run build, QL tests, and optionally basic code sanity checks (formatting and generated code) for the Go extractor +inputs: + go-test-version: + description: Which Go version to use for running the tests + required: false + default: ~1.22.0 + run-code-checks: + description: Whether to run formatting, code and qhelp generation checks + required: false + default: false +runs: + using: composite + steps: + - name: Set up Go ${{ inputs.go-test-version }} + uses: actions/setup-go@v5 + with: + go-version: ${{ inputs.go-test-version }} + cache: false + id: go + + - name: Set up CodeQL CLI + uses: ./.github/actions/fetch-codeql + + - name: Enable problem matchers in repository + shell: bash + run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;' + + - name: Check checked-in generated code + if: inputs.run-code-checks == 'true' + shell: bash + run: | + bazel run go:gen + git add . + git diff --exit-code HEAD || ( + echo "please run bazel run //go:gen" + exit 1 + ) + + - name: Build + shell: bash + run: | + bazel run go:create-extractor-pack + + - name: Check that all Go code is autoformatted + if: inputs.run-code-checks == 'true' && !cancelled() + shell: bash + run: | + cd go + make check-formatting + + - name: Compile qhelp files to markdown + if: inputs.run-code-checks == 'true' && !cancelled() + id: markdown + shell: bash + run: | + cd go + env QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown + + - name: Upload qhelp markdown + if: inputs.run-code-checks == 'true' && !cancelled() + uses: actions/upload-artifact@v3 + with: + name: qhelp-markdown + path: go/qhelp-out/**/*.md + + - name: Cache compilation cache + id: query-cache + uses: ./.github/actions/cache-query-compilation + with: + key: go-qltest + + - name: Test + shell: bash + run: | + cd go + make test cache="${{ steps.query-cache.outputs.cache-dir }}" diff --git a/go/documentation/library-coverage/coverage.csv b/go/documentation/library-coverage/coverage.csv index f06794d3ecc..b55c72e348f 100644 --- a/go/documentation/library-coverage/coverage.csv +++ b/go/documentation/library-coverage/coverage.csv @@ -1,5 +1,5 @@ package,sink,source,summary,sink:credentials-key,sink:jwt,source:remote,summary:taint,summary:value -,,,2,,,,,2 +,,,5,,,,,5 archive/tar,,,5,,,,5, archive/zip,,,6,,,,6, bufio,,,17,,,,17, diff --git a/go/documentation/library-coverage/coverage.rst b/go/documentation/library-coverage/coverage.rst index 4dff6d7ac90..515b17f6718 100644 --- a/go/documentation/library-coverage/coverage.rst +++ b/go/documentation/library-coverage/coverage.rst @@ -18,7 +18,7 @@ Go framework & library support `Macaron `_,``gopkg.in/macaron*``,12,1, `Revel `_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",,20, `SendGrid `_,``github.com/sendgrid/sendgrid-go*``,,1, - `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``",8,578, + `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``",8,581, `beego `_,"``github.com/astaxie/beego*``, ``github.com/beego/beego*``",,42, `cristalhq/jwt `_,``github.com/cristalhq/jwt*``,,,1 `fasthttp `_,``github.com/valyala/fasthttp*``,,5, @@ -35,5 +35,5 @@ Go framework & library support `yaml `_,``gopkg.in/yaml*``,,9, `zap `_,``go.uber.org/zap*``,,11, Others,"``github.com/go-jose/go-jose/$ANYVERSION/jwt``, ``gopkg.in/square/go-jose.v2/jwt``",,8,2 - Totals,,20,871,24 + Totals,,20,874,24 diff --git a/go/extractor/BUILD.bazel b/go/extractor/BUILD.bazel index 7e576927f66..8c69d9cc01f 100644 --- a/go/extractor/BUILD.bazel +++ b/go/extractor/BUILD.bazel @@ -18,6 +18,7 @@ go_library( "//go/extractor/dbscheme", "//go/extractor/diagnostics", "//go/extractor/srcarchive", + "//go/extractor/toolchain", "//go/extractor/trap", "//go/extractor/util", "//go/extractor/vendor/golang.org/x/mod/modfile", diff --git a/go/extractor/autobuilder/autobuilder.go b/go/extractor/autobuilder/autobuilder.go index eec9ba84c04..b9405a764d4 100644 --- a/go/extractor/autobuilder/autobuilder.go +++ b/go/extractor/autobuilder/autobuilder.go @@ -54,13 +54,15 @@ func checkExtractorRun() bool { } // tryBuildIfExists tries to run the command `cmd args...` if the file `buildFile` exists and is not -// a directory. Returns true if the command was successful and false if not. -func tryBuildIfExists(buildFile, cmd string, args ...string) bool { - if util.FileExists(buildFile) { +// a directory. Returns values indicating whether the script succeeded as well as whether the script was found. +func tryBuildIfExists(buildFile, cmd string, args ...string) (scriptSuccess bool, scriptFound bool) { + scriptSuccess = false + scriptFound = util.FileExists(buildFile) + if scriptFound { log.Printf("%s found.\n", buildFile) - return tryBuild(cmd, args...) + scriptSuccess = tryBuild(cmd, args...) } - return false + return } // tryBuild tries to run `cmd args...`, returning true if successful and false if not. @@ -92,11 +94,25 @@ var BuildScripts = []BuildScript{ // Autobuild attempts to detect build systems based on the presence of build scripts from the // list in `BuildScripts` and run the corresponding command. This may invoke zero or more // build scripts in the order given by `BuildScripts`. -func Autobuild() bool { +// Returns `scriptSuccess` which indicates whether a build script was successfully executed. +// Returns `scriptsExecuted` which contains the names of all build scripts that were executed. +func Autobuild() (scriptSuccess bool, scriptsExecuted []string) { + scriptSuccess = false + scriptsExecuted = []string{} + for _, script := range BuildScripts { - if tryBuildIfExists(script.Filename, script.Tool) { - return true + // Try to run the build script + success, scriptFound := tryBuildIfExists(script.Filename, script.Tool) + + // If it was found, we attempted to run it: add it to the array. + if scriptFound { + scriptsExecuted = append(scriptsExecuted, script.Filename) + } + // If it was successfully executed, we stop here. + if success { + scriptSuccess = true + return } } - return false + return } diff --git a/go/extractor/cli/go-autobuilder/go-autobuilder.go b/go/extractor/cli/go-autobuilder/go-autobuilder.go index 2e9731c989b..07b41c98b0a 100644 --- a/go/extractor/cli/go-autobuilder/go-autobuilder.go +++ b/go/extractor/cli/go-autobuilder/go-autobuilder.go @@ -320,21 +320,26 @@ func setGopath(root string) { log.Printf("GOPATH set to %s.\n", newGopath) } -// Try to build the project without custom commands. If that fails, return a boolean indicating -// that we should install dependencies ourselves. +// Try to build the project with a build script. If that fails, return a boolean indicating +// that we should install dependencies in the normal way. func buildWithoutCustomCommands(modMode project.ModMode) bool { shouldInstallDependencies := false - // try to build the project - buildSucceeded := autobuilder.Autobuild() + // try to run a build script + scriptSucceeded, scriptsExecuted := autobuilder.Autobuild() + scriptCount := len(scriptsExecuted) - // Build failed or there are still dependency errors; we'll try to install dependencies - // ourselves - if !buildSucceeded { - log.Println("Build failed, continuing to install dependencies.") + // If there is no build script we could invoke successfully or there are still dependency errors; + // we'll try to install dependencies ourselves in the normal Go way. + if !scriptSucceeded { + if scriptCount > 0 { + log.Printf("Unsuccessfully ran %d build scripts(s), continuing to install dependencies in the normal way.\n", scriptCount) + } else { + log.Println("Unable to find any build scripts, continuing to install dependencies in the normal way.") + } shouldInstallDependencies = true - } else if util.DepErrors("./...", modMode.ArgsForGoVersion(toolchain.GetEnvGoSemVer())...) { - log.Println("Dependencies are still not resolving after the build, continuing to install dependencies.") + } else if toolchain.DepErrors("./...", modMode.ArgsForGoVersion(toolchain.GetEnvGoSemVer())...) { + log.Printf("Dependencies are still not resolving after executing %d build script(s), continuing to install dependencies in the normal way.\n", scriptCount) shouldInstallDependencies = true } diff --git a/go/extractor/cli/go-build-runner/go-build-runner.go b/go/extractor/cli/go-build-runner/go-build-runner.go index 118de5caf2e..8c6c4f47651 100644 --- a/go/extractor/cli/go-build-runner/go-build-runner.go +++ b/go/extractor/cli/go-build-runner/go-build-runner.go @@ -1,20 +1,22 @@ package main import ( - "github.com/github/codeql-go/extractor/util" "log" "os" "os/exec" "path/filepath" "runtime" + "github.com/github/codeql-go/extractor/util" + "github.com/github/codeql-go/extractor/autobuilder" ) func main() { // check if a build command has successfully extracted something autobuilder.CheckExtracted = true - if autobuilder.Autobuild() { + scriptSuccess, _ := autobuilder.Autobuild() + if scriptSuccess { return } diff --git a/go/extractor/extractor.go b/go/extractor/extractor.go index d7759326d57..090bd486c3a 100644 --- a/go/extractor/extractor.go +++ b/go/extractor/extractor.go @@ -23,6 +23,7 @@ import ( "github.com/github/codeql-go/extractor/dbscheme" "github.com/github/codeql-go/extractor/diagnostics" "github.com/github/codeql-go/extractor/srcarchive" + "github.com/github/codeql-go/extractor/toolchain" "github.com/github/codeql-go/extractor/trap" "github.com/github/codeql-go/extractor/util" "golang.org/x/tools/go/packages" @@ -115,14 +116,14 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { log.Println("Done extracting universe scope.") // a map of package path to source directory and module root directory - pkgInfos := make(map[string]util.PkgInfo) + pkgInfos := make(map[string]toolchain.PkgInfo) // root directories of packages that we want to extract wantedRoots := make(map[string]bool) if os.Getenv("CODEQL_EXTRACTOR_GO_FAST_PACKAGE_INFO") != "false" { log.Printf("Running go list to resolve package and module directories.") // get all packages information - pkgInfos, err = util.GetPkgsInfo(patterns, true, modFlags...) + pkgInfos, err = toolchain.GetPkgsInfo(patterns, true, modFlags...) if err != nil { log.Fatalf("Error getting dependency package or module directories: %v.", err) } @@ -136,7 +137,7 @@ func ExtractWithFlags(buildFlags []string, patterns []string) error { log.Printf("Processing package %s.", pkg.PkgPath) if _, ok := pkgInfos[pkg.PkgPath]; !ok { - pkgInfos[pkg.PkgPath] = util.GetPkgInfo(pkg.PkgPath, modFlags...) + pkgInfos[pkg.PkgPath] = toolchain.GetPkgInfo(pkg.PkgPath, modFlags...) } log.Printf("Extracting types for package %s.", pkg.PkgPath) diff --git a/go/extractor/toolchain/toolchain.go b/go/extractor/toolchain/toolchain.go index 01befa4384e..89ad1e35ecc 100644 --- a/go/extractor/toolchain/toolchain.go +++ b/go/extractor/toolchain/toolchain.go @@ -2,6 +2,8 @@ package toolchain import ( "bufio" + "encoding/json" + "io" "log" "os" "os/exec" @@ -177,3 +179,151 @@ func Version() *exec.Cmd { version := exec.Command("go", "version") return version } + +// Runs `go list` with `format`, `patterns`, and `flags` for the respective inputs. +func RunList(format string, patterns []string, flags ...string) (string, error) { + return RunListWithEnv(format, patterns, nil, flags...) +} + +// Runs `go list`. +func RunListWithEnv(format string, patterns []string, additionalEnv []string, flags ...string) (string, error) { + args := append([]string{"list", "-e", "-f", format}, flags...) + args = append(args, patterns...) + cmd := exec.Command("go", args...) + cmd.Env = append(os.Environ(), additionalEnv...) + out, err := cmd.Output() + + if err != nil { + if exitErr, ok := err.(*exec.ExitError); ok { + log.Printf("Warning: go list command failed, output below:\nstdout:\n%s\nstderr:\n%s\n", out, exitErr.Stderr) + } else { + log.Printf("Warning: Failed to run go list: %s", err.Error()) + } + return "", err + } + + return strings.TrimSpace(string(out)), nil +} + +// PkgInfo holds package directory and module directory (if any) for a package +type PkgInfo struct { + PkgDir string // the directory directly containing source code of this package + ModDir string // the module directory containing this package, empty if not a module +} + +// GetPkgsInfo gets the absolute module and package root directories for the packages matched by the +// patterns `patterns`. It passes to `go list` the flags specified by `flags`. If `includingDeps` +// is true, all dependencies will also be included. +func GetPkgsInfo(patterns []string, includingDeps bool, flags ...string) (map[string]PkgInfo, error) { + // enable module mode so that we can find a module root if it exists, even if go module support is + // disabled by a build + if includingDeps { + // the flag `-deps` causes all dependencies to be retrieved + flags = append(flags, "-deps") + } + + // using -json overrides -f format + output, err := RunList("", patterns, append(flags, "-json")...) + if err != nil { + return nil, err + } + + // the output of `go list -json` is a stream of json object + type goListPkgInfo struct { + ImportPath string + Dir string + Module *struct { + Dir string + } + } + pkgInfoMapping := make(map[string]PkgInfo) + streamDecoder := json.NewDecoder(strings.NewReader(output)) + for { + var pkgInfo goListPkgInfo + decErr := streamDecoder.Decode(&pkgInfo) + if decErr == io.EOF { + break + } + if decErr != nil { + log.Printf("Error decoding output of go list -json: %s", err.Error()) + return nil, decErr + } + pkgAbsDir, err := filepath.Abs(pkgInfo.Dir) + if err != nil { + log.Printf("Unable to make package dir %s absolute: %s", pkgInfo.Dir, err.Error()) + } + var modAbsDir string + if pkgInfo.Module != nil { + modAbsDir, err = filepath.Abs(pkgInfo.Module.Dir) + if err != nil { + log.Printf("Unable to make module dir %s absolute: %s", pkgInfo.Module.Dir, err.Error()) + } + } + pkgInfoMapping[pkgInfo.ImportPath] = PkgInfo{ + PkgDir: pkgAbsDir, + ModDir: modAbsDir, + } + } + return pkgInfoMapping, nil +} + +// GetPkgInfo fills the package info structure for the specified package path. +// It passes the `go list` the flags specified by `flags`. +func GetPkgInfo(pkgpath string, flags ...string) PkgInfo { + return PkgInfo{ + PkgDir: GetPkgDir(pkgpath, flags...), + ModDir: GetModDir(pkgpath, flags...), + } +} + +// GetModDir gets the absolute directory of the module containing the package with path +// `pkgpath`. It passes the `go list` the flags specified by `flags`. +func GetModDir(pkgpath string, flags ...string) string { + // enable module mode so that we can find a module root if it exists, even if go module support is + // disabled by a build + mod, err := RunListWithEnv("{{.Module}}", []string{pkgpath}, []string{"GO111MODULE=on"}, flags...) + if err != nil || mod == "" { + // if the command errors or modules aren't being used, return the empty string + return "" + } + + modDir, err := RunListWithEnv("{{.Module.Dir}}", []string{pkgpath}, []string{"GO111MODULE=on"}, flags...) + if err != nil { + return "" + } + + abs, err := filepath.Abs(modDir) + if err != nil { + log.Printf("Warning: unable to make %s absolute: %s", modDir, err.Error()) + return "" + } + return abs +} + +// GetPkgDir gets the absolute directory containing the package with path `pkgpath`. It passes the +// `go list` command the flags specified by `flags`. +func GetPkgDir(pkgpath string, flags ...string) string { + pkgDir, err := RunList("{{.Dir}}", []string{pkgpath}, flags...) + if err != nil { + return "" + } + + abs, err := filepath.Abs(pkgDir) + if err != nil { + log.Printf("Warning: unable to make %s absolute: %s", pkgDir, err.Error()) + return "" + } + return abs +} + +// DepErrors checks there are any errors resolving dependencies for `pkgpath`. It passes the `go +// list` command the flags specified by `flags`. +func DepErrors(pkgpath string, flags ...string) bool { + out, err := RunList("{{if .DepsErrors}}error{{else}}{{end}}", []string{pkgpath}, flags...) + if err != nil { + // if go list failed, assume dependencies are broken + return false + } + + return out != "" +} diff --git a/go/extractor/util/util.go b/go/extractor/util/util.go index 2ae6a2b0cd2..efde5988193 100644 --- a/go/extractor/util/util.go +++ b/go/extractor/util/util.go @@ -1,9 +1,7 @@ package util import ( - "encoding/json" "errors" - "io" "io/fs" "log" "net/url" @@ -35,154 +33,6 @@ func Getenv(key string, aliases ...string) string { return "" } -// runGoList is a helper function for running go list with format `format` and flags `flags` on -// package `pkgpath`. -func runGoList(format string, patterns []string, flags ...string) (string, error) { - return runGoListWithEnv(format, patterns, nil, flags...) -} - -func runGoListWithEnv(format string, patterns []string, additionalEnv []string, flags ...string) (string, error) { - args := append([]string{"list", "-e", "-f", format}, flags...) - args = append(args, patterns...) - cmd := exec.Command("go", args...) - cmd.Env = append(os.Environ(), additionalEnv...) - out, err := cmd.Output() - - if err != nil { - if err, ok := err.(*exec.ExitError); ok { - log.Printf("Warning: go list command failed, output below:\nstdout:\n%s\nstderr:\n%s\n", out, err.Stderr) - } else { - log.Printf("Warning: Failed to run go list: %s", err.Error()) - } - return "", err - } - - return strings.TrimSpace(string(out)), nil -} - -// PkgInfo holds package directory and module directory (if any) for a package -type PkgInfo struct { - PkgDir string // the directory directly containing source code of this package - ModDir string // the module directory containing this package, empty if not a module -} - -// GetPkgsInfo gets the absolute module and package root directories for the packages matched by the -// patterns `patterns`. It passes to `go list` the flags specified by `flags`. If `includingDeps` -// is true, all dependencies will also be included. -func GetPkgsInfo(patterns []string, includingDeps bool, flags ...string) (map[string]PkgInfo, error) { - // enable module mode so that we can find a module root if it exists, even if go module support is - // disabled by a build - if includingDeps { - // the flag `-deps` causes all dependencies to be retrieved - flags = append(flags, "-deps") - } - - // using -json overrides -f format - output, err := runGoList("", patterns, append(flags, "-json")...) - if err != nil { - return nil, err - } - - // the output of `go list -json` is a stream of json object - type goListPkgInfo struct { - ImportPath string - Dir string - Module *struct { - Dir string - } - } - pkgInfoMapping := make(map[string]PkgInfo) - streamDecoder := json.NewDecoder(strings.NewReader(output)) - for { - var pkgInfo goListPkgInfo - decErr := streamDecoder.Decode(&pkgInfo) - if decErr == io.EOF { - break - } - if decErr != nil { - log.Printf("Error decoding output of go list -json: %s", err.Error()) - return nil, decErr - } - pkgAbsDir, err := filepath.Abs(pkgInfo.Dir) - if err != nil { - log.Printf("Unable to make package dir %s absolute: %s", pkgInfo.Dir, err.Error()) - } - var modAbsDir string - if pkgInfo.Module != nil { - modAbsDir, err = filepath.Abs(pkgInfo.Module.Dir) - if err != nil { - log.Printf("Unable to make module dir %s absolute: %s", pkgInfo.Module.Dir, err.Error()) - } - } - pkgInfoMapping[pkgInfo.ImportPath] = PkgInfo{ - PkgDir: pkgAbsDir, - ModDir: modAbsDir, - } - } - return pkgInfoMapping, nil -} - -// GetPkgInfo fills the package info structure for the specified package path. -// It passes the `go list` the flags specified by `flags`. -func GetPkgInfo(pkgpath string, flags ...string) PkgInfo { - return PkgInfo{ - PkgDir: GetPkgDir(pkgpath, flags...), - ModDir: GetModDir(pkgpath, flags...), - } -} - -// GetModDir gets the absolute directory of the module containing the package with path -// `pkgpath`. It passes the `go list` the flags specified by `flags`. -func GetModDir(pkgpath string, flags ...string) string { - // enable module mode so that we can find a module root if it exists, even if go module support is - // disabled by a build - mod, err := runGoListWithEnv("{{.Module}}", []string{pkgpath}, []string{"GO111MODULE=on"}, flags...) - if err != nil || mod == "" { - // if the command errors or modules aren't being used, return the empty string - return "" - } - - modDir, err := runGoListWithEnv("{{.Module.Dir}}", []string{pkgpath}, []string{"GO111MODULE=on"}, flags...) - if err != nil { - return "" - } - - abs, err := filepath.Abs(modDir) - if err != nil { - log.Printf("Warning: unable to make %s absolute: %s", modDir, err.Error()) - return "" - } - return abs -} - -// GetPkgDir gets the absolute directory containing the package with path `pkgpath`. It passes the -// `go list` command the flags specified by `flags`. -func GetPkgDir(pkgpath string, flags ...string) string { - pkgDir, err := runGoList("{{.Dir}}", []string{pkgpath}, flags...) - if err != nil { - return "" - } - - abs, err := filepath.Abs(pkgDir) - if err != nil { - log.Printf("Warning: unable to make %s absolute: %s", pkgDir, err.Error()) - return "" - } - return abs -} - -// DepErrors checks there are any errors resolving dependencies for `pkgpath`. It passes the `go -// list` command the flags specified by `flags`. -func DepErrors(pkgpath string, flags ...string) bool { - out, err := runGoList("{{if .DepsErrors}}error{{else}}{{end}}", []string{pkgpath}, flags...) - if err != nil { - // if go list failed, assume dependencies are broken - return false - } - - return out != "" -} - // FileExists tests whether the file at `filename` exists and is not a directory. func FileExists(filename string) bool { info, err := os.Stat(filename) diff --git a/go/integration-tests-lib/go_integration_test.py b/go/integration-tests-lib/go_integration_test.py index 8e4cf6c102c..2c26f513ba1 100644 --- a/go/integration-tests-lib/go_integration_test.py +++ b/go/integration-tests-lib/go_integration_test.py @@ -1,15 +1,22 @@ import os from create_database_utils import * from diagnostics_test_utils import * +from resolve_environment_utils import * -def go_integration_test(source = "src", db = "db", runFunction = runSuccessfully): +def go_integration_test(toolchain=None, source = "src", db = "db", runFunction = runSuccessfully): # Set up a GOPATH relative to this test's root directory; # we set os.environ instead of using extra_env because we # need it to be set for the call to "go clean -modcache" later goPath = os.path.join(os.path.abspath(os.getcwd()), ".go") os.environ['GOPATH'] = goPath + extra_env = None + + if toolchain != None: + extra_env = { 'GOTOOLCHAIN': toolchain } + try: + run_codeql_resolve_build_environment(lang="go", source=source, extra_env=extra_env) run_codeql_database_create([], lang="go", source=source, db=db, runFunction=runFunction) check_diagnostics() diff --git a/go/ql/consistency-queries/CHANGELOG.md b/go/ql/consistency-queries/CHANGELOG.md index ad4781e2cbd..4f4b3189bb4 100644 --- a/go/ql/consistency-queries/CHANGELOG.md +++ b/go/ql/consistency-queries/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.15 + +No user-facing changes. + ## 0.0.14 No user-facing changes. diff --git a/go/ql/consistency-queries/change-notes/released/0.0.15.md b/go/ql/consistency-queries/change-notes/released/0.0.15.md new file mode 100644 index 00000000000..7af9c05f23f --- /dev/null +++ b/go/ql/consistency-queries/change-notes/released/0.0.15.md @@ -0,0 +1,3 @@ +## 0.0.15 + +No user-facing changes. diff --git a/go/ql/consistency-queries/codeql-pack.release.yml b/go/ql/consistency-queries/codeql-pack.release.yml index ca29e45d0a6..dff35216fc6 100644 --- a/go/ql/consistency-queries/codeql-pack.release.yml +++ b/go/ql/consistency-queries/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.14 +lastReleaseVersion: 0.0.15 diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml index f56add92e15..a8412fa944e 100644 --- a/go/ql/consistency-queries/qlpack.yml +++ b/go/ql/consistency-queries/qlpack.yml @@ -1,5 +1,5 @@ name: codeql-go-consistency-queries -version: 0.0.15-dev +version: 0.0.16-dev groups: - go - queries diff --git a/go/ql/docs/experimental.md b/go/ql/docs/experimental.md index bef435d6674..ea5ed312fb5 100644 --- a/go/ql/docs/experimental.md +++ b/go/ql/docs/experimental.md @@ -21,7 +21,7 @@ Experimental queries and libraries may not be actively maintained as the standar 3. **Formatting** - - The queries and libraries must be [autoformatted](https://codeql.github.com/docs/codeql-for-visual-studio-code/about-codeql-for-visual-studio-code/). + - The queries and libraries must be [autoformatted](https://docs.github.com/en/code-security/codeql-for-vs-code/). 4. **Compilation** diff --git a/go/ql/integration-tests/all-platforms/go/bazel-sample-1/build-environment.expected b/go/ql/integration-tests/all-platforms/go/bazel-sample-1/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/bazel-sample-1/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/bazel-sample-2/build-environment.expected b/go/ql/integration-tests/all-platforms/go/bazel-sample-2/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/bazel-sample-2/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/build-constraints-exclude-all-go-files/build-environment.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/build-constraints-exclude-all-go-files/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/build-constraints-exclude-all-go-files/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/build-environment.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/invalid-toolchain-version/build-environment.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/invalid-toolchain-version/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/invalid-toolchain-version/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/newer-go-version-needed/build-environment.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/newer-go-version-needed/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/newer-go-version-needed/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/no-go-files-found/build-environment.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/no-go-files-found/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/no-go-files-found/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-with-go-mod/build-environment.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-with-go-mod/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-with-go-mod/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-without-go-mod/build-environment.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-without-go-mod/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-without-go-mod/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/build-environment.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/go-get-without-modules-sample/build-environment.expected b/go/ql/integration-tests/all-platforms/go/go-get-without-modules-sample/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-get-without-modules-sample/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-sample/build-environment.expected b/go/ql/integration-tests/all-platforms/go/go-mod-sample/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-sample/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/build-environment.expected b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/go-version-bump/build-environment.expected b/go/ql/integration-tests/all-platforms/go/go-version-bump/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-version-bump/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/make-sample/build-environment.expected b/go/ql/integration-tests/all-platforms/go/make-sample/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/make-sample/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/mixed-layout/build-environment.expected b/go/ql/integration-tests/all-platforms/go/mixed-layout/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/mixed-layout/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/ninja-sample/build-environment.expected b/go/ql/integration-tests/all-platforms/go/ninja-sample/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/ninja-sample/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/build-environment.expected b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/build-environment.expected new file mode 100644 index 00000000000..0ef0c180822 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/build-environment.expected @@ -0,0 +1,7 @@ +{ + "configuration" : { + "go" : { + "version" : "1.22" + } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/diagnostics.expected b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/diagnostics.expected new file mode 100644 index 00000000000..b64c1397938 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/diagnostics.expected @@ -0,0 +1,31 @@ +{ + "location": { + "file": "go.mod" + }, + "markdownMessage": "As of Go 1.21, toolchain versions [must use the 1.N.P syntax](https://go.dev/doc/toolchain#version).\n\n`1.22` in `go.mod` does not match this syntax and there is no additional `toolchain` directive, which may cause some `go` commands to fail.", + "severity": "warning", + "source": { + "extractorName": "go", + "id": "go/autobuilder/invalid-go-toolchain-version", + "name": "Invalid Go toolchain version" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "markdownMessage": "A single `go.mod` file was found.\n\n`go.mod`", + "severity": "note", + "source": { + "extractorName": "go", + "id": "go/autobuilder/single-root-go-mod-found", + "name": "A single `go.mod` file was found in the root" + }, + "visibility": { + "cliSummaryTable": false, + "statusPage": false, + "telemetry": true + } +} diff --git a/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/src/go.mod b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/src/go.mod new file mode 100644 index 00000000000..881685330d0 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/src/go.mod @@ -0,0 +1,3 @@ +go 1.22 + +module main diff --git a/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/src/main.go b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/src/main.go new file mode 100644 index 00000000000..37148d1f7af --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/src/main.go @@ -0,0 +1,3 @@ +package main + +func Main() {} diff --git a/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/test.py b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/test.py new file mode 100644 index 00000000000..87741c37088 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/test.py @@ -0,0 +1,3 @@ +from go_integration_test import * + +go_integration_test(toolchain="go1.21.0") diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/build-environment.expected b/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/build-environment.expected b/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/build-environment.expected b/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/build-environment.expected b/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/build-environment.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/build-environment.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/build-environment.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/build-environment.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/linux-only/go/dep-sample/build-environment.expected b/go/ql/integration-tests/linux-only/go/dep-sample/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/linux-only/go/dep-sample/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/integration-tests/linux-only/go/glide-sample/build-environment.expected b/go/ql/integration-tests/linux-only/go/glide-sample/build-environment.expected new file mode 100644 index 00000000000..0b225ce0085 --- /dev/null +++ b/go/ql/integration-tests/linux-only/go/glide-sample/build-environment.expected @@ -0,0 +1,5 @@ +{ + "configuration" : { + "go" : { } + } +} diff --git a/go/ql/lib/CHANGELOG.md b/go/ql/lib/CHANGELOG.md index de0b40c8648..48fa34080d6 100644 --- a/go/ql/lib/CHANGELOG.md +++ b/go/ql/lib/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.8.1 + +### Minor Analysis Improvements + +* Fixed a bug that stopped built-in functions from being referenced using the predicate `hasQualifiedName` because technically they do not belong to any package. Now you can use the empty string as the package, e.g. `f.hasQualifiedName("", "len")`. +* Fixed a bug that stopped data flow models for built-in functions from having any effect because the package "" was not parsed correctly. +* Fixed a bug that stopped data flow from being followed through variadic arguments to built-in functions or to functions called using a variable. + ## 0.8.0 ### Breaking Changes diff --git a/go/ql/lib/change-notes/2024-05-09-model-append-copy-max-min.md b/go/ql/lib/change-notes/2024-05-09-model-append-copy-max-min.md new file mode 100644 index 00000000000..3d7e2e9e1a6 --- /dev/null +++ b/go/ql/lib/change-notes/2024-05-09-model-append-copy-max-min.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Converted the models for the built-in functions `append`, `copy`, `max` and `min` to value flow and Models-as-Data. diff --git a/go/ql/lib/change-notes/2024-05-16-incorrect-integer-conversion-defined-types.md b/go/ql/lib/change-notes/2024-05-16-incorrect-integer-conversion-defined-types.md new file mode 100644 index 00000000000..c3343d6e5f0 --- /dev/null +++ b/go/ql/lib/change-notes/2024-05-16-incorrect-integer-conversion-defined-types.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* A bug has been fixed which meant that the query `go/incorrect-integer-conversion` did not consider type assertions and type switches which use a defined type whose underlying type is an integer type. This may lead to fewer false positive alerts. diff --git a/go/ql/lib/change-notes/2024-05-16-read-store-steps-named-types.md b/go/ql/lib/change-notes/2024-05-16-read-store-steps-named-types.md new file mode 100644 index 00000000000..037210c9159 --- /dev/null +++ b/go/ql/lib/change-notes/2024-05-16-read-store-steps-named-types.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* A bug has been fixed which meant flow was not followed through some ranged for loops. This may lead to more alerts being found. diff --git a/go/ql/lib/change-notes/released/0.8.1.md b/go/ql/lib/change-notes/released/0.8.1.md new file mode 100644 index 00000000000..075094e29c8 --- /dev/null +++ b/go/ql/lib/change-notes/released/0.8.1.md @@ -0,0 +1,7 @@ +## 0.8.1 + +### Minor Analysis Improvements + +* Fixed a bug that stopped built-in functions from being referenced using the predicate `hasQualifiedName` because technically they do not belong to any package. Now you can use the empty string as the package, e.g. `f.hasQualifiedName("", "len")`. +* Fixed a bug that stopped data flow models for built-in functions from having any effect because the package "" was not parsed correctly. +* Fixed a bug that stopped data flow from being followed through variadic arguments to built-in functions or to functions called using a variable. diff --git a/go/ql/lib/codeql-pack.release.yml b/go/ql/lib/codeql-pack.release.yml index 37eab3197dc..2f693f95ba6 100644 --- a/go/ql/lib/codeql-pack.release.yml +++ b/go/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.8.0 +lastReleaseVersion: 0.8.1 diff --git a/go/ql/lib/ext/builtin.model.yml b/go/ql/lib/ext/builtin.model.yml index f4e7a4e5348..37002f037ab 100644 --- a/go/ql/lib/ext/builtin.model.yml +++ b/go/ql/lib/ext/builtin.model.yml @@ -4,4 +4,7 @@ extensions: extensible: summaryModel data: - ["", "", False, "append", "", "", "Argument[0].ArrayElement", "ReturnValue.ArrayElement", "value", "manual"] - - ["", "", False, "append", "", "", "Argument[1]", "ReturnValue.ArrayElement", "value", "manual"] \ No newline at end of file + - ["", "", False, "append", "", "", "Argument[1].ArrayElement", "ReturnValue.ArrayElement", "value", "manual"] + - ["", "", False, "copy", "", "", "Argument[1].ArrayElement", "Argument[0].ArrayElement", "value", "manual"] + - ["", "", False, "max", "", "", "Argument[0..1000]", "ReturnValue", "value", "manual"] + - ["", "", False, "min", "", "", "Argument[0..1000]", "ReturnValue", "value", "manual"] diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml index 53780e3ecee..ddb37bd4a3b 100644 --- a/go/ql/lib/qlpack.yml +++ b/go/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-all -version: 0.8.1-dev +version: 0.8.2-dev groups: go dbscheme: go.dbscheme extractor: go diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 3f2b394d775..d45f4142427 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -103,7 +103,11 @@ class Entity extends @object { */ pragma[nomagic] predicate hasQualifiedName(string pkg, string name) { - pkg = this.getPackage().getPath() and + ( + pkg = this.getPackage().getPath() + or + not exists(this.getPackage()) and pkg = "" + ) and name = this.getName() } diff --git a/go/ql/lib/semmle/go/dataflow/ExternalFlow.qll b/go/ql/lib/semmle/go/dataflow/ExternalFlow.qll index 26572e27a78..02049bf66c7 100644 --- a/go/ql/lib/semmle/go/dataflow/ExternalFlow.qll +++ b/go/ql/lib/semmle/go/dataflow/ExternalFlow.qll @@ -271,6 +271,8 @@ private string interpretPackage(string p) { then result = package(p.regexpCapture(r, 1), p.regexpCapture(r, 4)) else result = package(p, "") ) + or + p = "" and result = "" } /** Gets the source/sink/summary element corresponding to the supplied parameters. */ diff --git a/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll b/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll index e6a21a06dec..9f07693b7ea 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll @@ -14,38 +14,40 @@ private import semmle.go.dataflow.ExternalFlow * varargs. */ predicate containerStoreStep(Node node1, Node node2, Content c) { - c instanceof ArrayContent and - ( + exists(Type t | t = node2.getType().getUnderlyingType() | + c instanceof ArrayContent and ( - node2.getType() instanceof ArrayType or - node2.getType() instanceof SliceType - ) and - ( - exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), _, node1)) - or - node1 = node2.(ImplicitVarargsSlice).getCallNode().getAnImplicitVarargsArgument() - or - // To model data flow from array elements of the base of a `SliceNode` to - // the `SliceNode` itself, we consider there to be a read step with array - // content from the base to the corresponding `SliceElementNode` and then - // a store step with array content from the `SliceelementNode` to the - // `SliceNode` itself. - node2 = node1.(SliceElementNode).getSliceNode() + ( + t instanceof ArrayType or + t instanceof SliceType + ) and + ( + exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), _, node1)) + or + node1 = node2.(ImplicitVarargsSlice).getCallNode().getAnImplicitVarargsArgument() + or + // To model data flow from array elements of the base of a `SliceNode` to + // the `SliceNode` itself, we consider there to be a read step with array + // content from the base to the corresponding `SliceElementNode` and then + // a store step with array content from the `SliceelementNode` to the + // `SliceNode` itself. + node2 = node1.(SliceElementNode).getSliceNode() + ) ) + or + c instanceof CollectionContent and + exists(SendStmt send | + send.getChannel() = node2.(ExprNode).asExpr() and send.getValue() = node1.(ExprNode).asExpr() + ) + or + c instanceof MapKeyContent and + t instanceof MapType and + exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), node1, _)) + or + c instanceof MapValueContent and + t instanceof MapType and + exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), _, node1)) ) - or - c instanceof CollectionContent and - exists(SendStmt send | - send.getChannel() = node2.(ExprNode).asExpr() and send.getValue() = node1.(ExprNode).asExpr() - ) - or - c instanceof MapKeyContent and - node2.getType() instanceof MapType and - exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), node1, _)) - or - c instanceof MapValueContent and - node2.getType() instanceof MapType and - exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), _, node1)) } /** @@ -55,35 +57,37 @@ predicate containerStoreStep(Node node1, Node node2, Content c) { * as well as array iteration through enhanced `for` statements. */ predicate containerReadStep(Node node1, Node node2, Content c) { - c instanceof ArrayContent and - ( - node1.getType() instanceof ArrayType or - node1.getType() instanceof SliceType - ) and - ( - node2.(Read).readsElement(node1, _) + exists(Type t | t = node1.getType().getUnderlyingType() | + c instanceof ArrayContent and + ( + t instanceof ArrayType or + t instanceof SliceType + ) and + ( + node2.(Read).readsElement(node1, _) + or + node2.(RangeElementNode).getBase() = node1 + or + // To model data flow from array elements of the base of a `SliceNode` to + // the `SliceNode` itself, we consider there to be a read step with array + // content from the base to the corresponding `SliceElementNode` and then + // a store step with array content from the `SliceelementNode` to the + // `SliceNode` itself. + node2.(SliceElementNode).getSliceNode().getBase() = node1 + ) or - node2.(RangeElementNode).getBase() = node1 + c instanceof CollectionContent and + exists(UnaryOperationNode recv | recv = node2 | + node1 = recv.getOperand() and + recv.getOperator() = "<-" + ) or - // To model data flow from array elements of the base of a `SliceNode` to - // the `SliceNode` itself, we consider there to be a read step with array - // content from the base to the corresponding `SliceElementNode` and then - // a store step with array content from the `SliceelementNode` to the - // `SliceNode` itself. - node2.(SliceElementNode).getSliceNode().getBase() = node1 + c instanceof MapKeyContent and + t instanceof MapType and + node2.(RangeIndexNode).getBase() = node1 + or + c instanceof MapValueContent and + t instanceof MapType and + (node2.(Read).readsElement(node1, _) or node2.(RangeElementNode).getBase() = node1) ) - or - c instanceof CollectionContent and - exists(UnaryOperationNode recv | recv = node2 | - node1 = recv.getOperand() and - recv.getOperator() = "<-" - ) - or - c instanceof MapKeyContent and - node1.getType() instanceof MapType and - node2.(RangeIndexNode).getBase() = node1 - or - c instanceof MapValueContent and - node1.getType() instanceof MapType and - (node2.(Read).readsElement(node1, _) or node2.(RangeElementNode).getBase() = node1) } diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll index 6b230bc728f..947491b44bb 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll @@ -455,8 +455,8 @@ module Public { CallNode getCallNode() { result = call } override Type getType() { - exists(Function f | f = call.getTarget() | - result = f.getParameterType(f.getNumParameter() - 1) + exists(SignatureType t | t = call.getCall().getCalleeType() | + result = t.getParameterType(t.getNumParameter() - 1) ) } diff --git a/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll b/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll index 9c645bac1da..77457886e7e 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/TaintTrackingUtil.qll @@ -140,6 +140,10 @@ predicate referenceStep(DataFlow::Node pred, DataFlow::Node succ) { */ predicate elementWriteStep(DataFlow::Node pred, DataFlow::Node succ) { any(DataFlow::Write w).writesElement(succ.(DataFlow::PostUpdateNode).getPreUpdateNode(), _, pred) + or + FlowSummaryImpl::Private::Steps::summaryStoreStep(pred.(DataFlowPrivate::FlowSummaryNode) + .getSummaryNode(), any(DataFlow::Content c | c instanceof DataFlow::ArrayContent), + succ.(DataFlowPrivate::FlowSummaryNode).getSummaryNode()) } /** Holds if taint flows from `pred` to `succ` via a field read. */ diff --git a/go/ql/lib/semmle/go/frameworks/Stdlib.qll b/go/ql/lib/semmle/go/frameworks/Stdlib.qll index 19938ce73c2..44f3d16c11c 100644 --- a/go/ql/lib/semmle/go/frameworks/Stdlib.qll +++ b/go/ql/lib/semmle/go/frameworks/Stdlib.qll @@ -44,58 +44,6 @@ import semmle.go.frameworks.stdlib.TextTabwriter import semmle.go.frameworks.stdlib.TextTemplate import semmle.go.frameworks.stdlib.Unsafe -// These are modeled using TaintTracking::FunctionModel because they doesn't have real type signatures, -// and therefore currently have an InvalidType, not a SignatureType, which breaks Models as Data. -/** - * A model of the built-in `append` function, which propagates taint from its arguments to its - * result. - */ -private class AppendFunction extends TaintTracking::FunctionModel { - AppendFunction() { this = Builtin::append() } - - override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) { - inp.isParameter(_) and outp.isResult() - } -} - -/** - * A model of the built-in `copy` function, which propagates taint from its second argument - * to its first. - */ -private class CopyFunction extends TaintTracking::FunctionModel { - CopyFunction() { this = Builtin::copy() } - - override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) { - inp.isParameter(1) and outp.isParameter(0) - } -} - -/** - * A model of the built-in `min` function, which computes the smallest value of a fixed number of - * arguments of ordered types. There is at least one argument and "ordered types" includes e.g. - * strings, so we care about data flow through `min`. - */ -private class MinFunction extends DataFlow::FunctionModel { - MinFunction() { this = Builtin::min_() } - - override predicate hasDataFlow(FunctionInput inp, FunctionOutput outp) { - inp.isParameter(_) and outp.isResult() - } -} - -/** - * A model of the built-in `max` function, which computes the largest value of a fixed number of - * arguments of ordered types. There is at least one argument and "ordered types" includes e.g. - * strings, so we care about data flow through `max`. - */ -private class MaxFunction extends DataFlow::FunctionModel { - MaxFunction() { this = Builtin::max_() } - - override predicate hasDataFlow(FunctionInput inp, FunctionOutput outp) { - inp.isParameter(_) and outp.isResult() - } -} - /** Provides a class for modeling functions which convert strings into integers. */ module IntegerParser { /** diff --git a/go/ql/lib/semmle/go/security/IncorrectIntegerConversionLib.qll b/go/ql/lib/semmle/go/security/IncorrectIntegerConversionLib.qll index a87d72b32f6..68d874768ce 100644 --- a/go/ql/lib/semmle/go/security/IncorrectIntegerConversionLib.qll +++ b/go/ql/lib/semmle/go/security/IncorrectIntegerConversionLib.qll @@ -422,7 +422,7 @@ class TypeAssertionCheck extends DataFlow::ExprNode, FlowStateTransformer { TypeAssertionCheck() { exists(TypeAssertExpr tae | this = DataFlow::exprNode(tae.getExpr()) and - it = tae.getTypeExpr().getType() + it = tae.getTypeExpr().getType().getUnderlyingType() ) } @@ -442,7 +442,7 @@ class TypeSwitchVarFlowStateTransformer extends DataFlow::SsaNode, FlowStateTran TypeSwitchVarFlowStateTransformer() { exists(IR::TypeSwitchImplicitVariableInstruction insn, LocalVariable lv | insn.writes(lv, _) | this.getSourceVariable() = lv and - it = lv.getType() + it = lv.getType().getUnderlyingType() ) } @@ -572,7 +572,7 @@ private module ConversionWithoutBoundsCheckConfig implements DataFlow::StateConf * Tracks taint flow from an integer obtained from parsing a string that flows * to a type conversion to a smaller integer type, which could cause data loss. */ -module Flow = TaintTracking::GlobalWithState; +module Flow = DataFlow::GlobalWithState; /** Gets a string describing the size of the integer parsed. */ deprecated string describeBitSize(int bitSize, int intTypeBitSize) { diff --git a/go/ql/lib/upgrades/b37faf5d62cccefad9fcfd8f5c026620097b2355/upgrade.properties b/go/ql/lib/upgrades/b37faf5d62cccefad9fcfd8f5c026620097b2355/upgrade.properties index 71f3ee178e5..abef33214b3 100644 --- a/go/ql/lib/upgrades/b37faf5d62cccefad9fcfd8f5c026620097b2355/upgrade.properties +++ b/go/ql/lib/upgrades/b37faf5d62cccefad9fcfd8f5c026620097b2355/upgrade.properties @@ -1,4 +1,4 @@ description: Removed unused column from the `folders` and `files` relations compatibility: full -files.rel: reorder files.rel (int id, string name, string simple, string ext, int fromSource) id name -folders.rel: reorder folders.rel (int id, string name, string simple) id name +files.rel: reorder files.rel (@file id, string name, string simple, string ext, int fromSource) id name +folders.rel: reorder folders.rel (@folder id, string name, string simple) id name diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md index 0364ec221d4..e32dd2f671b 100644 --- a/go/ql/src/CHANGELOG.md +++ b/go/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.16 + +No user-facing changes. + ## 0.7.15 ### Minor Analysis Improvements diff --git a/go/ql/src/Security/CWE-020/MissingRegexpAnchor.qhelp b/go/ql/src/Security/CWE-020/MissingRegexpAnchor.qhelp index df238e10ee6..a947f93836b 100644 --- a/go/ql/src/Security/CWE-020/MissingRegexpAnchor.qhelp +++ b/go/ql/src/Security/CWE-020/MissingRegexpAnchor.qhelp @@ -45,6 +45,12 @@ one of the alternatives. As an example, the regular expression (^www\.example\.com)|(beta\.example\.com)/, so the second alternative beta\.example\.com is not anchored at the beginning of the string.

    + +

    +When checking for a domain name that may have subdomains, it is important to anchor the regular expression +or ensure that the domain name is prefixed with a dot. +

    + diff --git a/go/ql/src/Security/CWE-020/MissingRegexpAnchorGoodDomain.go b/go/ql/src/Security/CWE-020/MissingRegexpAnchorGoodDomain.go new file mode 100644 index 00000000000..6e5ec1b24dc --- /dev/null +++ b/go/ql/src/Security/CWE-020/MissingRegexpAnchorGoodDomain.go @@ -0,0 +1,20 @@ +package main + +import ( + "regexp" +) + +func checkSubdomain(domain String) { + // Checking strictly that the domain is `example.com`. + re := "^example\\.com$" + if matched, _ := regexp.MatchString(re, domain); matched { + // domain is good. + } + + // GOOD: Alternatively, check the domain is `example.com` or a subdomain of `example.com`. + re2 := "(^|\\.)example\\.com$" + + if matched, _ := regexp.MatchString(re2, domain); matched { + // domain is good. + } +} diff --git a/go/ql/src/change-notes/2024-05-14-incorrect-integer-conversion.md b/go/ql/src/change-notes/2024-05-14-incorrect-integer-conversion.md new file mode 100644 index 00000000000..b3403d092f6 --- /dev/null +++ b/go/ql/src/change-notes/2024-05-14-incorrect-integer-conversion.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The query `go/incorrect-integer-conversion` has now been restricted to only use flow through value-preserving steps. This reduces false positives, especially around type switches. diff --git a/go/ql/src/change-notes/released/0.7.16.md b/go/ql/src/change-notes/released/0.7.16.md new file mode 100644 index 00000000000..25e4d92a4a6 --- /dev/null +++ b/go/ql/src/change-notes/released/0.7.16.md @@ -0,0 +1,3 @@ +## 0.7.16 + +No user-facing changes. diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml index e56b7f6a7b1..1ba18ba0a0a 100644 --- a/go/ql/src/codeql-pack.release.yml +++ b/go/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.7.15 +lastReleaseVersion: 0.7.16 diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml index 121ba967472..ef00fe536a9 100644 --- a/go/ql/src/qlpack.yml +++ b/go/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-queries -version: 0.7.16-dev +version: 0.7.17-dev groups: - go - queries diff --git a/go/ql/test/experimental/CWE-090/LDAPInjection.expected b/go/ql/test/experimental/CWE-090/LDAPInjection.expected index 740121e5631..050f48cca80 100644 --- a/go/ql/test/experimental/CWE-090/LDAPInjection.expected +++ b/go/ql/test/experimental/CWE-090/LDAPInjection.expected @@ -1,18 +1,18 @@ edges -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:59:3:59:11 | untrusted | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:61:3:61:51 | ...+... | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:62:3:62:33 | slice literal | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:62:24:62:32 | untrusted | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:66:3:66:11 | untrusted | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:68:3:68:51 | ...+... | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:69:3:69:33 | slice literal | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:69:24:69:32 | untrusted | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:73:3:73:11 | untrusted | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:75:3:75:51 | ...+... | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:76:3:76:33 | slice literal | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:76:24:76:32 | untrusted | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:80:22:80:30 | untrusted | provenance | Src:MaD:671 | -| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:81:25:81:33 | untrusted | provenance | Src:MaD:671 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:59:3:59:11 | untrusted | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:61:3:61:51 | ...+... | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:62:3:62:33 | slice literal | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:62:24:62:32 | untrusted | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:66:3:66:11 | untrusted | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:68:3:68:51 | ...+... | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:69:3:69:33 | slice literal | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:69:24:69:32 | untrusted | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:73:3:73:11 | untrusted | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:75:3:75:51 | ...+... | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:76:3:76:33 | slice literal | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:76:24:76:32 | untrusted | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:80:22:80:30 | untrusted | provenance | Src:MaD:674 | +| LDAPInjection.go:57:15:57:29 | call to UserAgent | LDAPInjection.go:81:25:81:33 | untrusted | provenance | Src:MaD:674 | | LDAPInjection.go:62:3:62:33 | slice literal [array] | LDAPInjection.go:62:3:62:33 | slice literal | provenance | | | LDAPInjection.go:62:24:62:32 | untrusted | LDAPInjection.go:62:3:62:33 | slice literal [array] | provenance | | | LDAPInjection.go:69:3:69:33 | slice literal [array] | LDAPInjection.go:69:3:69:33 | slice literal | provenance | | diff --git a/go/ql/test/experimental/CWE-203/Timing.expected b/go/ql/test/experimental/CWE-203/Timing.expected index 714a8475dda..67abd2d9fdf 100644 --- a/go/ql/test/experimental/CWE-203/Timing.expected +++ b/go/ql/test/experimental/CWE-203/Timing.expected @@ -1,9 +1,9 @@ edges -| timing.go:15:18:15:27 | selection of Header | timing.go:15:18:15:45 | call to Get | provenance | MaD:652 | +| timing.go:15:18:15:27 | selection of Header | timing.go:15:18:15:45 | call to Get | provenance | MaD:655 | | timing.go:15:18:15:45 | call to Get | timing.go:17:31:17:42 | headerSecret | provenance | | -| timing.go:28:18:28:27 | selection of Header | timing.go:28:18:28:45 | call to Get | provenance | MaD:652 | +| timing.go:28:18:28:27 | selection of Header | timing.go:28:18:28:45 | call to Get | provenance | MaD:655 | | timing.go:28:18:28:45 | call to Get | timing.go:30:47:30:58 | headerSecret | provenance | | -| timing.go:41:18:41:27 | selection of Header | timing.go:41:18:41:45 | call to Get | provenance | MaD:652 | +| timing.go:41:18:41:27 | selection of Header | timing.go:41:18:41:45 | call to Get | provenance | MaD:655 | | timing.go:41:18:41:45 | call to Get | timing.go:42:25:42:36 | headerSecret | provenance | | nodes | timing.go:15:18:15:27 | selection of Header | semmle.label | selection of Header | diff --git a/go/ql/test/experimental/CWE-287/ImproperLdapAuth.expected b/go/ql/test/experimental/CWE-287/ImproperLdapAuth.expected index 0cc7cab4cfa..93ac9a34209 100644 --- a/go/ql/test/experimental/CWE-287/ImproperLdapAuth.expected +++ b/go/ql/test/experimental/CWE-287/ImproperLdapAuth.expected @@ -1,5 +1,5 @@ edges -| ImproperLdapAuth.go:18:18:18:24 | selection of URL | ImproperLdapAuth.go:18:18:18:32 | call to Query | provenance | MaD:732 | +| ImproperLdapAuth.go:18:18:18:24 | selection of URL | ImproperLdapAuth.go:18:18:18:32 | call to Query | provenance | MaD:735 | | ImproperLdapAuth.go:18:18:18:32 | call to Query | ImproperLdapAuth.go:28:23:28:34 | bindPassword | provenance | | | ImproperLdapAuth.go:87:18:87:19 | "" | ImproperLdapAuth.go:97:23:97:34 | bindPassword | provenance | | nodes diff --git a/go/ql/test/experimental/CWE-369/DivideByZero.expected b/go/ql/test/experimental/CWE-369/DivideByZero.expected index 871b794cb30..41317f62b42 100644 --- a/go/ql/test/experimental/CWE-369/DivideByZero.expected +++ b/go/ql/test/experimental/CWE-369/DivideByZero.expected @@ -1,24 +1,24 @@ edges -| DivideByZero.go:10:12:10:16 | selection of URL | DivideByZero.go:10:12:10:24 | call to Query | provenance | MaD:732 | +| DivideByZero.go:10:12:10:16 | selection of URL | DivideByZero.go:10:12:10:24 | call to Query | provenance | MaD:735 | | DivideByZero.go:10:12:10:24 | call to Query | DivideByZero.go:11:27:11:32 | param1 | provenance | | | DivideByZero.go:11:2:11:33 | ... := ...[0] | DivideByZero.go:12:16:12:20 | value | provenance | | | DivideByZero.go:11:27:11:32 | param1 | DivideByZero.go:11:2:11:33 | ... := ...[0] | provenance | | -| DivideByZero.go:17:12:17:16 | selection of URL | DivideByZero.go:17:12:17:24 | call to Query | provenance | MaD:732 | +| DivideByZero.go:17:12:17:16 | selection of URL | DivideByZero.go:17:12:17:24 | call to Query | provenance | MaD:735 | | DivideByZero.go:17:12:17:24 | call to Query | DivideByZero.go:18:11:18:24 | type conversion | provenance | | | DivideByZero.go:18:11:18:24 | type conversion | DivideByZero.go:19:16:19:20 | value | provenance | | -| DivideByZero.go:24:12:24:16 | selection of URL | DivideByZero.go:24:12:24:24 | call to Query | provenance | MaD:732 | +| DivideByZero.go:24:12:24:16 | selection of URL | DivideByZero.go:24:12:24:24 | call to Query | provenance | MaD:735 | | DivideByZero.go:24:12:24:24 | call to Query | DivideByZero.go:25:31:25:36 | param1 | provenance | | | DivideByZero.go:25:2:25:45 | ... := ...[0] | DivideByZero.go:26:16:26:20 | value | provenance | | | DivideByZero.go:25:31:25:36 | param1 | DivideByZero.go:25:2:25:45 | ... := ...[0] | provenance | | -| DivideByZero.go:31:12:31:16 | selection of URL | DivideByZero.go:31:12:31:24 | call to Query | provenance | MaD:732 | +| DivideByZero.go:31:12:31:16 | selection of URL | DivideByZero.go:31:12:31:24 | call to Query | provenance | MaD:735 | | DivideByZero.go:31:12:31:24 | call to Query | DivideByZero.go:32:33:32:38 | param1 | provenance | | | DivideByZero.go:32:2:32:43 | ... := ...[0] | DivideByZero.go:33:16:33:20 | value | provenance | | | DivideByZero.go:32:33:32:38 | param1 | DivideByZero.go:32:2:32:43 | ... := ...[0] | provenance | | -| DivideByZero.go:38:12:38:16 | selection of URL | DivideByZero.go:38:12:38:24 | call to Query | provenance | MaD:732 | +| DivideByZero.go:38:12:38:16 | selection of URL | DivideByZero.go:38:12:38:24 | call to Query | provenance | MaD:735 | | DivideByZero.go:38:12:38:24 | call to Query | DivideByZero.go:39:32:39:37 | param1 | provenance | | | DivideByZero.go:39:2:39:46 | ... := ...[0] | DivideByZero.go:40:16:40:20 | value | provenance | | | DivideByZero.go:39:32:39:37 | param1 | DivideByZero.go:39:2:39:46 | ... := ...[0] | provenance | | -| DivideByZero.go:54:12:54:16 | selection of URL | DivideByZero.go:54:12:54:24 | call to Query | provenance | MaD:732 | +| DivideByZero.go:54:12:54:16 | selection of URL | DivideByZero.go:54:12:54:24 | call to Query | provenance | MaD:735 | | DivideByZero.go:54:12:54:24 | call to Query | DivideByZero.go:55:11:55:24 | type conversion | provenance | | | DivideByZero.go:55:11:55:24 | type conversion | DivideByZero.go:57:17:57:21 | value | provenance | | nodes diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.expected b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.expected index ebdb7e467cf..c396fc4e9ba 100644 --- a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.expected +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.expected @@ -1,5 +1,5 @@ edges -| test.go:59:16:59:44 | call to FormValue | test.go:128:20:128:27 | definition of filename | provenance | Src:MaD:667 | +| test.go:59:16:59:44 | call to FormValue | test.go:128:20:128:27 | definition of filename | provenance | Src:MaD:670 | | test.go:60:15:60:26 | selection of Body | test.go:158:19:158:22 | definition of file | provenance | | | test.go:61:24:61:35 | selection of Body | test.go:169:28:169:31 | definition of file | provenance | | | test.go:62:13:62:24 | selection of Body | test.go:181:17:181:20 | definition of file | provenance | | @@ -34,18 +34,18 @@ edges | test.go:145:12:145:19 | call to Open | test.go:147:37:147:38 | rc | provenance | | | test.go:158:19:158:22 | definition of file | test.go:159:25:159:28 | file | provenance | | | test.go:159:2:159:29 | ... := ...[0] | test.go:160:48:160:52 | file1 | provenance | | -| test.go:159:25:159:28 | file | test.go:159:2:159:29 | ... := ...[0] | provenance | MaD:544 | +| test.go:159:25:159:28 | file | test.go:159:2:159:29 | ... := ...[0] | provenance | MaD:547 | | test.go:160:2:160:69 | ... := ...[0] | test.go:163:26:163:29 | file | provenance | | | test.go:160:32:160:53 | call to NewReader | test.go:160:2:160:69 | ... := ...[0] | provenance | | -| test.go:160:48:160:52 | file1 | test.go:160:32:160:53 | call to NewReader | provenance | MaD:40 | +| test.go:160:48:160:52 | file1 | test.go:160:32:160:53 | call to NewReader | provenance | MaD:43 | | test.go:163:3:163:36 | ... := ...[0] | test.go:164:36:164:51 | fileReaderCloser | provenance | | | test.go:163:26:163:29 | file | test.go:163:3:163:36 | ... := ...[0] | provenance | MaD:8 | | test.go:169:28:169:31 | definition of file | test.go:170:25:170:28 | file | provenance | | | test.go:170:2:170:29 | ... := ...[0] | test.go:171:57:171:61 | file2 | provenance | | -| test.go:170:25:170:28 | file | test.go:170:2:170:29 | ... := ...[0] | provenance | MaD:544 | +| test.go:170:25:170:28 | file | test.go:170:2:170:29 | ... := ...[0] | provenance | MaD:547 | | test.go:171:2:171:78 | ... := ...[0] | test.go:175:26:175:29 | file | provenance | | | test.go:171:41:171:62 | call to NewReader | test.go:171:2:171:78 | ... := ...[0] | provenance | | -| test.go:171:57:171:61 | file2 | test.go:171:41:171:62 | call to NewReader | provenance | MaD:40 | +| test.go:171:57:171:61 | file2 | test.go:171:41:171:62 | call to NewReader | provenance | MaD:43 | | test.go:175:26:175:29 | file | test.go:175:26:175:36 | call to Open | provenance | | | test.go:175:26:175:36 | call to Open | test.go:176:36:176:51 | fileReaderCloser | provenance | | | test.go:181:17:181:20 | definition of file | test.go:184:41:184:44 | file | provenance | | diff --git a/go/ql/test/experimental/CWE-74/DsnInjection.expected b/go/ql/test/experimental/CWE-74/DsnInjection.expected index fe3300c6dd4..1be313aa048 100644 --- a/go/ql/test/experimental/CWE-74/DsnInjection.expected +++ b/go/ql/test/experimental/CWE-74/DsnInjection.expected @@ -1,6 +1,6 @@ edges -| Dsn.go:47:10:47:30 | call to FormValue | Dsn.go:49:102:49:105 | name | provenance | Src:MaD:667 | -| Dsn.go:49:11:49:106 | []type{args} [array] | Dsn.go:49:11:49:106 | call to Sprintf | provenance | MaD:242 | +| Dsn.go:47:10:47:30 | call to FormValue | Dsn.go:49:102:49:105 | name | provenance | Src:MaD:670 | +| Dsn.go:49:11:49:106 | []type{args} [array] | Dsn.go:49:11:49:106 | call to Sprintf | provenance | MaD:245 | | Dsn.go:49:11:49:106 | call to Sprintf | Dsn.go:50:29:50:33 | dbDSN | provenance | | | Dsn.go:49:102:49:105 | name | Dsn.go:49:11:49:106 | []type{args} [array] | provenance | | | Dsn.go:49:102:49:105 | name | Dsn.go:49:11:49:106 | call to Sprintf | provenance | FunctionModel | diff --git a/go/ql/test/experimental/CWE-74/DsnInjectionLocal.expected b/go/ql/test/experimental/CWE-74/DsnInjectionLocal.expected index 45fe5766a70..37070877267 100644 --- a/go/ql/test/experimental/CWE-74/DsnInjectionLocal.expected +++ b/go/ql/test/experimental/CWE-74/DsnInjectionLocal.expected @@ -1,6 +1,6 @@ edges | Dsn.go:26:11:26:17 | selection of Args | Dsn.go:28:102:28:109 | index expression | provenance | | -| Dsn.go:28:11:28:110 | []type{args} [array] | Dsn.go:28:11:28:110 | call to Sprintf | provenance | MaD:242 | +| Dsn.go:28:11:28:110 | []type{args} [array] | Dsn.go:28:11:28:110 | call to Sprintf | provenance | MaD:245 | | Dsn.go:28:11:28:110 | call to Sprintf | Dsn.go:29:29:29:33 | dbDSN | provenance | | | Dsn.go:28:102:28:109 | index expression | Dsn.go:28:11:28:110 | []type{args} [array] | provenance | | | Dsn.go:28:102:28:109 | index expression | Dsn.go:28:11:28:110 | call to Sprintf | provenance | FunctionModel | @@ -12,7 +12,7 @@ edges | Dsn.go:63:9:63:11 | implicit dereference | Dsn.go:67:102:67:108 | selection of dsn | provenance | | | Dsn.go:63:19:63:25 | selection of Args | Dsn.go:63:19:63:29 | slice expression | provenance | | | Dsn.go:63:19:63:29 | slice expression | Dsn.go:63:9:63:11 | implicit dereference | provenance | FunctionModel | -| Dsn.go:67:11:67:109 | []type{args} [array] | Dsn.go:67:11:67:109 | call to Sprintf | provenance | MaD:242 | +| Dsn.go:67:11:67:109 | []type{args} [array] | Dsn.go:67:11:67:109 | call to Sprintf | provenance | MaD:245 | | Dsn.go:67:11:67:109 | call to Sprintf | Dsn.go:68:29:68:33 | dbDSN | provenance | | | Dsn.go:67:102:67:104 | cfg [pointer] | Dsn.go:67:102:67:104 | implicit dereference | provenance | | | Dsn.go:67:102:67:104 | implicit dereference | Dsn.go:63:9:63:11 | implicit dereference | provenance | | diff --git a/go/ql/test/experimental/CWE-79/HTMLTemplateEscapingPassthrough.expected b/go/ql/test/experimental/CWE-79/HTMLTemplateEscapingPassthrough.expected index b99e5cd5875..bef600d1887 100644 --- a/go/ql/test/experimental/CWE-79/HTMLTemplateEscapingPassthrough.expected +++ b/go/ql/test/experimental/CWE-79/HTMLTemplateEscapingPassthrough.expected @@ -1,28 +1,28 @@ edges | HTMLTemplateEscapingPassthrough.go:29:12:29:41 | type conversion | HTMLTemplateEscapingPassthrough.go:30:39:30:39 | a | provenance | | -| HTMLTemplateEscapingPassthrough.go:29:26:29:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:29:12:29:41 | type conversion | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:29:26:29:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:29:12:29:41 | type conversion | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:35:9:35:38 | type conversion | HTMLTemplateEscapingPassthrough.go:36:40:36:40 | a | provenance | | -| HTMLTemplateEscapingPassthrough.go:35:23:35:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:35:9:35:38 | type conversion | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:35:23:35:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:35:9:35:38 | type conversion | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:40:9:40:34 | type conversion | HTMLTemplateEscapingPassthrough.go:41:40:41:40 | a | provenance | | -| HTMLTemplateEscapingPassthrough.go:40:19:40:33 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:40:9:40:34 | type conversion | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:40:19:40:33 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:40:9:40:34 | type conversion | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:46:11:46:44 | type conversion | HTMLTemplateEscapingPassthrough.go:47:41:47:41 | c | provenance | | -| HTMLTemplateEscapingPassthrough.go:46:29:46:43 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:46:11:46:44 | type conversion | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:46:29:46:43 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:46:11:46:44 | type conversion | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:50:11:50:38 | type conversion | HTMLTemplateEscapingPassthrough.go:51:44:51:44 | d | provenance | | -| HTMLTemplateEscapingPassthrough.go:50:23:50:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:50:11:50:38 | type conversion | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:50:23:50:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:50:11:50:38 | type conversion | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:54:11:54:41 | type conversion | HTMLTemplateEscapingPassthrough.go:55:44:55:44 | e | provenance | | -| HTMLTemplateEscapingPassthrough.go:54:26:54:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:54:11:54:41 | type conversion | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:54:26:54:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:54:11:54:41 | type conversion | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:58:11:58:39 | type conversion | HTMLTemplateEscapingPassthrough.go:59:38:59:38 | b | provenance | | -| HTMLTemplateEscapingPassthrough.go:58:24:58:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:58:11:58:39 | type conversion | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:58:24:58:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:58:11:58:39 | type conversion | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:62:11:62:42 | type conversion | HTMLTemplateEscapingPassthrough.go:63:44:63:44 | f | provenance | | -| HTMLTemplateEscapingPassthrough.go:62:27:62:41 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:62:11:62:42 | type conversion | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:62:27:62:41 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:62:11:62:42 | type conversion | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:66:11:66:39 | type conversion | HTMLTemplateEscapingPassthrough.go:67:38:67:38 | g | provenance | | -| HTMLTemplateEscapingPassthrough.go:66:24:66:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:66:11:66:39 | type conversion | provenance | Src:MaD:671 | -| HTMLTemplateEscapingPassthrough.go:75:17:75:31 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:76:38:76:44 | escaped | provenance | Src:MaD:671 | -| HTMLTemplateEscapingPassthrough.go:81:10:81:24 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:84:38:84:40 | src | provenance | Src:MaD:671 | -| HTMLTemplateEscapingPassthrough.go:89:10:89:24 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:91:64:91:66 | src | provenance | Src:MaD:671 | +| HTMLTemplateEscapingPassthrough.go:66:24:66:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:66:11:66:39 | type conversion | provenance | Src:MaD:674 | +| HTMLTemplateEscapingPassthrough.go:75:17:75:31 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:76:38:76:44 | escaped | provenance | Src:MaD:674 | +| HTMLTemplateEscapingPassthrough.go:81:10:81:24 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:84:38:84:40 | src | provenance | Src:MaD:674 | +| HTMLTemplateEscapingPassthrough.go:89:10:89:24 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:91:64:91:66 | src | provenance | Src:MaD:674 | | HTMLTemplateEscapingPassthrough.go:91:16:91:77 | type conversion | HTMLTemplateEscapingPassthrough.go:92:38:92:46 | converted | provenance | | | HTMLTemplateEscapingPassthrough.go:91:38:91:67 | call to HTMLEscapeString | HTMLTemplateEscapingPassthrough.go:91:16:91:77 | type conversion | provenance | | -| HTMLTemplateEscapingPassthrough.go:91:64:91:66 | src | HTMLTemplateEscapingPassthrough.go:91:38:91:67 | call to HTMLEscapeString | provenance | MaD:519 | +| HTMLTemplateEscapingPassthrough.go:91:64:91:66 | src | HTMLTemplateEscapingPassthrough.go:91:38:91:67 | call to HTMLEscapeString | provenance | MaD:522 | nodes | HTMLTemplateEscapingPassthrough.go:29:12:29:41 | type conversion | semmle.label | type conversion | | HTMLTemplateEscapingPassthrough.go:29:26:29:40 | call to UserAgent | semmle.label | call to UserAgent | diff --git a/go/ql/test/experimental/CWE-918/SSRF.expected b/go/ql/test/experimental/CWE-918/SSRF.expected index 3eff488162e..0f286ee2760 100644 --- a/go/ql/test/experimental/CWE-918/SSRF.expected +++ b/go/ql/test/experimental/CWE-918/SSRF.expected @@ -1,44 +1,44 @@ edges -| builtin.go:19:12:19:34 | call to FormValue | builtin.go:22:21:22:62 | ...+... | provenance | Src:MaD:667 | -| builtin.go:83:21:83:31 | call to Referer | builtin.go:88:27:88:40 | untrustedInput | provenance | Src:MaD:670 | -| builtin.go:97:21:97:31 | call to Referer | builtin.go:101:36:101:49 | untrustedInput | provenance | Src:MaD:670 | -| builtin.go:111:21:111:31 | call to Referer | builtin.go:114:15:114:28 | untrustedInput | provenance | Src:MaD:670 | -| builtin.go:129:21:129:31 | call to Referer | builtin.go:132:38:132:51 | untrustedInput | provenance | Src:MaD:670 | +| builtin.go:19:12:19:34 | call to FormValue | builtin.go:22:21:22:62 | ...+... | provenance | Src:MaD:670 | +| builtin.go:83:21:83:31 | call to Referer | builtin.go:88:27:88:40 | untrustedInput | provenance | Src:MaD:673 | +| builtin.go:97:21:97:31 | call to Referer | builtin.go:101:36:101:49 | untrustedInput | provenance | Src:MaD:673 | +| builtin.go:111:21:111:31 | call to Referer | builtin.go:114:15:114:28 | untrustedInput | provenance | Src:MaD:673 | +| builtin.go:129:21:129:31 | call to Referer | builtin.go:132:38:132:51 | untrustedInput | provenance | Src:MaD:673 | | new-tests.go:26:26:26:30 | &... | new-tests.go:31:48:31:56 | selection of word | provenance | | | new-tests.go:26:26:26:30 | &... | new-tests.go:32:48:32:56 | selection of safe | provenance | | | new-tests.go:26:26:26:30 | &... | new-tests.go:35:49:35:57 | selection of word | provenance | | -| new-tests.go:31:11:31:57 | []type{args} [array] | new-tests.go:31:11:31:57 | call to Sprintf | provenance | MaD:242 | +| new-tests.go:31:11:31:57 | []type{args} [array] | new-tests.go:31:11:31:57 | call to Sprintf | provenance | MaD:245 | | new-tests.go:31:48:31:56 | selection of word | new-tests.go:31:11:31:57 | []type{args} [array] | provenance | | | new-tests.go:31:48:31:56 | selection of word | new-tests.go:31:11:31:57 | call to Sprintf | provenance | FunctionModel | -| new-tests.go:32:11:32:57 | []type{args} [array] | new-tests.go:32:11:32:57 | call to Sprintf | provenance | MaD:242 | +| new-tests.go:32:11:32:57 | []type{args} [array] | new-tests.go:32:11:32:57 | call to Sprintf | provenance | MaD:245 | | new-tests.go:32:48:32:56 | selection of safe | new-tests.go:32:11:32:57 | []type{args} [array] | provenance | | | new-tests.go:32:48:32:56 | selection of safe | new-tests.go:32:11:32:57 | call to Sprintf | provenance | FunctionModel | -| new-tests.go:35:12:35:58 | []type{args} [array] | new-tests.go:35:12:35:58 | call to Sprintf | provenance | MaD:242 | +| new-tests.go:35:12:35:58 | []type{args} [array] | new-tests.go:35:12:35:58 | call to Sprintf | provenance | MaD:245 | | new-tests.go:35:49:35:57 | selection of word | new-tests.go:35:12:35:58 | []type{args} [array] | provenance | | | new-tests.go:35:49:35:57 | selection of word | new-tests.go:35:12:35:58 | call to Sprintf | provenance | FunctionModel | | new-tests.go:39:18:39:30 | call to Param | new-tests.go:47:11:47:46 | ...+... | provenance | | | new-tests.go:49:18:49:30 | call to Query | new-tests.go:50:11:50:46 | ...+... | provenance | | | new-tests.go:62:2:62:39 | ... := ...[0] | new-tests.go:63:17:63:23 | reqBody | provenance | | -| new-tests.go:62:31:62:38 | selection of Body | new-tests.go:62:2:62:39 | ... := ...[0] | provenance | MaD:537 | -| new-tests.go:63:17:63:23 | reqBody | new-tests.go:63:26:63:30 | &... | provenance | MaD:181 | +| new-tests.go:62:31:62:38 | selection of Body | new-tests.go:62:2:62:39 | ... := ...[0] | provenance | MaD:540 | +| new-tests.go:63:17:63:23 | reqBody | new-tests.go:63:26:63:30 | &... | provenance | MaD:184 | | new-tests.go:63:26:63:30 | &... | new-tests.go:68:48:68:56 | selection of word | provenance | | | new-tests.go:63:26:63:30 | &... | new-tests.go:69:48:69:56 | selection of safe | provenance | | | new-tests.go:63:26:63:30 | &... | new-tests.go:74:49:74:57 | selection of word | provenance | | -| new-tests.go:68:11:68:57 | []type{args} [array] | new-tests.go:68:11:68:57 | call to Sprintf | provenance | MaD:242 | +| new-tests.go:68:11:68:57 | []type{args} [array] | new-tests.go:68:11:68:57 | call to Sprintf | provenance | MaD:245 | | new-tests.go:68:48:68:56 | selection of word | new-tests.go:68:11:68:57 | []type{args} [array] | provenance | | | new-tests.go:68:48:68:56 | selection of word | new-tests.go:68:11:68:57 | call to Sprintf | provenance | FunctionModel | -| new-tests.go:69:11:69:57 | []type{args} [array] | new-tests.go:69:11:69:57 | call to Sprintf | provenance | MaD:242 | +| new-tests.go:69:11:69:57 | []type{args} [array] | new-tests.go:69:11:69:57 | call to Sprintf | provenance | MaD:245 | | new-tests.go:69:48:69:56 | selection of safe | new-tests.go:69:11:69:57 | []type{args} [array] | provenance | | | new-tests.go:69:48:69:56 | selection of safe | new-tests.go:69:11:69:57 | call to Sprintf | provenance | FunctionModel | -| new-tests.go:74:12:74:58 | []type{args} [array] | new-tests.go:74:12:74:58 | call to Sprintf | provenance | MaD:242 | +| new-tests.go:74:12:74:58 | []type{args} [array] | new-tests.go:74:12:74:58 | call to Sprintf | provenance | MaD:245 | | new-tests.go:74:49:74:57 | selection of word | new-tests.go:74:12:74:58 | []type{args} [array] | provenance | | | new-tests.go:74:49:74:57 | selection of word | new-tests.go:74:12:74:58 | call to Sprintf | provenance | FunctionModel | -| new-tests.go:78:18:78:24 | selection of URL | new-tests.go:78:18:78:32 | call to Query | provenance | MaD:732 | -| new-tests.go:78:18:78:32 | call to Query | new-tests.go:78:18:78:46 | call to Get | provenance | MaD:739 | +| new-tests.go:78:18:78:24 | selection of URL | new-tests.go:78:18:78:32 | call to Query | provenance | MaD:735 | +| new-tests.go:78:18:78:32 | call to Query | new-tests.go:78:18:78:46 | call to Get | provenance | MaD:742 | | new-tests.go:78:18:78:46 | call to Get | new-tests.go:79:11:79:46 | ...+... | provenance | | | new-tests.go:81:18:81:67 | call to TrimPrefix | new-tests.go:82:11:82:46 | ...+... | provenance | | | new-tests.go:81:37:81:43 | selection of URL | new-tests.go:81:37:81:48 | selection of Path | provenance | | -| new-tests.go:81:37:81:48 | selection of Path | new-tests.go:81:18:81:67 | call to TrimPrefix | provenance | MaD:855 | +| new-tests.go:81:37:81:48 | selection of Path | new-tests.go:81:18:81:67 | call to TrimPrefix | provenance | MaD:858 | | new-tests.go:86:10:86:20 | call to Vars | new-tests.go:88:11:88:46 | ...+... | provenance | | | new-tests.go:95:18:95:45 | call to URLParam | new-tests.go:96:11:96:46 | ...+... | provenance | | nodes diff --git a/go/ql/test/library-tests/semmle/go/dataflow/DefaultTaintSanitizer/DefaultSanitizer.expected b/go/ql/test/library-tests/semmle/go/dataflow/DefaultTaintSanitizer/DefaultSanitizer.expected index e33725ab78a..cbf4158c838 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/DefaultTaintSanitizer/DefaultSanitizer.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/DefaultTaintSanitizer/DefaultSanitizer.expected @@ -1,6 +1,6 @@ edges | Builtin.go:6:2:6:2 | definition of b | Builtin.go:8:9:8:17 | type conversion | provenance | | -| Builtin.go:7:2:7:15 | selection of Body | Builtin.go:6:2:6:2 | definition of b | provenance | MaD:550 | +| Builtin.go:7:2:7:15 | selection of Body | Builtin.go:6:2:6:2 | definition of b | provenance | MaD:553 | nodes | Builtin.go:6:2:6:2 | definition of b | semmle.label | definition of b | | Builtin.go:7:2:7:15 | selection of Body | semmle.label | selection of Body | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/sinks.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/sinks.expected deleted file mode 100644 index 38dc380b55b..00000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/sinks.expected +++ /dev/null @@ -1,35 +0,0 @@ -invalidModelRow -#select -| test.go:47:10:47:12 | arg | qltest | -| test.go:48:2:48:13 | type assertion | qltest | -| test.go:61:10:61:15 | taint1 | qltest | -| test.go:64:10:64:15 | taint2 | qltest | -| test.go:68:10:68:15 | taint3 | qltest | -| test.go:72:10:72:15 | taint4 | qltest | -| test.go:75:10:75:15 | taint5 | qltest | -| test.go:79:10:79:15 | taint6 | qltest | -| test.go:82:10:82:15 | taint7 | qltest | -| test.go:85:10:85:18 | index expression | qltest | -| test.go:89:10:89:15 | taint9 | qltest | -| test.go:92:10:92:33 | call to GetElement | qltest | -| test.go:93:10:93:18 | <-... | qltest | -| test.go:97:10:97:16 | taint11 | qltest | -| test.go:100:10:100:32 | call to GetMapKey | qltest | -| test.go:102:11:102:11 | k | qltest | -| test.go:105:11:105:11 | k | qltest | -| test.go:110:10:110:16 | taint13 | qltest | -| test.go:113:10:113:20 | index expression | qltest | -| test.go:117:10:117:16 | taint15 | qltest | -| test.go:121:10:121:17 | index expression | qltest | -| test.go:126:10:126:16 | taint16 | qltest | -| test.go:130:10:130:13 | selection of F | qltest | -| test.go:133:10:133:17 | call to Get | qltest | -| test.go:137:10:137:17 | call to Get | qltest | -| test.go:142:10:142:17 | call to Get | qltest | -| test.go:146:10:146:14 | selection of F | qltest | -| test.go:149:10:149:32 | call to GetThroughPointer | qltest | -| test.go:153:10:153:32 | call to GetThroughPointer | qltest | -| test.go:158:10:158:32 | call to GetThroughPointer | qltest | -| test.go:164:17:164:20 | arg1 | qltest | -| test.go:164:23:164:26 | arg2 | qltest | -| test.go:164:29:164:32 | arg3 | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/srcs.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/srcs.expected deleted file mode 100644 index 2f1e3256778..00000000000 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/srcs.expected +++ /dev/null @@ -1,23 +0,0 @@ -invalidModelRow -#select -| test.go:10:6:10:8 | definition of arg | qltest-arg | -| test.go:38:8:38:15 | call to Src1 | qltest | -| test.go:39:8:39:15 | call to Src2 | qltest | -| test.go:39:8:39:15 | call to Src2 | qltest-w-subtypes | -| test.go:40:8:40:16 | call to Src2 | qltest-w-subtypes | -| test.go:41:2:41:21 | ... = ...[0] | qltest | -| test.go:41:2:41:21 | ... = ...[1] | qltest-w-subtypes | -| test.go:42:2:42:22 | ... = ...[1] | qltest-w-subtypes | -| test.go:58:9:58:16 | call to Src1 | qltest | -| test.go:91:46:91:53 | call to Src1 | qltest | -| test.go:95:35:95:42 | call to Src1 | qltest | -| test.go:99:42:99:49 | call to Src1 | qltest | -| test.go:124:8:124:15 | call to Src1 | qltest | -| test.go:129:9:129:16 | call to Src1 | qltest | -| test.go:132:15:132:22 | call to Src1 | qltest | -| test.go:136:9:136:16 | call to Src1 | qltest | -| test.go:140:9:140:16 | call to Src1 | qltest | -| test.go:145:24:145:31 | call to Src1 | qltest | -| test.go:148:17:148:24 | call to Src1 | qltest | -| test.go:152:24:152:31 | call to Src1 | qltest | -| test.go:156:24:156:31 | call to Src1 | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/completetest.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.expected similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/completetest.expected rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.expected diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/completetest.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.ext.yml similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/completetest.ext.yml rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.ext.yml diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/completetest.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.ql similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/completetest.ql rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.ql diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/go.mod b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/go.mod similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/go.mod rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/go.mod diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.expected new file mode 100644 index 00000000000..c4dfd6a4e3d --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.expected @@ -0,0 +1,44 @@ +invalidModelRow +#select +| test.go:47:10:47:12 | arg | qltest | +| test.go:48:2:48:13 | type assertion | qltest | +| test.go:61:10:61:15 | taint1 | qltest | +| test.go:64:10:64:15 | taint2 | qltest | +| test.go:68:10:68:15 | taint3 | qltest | +| test.go:72:10:72:15 | taint4 | qltest | +| test.go:75:10:75:15 | taint5 | qltest | +| test.go:79:10:79:15 | taint6 | qltest | +| test.go:82:10:82:15 | taint7 | qltest | +| test.go:85:10:85:18 | index expression | qltest | +| test.go:87:11:87:11 | x | qltest | +| test.go:90:11:90:11 | x | qltest | +| test.go:95:10:95:15 | taint9 | qltest | +| test.go:98:10:98:33 | call to GetElement | qltest | +| test.go:99:10:99:18 | <-... | qltest | +| test.go:101:11:101:11 | e | qltest | +| test.go:104:11:104:11 | e | qltest | +| test.go:109:10:109:16 | taint11 | qltest | +| test.go:112:10:112:32 | call to GetMapKey | qltest | +| test.go:114:11:114:11 | k | qltest | +| test.go:117:11:117:11 | k | qltest | +| test.go:120:11:120:11 | k | qltest | +| test.go:123:11:123:11 | k | qltest | +| test.go:128:10:128:16 | taint13 | qltest | +| test.go:131:10:131:20 | index expression | qltest | +| test.go:133:11:133:11 | v | qltest | +| test.go:136:11:136:11 | v | qltest | +| test.go:141:10:141:16 | taint15 | qltest | +| test.go:145:10:145:17 | index expression | qltest | +| test.go:151:10:151:18 | index expression | qltest | +| test.go:156:10:156:16 | taint16 | qltest | +| test.go:160:10:160:13 | selection of F | qltest | +| test.go:163:10:163:17 | call to Get | qltest | +| test.go:167:10:167:17 | call to Get | qltest | +| test.go:172:10:172:17 | call to Get | qltest | +| test.go:176:10:176:14 | selection of F | qltest | +| test.go:179:10:179:32 | call to GetThroughPointer | qltest | +| test.go:183:10:183:32 | call to GetThroughPointer | qltest | +| test.go:188:10:188:32 | call to GetThroughPointer | qltest | +| test.go:194:17:194:20 | arg1 | qltest | +| test.go:194:23:194:26 | arg2 | qltest | +| test.go:194:29:194:32 | arg3 | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/sinks.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.ext.yml similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/sinks.ext.yml rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.ext.yml diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/sinks.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.ql similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/sinks.ql rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.ql diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.expected new file mode 100644 index 00000000000..76d12060144 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.expected @@ -0,0 +1,23 @@ +invalidModelRow +#select +| test.go:10:6:10:8 | definition of arg | qltest-arg | +| test.go:38:8:38:15 | call to Src1 | qltest | +| test.go:39:8:39:15 | call to Src2 | qltest | +| test.go:39:8:39:15 | call to Src2 | qltest-w-subtypes | +| test.go:40:8:40:16 | call to Src2 | qltest-w-subtypes | +| test.go:41:2:41:21 | ... = ...[0] | qltest | +| test.go:41:2:41:21 | ... = ...[1] | qltest-w-subtypes | +| test.go:42:2:42:22 | ... = ...[1] | qltest-w-subtypes | +| test.go:58:9:58:16 | call to Src1 | qltest | +| test.go:97:46:97:53 | call to Src1 | qltest | +| test.go:107:35:107:42 | call to Src1 | qltest | +| test.go:111:42:111:49 | call to Src1 | qltest | +| test.go:154:8:154:15 | call to Src1 | qltest | +| test.go:159:9:159:16 | call to Src1 | qltest | +| test.go:162:15:162:22 | call to Src1 | qltest | +| test.go:166:9:166:16 | call to Src1 | qltest | +| test.go:170:9:170:16 | call to Src1 | qltest | +| test.go:175:24:175:31 | call to Src1 | qltest | +| test.go:178:17:178:24 | call to Src1 | qltest | +| test.go:182:24:182:31 | call to Src1 | qltest | +| test.go:186:24:186:31 | call to Src1 | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/srcs.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.ext.yml similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/srcs.ext.yml rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.ext.yml diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/srcs.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.ql similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/srcs.ql rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.ql diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/steps.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/steps.expected similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/steps.expected rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/steps.expected diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/steps.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/steps.ext.yml similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/steps.ext.yml rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/steps.ext.yml diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/steps.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/steps.ql similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/steps.ql rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/steps.ql diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/test.go similarity index 83% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/test.go rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/test.go index 35da086a888..68939041718 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/test.go @@ -83,6 +83,12 @@ func simpleflow() { taint8 := test.StepArgResArrayContent(src) b.Sink1(taint8[0]) // $ hasTaintFlow="index expression" + for _, x := range taint8 { + b.Sink1(x) // $ hasTaintFlow="x" + } + for _, x := range arraytype(taint8) { + b.Sink1(x) // $ hasTaintFlow="x" + } srcArray := []interface{}{nil, src} taint9 := test.StepArgArrayContentRes(srcArray) @@ -91,6 +97,12 @@ func simpleflow() { taint10 := test.StepArgResCollectionContent(a.Src1()).(chan interface{}) b.Sink1(test.GetElement(taint10)) // $ hasTaintFlow="call to GetElement" b.Sink1(<-taint10) // $ hasTaintFlow="<-..." + for e := range taint10 { + b.Sink1(e) // $ MISSING: hasTaintFlow="e" + } + for e := range channeltype(taint10) { + b.Sink1(e) // $ MISSING: hasTaintFlow="e" + } srcCollection := test.SetElement(a.Src1()) taint11 := test.StepArgCollectionContentRes(srcCollection) @@ -104,6 +116,12 @@ func simpleflow() { for k := range taint12 { b.Sink1(k) // $ hasTaintFlow="k" } + for k, _ := range mapstringstringtype(taint12) { + b.Sink1(k) // $ hasTaintFlow="k" + } + for k := range mapstringstringtype(taint12) { + b.Sink1(k) // $ hasTaintFlow="k" + } srcMap13 := map[string]string{src.(string): ""} taint13 := test.StepArgMapKeyContentRes(srcMap13) @@ -111,6 +129,12 @@ func simpleflow() { taint14 := test.StepArgResMapValueContent(src).(map[string]string) b.Sink1(taint14[""]) // $ hasTaintFlow="index expression" + for _, v := range taint14 { + b.Sink1(v) // $ hasTaintFlow="v" + } + for _, v := range mapstringstringtype(taint14) { + b.Sink1(v) // $ hasTaintFlow="v" + } srcMap15 := map[string]string{"": src.(string)} taint15 := test.StepArgMapValueContentRes(srcMap15) @@ -120,6 +144,12 @@ func simpleflow() { slice = append(slice, src) b.Sink1(slice[0]) // $ hasTaintFlow="index expression" + slice1 := make([]string, 2) + slice1[0] = src.(string) + slice2 := make([]string, 2) + copy(slice2, slice1) + b.Sink1(slice2[0]) // $ hasTaintFlow="index expression" + ch := make(chan string) ch <- a.Src1().(string) taint16 := test.StepArgCollectionContentRes(ch) @@ -163,3 +193,7 @@ func simpleflow() { arg4 := src b.SinkManyArgs(arg1, arg2, arg3, arg4) // $ hasTaintFlow="arg1" hasTaintFlow="arg2" hasTaintFlow="arg3" } + +type mapstringstringtype map[string]string +type arraytype []interface{} +type channeltype chan interface{} diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/vendor/github.com/nonexistent/test/stub.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/vendor/github.com/nonexistent/test/stub.go similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/vendor/github.com/nonexistent/test/stub.go rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/vendor/github.com/nonexistent/test/stub.go diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/vendor/modules.txt b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/vendor/modules.txt similarity index 100% rename from go/ql/test/library-tests/semmle/go/dataflow/ExternalFlow/vendor/modules.txt rename to go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/vendor/modules.txt diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.expected new file mode 100644 index 00000000000..42831abaf15 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.expected @@ -0,0 +1,2 @@ +invalidModelRow +testFailures diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ext.yml new file mode 100644 index 00000000000..0ef664d5182 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ext.yml @@ -0,0 +1,40 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "T", False, "StepArgRes", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepArgRes1", "", "", "Argument[0]", "ReturnValue[1]", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepArgArg", "", "", "Argument[0]", "Argument[1]", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepArgQual", "", "", "Argument[0]", "Argument[-1]", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepQualRes", "", "", "Argument[-1]", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepQualArg", "", "", "Argument[-1]", "Argument[0]", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgResNoQual", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgResArrayContent", "", "", "Argument[0]", "ReturnValue.ArrayElement", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgArrayContentRes", "", "", "Argument[0].ArrayElement", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgResCollectionContent", "", "", "Argument[0]", "ReturnValue.Element", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgCollectionContentRes", "", "", "Argument[0].Element", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgResMapKeyContent", "", "", "Argument[0]", "ReturnValue.MapKey", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgMapKeyContentRes", "", "", "Argument[0].MapKey", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgResMapValueContent", "", "", "Argument[0]", "ReturnValue.MapValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgMapValueContentRes", "", "", "Argument[0].MapValue", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "GetElement", "", "", "Argument[0].Element", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "GetMapKey", "", "", "Argument[0].MapKey", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "SetElement", "", "", "Argument[0]", "ReturnValue.Element", "value", "manual"] + - ["github.com/nonexistent/test", "C", False, "Get", "", "", "Argument[-1].Field[github.com/nonexistent/test.C.F]", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "C", False, "GetThroughPointer", "", "", "Argument[-1].Dereference.Field[github.com/nonexistent/test.C.F]", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "C", False, "Set", "", "", "Argument[0]", "Argument[-1].Field[github.com/nonexistent/test.C.F]", "value", "manual"] + - ["github.com/nonexistent/test", "C", False, "SetThroughPointer", "", "", "Argument[0]", "Argument[-1].Dereference.Field[github.com/nonexistent/test.C.F]", "value", "manual"] + + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "A", False, "Src1", "", "", "ReturnValue", "qltest", "manual"] + + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "B", False, "Sink1", "", "", "Argument[0]", "qltest", "manual"] + - ["github.com/nonexistent/test", "B", False, "SinkManyArgs", "", "", "Argument[0..2]", "qltest", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ql new file mode 100644 index 00000000000..372283d0a6c --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ql @@ -0,0 +1,17 @@ +/** + * @kind path-problem + */ + +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import TestUtilities.InlineFlowTest + +module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node src) { sourceNode(src, "qltest") } + + predicate isSink(DataFlow::Node src) { sinkNode(src, "qltest") } +} + +import ValueFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/go.mod b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/go.mod new file mode 100644 index 00000000000..f5b1162fa7a --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/go.mod @@ -0,0 +1,5 @@ +module semmle.go.Packages + +go 1.13 + +require github.com/nonexistent/test v0.0.0-20200203000000-0000000000000 diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.expected new file mode 100644 index 00000000000..0d7136bb73d --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.expected @@ -0,0 +1,50 @@ +invalidModelRow +#select +| test.go:47:10:47:12 | arg | qltest | +| test.go:48:2:48:13 | type assertion | qltest | +| test.go:61:10:61:15 | taint1 | qltest | +| test.go:64:10:64:15 | taint2 | qltest | +| test.go:68:10:68:15 | taint3 | qltest | +| test.go:72:10:72:15 | taint4 | qltest | +| test.go:75:10:75:15 | taint5 | qltest | +| test.go:79:10:79:15 | taint6 | qltest | +| test.go:82:10:82:15 | taint7 | qltest | +| test.go:85:10:85:18 | index expression | qltest | +| test.go:87:11:87:11 | x | qltest | +| test.go:90:11:90:11 | x | qltest | +| test.go:95:10:95:15 | taint9 | qltest | +| test.go:98:10:98:33 | call to GetElement | qltest | +| test.go:99:10:99:18 | <-... | qltest | +| test.go:101:11:101:11 | e | qltest | +| test.go:104:11:104:11 | e | qltest | +| test.go:109:10:109:16 | taint11 | qltest | +| test.go:112:10:112:32 | call to GetMapKey | qltest | +| test.go:114:11:114:11 | k | qltest | +| test.go:117:11:117:11 | k | qltest | +| test.go:120:11:120:11 | k | qltest | +| test.go:123:11:123:11 | k | qltest | +| test.go:128:10:128:16 | taint13 | qltest | +| test.go:131:10:131:20 | index expression | qltest | +| test.go:133:11:133:11 | v | qltest | +| test.go:136:11:136:11 | v | qltest | +| test.go:141:10:141:16 | taint15 | qltest | +| test.go:145:10:145:17 | index expression | qltest | +| test.go:151:10:151:18 | index expression | qltest | +| test.go:156:10:156:16 | taint16 | qltest | +| test.go:160:10:160:13 | selection of F | qltest | +| test.go:163:10:163:17 | call to Get | qltest | +| test.go:167:10:167:17 | call to Get | qltest | +| test.go:172:10:172:17 | call to Get | qltest | +| test.go:176:10:176:14 | selection of F | qltest | +| test.go:179:10:179:32 | call to GetThroughPointer | qltest | +| test.go:183:10:183:32 | call to GetThroughPointer | qltest | +| test.go:188:10:188:32 | call to GetThroughPointer | qltest | +| test.go:194:17:194:20 | arg1 | qltest | +| test.go:194:23:194:26 | arg2 | qltest | +| test.go:194:29:194:32 | arg3 | qltest | +| test.go:197:10:197:26 | call to max | qltest | +| test.go:198:10:198:26 | call to max | qltest | +| test.go:199:10:199:26 | call to max | qltest | +| test.go:200:10:200:26 | call to min | qltest | +| test.go:201:10:201:26 | call to min | qltest | +| test.go:202:10:202:26 | call to min | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.ext.yml new file mode 100644 index 00000000000..653f82bae61 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.ext.yml @@ -0,0 +1,8 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sinkModel + data: + - ["github.com/nonexistent/test", "B", False, "Sink1", "", "", "Argument[0]", "qltest", "manual"] + - ["github.com/nonexistent/test", "B", False, "SinkMethod", "", "", "Argument[-1]", "qltest", "manual"] + - ["github.com/nonexistent/test", "B", False, "SinkManyArgs", "", "", "Argument[0..2]", "qltest", "manual"] \ No newline at end of file diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.ql new file mode 100644 index 00000000000..de84cf24e4d --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.ql @@ -0,0 +1,7 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation + +from DataFlow::Node node, string kind +where sinkNode(node, kind) +select node, kind diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.expected new file mode 100644 index 00000000000..76d12060144 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.expected @@ -0,0 +1,23 @@ +invalidModelRow +#select +| test.go:10:6:10:8 | definition of arg | qltest-arg | +| test.go:38:8:38:15 | call to Src1 | qltest | +| test.go:39:8:39:15 | call to Src2 | qltest | +| test.go:39:8:39:15 | call to Src2 | qltest-w-subtypes | +| test.go:40:8:40:16 | call to Src2 | qltest-w-subtypes | +| test.go:41:2:41:21 | ... = ...[0] | qltest | +| test.go:41:2:41:21 | ... = ...[1] | qltest-w-subtypes | +| test.go:42:2:42:22 | ... = ...[1] | qltest-w-subtypes | +| test.go:58:9:58:16 | call to Src1 | qltest | +| test.go:97:46:97:53 | call to Src1 | qltest | +| test.go:107:35:107:42 | call to Src1 | qltest | +| test.go:111:42:111:49 | call to Src1 | qltest | +| test.go:154:8:154:15 | call to Src1 | qltest | +| test.go:159:9:159:16 | call to Src1 | qltest | +| test.go:162:15:162:22 | call to Src1 | qltest | +| test.go:166:9:166:16 | call to Src1 | qltest | +| test.go:170:9:170:16 | call to Src1 | qltest | +| test.go:175:24:175:31 | call to Src1 | qltest | +| test.go:178:17:178:24 | call to Src1 | qltest | +| test.go:182:24:182:31 | call to Src1 | qltest | +| test.go:186:24:186:31 | call to Src1 | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.ext.yml new file mode 100644 index 00000000000..5493650132c --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.ext.yml @@ -0,0 +1,11 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["github.com/nonexistent/test", "A", False, "Src1", "", "", "ReturnValue", "qltest", "manual"] + - ["github.com/nonexistent/test", "A", False, "Src2", "", "", "ReturnValue", "qltest", "manual"] + - ["github.com/nonexistent/test", "A", True, "Src2", "", "", "ReturnValue", "qltest-w-subtypes", "manual"] + - ["github.com/nonexistent/test", "A", False, "SrcArg", "", "", "Argument[0]", "qltest-arg", "manual"] + - ["github.com/nonexistent/test", "A", False, "Src3", "", "", "ReturnValue[0]", "qltest", "manual"] + - ["github.com/nonexistent/test", "A", True, "Src3", "", "", "ReturnValue[1]", "qltest-w-subtypes", "manual"] \ No newline at end of file diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.ql new file mode 100644 index 00000000000..d1cd0fee89d --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.ql @@ -0,0 +1,7 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation + +from DataFlow::Node node, string kind +where sourceNode(node, kind) +select node, kind diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.expected new file mode 100644 index 00000000000..bb662634e9d --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.expected @@ -0,0 +1,34 @@ +invalidModelRow +#select +| test.go:17:23:17:25 | arg | test.go:17:10:17:26 | call to StepArgRes | +| test.go:18:27:18:29 | arg | test.go:18:2:18:30 | ... = ...[1] | +| test.go:19:15:19:17 | arg | test.go:11:6:11:9 | definition of arg1 | +| test.go:20:16:20:18 | arg | test.go:13:6:13:6 | definition of t | +| test.go:21:10:21:10 | t | test.go:21:10:21:24 | call to StepQualRes | +| test.go:22:2:22:2 | t | test.go:10:6:10:8 | definition of arg | +| test.go:23:32:23:34 | arg | test.go:23:10:23:35 | call to StepArgResNoQual | +| test.go:60:25:60:27 | src | test.go:60:12:60:28 | call to StepArgRes | +| test.go:63:29:63:31 | src | test.go:63:2:63:32 | ... := ...[1] | +| test.go:67:15:67:17 | src | test.go:66:6:66:11 | definition of taint3 | +| test.go:71:21:71:23 | src | test.go:70:6:70:11 | definition of taint4 | +| test.go:74:13:74:25 | type assertion | test.go:74:12:74:40 | call to StepQualRes | +| test.go:78:3:78:15 | type assertion | test.go:77:6:77:11 | definition of taint6 | +| test.go:81:34:81:36 | src | test.go:81:12:81:37 | call to StepArgResNoQual | +| test.go:197:14:197:19 | srcInt | test.go:197:10:197:26 | call to max | +| test.go:197:22:197:22 | 0 | test.go:197:10:197:26 | call to max | +| test.go:197:25:197:25 | 1 | test.go:197:10:197:26 | call to max | +| test.go:198:14:198:14 | 0 | test.go:198:10:198:26 | call to max | +| test.go:198:17:198:22 | srcInt | test.go:198:10:198:26 | call to max | +| test.go:198:25:198:25 | 1 | test.go:198:10:198:26 | call to max | +| test.go:199:14:199:14 | 0 | test.go:199:10:199:26 | call to max | +| test.go:199:17:199:17 | 1 | test.go:199:10:199:26 | call to max | +| test.go:199:20:199:25 | srcInt | test.go:199:10:199:26 | call to max | +| test.go:200:14:200:19 | srcInt | test.go:200:10:200:26 | call to min | +| test.go:200:22:200:22 | 0 | test.go:200:10:200:26 | call to min | +| test.go:200:25:200:25 | 1 | test.go:200:10:200:26 | call to min | +| test.go:201:14:201:14 | 0 | test.go:201:10:201:26 | call to min | +| test.go:201:17:201:22 | srcInt | test.go:201:10:201:26 | call to min | +| test.go:201:25:201:25 | 1 | test.go:201:10:201:26 | call to min | +| test.go:202:14:202:14 | 0 | test.go:202:10:202:26 | call to min | +| test.go:202:17:202:17 | 1 | test.go:202:10:202:26 | call to min | +| test.go:202:20:202:25 | srcInt | test.go:202:10:202:26 | call to min | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.ext.yml b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.ext.yml new file mode 100644 index 00000000000..12acdaba531 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.ext.yml @@ -0,0 +1,14 @@ +extensions: + - addsTo: + pack: codeql/go-all + extensible: summaryModel + data: + - ["github.com/nonexistent/test", "T", False, "StepArgRes", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepArgRes1", "", "", "Argument[0]", "ReturnValue[1]", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepArgArg", "", "", "Argument[0]", "Argument[1]", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepArgQual", "", "", "Argument[0]", "Argument[-1]", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepQualRes", "", "", "Argument[-1]", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "T", False, "StepQualArg", "", "", "Argument[-1]", "Argument[0]", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgResNoQual", "", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgResContent", "", "", "Argument[0]", "ReturnValue.ArrayElement", "value", "manual"] + - ["github.com/nonexistent/test", "", False, "StepArgContentRes", "", "", "Argument[0].ArrayElement", "ReturnValue", "value", "manual"] diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.ql new file mode 100644 index 00000000000..5b32c96c628 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/steps.ql @@ -0,0 +1,8 @@ +import go +import semmle.go.dataflow.ExternalFlow +import ModelValidation +import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl + +from DataFlow::Node node1, DataFlow::Node node2 +where FlowSummaryImpl::Private::Steps::summaryThroughStepValue(node1, node2, _) +select node1, node2 diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/test.go new file mode 100644 index 00000000000..a72a7895323 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/test.go @@ -0,0 +1,207 @@ +package main + +import ( + "github.com/nonexistent/test" +) + +func use(args ...interface{}) {} + +func main() { + var arg interface{} + var arg1 interface{} + var array []interface{} + var t *test.T + var taint interface{} + var taintSlice []interface{} + + taint = t.StepArgRes(arg) + _, taint = t.StepArgRes1(arg) + t.StepArgArg(arg, arg1) + t.StepArgQual(arg) + taint = t.StepQualRes() + t.StepQualArg(arg) + taint = test.StepArgResNoQual(arg) + taintSlice = test.StepArgResArrayContent(arg) + taint = test.StepArgArrayContentRes(array) + taint = test.StepArgResCollectionContent(arg) + taint = test.StepArgCollectionContentRes(array) + taint = test.StepArgResMapKeyContent(arg) + taint = test.StepArgMapKeyContentRes(array) + taint = test.StepArgResMapValueContent(arg) + taint = test.StepArgMapValueContentRes(array) + + var src interface{} + var src1 interface{} + var a test.A + var a1 test.A1 + + src = a.Src1() + src = a.Src2() + src = a1.Src2() + src, src1 = a.Src3() + src, src1 = a1.Src3() + a.SrcArg(arg) + + var b test.B + + b.Sink1(arg) + arg.(test.B).SinkMethod() + + use(arg, arg1, t, taint, taintSlice, src, src1) +} + +func simpleflow() { + var a test.A + var b test.B + var t *test.T + + src := a.Src1() + + taint1 := t.StepArgRes(src) + b.Sink1(taint1) // $ hasValueFlow="taint1" + + _, taint2 := t.StepArgRes1(src) + b.Sink1(taint2) // $ hasValueFlow="taint2" + + var taint3 interface{} + t.StepArgArg(src, taint3) + b.Sink1(taint3) // $ hasValueFlow="taint3" + + var taint4 test.T + taint4.StepArgQual(src) + b.Sink1(taint4) // $ hasValueFlow="taint4" + + taint5 := (src.(*test.T)).StepQualRes() + b.Sink1(taint5) // $ hasValueFlow="taint5" + + var taint6 interface{} + (src.(*test.T)).StepQualArg(taint6) + b.Sink1(taint6) // $ hasValueFlow="taint6" + + taint7 := test.StepArgResNoQual(src) + b.Sink1(taint7) // $ hasValueFlow="taint7" + + taint8 := test.StepArgResArrayContent(src) + b.Sink1(taint8[0]) // $ hasValueFlow="index expression" + for _, x := range taint8 { + b.Sink1(x) // $ hasValueFlow="x" + } + for _, x := range arraytype(taint8) { + b.Sink1(x) // $ hasValueFlow="x" + } + + srcArray := []interface{}{nil, src} + taint9 := test.StepArgArrayContentRes(srcArray) + b.Sink1(taint9) // $ hasValueFlow="taint9" + + taint10 := test.StepArgResCollectionContent(a.Src1()).(chan interface{}) + b.Sink1(test.GetElement(taint10)) // $ hasValueFlow="call to GetElement" + b.Sink1(<-taint10) // $ hasValueFlow="<-..." + for e := range taint10 { + b.Sink1(e) // $ MISSING: hasValueFlow="e" + } + for e := range channeltype(taint10) { + b.Sink1(e) // $ MISSING: hasValueFlow="e" + } + + srcCollection := test.SetElement(a.Src1()) + taint11 := test.StepArgCollectionContentRes(srcCollection) + b.Sink1(taint11) // $ hasValueFlow="taint11" + + taint12 := test.StepArgResMapKeyContent(a.Src1()).(map[string]string) + b.Sink1(test.GetMapKey(taint12)) // $ hasValueFlow="call to GetMapKey" + for k, _ := range taint12 { + b.Sink1(k) // $ hasValueFlow="k" + } + for k := range taint12 { + b.Sink1(k) // $ hasValueFlow="k" + } + for k, _ := range mapstringstringtype(taint12) { + b.Sink1(k) // $ hasValueFlow="k" + } + for k := range mapstringstringtype(taint12) { + b.Sink1(k) // $ hasValueFlow="k" + } + + srcMap13 := map[string]string{src.(string): ""} + taint13 := test.StepArgMapKeyContentRes(srcMap13) + b.Sink1(taint13) // $ hasValueFlow="taint13" + + taint14 := test.StepArgResMapValueContent(src).(map[string]string) + b.Sink1(taint14[""]) // $ hasValueFlow="index expression" + for _, v := range taint14 { + b.Sink1(v) // $ hasValueFlow="v" + } + for _, v := range mapstringstringtype(taint14) { + b.Sink1(v) // $ hasValueFlow="v" + } + + srcMap15 := map[string]string{"": src.(string)} + taint15 := test.StepArgMapValueContentRes(srcMap15) + b.Sink1(taint15) // $ hasValueFlow="taint15" + + slice := make([]interface{}, 0) + slice = append(slice, src) + b.Sink1(slice[0]) // $ hasValueFlow="index expression" + + slice1 := make([]string, 2) + slice1[0] = src.(string) + slice2 := make([]string, 2) + copy(slice2, slice1) + b.Sink1(slice2[0]) // $ hasValueFlow="index expression" + + ch := make(chan string) + ch <- a.Src1().(string) + taint16 := test.StepArgCollectionContentRes(ch) + b.Sink1(taint16) // $ MISSING: hasValueFlow="taint16" // currently fails due to lack of post-update nodes after send statements + + c1 := test.C{""} + c1.Set(a.Src1().(string)) + b.Sink1(c1.F) // $ hasValueFlow="selection of F" + + c2 := test.C{a.Src1().(string)} + b.Sink1(c2.Get()) // $ hasValueFlow="call to Get" + + c3 := test.C{""} + c3.Set(a.Src1().(string)) + b.Sink1(c3.Get()) // $ hasValueFlow="call to Get" + + c4 := test.C{""} + c4.Set(a.Src1().(string)) + c4.Set("") + b.Sink1(c4.Get()) // $ SPURIOUS: hasValueFlow="call to Get" // because we currently don't clear content + + cp1 := &test.C{""} + cp1.SetThroughPointer(a.Src1().(string)) + b.Sink1(cp1.F) // $ hasValueFlow="selection of F" + + cp2 := &test.C{a.Src1().(string)} + b.Sink1(cp2.GetThroughPointer()) // $ hasValueFlow="call to GetThroughPointer" + + cp3 := &test.C{""} + cp3.SetThroughPointer(a.Src1().(string)) + b.Sink1(cp3.GetThroughPointer()) // $ hasValueFlow="call to GetThroughPointer" + + cp4 := &test.C{""} + cp4.SetThroughPointer(a.Src1().(string)) + cp4.SetThroughPointer("") + b.Sink1(cp4.GetThroughPointer()) // $ SPURIOUS: hasValueFlow="call to GetThroughPointer" // because we currently don't clear content + + arg1 := src + arg2 := src + arg3 := src + arg4 := src + b.SinkManyArgs(arg1, arg2, arg3, arg4) // $ hasValueFlow="arg1" hasValueFlow="arg2" hasValueFlow="arg3" + + var srcInt int = src.(int) + b.Sink1(max(srcInt, 0, 1)) // $ hasValueFlow="call to max" + b.Sink1(max(0, srcInt, 1)) // $ hasValueFlow="call to max" + b.Sink1(max(0, 1, srcInt)) // $ hasValueFlow="call to max" + b.Sink1(min(srcInt, 0, 1)) // $ hasValueFlow="call to min" + b.Sink1(min(0, srcInt, 1)) // $ hasValueFlow="call to min" + b.Sink1(min(0, 1, srcInt)) // $ hasValueFlow="call to min" +} + +type mapstringstringtype map[string]string +type arraytype []interface{} +type channeltype chan interface{} diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/vendor/github.com/nonexistent/test/stub.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/vendor/github.com/nonexistent/test/stub.go new file mode 100644 index 00000000000..746f6ac9a6a --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/vendor/github.com/nonexistent/test/stub.go @@ -0,0 +1,72 @@ +package test + +type T struct{} + +func (t *T) StepArgRes(arg interface{}) interface{} { return nil } + +func (t *T) StepArgRes1(arg interface{}) (interface{}, interface{}) { return nil, nil } + +func (t *T) StepArgArg(a1 interface{}, a2 interface{}) {} + +func (t *T) StepArgQual(arg interface{}) {} + +func (t *T) StepQualRes() interface{} { return nil } + +func (t *T) StepQualArg(arg interface{}) {} + +func StepArgResNoQual(arg interface{}) interface{} { return nil } + +func StepArgResArrayContent(arg interface{}) []interface{} { return nil } + +func StepArgArrayContentRes(arg []interface{}) interface{} { return nil } + +func StepArgResCollectionContent(arg interface{}) interface{} { return nil } + +func StepArgCollectionContentRes(arg interface{}) interface{} { return nil } + +func StepArgResMapKeyContent(arg interface{}) interface{} { return nil } + +func StepArgMapKeyContentRes(arg interface{}) interface{} { return nil } + +func StepArgResMapValueContent(arg interface{}) interface{} { return nil } + +func StepArgMapValueContentRes(arg interface{}) interface{} { return nil } + +func GetElement(x interface{}) interface{} { return nil } + +func SetElement(x interface{}) interface{} { return nil } + +func GetMapKey(x interface{}) interface{} { return nil } + +type A interface { + Src1() interface{} + Src2() interface{} + Src3() (interface{}, interface{}) + SrcArg(arg interface{}) +} + +type A1 struct{} + +func (a *A1) Src1() interface{} { return nil } + +func (a *A1) Src2() interface{} { return nil } + +func (a *A1) Src3() (interface{}, interface{}) { return nil, nil } + +func (a *A1) SrcArg(arg interface{}) {} + +type B interface { + Sink1(arg interface{}) + SinkMethod() interface{} + SinkManyArgs(arg1 interface{}, arg2 interface{}, arg3 interface{}, arg4 interface{}) +} + +type C struct { + F string +} + +func (c C) Set(f string) {} +func (c C) Get() string { return "" } + +func (c *C) SetThroughPointer(f string) {} +func (c *C) GetThroughPointer() string { return "" } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/vendor/modules.txt b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/vendor/modules.txt new file mode 100644 index 00000000000..b62dbf8819b --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/vendor/modules.txt @@ -0,0 +1,3 @@ +# github.com/nonexistent/test v0.0.0-20200203000000-0000000000000 +## explicit +github.com/nonexistent/test diff --git a/go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalFlowStep.ql b/go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalFlowStep.ql index 979c4fd6700..8bc89603405 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalFlowStep.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalFlowStep.ql @@ -1,5 +1,7 @@ import go from DataFlow::Node nd, DataFlow::Node succ -where DataFlow::localFlowStep(nd, succ) +where + DataFlow::localFlowStep(nd, succ) and + (exists(nd.getFile()) or exists(succ.getFile())) select nd, succ diff --git a/go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalTaintStep.expected b/go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalTaintStep.expected index 1397e71759d..2579716e50a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalTaintStep.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalTaintStep.expected @@ -3,13 +3,6 @@ | main.go:38:13:38:13 | 1 | main.go:38:7:38:20 | slice literal | | main.go:38:16:38:16 | 2 | main.go:38:7:38:20 | slice literal | | main.go:38:19:38:19 | 3 | main.go:38:7:38:20 | slice literal | -| main.go:39:15:39:15 | s | main.go:39:8:39:25 | call to append | -| main.go:39:18:39:18 | 4 | main.go:39:8:39:25 | call to append | -| main.go:39:21:39:21 | 5 | main.go:39:8:39:25 | call to append | -| main.go:39:24:39:24 | 6 | main.go:39:8:39:25 | call to append | -| main.go:40:15:40:15 | s | main.go:40:8:40:23 | call to append | -| main.go:40:18:40:19 | s1 | main.go:40:8:40:23 | call to append | -| main.go:42:10:42:11 | s4 | main.go:38:2:38:2 | definition of s | | main.go:47:20:47:21 | next key-value pair in range | main.go:47:2:50:2 | range statement[0] | | main.go:47:20:47:21 | next key-value pair in range | main.go:47:2:50:2 | range statement[1] | | main.go:47:20:47:21 | xs | main.go:47:2:50:2 | range statement[1] | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/LocalFlowStep.ql b/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/LocalFlowStep.ql index 979c4fd6700..8bc89603405 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/LocalFlowStep.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/LocalFlowStep.ql @@ -1,5 +1,7 @@ import go from DataFlow::Node nd, DataFlow::Node succ -where DataFlow::localFlowStep(nd, succ) +where + DataFlow::localFlowStep(nd, succ) and + (exists(nd.getFile()) or exists(succ.getFile())) select nd, succ diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.expected b/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.expected index 575045cc46e..b8d86627021 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.expected @@ -24,21 +24,21 @@ edges | test.go:199:15:199:26 | call to Data | test.go:204:36:204:53 | type assertion | provenance | | | test.go:199:15:199:26 | call to Data | test.go:205:34:205:51 | type assertion | provenance | | | test.go:200:21:200:54 | call to HTML2str | test.go:200:14:200:55 | type conversion | provenance | | -| test.go:200:36:200:53 | type assertion | test.go:200:21:200:54 | call to HTML2str | provenance | MaD:246 | +| test.go:200:36:200:53 | type assertion | test.go:200:21:200:54 | call to HTML2str | provenance | MaD:249 | | test.go:201:21:201:57 | call to Htmlunquote | test.go:201:14:201:58 | type conversion | provenance | | -| test.go:201:39:201:56 | type assertion | test.go:201:21:201:57 | call to Htmlunquote | provenance | MaD:248 | +| test.go:201:39:201:56 | type assertion | test.go:201:21:201:57 | call to Htmlunquote | provenance | MaD:251 | | test.go:202:2:202:68 | ... := ...[0] | test.go:203:14:203:28 | type assertion | provenance | | -| test.go:202:28:202:56 | type assertion | test.go:202:2:202:68 | ... := ...[0] | provenance | MaD:249 | +| test.go:202:28:202:56 | type assertion | test.go:202:2:202:68 | ... := ...[0] | provenance | MaD:252 | | test.go:204:21:204:54 | call to Str2html | test.go:204:14:204:55 | type conversion | provenance | | -| test.go:204:36:204:53 | type assertion | test.go:204:21:204:54 | call to Str2html | provenance | MaD:251 | +| test.go:204:36:204:53 | type assertion | test.go:204:21:204:54 | call to Str2html | provenance | MaD:254 | | test.go:205:21:205:58 | call to Substr | test.go:205:14:205:59 | type conversion | provenance | | -| test.go:205:34:205:51 | type assertion | test.go:205:21:205:58 | call to Substr | provenance | MaD:252 | +| test.go:205:34:205:51 | type assertion | test.go:205:21:205:58 | call to Substr | provenance | MaD:255 | | test.go:207:6:207:6 | definition of s | test.go:209:14:209:28 | type conversion | provenance | | -| test.go:208:18:208:33 | selection of Form | test.go:207:6:207:6 | definition of s | provenance | MaD:250 | +| test.go:208:18:208:33 | selection of Form | test.go:207:6:207:6 | definition of s | provenance | MaD:253 | | test.go:223:2:223:34 | ... := ...[0] | test.go:225:31:225:31 | f | provenance | | | test.go:223:2:223:34 | ... := ...[1] | test.go:224:14:224:32 | type conversion | provenance | | | test.go:225:2:225:32 | ... := ...[0] | test.go:226:14:226:20 | content | provenance | | -| test.go:225:31:225:31 | f | test.go:225:2:225:32 | ... := ...[0] | provenance | MaD:537 | +| test.go:225:31:225:31 | f | test.go:225:2:225:32 | ... := ...[0] | provenance | MaD:540 | | test.go:228:2:228:40 | ... := ...[0] | test.go:229:14:229:38 | type conversion | provenance | | | test.go:231:7:231:28 | call to GetString | test.go:232:14:232:22 | type conversion | provenance | | | test.go:234:8:234:35 | call to GetStrings | test.go:235:14:235:26 | type conversion | provenance | | @@ -66,39 +66,39 @@ edges | test.go:278:21:278:28 | index expression | test.go:276:2:276:13 | definition of genericFiles [array] | provenance | | | test.go:283:44:283:60 | selection of Filename | test.go:283:21:283:61 | call to GetDisplayString | provenance | FunctionModel | | test.go:284:21:284:53 | call to SliceChunk | test.go:284:21:284:92 | selection of Filename | provenance | | -| test.go:284:38:284:49 | genericFiles | test.go:284:21:284:53 | call to SliceChunk | provenance | MaD:260 | +| test.go:284:38:284:49 | genericFiles | test.go:284:21:284:53 | call to SliceChunk | provenance | MaD:263 | | test.go:285:21:285:60 | call to SliceDiff | test.go:285:21:285:96 | selection of Filename | provenance | | -| test.go:285:37:285:48 | genericFiles | test.go:285:21:285:60 | call to SliceDiff | provenance | MaD:261 | +| test.go:285:37:285:48 | genericFiles | test.go:285:21:285:60 | call to SliceDiff | provenance | MaD:264 | | test.go:290:3:292:44 | call to SliceFilter | test.go:290:3:292:80 | selection of Filename | provenance | | -| test.go:291:4:291:15 | genericFiles | test.go:290:3:292:44 | call to SliceFilter | provenance | MaD:262 | +| test.go:291:4:291:15 | genericFiles | test.go:290:3:292:44 | call to SliceFilter | provenance | MaD:265 | | test.go:293:21:293:65 | call to SliceIntersect | test.go:293:21:293:101 | selection of Filename | provenance | | -| test.go:293:42:293:53 | genericFiles | test.go:293:21:293:65 | call to SliceIntersect | provenance | MaD:263 | +| test.go:293:42:293:53 | genericFiles | test.go:293:21:293:65 | call to SliceIntersect | provenance | MaD:266 | | test.go:294:21:294:65 | call to SliceIntersect | test.go:294:21:294:101 | selection of Filename | provenance | | -| test.go:294:53:294:64 | genericFiles | test.go:294:21:294:65 | call to SliceIntersect | provenance | MaD:263 | +| test.go:294:53:294:64 | genericFiles | test.go:294:21:294:65 | call to SliceIntersect | provenance | MaD:266 | | test.go:295:21:295:61 | call to SliceMerge | test.go:295:21:295:97 | selection of Filename | provenance | | -| test.go:295:38:295:49 | genericFiles | test.go:295:21:295:61 | call to SliceMerge | provenance | MaD:264 | +| test.go:295:38:295:49 | genericFiles | test.go:295:21:295:61 | call to SliceMerge | provenance | MaD:267 | | test.go:296:21:296:61 | call to SliceMerge | test.go:296:21:296:97 | selection of Filename | provenance | | -| test.go:296:49:296:60 | genericFiles | test.go:296:21:296:61 | call to SliceMerge | provenance | MaD:264 | +| test.go:296:49:296:60 | genericFiles | test.go:296:21:296:61 | call to SliceMerge | provenance | MaD:267 | | test.go:297:21:297:66 | call to SlicePad | test.go:297:21:297:102 | selection of Filename | provenance | | | test.go:297:51:297:62 | genericFiles [array] | test.go:297:51:297:65 | index expression | provenance | | -| test.go:297:51:297:65 | index expression | test.go:297:21:297:66 | call to SlicePad | provenance | MaD:265 | +| test.go:297:51:297:65 | index expression | test.go:297:21:297:66 | call to SlicePad | provenance | MaD:268 | | test.go:298:21:298:66 | call to SlicePad | test.go:298:21:298:102 | selection of Filename | provenance | | -| test.go:298:36:298:47 | genericFiles | test.go:298:21:298:66 | call to SlicePad | provenance | MaD:265 | +| test.go:298:36:298:47 | genericFiles | test.go:298:21:298:66 | call to SlicePad | provenance | MaD:268 | | test.go:299:21:299:49 | call to SliceRand | test.go:299:21:299:82 | selection of Filename | provenance | | -| test.go:299:37:299:48 | genericFiles | test.go:299:21:299:49 | call to SliceRand | provenance | MaD:266 | +| test.go:299:37:299:48 | genericFiles | test.go:299:21:299:49 | call to SliceRand | provenance | MaD:269 | | test.go:301:21:301:97 | call to SliceReduce | test.go:301:21:301:133 | selection of Filename | provenance | | -| test.go:301:39:301:50 | genericFiles | test.go:301:21:301:97 | call to SliceReduce | provenance | MaD:267 | +| test.go:301:39:301:50 | genericFiles | test.go:301:21:301:97 | call to SliceReduce | provenance | MaD:270 | | test.go:302:21:302:52 | call to SliceShuffle | test.go:302:21:302:88 | selection of Filename | provenance | | -| test.go:302:40:302:51 | genericFiles | test.go:302:21:302:52 | call to SliceShuffle | provenance | MaD:268 | +| test.go:302:40:302:51 | genericFiles | test.go:302:21:302:52 | call to SliceShuffle | provenance | MaD:271 | | test.go:303:21:303:51 | call to SliceUnique | test.go:303:21:303:87 | selection of Filename | provenance | | -| test.go:303:39:303:50 | genericFiles | test.go:303:21:303:51 | call to SliceUnique | provenance | MaD:269 | +| test.go:303:39:303:50 | genericFiles | test.go:303:21:303:51 | call to SliceUnique | provenance | MaD:272 | | test.go:308:2:308:5 | definition of bMap | test.go:311:21:311:24 | bMap | provenance | | | test.go:308:2:308:5 | definition of bMap | test.go:312:21:312:24 | bMap | provenance | | | test.go:309:15:309:36 | call to GetString | test.go:310:22:310:30 | untrusted | provenance | | -| test.go:310:22:310:30 | untrusted | test.go:308:2:308:5 | definition of bMap | provenance | MaD:272 | -| test.go:311:21:311:24 | bMap | test.go:311:21:311:39 | call to Get | provenance | MaD:270 | +| test.go:310:22:310:30 | untrusted | test.go:308:2:308:5 | definition of bMap | provenance | MaD:275 | +| test.go:311:21:311:24 | bMap | test.go:311:21:311:39 | call to Get | provenance | MaD:273 | | test.go:311:21:311:39 | call to Get | test.go:311:21:311:48 | type assertion | provenance | | -| test.go:312:21:312:24 | bMap | test.go:312:21:312:32 | call to Items | provenance | MaD:271 | +| test.go:312:21:312:24 | bMap | test.go:312:21:312:32 | call to Items | provenance | MaD:274 | | test.go:312:21:312:32 | call to Items | test.go:312:21:312:52 | type assertion | provenance | | nodes | test.go:33:6:33:10 | definition of bound | semmle.label | definition of bound | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Beego/TaintedPath.expected b/go/ql/test/library-tests/semmle/go/frameworks/Beego/TaintedPath.expected index 94a3262d41e..05e9c603276 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Beego/TaintedPath.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Beego/TaintedPath.expected @@ -2,7 +2,7 @@ edges | test.go:215:15:215:26 | call to Data | test.go:216:18:216:26 | untrusted | provenance | | | test.go:215:15:215:26 | call to Data | test.go:217:10:217:18 | untrusted | provenance | | | test.go:215:15:215:26 | call to Data | test.go:218:35:218:43 | untrusted | provenance | | -| test.go:324:17:324:37 | selection of RequestBody | test.go:324:40:324:43 | &... | provenance | MaD:181 | +| test.go:324:17:324:37 | selection of RequestBody | test.go:324:40:324:43 | &... | provenance | MaD:184 | | test.go:324:40:324:43 | &... | test.go:326:35:326:43 | untrusted | provenance | | | test.go:332:15:332:26 | call to Data | test.go:334:23:334:31 | untrusted | provenance | | | test.go:340:15:340:26 | call to Data | test.go:342:53:342:61 | untrusted | provenance | | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.expected b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.expected index 88df7efaf18..db36747266e 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.expected @@ -1,36 +1,36 @@ edges -| test.go:10:15:10:41 | call to UserAgent | test.go:12:11:12:19 | untrusted | provenance | Src:MaD:671 | -| test.go:10:15:10:41 | call to UserAgent | test.go:13:23:13:31 | untrusted | provenance | Src:MaD:671 | -| test.go:10:15:10:41 | call to UserAgent | test.go:14:14:14:22 | untrusted | provenance | Src:MaD:671 | -| test.go:10:15:10:41 | call to UserAgent | test.go:15:26:15:34 | untrusted | provenance | Src:MaD:671 | -| test.go:10:15:10:41 | call to UserAgent | test.go:16:12:16:20 | untrusted | provenance | Src:MaD:671 | -| test.go:10:15:10:41 | call to UserAgent | test.go:17:24:17:32 | untrusted | provenance | Src:MaD:671 | -| test.go:10:15:10:41 | call to UserAgent | test.go:18:15:18:23 | untrusted | provenance | Src:MaD:671 | -| test.go:10:15:10:41 | call to UserAgent | test.go:19:27:19:35 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:26:12:26:20 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:27:10:27:18 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:28:15:28:23 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:29:14:29:22 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:30:15:30:23 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:31:8:31:16 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:32:11:32:19 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:33:9:33:17 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:34:8:34:16 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:35:8:35:16 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:36:13:36:21 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:37:13:37:21 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:38:12:38:20 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:39:12:39:20 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:40:9:40:17 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:41:12:41:20 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:42:16:42:24 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:42:27:42:35 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:43:12:43:20 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:44:14:44:22 | untrusted | provenance | Src:MaD:671 | -| test.go:24:15:24:41 | call to UserAgent | test.go:44:25:44:33 | untrusted | provenance | Src:MaD:671 | -| test.go:48:15:48:41 | call to UserAgent | test.go:49:12:49:20 | untrusted | provenance | Src:MaD:671 | -| test.go:54:15:54:41 | call to UserAgent | test.go:56:31:56:39 | untrusted | provenance | Src:MaD:671 | -| test.go:60:15:60:41 | call to UserAgent | test.go:62:19:62:27 | untrusted | provenance | Src:MaD:671 | +| test.go:10:15:10:41 | call to UserAgent | test.go:12:11:12:19 | untrusted | provenance | Src:MaD:674 | +| test.go:10:15:10:41 | call to UserAgent | test.go:13:23:13:31 | untrusted | provenance | Src:MaD:674 | +| test.go:10:15:10:41 | call to UserAgent | test.go:14:14:14:22 | untrusted | provenance | Src:MaD:674 | +| test.go:10:15:10:41 | call to UserAgent | test.go:15:26:15:34 | untrusted | provenance | Src:MaD:674 | +| test.go:10:15:10:41 | call to UserAgent | test.go:16:12:16:20 | untrusted | provenance | Src:MaD:674 | +| test.go:10:15:10:41 | call to UserAgent | test.go:17:24:17:32 | untrusted | provenance | Src:MaD:674 | +| test.go:10:15:10:41 | call to UserAgent | test.go:18:15:18:23 | untrusted | provenance | Src:MaD:674 | +| test.go:10:15:10:41 | call to UserAgent | test.go:19:27:19:35 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:26:12:26:20 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:27:10:27:18 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:28:15:28:23 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:29:14:29:22 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:30:15:30:23 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:31:8:31:16 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:32:11:32:19 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:33:9:33:17 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:34:8:34:16 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:35:8:35:16 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:36:13:36:21 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:37:13:37:21 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:38:12:38:20 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:39:12:39:20 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:40:9:40:17 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:41:12:41:20 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:42:16:42:24 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:42:27:42:35 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:43:12:43:20 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:44:14:44:22 | untrusted | provenance | Src:MaD:674 | +| test.go:24:15:24:41 | call to UserAgent | test.go:44:25:44:33 | untrusted | provenance | Src:MaD:674 | +| test.go:48:15:48:41 | call to UserAgent | test.go:49:12:49:20 | untrusted | provenance | Src:MaD:674 | +| test.go:54:15:54:41 | call to UserAgent | test.go:56:31:56:39 | untrusted | provenance | Src:MaD:674 | +| test.go:60:15:60:41 | call to UserAgent | test.go:62:19:62:27 | untrusted | provenance | Src:MaD:674 | nodes | test.go:10:15:10:41 | call to UserAgent | semmle.label | call to UserAgent | | test.go:12:11:12:19 | untrusted | semmle.label | untrusted | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Echo/ReflectedXss.expected b/go/ql/test/library-tests/semmle/go/frameworks/Echo/ReflectedXss.expected index c29c8d4d888..b0917d9bc3a 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Echo/ReflectedXss.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Echo/ReflectedXss.expected @@ -8,28 +8,28 @@ edges | test.go:51:2:51:30 | ... := ...[0] | test.go:52:16:52:37 | index expression | provenance | | | test.go:57:2:57:46 | ... := ...[0] | test.go:58:13:58:22 | fileHeader | provenance | | | test.go:58:2:58:29 | ... := ...[0] | test.go:60:2:60:5 | file | provenance | | -| test.go:58:13:58:22 | fileHeader | test.go:58:2:58:29 | ... := ...[0] | provenance | MaD:624 | +| test.go:58:13:58:22 | fileHeader | test.go:58:2:58:29 | ... := ...[0] | provenance | MaD:627 | | test.go:59:2:59:7 | definition of buffer | test.go:61:20:61:25 | buffer | provenance | | -| test.go:60:2:60:5 | file | test.go:59:2:59:7 | definition of buffer | provenance | MaD:550 | +| test.go:60:2:60:5 | file | test.go:59:2:59:7 | definition of buffer | provenance | MaD:553 | | test.go:66:2:66:31 | ... := ...[0] | test.go:67:16:67:41 | index expression | provenance | | | test.go:72:2:72:31 | ... := ...[0] | test.go:74:13:74:22 | fileHeader | provenance | | | test.go:74:2:74:29 | ... := ...[0] | test.go:76:2:76:5 | file | provenance | | -| test.go:74:13:74:22 | fileHeader | test.go:74:2:74:29 | ... := ...[0] | provenance | MaD:624 | +| test.go:74:13:74:22 | fileHeader | test.go:74:2:74:29 | ... := ...[0] | provenance | MaD:627 | | test.go:75:2:75:7 | definition of buffer | test.go:77:20:77:25 | buffer | provenance | | -| test.go:76:2:76:5 | file | test.go:75:2:75:7 | definition of buffer | provenance | MaD:550 | +| test.go:76:2:76:5 | file | test.go:75:2:75:7 | definition of buffer | provenance | MaD:553 | | test.go:82:2:82:32 | ... := ...[0] | test.go:83:16:83:24 | selection of Value | provenance | | | test.go:88:13:88:25 | call to Cookies | test.go:89:16:89:31 | selection of Value | provenance | | | test.go:99:11:99:15 | &... | test.go:100:16:100:21 | selection of s | provenance | | | test.go:112:17:112:19 | definition of ctx | test.go:114:16:114:18 | ctx | provenance | | -| test.go:113:21:113:42 | call to Param | test.go:112:17:112:19 | definition of ctx | provenance | MaD:355 | -| test.go:114:16:114:18 | ctx | test.go:114:16:114:33 | call to Get | provenance | MaD:354 | +| test.go:113:21:113:42 | call to Param | test.go:112:17:112:19 | definition of ctx | provenance | MaD:358 | +| test.go:114:16:114:18 | ctx | test.go:114:16:114:33 | call to Get | provenance | MaD:357 | | test.go:114:16:114:33 | call to Get | test.go:114:16:114:42 | type assertion | provenance | | | test.go:124:11:124:32 | call to Param | test.go:125:16:125:20 | param | provenance | | | test.go:130:11:130:32 | call to Param | test.go:131:20:131:32 | type conversion | provenance | | | test.go:136:11:136:32 | call to Param | test.go:137:29:137:41 | type conversion | provenance | | | test.go:148:11:148:32 | call to Param | test.go:149:30:149:34 | param | provenance | | | test.go:149:12:149:35 | call to NewReader | test.go:150:31:150:36 | reader | provenance | | -| test.go:149:30:149:34 | param | test.go:149:12:149:35 | call to NewReader | provenance | MaD:833 | +| test.go:149:30:149:34 | param | test.go:149:12:149:35 | call to NewReader | provenance | MaD:836 | | test.go:164:11:164:32 | call to Param | test.go:165:23:165:35 | type conversion | provenance | | nodes | test.go:15:11:15:32 | call to Param | semmle.label | call to Param | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Encoding/jsoniter.expected b/go/ql/test/library-tests/semmle/go/frameworks/Encoding/jsoniter.expected index fc1b0f4ec46..4bb254ce89d 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Encoding/jsoniter.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Encoding/jsoniter.expected @@ -3,13 +3,13 @@ edges | jsoniter.go:23:20:23:38 | call to getUntrustedBytes | jsoniter.go:31:21:31:34 | untrustedInput | provenance | | | jsoniter.go:24:21:24:40 | call to getUntrustedString | jsoniter.go:35:27:35:41 | untrustedString | provenance | | | jsoniter.go:24:21:24:40 | call to getUntrustedString | jsoniter.go:39:31:39:45 | untrustedString | provenance | | -| jsoniter.go:27:17:27:30 | untrustedInput | jsoniter.go:27:33:27:37 | &... | provenance | MaD:346 | +| jsoniter.go:27:17:27:30 | untrustedInput | jsoniter.go:27:33:27:37 | &... | provenance | MaD:349 | | jsoniter.go:27:33:27:37 | &... | jsoniter.go:28:15:28:24 | selection of field | provenance | | -| jsoniter.go:31:21:31:34 | untrustedInput | jsoniter.go:31:37:31:42 | &... | provenance | MaD:344 | +| jsoniter.go:31:21:31:34 | untrustedInput | jsoniter.go:31:37:31:42 | &... | provenance | MaD:347 | | jsoniter.go:31:37:31:42 | &... | jsoniter.go:32:15:32:25 | selection of field | provenance | | -| jsoniter.go:35:27:35:41 | untrustedString | jsoniter.go:35:44:35:49 | &... | provenance | MaD:347 | +| jsoniter.go:35:27:35:41 | untrustedString | jsoniter.go:35:44:35:49 | &... | provenance | MaD:350 | | jsoniter.go:35:44:35:49 | &... | jsoniter.go:36:15:36:25 | selection of field | provenance | | -| jsoniter.go:39:31:39:45 | untrustedString | jsoniter.go:39:48:39:53 | &... | provenance | MaD:345 | +| jsoniter.go:39:31:39:45 | untrustedString | jsoniter.go:39:48:39:53 | &... | provenance | MaD:348 | | jsoniter.go:39:48:39:53 | &... | jsoniter.go:40:15:40:25 | selection of field | provenance | | nodes | jsoniter.go:23:20:23:38 | call to getUntrustedBytes | semmle.label | call to getUntrustedBytes | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Revel/ReflectedXss.expected b/go/ql/test/library-tests/semmle/go/frameworks/Revel/ReflectedXss.expected index 23abbdd54b2..3920d50cdc4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Revel/ReflectedXss.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Revel/ReflectedXss.expected @@ -1,10 +1,10 @@ edges | EndToEnd.go:35:2:35:4 | definition of buf | EndToEnd.go:37:24:37:26 | buf | provenance | | | EndToEnd.go:36:18:36:25 | selection of Params | EndToEnd.go:36:18:36:30 | selection of Form | provenance | | -| EndToEnd.go:36:18:36:30 | selection of Form | EndToEnd.go:36:18:36:47 | call to Get | provenance | MaD:739 | -| EndToEnd.go:36:18:36:47 | call to Get | EndToEnd.go:35:2:35:4 | definition of buf | provenance | MaD:553 | +| EndToEnd.go:36:18:36:30 | selection of Form | EndToEnd.go:36:18:36:47 | call to Get | provenance | MaD:742 | +| EndToEnd.go:36:18:36:47 | call to Get | EndToEnd.go:35:2:35:4 | definition of buf | provenance | MaD:556 | | EndToEnd.go:69:22:69:29 | selection of Params | EndToEnd.go:69:22:69:34 | selection of Form | provenance | | -| EndToEnd.go:69:22:69:34 | selection of Form | EndToEnd.go:69:22:69:51 | call to Get | provenance | MaD:739 | +| EndToEnd.go:69:22:69:34 | selection of Form | EndToEnd.go:69:22:69:51 | call to Get | provenance | MaD:742 | | Revel.go:70:22:70:29 | selection of Params | Revel.go:70:22:70:35 | selection of Query | provenance | | | examples/booking/app/init.go:36:44:36:48 | selection of URL | examples/booking/app/init.go:36:44:36:53 | selection of Path | provenance | | | examples/booking/app/init.go:40:49:40:53 | selection of URL | examples/booking/app/init.go:40:49:40:58 | selection of Path | provenance | | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Revel/TaintedPath.expected b/go/ql/test/library-tests/semmle/go/frameworks/Revel/TaintedPath.expected index dc85069dcba..fbe76bc2f91 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Revel/TaintedPath.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Revel/TaintedPath.expected @@ -1,8 +1,8 @@ edges | EndToEnd.go:58:18:58:25 | selection of Params | EndToEnd.go:58:18:58:30 | selection of Form | provenance | | -| EndToEnd.go:58:18:58:30 | selection of Form | EndToEnd.go:58:18:58:47 | call to Get | provenance | MaD:739 | +| EndToEnd.go:58:18:58:30 | selection of Form | EndToEnd.go:58:18:58:47 | call to Get | provenance | MaD:742 | | EndToEnd.go:64:26:64:33 | selection of Params | EndToEnd.go:64:26:64:38 | selection of Form | provenance | | -| EndToEnd.go:64:26:64:38 | selection of Form | EndToEnd.go:64:26:64:55 | call to Get | provenance | MaD:739 | +| EndToEnd.go:64:26:64:38 | selection of Form | EndToEnd.go:64:26:64:55 | call to Get | provenance | MaD:742 | nodes | EndToEnd.go:58:18:58:25 | selection of Params | semmle.label | selection of Params | | EndToEnd.go:58:18:58:30 | selection of Form | semmle.label | selection of Form | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected b/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected index 2290d6d6c40..842a8036849 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected @@ -6,9 +6,9 @@ edges | rpc/notes/service.twirp.go:493:2:493:2 | capture variable reqContent | rpc/notes/service.twirp.go:495:35:495:44 | reqContent | provenance | | | rpc/notes/service.twirp.go:495:35:495:44 | reqContent | server/main.go:19:56:19:61 | definition of params | provenance | | | rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | rpc/notes/service.twirp.go:544:27:544:29 | buf | provenance | | -| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | provenance | MaD:544 | +| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | provenance | MaD:547 | | rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | rpc/notes/service.twirp.go:574:2:574:2 | capture variable reqContent | provenance | | -| rpc/notes/service.twirp.go:544:27:544:29 | buf | rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | provenance | MaD:429 | +| rpc/notes/service.twirp.go:544:27:544:29 | buf | rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | provenance | MaD:432 | | rpc/notes/service.twirp.go:554:6:554:13 | definition of typedReq | rpc/notes/service.twirp.go:558:44:558:51 | typedReq | provenance | | | rpc/notes/service.twirp.go:558:44:558:51 | typedReq | server/main.go:19:56:19:61 | definition of params | provenance | | | rpc/notes/service.twirp.go:574:2:574:2 | capture variable reqContent | rpc/notes/service.twirp.go:576:35:576:44 | reqContent | provenance | | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.expected b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.expected index 7e9932e143d..18ebd92b098 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.expected @@ -1,40 +1,40 @@ edges -| test.go:12:12:12:22 | selection of URL | test.go:12:12:12:30 | call to Query | provenance | MaD:732 | -| test.go:12:12:12:30 | call to Query | test.go:12:12:12:44 | call to Get | provenance | MaD:739 | +| test.go:12:12:12:22 | selection of URL | test.go:12:12:12:30 | call to Query | provenance | MaD:735 | +| test.go:12:12:12:30 | call to Query | test.go:12:12:12:44 | call to Get | provenance | MaD:742 | | test.go:12:12:12:44 | call to Get | test.go:15:42:15:47 | param1 | provenance | | | test.go:15:22:15:48 | call to UnescapeString | test.go:15:15:15:49 | type conversion | provenance | | -| test.go:15:42:15:47 | param1 | test.go:15:22:15:48 | call to UnescapeString | provenance | MaD:411 | +| test.go:15:42:15:47 | param1 | test.go:15:22:15:48 | call to UnescapeString | provenance | MaD:414 | | test.go:17:2:17:36 | ... := ...[0] | test.go:18:15:18:31 | type conversion | provenance | | | test.go:17:2:17:36 | ... := ...[0] | test.go:29:22:29:25 | node | provenance | | -| test.go:17:24:17:35 | selection of Body | test.go:17:2:17:36 | ... := ...[0] | provenance | MaD:406 | +| test.go:17:24:17:35 | selection of Body | test.go:17:2:17:36 | ... := ...[0] | provenance | MaD:409 | | test.go:20:2:20:48 | ... := ...[0] | test.go:21:15:21:32 | type conversion | provenance | | -| test.go:20:36:20:47 | selection of Body | test.go:20:2:20:48 | ... := ...[0] | provenance | MaD:409 | +| test.go:20:36:20:47 | selection of Body | test.go:20:2:20:48 | ... := ...[0] | provenance | MaD:412 | | test.go:23:2:23:50 | ... := ...[0] | test.go:24:15:24:35 | type conversion | provenance | | -| test.go:23:33:23:44 | selection of Body | test.go:23:2:23:50 | ... := ...[0] | provenance | MaD:407 | +| test.go:23:33:23:44 | selection of Body | test.go:23:2:23:50 | ... := ...[0] | provenance | MaD:410 | | test.go:26:2:26:62 | ... := ...[0] | test.go:27:15:27:36 | type conversion | provenance | | -| test.go:26:45:26:56 | selection of Body | test.go:26:2:26:62 | ... := ...[0] | provenance | MaD:408 | +| test.go:26:45:26:56 | selection of Body | test.go:26:2:26:62 | ... := ...[0] | provenance | MaD:411 | | test.go:31:15:31:45 | call to NewTokenizer | test.go:32:15:32:23 | tokenizer | provenance | | | test.go:31:15:31:45 | call to NewTokenizer | test.go:33:15:33:23 | tokenizer | provenance | | | test.go:31:15:31:45 | call to NewTokenizer | test.go:34:17:34:25 | tokenizer | provenance | | | test.go:31:15:31:45 | call to NewTokenizer | test.go:36:15:36:23 | tokenizer | provenance | | | test.go:31:15:31:45 | call to NewTokenizer | test.go:37:22:37:30 | tokenizer | provenance | | -| test.go:31:33:31:44 | selection of Body | test.go:31:15:31:45 | call to NewTokenizer | provenance | MaD:404 | -| test.go:32:15:32:23 | tokenizer | test.go:32:15:32:34 | call to Buffered | provenance | MaD:414 | -| test.go:33:15:33:23 | tokenizer | test.go:33:15:33:29 | call to Raw | provenance | MaD:415 | +| test.go:31:33:31:44 | selection of Body | test.go:31:15:31:45 | call to NewTokenizer | provenance | MaD:407 | +| test.go:32:15:32:23 | tokenizer | test.go:32:15:32:34 | call to Buffered | provenance | MaD:417 | +| test.go:33:15:33:23 | tokenizer | test.go:33:15:33:29 | call to Raw | provenance | MaD:418 | | test.go:34:2:34:35 | ... := ...[1] | test.go:35:15:35:19 | value | provenance | | -| test.go:34:17:34:25 | tokenizer | test.go:34:2:34:35 | ... := ...[1] | provenance | MaD:416 | -| test.go:36:15:36:23 | tokenizer | test.go:36:15:36:30 | call to Text | provenance | MaD:417 | -| test.go:37:22:37:30 | tokenizer | test.go:37:22:37:38 | call to Token | provenance | MaD:418 | +| test.go:34:17:34:25 | tokenizer | test.go:34:2:34:35 | ... := ...[1] | provenance | MaD:419 | +| test.go:36:15:36:23 | tokenizer | test.go:36:15:36:30 | call to Text | provenance | MaD:420 | +| test.go:37:22:37:30 | tokenizer | test.go:37:22:37:38 | call to Token | provenance | MaD:421 | | test.go:37:22:37:38 | call to Token | test.go:37:15:37:44 | type conversion | provenance | | | test.go:39:23:39:77 | call to NewTokenizerFragment | test.go:40:15:40:31 | tokenizerFragment | provenance | | -| test.go:39:49:39:60 | selection of Body | test.go:39:23:39:77 | call to NewTokenizerFragment | provenance | MaD:405 | -| test.go:40:15:40:31 | tokenizerFragment | test.go:40:15:40:42 | call to Buffered | provenance | MaD:414 | +| test.go:39:49:39:60 | selection of Body | test.go:39:23:39:77 | call to NewTokenizerFragment | provenance | MaD:408 | +| test.go:40:15:40:31 | tokenizerFragment | test.go:40:15:40:42 | call to Buffered | provenance | MaD:417 | | test.go:42:6:42:14 | definition of cleanNode | test.go:45:22:45:31 | &... | provenance | | | test.go:42:6:42:14 | definition of cleanNode | test.go:45:22:45:31 | &... | provenance | | | test.go:42:6:42:14 | definition of cleanNode | test.go:45:23:45:31 | cleanNode | provenance | | | test.go:43:2:43:43 | ... := ...[0] | test.go:44:24:44:34 | taintedNode | provenance | | -| test.go:43:31:43:42 | selection of Body | test.go:43:2:43:43 | ... := ...[0] | provenance | MaD:406 | -| test.go:44:24:44:34 | taintedNode | test.go:42:6:42:14 | definition of cleanNode | provenance | MaD:412 | +| test.go:43:31:43:42 | selection of Body | test.go:43:2:43:43 | ... := ...[0] | provenance | MaD:409 | +| test.go:44:24:44:34 | taintedNode | test.go:42:6:42:14 | definition of cleanNode | provenance | MaD:415 | | test.go:45:22:45:31 | &... | test.go:45:22:45:31 | &... | provenance | | | test.go:45:22:45:31 | &... | test.go:45:22:45:31 | &... | provenance | | | test.go:45:22:45:31 | &... | test.go:45:23:45:31 | cleanNode | provenance | | @@ -46,8 +46,8 @@ edges | test.go:47:6:47:15 | definition of cleanNode2 | test.go:50:22:50:32 | &... | provenance | | | test.go:47:6:47:15 | definition of cleanNode2 | test.go:50:23:50:32 | cleanNode2 | provenance | | | test.go:48:2:48:44 | ... := ...[0] | test.go:49:26:49:37 | taintedNode2 | provenance | | -| test.go:48:32:48:43 | selection of Body | test.go:48:2:48:44 | ... := ...[0] | provenance | MaD:406 | -| test.go:49:26:49:37 | taintedNode2 | test.go:47:6:47:15 | definition of cleanNode2 | provenance | MaD:413 | +| test.go:48:32:48:43 | selection of Body | test.go:48:2:48:44 | ... := ...[0] | provenance | MaD:409 | +| test.go:49:26:49:37 | taintedNode2 | test.go:47:6:47:15 | definition of cleanNode2 | provenance | MaD:416 | | test.go:50:22:50:32 | &... | test.go:50:22:50:32 | &... | provenance | | | test.go:50:22:50:32 | &... | test.go:50:22:50:32 | &... | provenance | | | test.go:50:22:50:32 | &... | test.go:50:23:50:32 | cleanNode2 | provenance | | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.expected b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.expected index 8b3a16cd35c..8c709e5b98c 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.expected @@ -1,6 +1,6 @@ edges -| test.go:56:2:56:42 | ... := ...[0] | test.go:57:29:57:40 | selection of Value | provenance | Src:MaD:664 | -| test.go:57:29:57:40 | selection of Value | test.go:57:11:57:41 | call to EscapeString | provenance | MaD:403 | +| test.go:56:2:56:42 | ... := ...[0] | test.go:57:29:57:40 | selection of Value | provenance | Src:MaD:667 | +| test.go:57:29:57:40 | selection of Value | test.go:57:11:57:41 | call to EscapeString | provenance | MaD:406 | nodes | test.go:56:2:56:42 | ... := ...[0] | semmle.label | ... := ...[0] | | test.go:57:11:57:41 | call to EscapeString | semmle.label | call to EscapeString | diff --git a/go/ql/test/query-tests/Security/CWE-022/TaintedPath.expected b/go/ql/test/query-tests/Security/CWE-022/TaintedPath.expected index f8c551ea750..a14903d578f 100644 --- a/go/ql/test/query-tests/Security/CWE-022/TaintedPath.expected +++ b/go/ql/test/query-tests/Security/CWE-022/TaintedPath.expected @@ -1,10 +1,10 @@ edges -| TaintedPath.go:14:18:14:22 | selection of URL | TaintedPath.go:14:18:14:30 | call to Query | provenance | MaD:732 | +| TaintedPath.go:14:18:14:22 | selection of URL | TaintedPath.go:14:18:14:30 | call to Query | provenance | MaD:735 | | TaintedPath.go:14:18:14:30 | call to Query | TaintedPath.go:17:29:17:40 | tainted_path | provenance | | | TaintedPath.go:14:18:14:30 | call to Query | TaintedPath.go:21:57:21:68 | tainted_path | provenance | | | TaintedPath.go:14:18:14:30 | call to Query | TaintedPath.go:68:39:68:56 | ...+... | provenance | | | TaintedPath.go:21:57:21:68 | tainted_path | TaintedPath.go:21:28:21:69 | call to Join | provenance | FunctionModel | -| TaintedPath.go:68:39:68:56 | ...+... | TaintedPath.go:68:28:68:57 | call to Clean | provenance | MaD:758 | +| TaintedPath.go:68:39:68:56 | ...+... | TaintedPath.go:68:28:68:57 | call to Clean | provenance | MaD:761 | nodes | TaintedPath.go:14:18:14:22 | selection of URL | semmle.label | selection of URL | | TaintedPath.go:14:18:14:30 | call to Query | semmle.label | call to Query | diff --git a/go/ql/test/query-tests/Security/CWE-022/ZipSlip.expected b/go/ql/test/query-tests/Security/CWE-022/ZipSlip.expected index 14b42a97482..3e46b5727cc 100644 --- a/go/ql/test/query-tests/Security/CWE-022/ZipSlip.expected +++ b/go/ql/test/query-tests/Security/CWE-022/ZipSlip.expected @@ -7,9 +7,9 @@ edges | UnsafeUnzipSymlinkGood.go:76:70:76:80 | selection of Name | UnsafeUnzipSymlinkGood.go:52:24:52:32 | definition of candidate | provenance | | | ZipSlip.go:11:2:15:2 | range statement[1] | ZipSlip.go:12:24:12:29 | selection of Name | provenance | | | ZipSlip.go:12:3:12:30 | ... := ...[0] | ZipSlip.go:14:20:14:20 | p | provenance | | -| ZipSlip.go:12:24:12:29 | selection of Name | ZipSlip.go:12:3:12:30 | ... := ...[0] | provenance | MaD:744 | +| ZipSlip.go:12:24:12:29 | selection of Name | ZipSlip.go:12:3:12:30 | ... := ...[0] | provenance | MaD:747 | | tarslip.go:15:2:15:30 | ... := ...[0] | tarslip.go:16:23:16:33 | selection of Name | provenance | | -| tarslip.go:16:23:16:33 | selection of Name | tarslip.go:16:14:16:34 | call to Dir | provenance | MaD:759 | +| tarslip.go:16:23:16:33 | selection of Name | tarslip.go:16:14:16:34 | call to Dir | provenance | MaD:762 | | tst.go:23:2:43:2 | range statement[1] | tst.go:29:20:29:23 | path | provenance | | nodes | UnsafeUnzipSymlinkGood.go:52:24:52:32 | definition of candidate | semmle.label | definition of candidate | diff --git a/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected b/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected index afe35f92dc6..77b37a3db7b 100644 --- a/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected +++ b/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected @@ -1,19 +1,19 @@ edges -| ArgumentInjection.go:9:10:9:16 | selection of URL | ArgumentInjection.go:9:10:9:24 | call to Query | provenance | MaD:732 | +| ArgumentInjection.go:9:10:9:16 | selection of URL | ArgumentInjection.go:9:10:9:24 | call to Query | provenance | MaD:735 | | ArgumentInjection.go:9:10:9:24 | call to Query | ArgumentInjection.go:10:31:10:34 | path | provenance | | -| CommandInjection.go:9:13:9:19 | selection of URL | CommandInjection.go:9:13:9:27 | call to Query | provenance | MaD:732 | +| CommandInjection.go:9:13:9:19 | selection of URL | CommandInjection.go:9:13:9:27 | call to Query | provenance | MaD:735 | | CommandInjection.go:9:13:9:27 | call to Query | CommandInjection.go:10:22:10:28 | cmdName | provenance | | -| GitSubcommands.go:10:13:10:19 | selection of URL | GitSubcommands.go:10:13:10:27 | call to Query | provenance | MaD:732 | +| GitSubcommands.go:10:13:10:19 | selection of URL | GitSubcommands.go:10:13:10:27 | call to Query | provenance | MaD:735 | | GitSubcommands.go:10:13:10:27 | call to Query | GitSubcommands.go:12:31:12:37 | tainted | provenance | | | GitSubcommands.go:10:13:10:27 | call to Query | GitSubcommands.go:13:31:13:37 | tainted | provenance | | | GitSubcommands.go:10:13:10:27 | call to Query | GitSubcommands.go:14:30:14:36 | tainted | provenance | | | GitSubcommands.go:10:13:10:27 | call to Query | GitSubcommands.go:15:35:15:41 | tainted | provenance | | | GitSubcommands.go:10:13:10:27 | call to Query | GitSubcommands.go:16:36:16:42 | tainted | provenance | | -| SanitizingDoubleDash.go:9:13:9:19 | selection of URL | SanitizingDoubleDash.go:9:13:9:27 | call to Query | provenance | MaD:732 | +| SanitizingDoubleDash.go:9:13:9:19 | selection of URL | SanitizingDoubleDash.go:9:13:9:27 | call to Query | provenance | MaD:735 | | SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:13:25:13:31 | tainted | provenance | | | SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:14:23:14:33 | slice expression | provenance | | | SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:39:31:39:37 | tainted | provenance | | -| SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:53:21:53:28 | arrayLit | provenance | | +| SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:52:24:52:30 | tainted | provenance | | | SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:68:31:68:37 | tainted | provenance | | | SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:80:23:80:29 | tainted | provenance | | | SanitizingDoubleDash.go:13:15:13:32 | array literal [array] | SanitizingDoubleDash.go:14:23:14:30 | arrayLit [array] | provenance | | @@ -21,15 +21,25 @@ edges | SanitizingDoubleDash.go:14:23:14:30 | arrayLit [array] | SanitizingDoubleDash.go:14:23:14:33 | slice element node | provenance | | | SanitizingDoubleDash.go:14:23:14:33 | slice element node | SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] | provenance | | | SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] | SanitizingDoubleDash.go:14:23:14:33 | slice expression | provenance | | +| SanitizingDoubleDash.go:39:14:39:44 | []type{args} [array] | SanitizingDoubleDash.go:39:14:39:44 | call to append | provenance | MaD:29 | +| SanitizingDoubleDash.go:39:14:39:44 | []type{args} [array] | SanitizingDoubleDash.go:39:14:39:44 | call to append [array] | provenance | MaD:29 | | SanitizingDoubleDash.go:39:14:39:44 | call to append | SanitizingDoubleDash.go:40:23:40:30 | arrayLit | provenance | | -| SanitizingDoubleDash.go:39:31:39:37 | tainted | SanitizingDoubleDash.go:39:14:39:44 | call to append | provenance | FunctionModel | +| SanitizingDoubleDash.go:39:14:39:44 | call to append [array] | SanitizingDoubleDash.go:40:23:40:30 | arrayLit | provenance | | +| SanitizingDoubleDash.go:39:31:39:37 | tainted | SanitizingDoubleDash.go:39:14:39:44 | []type{args} [array] | provenance | | +| SanitizingDoubleDash.go:52:15:52:31 | slice literal [array] | SanitizingDoubleDash.go:53:21:53:28 | arrayLit [array] | provenance | | +| SanitizingDoubleDash.go:52:24:52:30 | tainted | SanitizingDoubleDash.go:52:15:52:31 | slice literal [array] | provenance | | | SanitizingDoubleDash.go:53:14:53:35 | call to append | SanitizingDoubleDash.go:54:23:54:30 | arrayLit | provenance | | -| SanitizingDoubleDash.go:53:21:53:28 | arrayLit | SanitizingDoubleDash.go:53:14:53:35 | call to append | provenance | FunctionModel | -| SanitizingDoubleDash.go:68:14:68:38 | call to append | SanitizingDoubleDash.go:69:21:69:28 | arrayLit | provenance | | -| SanitizingDoubleDash.go:68:31:68:37 | tainted | SanitizingDoubleDash.go:68:14:68:38 | call to append | provenance | FunctionModel | +| SanitizingDoubleDash.go:53:14:53:35 | call to append [array] | SanitizingDoubleDash.go:54:23:54:30 | arrayLit | provenance | | +| SanitizingDoubleDash.go:53:21:53:28 | arrayLit [array] | SanitizingDoubleDash.go:53:14:53:35 | call to append | provenance | MaD:28 | +| SanitizingDoubleDash.go:53:21:53:28 | arrayLit [array] | SanitizingDoubleDash.go:53:14:53:35 | call to append [array] | provenance | MaD:28 | +| SanitizingDoubleDash.go:68:14:68:38 | []type{args} [array] | SanitizingDoubleDash.go:68:14:68:38 | call to append [array] | provenance | MaD:29 | +| SanitizingDoubleDash.go:68:14:68:38 | call to append [array] | SanitizingDoubleDash.go:69:21:69:28 | arrayLit [array] | provenance | | +| SanitizingDoubleDash.go:68:31:68:37 | tainted | SanitizingDoubleDash.go:68:14:68:38 | []type{args} [array] | provenance | | | SanitizingDoubleDash.go:69:14:69:35 | call to append | SanitizingDoubleDash.go:70:23:70:30 | arrayLit | provenance | | -| SanitizingDoubleDash.go:69:21:69:28 | arrayLit | SanitizingDoubleDash.go:69:14:69:35 | call to append | provenance | FunctionModel | -| SanitizingDoubleDash.go:92:13:92:19 | selection of URL | SanitizingDoubleDash.go:92:13:92:27 | call to Query | provenance | MaD:732 | +| SanitizingDoubleDash.go:69:14:69:35 | call to append [array] | SanitizingDoubleDash.go:70:23:70:30 | arrayLit | provenance | | +| SanitizingDoubleDash.go:69:21:69:28 | arrayLit [array] | SanitizingDoubleDash.go:69:14:69:35 | call to append | provenance | MaD:28 | +| SanitizingDoubleDash.go:69:21:69:28 | arrayLit [array] | SanitizingDoubleDash.go:69:14:69:35 | call to append [array] | provenance | MaD:28 | +| SanitizingDoubleDash.go:92:13:92:19 | selection of URL | SanitizingDoubleDash.go:92:13:92:27 | call to Query | provenance | MaD:735 | | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:95:25:95:31 | tainted | provenance | | | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:96:24:96:34 | slice expression | provenance | | | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:100:31:100:37 | tainted | provenance | | @@ -39,7 +49,7 @@ edges | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:111:37:111:43 | tainted | provenance | | | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:117:31:117:37 | tainted | provenance | | | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:123:31:123:37 | tainted | provenance | | -| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:129:21:129:28 | arrayLit | provenance | | +| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:128:24:128:30 | tainted | provenance | | | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:136:31:136:37 | tainted | provenance | | | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:142:31:142:37 | tainted | provenance | | | SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:148:30:148:36 | tainted | provenance | | @@ -56,20 +66,39 @@ edges | SanitizingDoubleDash.go:101:24:101:34 | slice expression [array] | SanitizingDoubleDash.go:101:24:101:34 | slice expression | provenance | | | SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] | SanitizingDoubleDash.go:106:24:106:31 | arrayLit | provenance | | | SanitizingDoubleDash.go:105:30:105:36 | tainted | SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] | provenance | | +| SanitizingDoubleDash.go:111:14:111:44 | []type{args} [array] | SanitizingDoubleDash.go:111:14:111:44 | call to append | provenance | MaD:29 | +| SanitizingDoubleDash.go:111:14:111:44 | []type{args} [array] | SanitizingDoubleDash.go:111:14:111:44 | call to append [array] | provenance | MaD:29 | | SanitizingDoubleDash.go:111:14:111:44 | call to append | SanitizingDoubleDash.go:112:24:112:31 | arrayLit | provenance | | -| SanitizingDoubleDash.go:111:37:111:43 | tainted | SanitizingDoubleDash.go:111:14:111:44 | call to append | provenance | FunctionModel | +| SanitizingDoubleDash.go:111:14:111:44 | call to append [array] | SanitizingDoubleDash.go:112:24:112:31 | arrayLit | provenance | | +| SanitizingDoubleDash.go:111:37:111:43 | tainted | SanitizingDoubleDash.go:111:14:111:44 | []type{args} [array] | provenance | | +| SanitizingDoubleDash.go:117:14:117:44 | []type{args} [array] | SanitizingDoubleDash.go:117:14:117:44 | call to append | provenance | MaD:29 | +| SanitizingDoubleDash.go:117:14:117:44 | []type{args} [array] | SanitizingDoubleDash.go:117:14:117:44 | call to append [array] | provenance | MaD:29 | | SanitizingDoubleDash.go:117:14:117:44 | call to append | SanitizingDoubleDash.go:118:24:118:31 | arrayLit | provenance | | -| SanitizingDoubleDash.go:117:31:117:37 | tainted | SanitizingDoubleDash.go:117:14:117:44 | call to append | provenance | FunctionModel | +| SanitizingDoubleDash.go:117:14:117:44 | call to append [array] | SanitizingDoubleDash.go:118:24:118:31 | arrayLit | provenance | | +| SanitizingDoubleDash.go:117:31:117:37 | tainted | SanitizingDoubleDash.go:117:14:117:44 | []type{args} [array] | provenance | | +| SanitizingDoubleDash.go:123:14:123:38 | []type{args} [array] | SanitizingDoubleDash.go:123:14:123:38 | call to append | provenance | MaD:29 | +| SanitizingDoubleDash.go:123:14:123:38 | []type{args} [array] | SanitizingDoubleDash.go:123:14:123:38 | call to append [array] | provenance | MaD:29 | | SanitizingDoubleDash.go:123:14:123:38 | call to append | SanitizingDoubleDash.go:124:24:124:31 | arrayLit | provenance | | -| SanitizingDoubleDash.go:123:31:123:37 | tainted | SanitizingDoubleDash.go:123:14:123:38 | call to append | provenance | FunctionModel | +| SanitizingDoubleDash.go:123:14:123:38 | call to append [array] | SanitizingDoubleDash.go:124:24:124:31 | arrayLit | provenance | | +| SanitizingDoubleDash.go:123:31:123:37 | tainted | SanitizingDoubleDash.go:123:14:123:38 | []type{args} [array] | provenance | | +| SanitizingDoubleDash.go:128:15:128:31 | slice literal [array] | SanitizingDoubleDash.go:129:21:129:28 | arrayLit [array] | provenance | | +| SanitizingDoubleDash.go:128:24:128:30 | tainted | SanitizingDoubleDash.go:128:15:128:31 | slice literal [array] | provenance | | | SanitizingDoubleDash.go:129:14:129:35 | call to append | SanitizingDoubleDash.go:130:24:130:31 | arrayLit | provenance | | -| SanitizingDoubleDash.go:129:21:129:28 | arrayLit | SanitizingDoubleDash.go:129:14:129:35 | call to append | provenance | FunctionModel | +| SanitizingDoubleDash.go:129:14:129:35 | call to append [array] | SanitizingDoubleDash.go:130:24:130:31 | arrayLit | provenance | | +| SanitizingDoubleDash.go:129:21:129:28 | arrayLit [array] | SanitizingDoubleDash.go:129:14:129:35 | call to append | provenance | MaD:28 | +| SanitizingDoubleDash.go:129:21:129:28 | arrayLit [array] | SanitizingDoubleDash.go:129:14:129:35 | call to append [array] | provenance | MaD:28 | +| SanitizingDoubleDash.go:136:14:136:38 | []type{args} [array] | SanitizingDoubleDash.go:136:14:136:38 | call to append | provenance | MaD:29 | +| SanitizingDoubleDash.go:136:14:136:38 | []type{args} [array] | SanitizingDoubleDash.go:136:14:136:38 | call to append [array] | provenance | MaD:29 | | SanitizingDoubleDash.go:136:14:136:38 | call to append | SanitizingDoubleDash.go:137:24:137:31 | arrayLit | provenance | | -| SanitizingDoubleDash.go:136:31:136:37 | tainted | SanitizingDoubleDash.go:136:14:136:38 | call to append | provenance | FunctionModel | -| SanitizingDoubleDash.go:142:14:142:38 | call to append | SanitizingDoubleDash.go:143:21:143:28 | arrayLit | provenance | | -| SanitizingDoubleDash.go:142:31:142:37 | tainted | SanitizingDoubleDash.go:142:14:142:38 | call to append | provenance | FunctionModel | +| SanitizingDoubleDash.go:136:14:136:38 | call to append [array] | SanitizingDoubleDash.go:137:24:137:31 | arrayLit | provenance | | +| SanitizingDoubleDash.go:136:31:136:37 | tainted | SanitizingDoubleDash.go:136:14:136:38 | []type{args} [array] | provenance | | +| SanitizingDoubleDash.go:142:14:142:38 | []type{args} [array] | SanitizingDoubleDash.go:142:14:142:38 | call to append [array] | provenance | MaD:29 | +| SanitizingDoubleDash.go:142:14:142:38 | call to append [array] | SanitizingDoubleDash.go:143:21:143:28 | arrayLit [array] | provenance | | +| SanitizingDoubleDash.go:142:31:142:37 | tainted | SanitizingDoubleDash.go:142:14:142:38 | []type{args} [array] | provenance | | | SanitizingDoubleDash.go:143:14:143:35 | call to append | SanitizingDoubleDash.go:144:24:144:31 | arrayLit | provenance | | -| SanitizingDoubleDash.go:143:21:143:28 | arrayLit | SanitizingDoubleDash.go:143:14:143:35 | call to append | provenance | FunctionModel | +| SanitizingDoubleDash.go:143:14:143:35 | call to append [array] | SanitizingDoubleDash.go:144:24:144:31 | arrayLit | provenance | | +| SanitizingDoubleDash.go:143:21:143:28 | arrayLit [array] | SanitizingDoubleDash.go:143:14:143:35 | call to append | provenance | MaD:28 | +| SanitizingDoubleDash.go:143:21:143:28 | arrayLit [array] | SanitizingDoubleDash.go:143:14:143:35 | call to append [array] | provenance | MaD:28 | nodes | ArgumentInjection.go:9:10:9:16 | selection of URL | semmle.label | selection of URL | | ArgumentInjection.go:9:10:9:24 | call to Query | semmle.label | call to Query | @@ -92,16 +121,23 @@ nodes | SanitizingDoubleDash.go:14:23:14:33 | slice element node | semmle.label | slice element node | | SanitizingDoubleDash.go:14:23:14:33 | slice expression | semmle.label | slice expression | | SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] | semmle.label | slice expression [array] | +| SanitizingDoubleDash.go:39:14:39:44 | []type{args} [array] | semmle.label | []type{args} [array] | | SanitizingDoubleDash.go:39:14:39:44 | call to append | semmle.label | call to append | +| SanitizingDoubleDash.go:39:14:39:44 | call to append [array] | semmle.label | call to append [array] | | SanitizingDoubleDash.go:39:31:39:37 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:40:23:40:30 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:52:15:52:31 | slice literal [array] | semmle.label | slice literal [array] | +| SanitizingDoubleDash.go:52:24:52:30 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:53:14:53:35 | call to append | semmle.label | call to append | -| SanitizingDoubleDash.go:53:21:53:28 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:53:14:53:35 | call to append [array] | semmle.label | call to append [array] | +| SanitizingDoubleDash.go:53:21:53:28 | arrayLit [array] | semmle.label | arrayLit [array] | | SanitizingDoubleDash.go:54:23:54:30 | arrayLit | semmle.label | arrayLit | -| SanitizingDoubleDash.go:68:14:68:38 | call to append | semmle.label | call to append | +| SanitizingDoubleDash.go:68:14:68:38 | []type{args} [array] | semmle.label | []type{args} [array] | +| SanitizingDoubleDash.go:68:14:68:38 | call to append [array] | semmle.label | call to append [array] | | SanitizingDoubleDash.go:68:31:68:37 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:69:14:69:35 | call to append | semmle.label | call to append | -| SanitizingDoubleDash.go:69:21:69:28 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:69:14:69:35 | call to append [array] | semmle.label | call to append [array] | +| SanitizingDoubleDash.go:69:21:69:28 | arrayLit [array] | semmle.label | arrayLit [array] | | SanitizingDoubleDash.go:70:23:70:30 | arrayLit | semmle.label | arrayLit | | SanitizingDoubleDash.go:80:23:80:29 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:92:13:92:19 | selection of URL | semmle.label | selection of URL | @@ -121,25 +157,38 @@ nodes | SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] | semmle.label | slice literal [array] | | SanitizingDoubleDash.go:105:30:105:36 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:106:24:106:31 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:111:14:111:44 | []type{args} [array] | semmle.label | []type{args} [array] | | SanitizingDoubleDash.go:111:14:111:44 | call to append | semmle.label | call to append | +| SanitizingDoubleDash.go:111:14:111:44 | call to append [array] | semmle.label | call to append [array] | | SanitizingDoubleDash.go:111:37:111:43 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:112:24:112:31 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:117:14:117:44 | []type{args} [array] | semmle.label | []type{args} [array] | | SanitizingDoubleDash.go:117:14:117:44 | call to append | semmle.label | call to append | +| SanitizingDoubleDash.go:117:14:117:44 | call to append [array] | semmle.label | call to append [array] | | SanitizingDoubleDash.go:117:31:117:37 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:118:24:118:31 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:123:14:123:38 | []type{args} [array] | semmle.label | []type{args} [array] | | SanitizingDoubleDash.go:123:14:123:38 | call to append | semmle.label | call to append | +| SanitizingDoubleDash.go:123:14:123:38 | call to append [array] | semmle.label | call to append [array] | | SanitizingDoubleDash.go:123:31:123:37 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:124:24:124:31 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:128:15:128:31 | slice literal [array] | semmle.label | slice literal [array] | +| SanitizingDoubleDash.go:128:24:128:30 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:129:14:129:35 | call to append | semmle.label | call to append | -| SanitizingDoubleDash.go:129:21:129:28 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:129:14:129:35 | call to append [array] | semmle.label | call to append [array] | +| SanitizingDoubleDash.go:129:21:129:28 | arrayLit [array] | semmle.label | arrayLit [array] | | SanitizingDoubleDash.go:130:24:130:31 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:136:14:136:38 | []type{args} [array] | semmle.label | []type{args} [array] | | SanitizingDoubleDash.go:136:14:136:38 | call to append | semmle.label | call to append | +| SanitizingDoubleDash.go:136:14:136:38 | call to append [array] | semmle.label | call to append [array] | | SanitizingDoubleDash.go:136:31:136:37 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:137:24:137:31 | arrayLit | semmle.label | arrayLit | -| SanitizingDoubleDash.go:142:14:142:38 | call to append | semmle.label | call to append | +| SanitizingDoubleDash.go:142:14:142:38 | []type{args} [array] | semmle.label | []type{args} [array] | +| SanitizingDoubleDash.go:142:14:142:38 | call to append [array] | semmle.label | call to append [array] | | SanitizingDoubleDash.go:142:31:142:37 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:143:14:143:35 | call to append | semmle.label | call to append | -| SanitizingDoubleDash.go:143:21:143:28 | arrayLit | semmle.label | arrayLit | +| SanitizingDoubleDash.go:143:14:143:35 | call to append [array] | semmle.label | call to append [array] | +| SanitizingDoubleDash.go:143:21:143:28 | arrayLit [array] | semmle.label | arrayLit [array] | | SanitizingDoubleDash.go:144:24:144:31 | arrayLit | semmle.label | arrayLit | | SanitizingDoubleDash.go:148:30:148:36 | tainted | semmle.label | tainted | | SanitizingDoubleDash.go:152:24:152:30 | tainted | semmle.label | tainted | diff --git a/go/ql/test/query-tests/Security/CWE-079/ReflectedXss.expected b/go/ql/test/query-tests/Security/CWE-079/ReflectedXss.expected index 8f4467cf2f8..a691cc4e456 100644 --- a/go/ql/test/query-tests/Security/CWE-079/ReflectedXss.expected +++ b/go/ql/test/query-tests/Security/CWE-079/ReflectedXss.expected @@ -1,45 +1,45 @@ edges -| ReflectedXss.go:11:15:11:20 | selection of Form | ReflectedXss.go:11:15:11:36 | call to Get | provenance | MaD:739 | +| ReflectedXss.go:11:15:11:20 | selection of Form | ReflectedXss.go:11:15:11:36 | call to Get | provenance | MaD:742 | | ReflectedXss.go:11:15:11:36 | call to Get | ReflectedXss.go:14:44:14:51 | username | provenance | | -| contenttype.go:11:11:11:16 | selection of Form | contenttype.go:11:11:11:28 | call to Get | provenance | MaD:739 | +| contenttype.go:11:11:11:16 | selection of Form | contenttype.go:11:11:11:28 | call to Get | provenance | MaD:742 | | contenttype.go:11:11:11:28 | call to Get | contenttype.go:17:11:17:22 | type conversion | provenance | | -| contenttype.go:49:11:49:16 | selection of Form | contenttype.go:49:11:49:28 | call to Get | provenance | MaD:739 | +| contenttype.go:49:11:49:16 | selection of Form | contenttype.go:49:11:49:28 | call to Get | provenance | MaD:742 | | contenttype.go:49:11:49:28 | call to Get | contenttype.go:53:34:53:37 | data | provenance | | -| contenttype.go:63:10:63:28 | call to FormValue | contenttype.go:64:52:64:55 | data | provenance | Src:MaD:667 | -| contenttype.go:73:10:73:28 | call to FormValue | contenttype.go:79:11:79:14 | data | provenance | Src:MaD:667 | -| contenttype.go:88:10:88:28 | call to FormValue | contenttype.go:91:4:91:7 | data | provenance | Src:MaD:667 | -| contenttype.go:113:10:113:28 | call to FormValue | contenttype.go:114:50:114:53 | data | provenance | Src:MaD:667 | -| reflectedxsstest.go:31:2:31:44 | ... := ...[0] | reflectedxsstest.go:32:34:32:37 | file | provenance | Src:MaD:666 | -| reflectedxsstest.go:31:2:31:44 | ... := ...[1] | reflectedxsstest.go:34:46:34:60 | selection of Filename | provenance | Src:MaD:666 | +| contenttype.go:63:10:63:28 | call to FormValue | contenttype.go:64:52:64:55 | data | provenance | Src:MaD:670 | +| contenttype.go:73:10:73:28 | call to FormValue | contenttype.go:79:11:79:14 | data | provenance | Src:MaD:670 | +| contenttype.go:88:10:88:28 | call to FormValue | contenttype.go:91:4:91:7 | data | provenance | Src:MaD:670 | +| contenttype.go:113:10:113:28 | call to FormValue | contenttype.go:114:50:114:53 | data | provenance | Src:MaD:670 | +| reflectedxsstest.go:31:2:31:44 | ... := ...[0] | reflectedxsstest.go:32:34:32:37 | file | provenance | Src:MaD:669 | +| reflectedxsstest.go:31:2:31:44 | ... := ...[1] | reflectedxsstest.go:34:46:34:60 | selection of Filename | provenance | Src:MaD:669 | | reflectedxsstest.go:32:2:32:38 | ... := ...[0] | reflectedxsstest.go:33:49:33:55 | content | provenance | | -| reflectedxsstest.go:32:34:32:37 | file | reflectedxsstest.go:32:2:32:38 | ... := ...[0] | provenance | MaD:537 | -| reflectedxsstest.go:33:17:33:56 | []type{args} [array] | reflectedxsstest.go:33:17:33:56 | call to Sprintf | provenance | MaD:242 | +| reflectedxsstest.go:32:34:32:37 | file | reflectedxsstest.go:32:2:32:38 | ... := ...[0] | provenance | MaD:540 | +| reflectedxsstest.go:33:17:33:56 | []type{args} [array] | reflectedxsstest.go:33:17:33:56 | call to Sprintf | provenance | MaD:245 | | reflectedxsstest.go:33:17:33:56 | call to Sprintf | reflectedxsstest.go:33:10:33:57 | type conversion | provenance | | | reflectedxsstest.go:33:49:33:55 | content | reflectedxsstest.go:33:17:33:56 | []type{args} [array] | provenance | | | reflectedxsstest.go:33:49:33:55 | content | reflectedxsstest.go:33:17:33:56 | call to Sprintf | provenance | FunctionModel | -| reflectedxsstest.go:34:17:34:61 | []type{args} [array] | reflectedxsstest.go:34:17:34:61 | call to Sprintf | provenance | MaD:242 | +| reflectedxsstest.go:34:17:34:61 | []type{args} [array] | reflectedxsstest.go:34:17:34:61 | call to Sprintf | provenance | MaD:245 | | reflectedxsstest.go:34:17:34:61 | call to Sprintf | reflectedxsstest.go:34:10:34:62 | type conversion | provenance | | | reflectedxsstest.go:34:46:34:60 | selection of Filename | reflectedxsstest.go:34:17:34:61 | []type{args} [array] | provenance | | | reflectedxsstest.go:34:46:34:60 | selection of Filename | reflectedxsstest.go:34:17:34:61 | call to Sprintf | provenance | FunctionModel | -| reflectedxsstest.go:38:2:38:35 | ... := ...[0] | reflectedxsstest.go:39:16:39:21 | reader | provenance | Src:MaD:668 | +| reflectedxsstest.go:38:2:38:35 | ... := ...[0] | reflectedxsstest.go:39:16:39:21 | reader | provenance | Src:MaD:671 | | reflectedxsstest.go:39:2:39:32 | ... := ...[0] | reflectedxsstest.go:40:14:40:17 | part | provenance | | | reflectedxsstest.go:39:2:39:32 | ... := ...[0] | reflectedxsstest.go:42:2:42:5 | part | provenance | | -| reflectedxsstest.go:39:16:39:21 | reader | reflectedxsstest.go:39:2:39:32 | ... := ...[0] | provenance | MaD:627 | -| reflectedxsstest.go:40:14:40:17 | part | reflectedxsstest.go:40:14:40:28 | call to FileName | provenance | MaD:625 | +| reflectedxsstest.go:39:16:39:21 | reader | reflectedxsstest.go:39:2:39:32 | ... := ...[0] | provenance | MaD:630 | +| reflectedxsstest.go:40:14:40:17 | part | reflectedxsstest.go:40:14:40:28 | call to FileName | provenance | MaD:628 | | reflectedxsstest.go:40:14:40:28 | call to FileName | reflectedxsstest.go:44:46:44:53 | partName | provenance | | | reflectedxsstest.go:41:2:41:10 | definition of byteSlice | reflectedxsstest.go:45:10:45:18 | byteSlice | provenance | | -| reflectedxsstest.go:42:2:42:5 | part | reflectedxsstest.go:41:2:41:10 | definition of byteSlice | provenance | MaD:550 | -| reflectedxsstest.go:44:17:44:54 | []type{args} [array] | reflectedxsstest.go:44:17:44:54 | call to Sprintf | provenance | MaD:242 | +| reflectedxsstest.go:42:2:42:5 | part | reflectedxsstest.go:41:2:41:10 | definition of byteSlice | provenance | MaD:553 | +| reflectedxsstest.go:44:17:44:54 | []type{args} [array] | reflectedxsstest.go:44:17:44:54 | call to Sprintf | provenance | MaD:245 | | reflectedxsstest.go:44:17:44:54 | call to Sprintf | reflectedxsstest.go:44:10:44:55 | type conversion | provenance | | | reflectedxsstest.go:44:46:44:53 | partName | reflectedxsstest.go:44:17:44:54 | []type{args} [array] | provenance | | | reflectedxsstest.go:44:46:44:53 | partName | reflectedxsstest.go:44:17:44:54 | call to Sprintf | provenance | FunctionModel | -| reflectedxsstest.go:51:14:51:18 | selection of URL | reflectedxsstest.go:51:14:51:26 | call to Query | provenance | MaD:732 | +| reflectedxsstest.go:51:14:51:18 | selection of URL | reflectedxsstest.go:51:14:51:26 | call to Query | provenance | MaD:735 | | reflectedxsstest.go:51:14:51:26 | call to Query | reflectedxsstest.go:54:11:54:21 | type conversion | provenance | | -| tst.go:14:15:14:20 | selection of Form | tst.go:14:15:14:36 | call to Get | provenance | MaD:739 | +| tst.go:14:15:14:20 | selection of Form | tst.go:14:15:14:36 | call to Get | provenance | MaD:742 | | tst.go:14:15:14:36 | call to Get | tst.go:18:32:18:32 | a | provenance | | | tst.go:18:19:18:38 | call to Join | tst.go:18:12:18:39 | type conversion | provenance | | -| tst.go:18:32:18:32 | a | tst.go:18:19:18:38 | call to Join | provenance | MaD:831 | -| tst.go:48:14:48:19 | selection of Form | tst.go:48:14:48:34 | call to Get | provenance | MaD:739 | +| tst.go:18:32:18:32 | a | tst.go:18:19:18:38 | call to Join | provenance | MaD:834 | +| tst.go:48:14:48:19 | selection of Form | tst.go:48:14:48:34 | call to Get | provenance | MaD:742 | | tst.go:48:14:48:34 | call to Get | tst.go:53:12:53:26 | type conversion | provenance | | | websocketXss.go:30:7:30:10 | definition of xnet | websocketXss.go:32:24:32:27 | xnet | provenance | | | websocketXss.go:34:3:34:7 | definition of xnet2 | websocketXss.go:36:24:36:28 | xnet2 | provenance | | diff --git a/go/ql/test/query-tests/Security/CWE-089/SqlInjection.expected b/go/ql/test/query-tests/Security/CWE-089/SqlInjection.expected index 1f46a8f43ba..b2b8053c3ab 100644 --- a/go/ql/test/query-tests/Security/CWE-089/SqlInjection.expected +++ b/go/ql/test/query-tests/Security/CWE-089/SqlInjection.expected @@ -1,50 +1,50 @@ edges -| SqlInjection.go:10:7:11:30 | []type{args} [array] | SqlInjection.go:10:7:11:30 | call to Sprintf | provenance | MaD:242 | +| SqlInjection.go:10:7:11:30 | []type{args} [array] | SqlInjection.go:10:7:11:30 | call to Sprintf | provenance | MaD:245 | | SqlInjection.go:10:7:11:30 | call to Sprintf | SqlInjection.go:12:11:12:11 | q | provenance | | -| SqlInjection.go:11:3:11:9 | selection of URL | SqlInjection.go:11:3:11:17 | call to Query | provenance | MaD:732 | +| SqlInjection.go:11:3:11:9 | selection of URL | SqlInjection.go:11:3:11:17 | call to Query | provenance | MaD:735 | | SqlInjection.go:11:3:11:17 | call to Query | SqlInjection.go:11:3:11:29 | index expression | provenance | | | SqlInjection.go:11:3:11:29 | index expression | SqlInjection.go:10:7:11:30 | []type{args} [array] | provenance | | | SqlInjection.go:11:3:11:29 | index expression | SqlInjection.go:10:7:11:30 | call to Sprintf | provenance | FunctionModel | | issue48.go:17:2:17:33 | ... := ...[0] | issue48.go:18:17:18:17 | b | provenance | | -| issue48.go:17:25:17:32 | selection of Body | issue48.go:17:2:17:33 | ... := ...[0] | provenance | MaD:537 | -| issue48.go:18:17:18:17 | b | issue48.go:18:20:18:39 | &... | provenance | MaD:181 | +| issue48.go:17:25:17:32 | selection of Body | issue48.go:17:2:17:33 | ... := ...[0] | provenance | MaD:540 | +| issue48.go:18:17:18:17 | b | issue48.go:18:20:18:39 | &... | provenance | MaD:184 | | issue48.go:18:20:18:39 | &... | issue48.go:21:3:21:33 | index expression | provenance | | -| issue48.go:20:8:21:34 | []type{args} [array] | issue48.go:20:8:21:34 | call to Sprintf | provenance | MaD:242 | +| issue48.go:20:8:21:34 | []type{args} [array] | issue48.go:20:8:21:34 | call to Sprintf | provenance | MaD:245 | | issue48.go:20:8:21:34 | call to Sprintf | issue48.go:22:11:22:12 | q3 | provenance | | | issue48.go:21:3:21:33 | index expression | issue48.go:20:8:21:34 | []type{args} [array] | provenance | | | issue48.go:21:3:21:33 | index expression | issue48.go:20:8:21:34 | call to Sprintf | provenance | FunctionModel | | issue48.go:27:2:27:34 | ... := ...[0] | issue48.go:28:17:28:18 | b2 | provenance | | -| issue48.go:27:26:27:33 | selection of Body | issue48.go:27:2:27:34 | ... := ...[0] | provenance | MaD:537 | -| issue48.go:28:17:28:18 | b2 | issue48.go:28:21:28:41 | &... | provenance | MaD:181 | +| issue48.go:27:26:27:33 | selection of Body | issue48.go:27:2:27:34 | ... := ...[0] | provenance | MaD:540 | +| issue48.go:28:17:28:18 | b2 | issue48.go:28:21:28:41 | &... | provenance | MaD:184 | | issue48.go:28:21:28:41 | &... | issue48.go:31:3:31:31 | selection of Category | provenance | | -| issue48.go:30:8:31:32 | []type{args} [array] | issue48.go:30:8:31:32 | call to Sprintf | provenance | MaD:242 | +| issue48.go:30:8:31:32 | []type{args} [array] | issue48.go:30:8:31:32 | call to Sprintf | provenance | MaD:245 | | issue48.go:30:8:31:32 | call to Sprintf | issue48.go:32:11:32:12 | q4 | provenance | | | issue48.go:31:3:31:31 | selection of Category | issue48.go:30:8:31:32 | []type{args} [array] | provenance | | | issue48.go:31:3:31:31 | selection of Category | issue48.go:30:8:31:32 | call to Sprintf | provenance | FunctionModel | -| issue48.go:37:17:37:50 | type conversion | issue48.go:37:53:37:73 | &... | provenance | MaD:181 | -| issue48.go:37:24:37:30 | selection of URL | issue48.go:37:24:37:38 | call to Query | provenance | MaD:732 | +| issue48.go:37:17:37:50 | type conversion | issue48.go:37:53:37:73 | &... | provenance | MaD:184 | +| issue48.go:37:24:37:30 | selection of URL | issue48.go:37:24:37:38 | call to Query | provenance | MaD:735 | | issue48.go:37:24:37:38 | call to Query | issue48.go:37:17:37:50 | type conversion | provenance | | | issue48.go:37:53:37:73 | &... | issue48.go:40:3:40:31 | selection of Category | provenance | | -| issue48.go:39:8:40:32 | []type{args} [array] | issue48.go:39:8:40:32 | call to Sprintf | provenance | MaD:242 | +| issue48.go:39:8:40:32 | []type{args} [array] | issue48.go:39:8:40:32 | call to Sprintf | provenance | MaD:245 | | issue48.go:39:8:40:32 | call to Sprintf | issue48.go:41:11:41:12 | q5 | provenance | | | issue48.go:40:3:40:31 | selection of Category | issue48.go:39:8:40:32 | []type{args} [array] | provenance | | | issue48.go:40:3:40:31 | selection of Category | issue48.go:39:8:40:32 | call to Sprintf | provenance | FunctionModel | | main.go:11:11:11:16 | selection of Form | main.go:11:11:11:28 | index expression | provenance | | -| main.go:15:11:15:84 | []type{args} [array] | main.go:15:11:15:84 | call to Sprintf | provenance | MaD:242 | -| main.go:15:63:15:67 | selection of URL | main.go:15:63:15:75 | call to Query | provenance | MaD:732 | +| main.go:15:11:15:84 | []type{args} [array] | main.go:15:11:15:84 | call to Sprintf | provenance | MaD:245 | +| main.go:15:63:15:67 | selection of URL | main.go:15:63:15:75 | call to Query | provenance | MaD:735 | | main.go:15:63:15:75 | call to Query | main.go:15:63:15:83 | index expression | provenance | | | main.go:15:63:15:83 | index expression | main.go:15:11:15:84 | []type{args} [array] | provenance | | | main.go:15:63:15:83 | index expression | main.go:15:11:15:84 | call to Sprintf | provenance | FunctionModel | -| main.go:16:11:16:85 | []type{args} [array] | main.go:16:11:16:85 | call to Sprintf | provenance | MaD:242 | -| main.go:16:63:16:70 | selection of Header | main.go:16:63:16:84 | call to Get | provenance | MaD:652 | +| main.go:16:11:16:85 | []type{args} [array] | main.go:16:11:16:85 | call to Sprintf | provenance | MaD:245 | +| main.go:16:63:16:70 | selection of Header | main.go:16:63:16:84 | call to Get | provenance | MaD:655 | | main.go:16:63:16:84 | call to Get | main.go:16:11:16:85 | []type{args} [array] | provenance | | | main.go:16:63:16:84 | call to Get | main.go:16:11:16:85 | call to Sprintf | provenance | FunctionModel | | main.go:28:17:31:2 | &... [pointer, Category] | main.go:34:3:34:13 | RequestData [pointer, Category] | provenance | | | main.go:28:18:31:2 | struct literal [Category] | main.go:28:17:31:2 | &... [pointer, Category] | provenance | | -| main.go:30:13:30:19 | selection of URL | main.go:30:13:30:27 | call to Query | provenance | MaD:732 | +| main.go:30:13:30:19 | selection of URL | main.go:30:13:30:27 | call to Query | provenance | MaD:735 | | main.go:30:13:30:27 | call to Query | main.go:30:13:30:39 | index expression | provenance | | | main.go:30:13:30:39 | index expression | main.go:28:18:31:2 | struct literal [Category] | provenance | | -| main.go:33:7:34:23 | []type{args} [array] | main.go:33:7:34:23 | call to Sprintf | provenance | MaD:242 | +| main.go:33:7:34:23 | []type{args} [array] | main.go:33:7:34:23 | call to Sprintf | provenance | MaD:245 | | main.go:33:7:34:23 | call to Sprintf | main.go:35:11:35:11 | q | provenance | | | main.go:34:3:34:13 | RequestData [pointer, Category] | main.go:34:3:34:13 | implicit dereference [Category] | provenance | | | main.go:34:3:34:13 | implicit dereference [Category] | main.go:34:3:34:22 | selection of Category | provenance | | @@ -54,10 +54,10 @@ edges | main.go:39:2:39:12 | definition of RequestData [pointer, Category] | main.go:43:3:43:13 | RequestData [pointer, Category] | provenance | | | main.go:40:2:40:12 | RequestData [pointer, Category] | main.go:40:2:40:12 | implicit dereference [Category] | provenance | | | main.go:40:2:40:12 | implicit dereference [Category] | main.go:39:2:39:12 | definition of RequestData [pointer, Category] | provenance | | -| main.go:40:25:40:31 | selection of URL | main.go:40:25:40:39 | call to Query | provenance | MaD:732 | +| main.go:40:25:40:31 | selection of URL | main.go:40:25:40:39 | call to Query | provenance | MaD:735 | | main.go:40:25:40:39 | call to Query | main.go:40:25:40:51 | index expression | provenance | | | main.go:40:25:40:51 | index expression | main.go:40:2:40:12 | implicit dereference [Category] | provenance | | -| main.go:42:7:43:23 | []type{args} [array] | main.go:42:7:43:23 | call to Sprintf | provenance | MaD:242 | +| main.go:42:7:43:23 | []type{args} [array] | main.go:42:7:43:23 | call to Sprintf | provenance | MaD:245 | | main.go:42:7:43:23 | call to Sprintf | main.go:44:11:44:11 | q | provenance | | | main.go:43:3:43:13 | RequestData [pointer, Category] | main.go:43:3:43:13 | implicit dereference [Category] | provenance | | | main.go:43:3:43:13 | implicit dereference [Category] | main.go:43:3:43:22 | selection of Category | provenance | | @@ -67,10 +67,10 @@ edges | main.go:48:2:48:12 | definition of RequestData [pointer, Category] | main.go:52:3:52:13 | RequestData [pointer, Category] | provenance | | | main.go:49:3:49:14 | star expression [Category] | main.go:48:2:48:12 | definition of RequestData [pointer, Category] | provenance | | | main.go:49:4:49:14 | RequestData [pointer, Category] | main.go:49:3:49:14 | star expression [Category] | provenance | | -| main.go:49:28:49:34 | selection of URL | main.go:49:28:49:42 | call to Query | provenance | MaD:732 | +| main.go:49:28:49:34 | selection of URL | main.go:49:28:49:42 | call to Query | provenance | MaD:735 | | main.go:49:28:49:42 | call to Query | main.go:49:28:49:54 | index expression | provenance | | | main.go:49:28:49:54 | index expression | main.go:49:3:49:14 | star expression [Category] | provenance | | -| main.go:51:7:52:23 | []type{args} [array] | main.go:51:7:52:23 | call to Sprintf | provenance | MaD:242 | +| main.go:51:7:52:23 | []type{args} [array] | main.go:51:7:52:23 | call to Sprintf | provenance | MaD:245 | | main.go:51:7:52:23 | call to Sprintf | main.go:53:11:53:11 | q | provenance | | | main.go:52:3:52:13 | RequestData [pointer, Category] | main.go:52:3:52:13 | implicit dereference [Category] | provenance | | | main.go:52:3:52:13 | implicit dereference [Category] | main.go:52:3:52:22 | selection of Category | provenance | | @@ -80,16 +80,16 @@ edges | main.go:57:2:57:12 | definition of RequestData [pointer, Category] | main.go:61:5:61:15 | RequestData [pointer, Category] | provenance | | | main.go:58:3:58:14 | star expression [Category] | main.go:57:2:57:12 | definition of RequestData [pointer, Category] | provenance | | | main.go:58:4:58:14 | RequestData [pointer, Category] | main.go:58:3:58:14 | star expression [Category] | provenance | | -| main.go:58:28:58:34 | selection of URL | main.go:58:28:58:42 | call to Query | provenance | MaD:732 | +| main.go:58:28:58:34 | selection of URL | main.go:58:28:58:42 | call to Query | provenance | MaD:735 | | main.go:58:28:58:42 | call to Query | main.go:58:28:58:54 | index expression | provenance | | | main.go:58:28:58:54 | index expression | main.go:58:3:58:14 | star expression [Category] | provenance | | -| main.go:60:7:61:26 | []type{args} [array] | main.go:60:7:61:26 | call to Sprintf | provenance | MaD:242 | +| main.go:60:7:61:26 | []type{args} [array] | main.go:60:7:61:26 | call to Sprintf | provenance | MaD:245 | | main.go:60:7:61:26 | call to Sprintf | main.go:62:11:62:11 | q | provenance | | | main.go:61:3:61:25 | selection of Category | main.go:60:7:61:26 | []type{args} [array] | provenance | | | main.go:61:3:61:25 | selection of Category | main.go:60:7:61:26 | call to Sprintf | provenance | FunctionModel | | main.go:61:4:61:15 | star expression [Category] | main.go:61:3:61:25 | selection of Category | provenance | | | main.go:61:5:61:15 | RequestData [pointer, Category] | main.go:61:4:61:15 | star expression [Category] | provenance | | -| mongoDB.go:40:20:40:30 | call to Referer | mongoDB.go:42:28:42:41 | untrustedInput | provenance | Src:MaD:670 | +| mongoDB.go:40:20:40:30 | call to Referer | mongoDB.go:42:28:42:41 | untrustedInput | provenance | Src:MaD:673 | | mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:50:34:50:39 | filter | provenance | | | mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:61:27:61:32 | filter | provenance | | | mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:63:23:63:28 | filter | provenance | | diff --git a/go/ql/test/query-tests/Security/CWE-089/StringBreak.expected b/go/ql/test/query-tests/Security/CWE-089/StringBreak.expected index a356d8697be..3f95c912930 100644 --- a/go/ql/test/query-tests/Security/CWE-089/StringBreak.expected +++ b/go/ql/test/query-tests/Security/CWE-089/StringBreak.expected @@ -2,10 +2,10 @@ edges | StringBreak.go:10:2:10:40 | ... := ...[0] | StringBreak.go:14:47:14:57 | versionJSON | provenance | | | StringBreakMismatched.go:12:2:12:40 | ... := ...[0] | StringBreakMismatched.go:13:29:13:47 | type conversion | provenance | | | StringBreakMismatched.go:13:13:13:62 | call to Replace | StringBreakMismatched.go:17:26:17:32 | escaped | provenance | | -| StringBreakMismatched.go:13:29:13:47 | type conversion | StringBreakMismatched.go:13:13:13:62 | call to Replace | provenance | MaD:835 | +| StringBreakMismatched.go:13:29:13:47 | type conversion | StringBreakMismatched.go:13:13:13:62 | call to Replace | provenance | MaD:838 | | StringBreakMismatched.go:24:2:24:40 | ... := ...[0] | StringBreakMismatched.go:25:29:25:47 | type conversion | provenance | | | StringBreakMismatched.go:25:13:25:61 | call to Replace | StringBreakMismatched.go:29:27:29:33 | escaped | provenance | | -| StringBreakMismatched.go:25:29:25:47 | type conversion | StringBreakMismatched.go:25:13:25:61 | call to Replace | provenance | MaD:835 | +| StringBreakMismatched.go:25:29:25:47 | type conversion | StringBreakMismatched.go:25:13:25:61 | call to Replace | provenance | MaD:838 | nodes | StringBreak.go:10:2:10:40 | ... := ...[0] | semmle.label | ... := ...[0] | | StringBreak.go:14:47:14:57 | versionJSON | semmle.label | versionJSON | diff --git a/go/ql/test/query-tests/Security/CWE-327/UnsafeTLS.expected b/go/ql/test/query-tests/Security/CWE-327/UnsafeTLS.expected index b518d306322..d87cdb8dcdc 100644 --- a/go/ql/test/query-tests/Security/CWE-327/UnsafeTLS.expected +++ b/go/ql/test/query-tests/Security/CWE-327/UnsafeTLS.expected @@ -13,19 +13,27 @@ edges | UnsafeTLS.go:297:5:297:38 | selection of TLS_ECDHE_RSA_WITH_RC4_128_SHA | UnsafeTLS.go:296:18:298:4 | slice literal | provenance | | | UnsafeTLS.go:305:5:305:47 | selection of TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | UnsafeTLS.go:304:18:306:4 | slice literal | provenance | | | UnsafeTLS.go:313:5:313:45 | selection of TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 | UnsafeTLS.go:312:18:314:4 | slice literal | provenance | | -| UnsafeTLS.go:329:53:329:93 | selection of TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 | UnsafeTLS.go:329:25:329:94 | call to append | provenance | FunctionModel | +| UnsafeTLS.go:329:25:329:94 | []type{args} [array] | UnsafeTLS.go:329:25:329:94 | call to append | provenance | MaD:29 | +| UnsafeTLS.go:329:53:329:93 | selection of TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 | UnsafeTLS.go:329:25:329:94 | []type{args} [array] | provenance | | | UnsafeTLS.go:334:13:334:38 | call to InsecureCipherSuites | UnsafeTLS.go:336:54:336:57 | selection of ID | provenance | | -| UnsafeTLS.go:336:54:336:57 | selection of ID | UnsafeTLS.go:336:26:336:58 | call to append | provenance | FunctionModel | +| UnsafeTLS.go:336:26:336:58 | []type{args} [array] | UnsafeTLS.go:336:26:336:58 | call to append | provenance | MaD:29 | +| UnsafeTLS.go:336:54:336:57 | selection of ID | UnsafeTLS.go:336:26:336:58 | []type{args} [array] | provenance | | | UnsafeTLS.go:342:13:342:38 | call to InsecureCipherSuites | UnsafeTLS.go:344:40:344:43 | selection of ID | provenance | | -| UnsafeTLS.go:344:19:344:44 | call to append | UnsafeTLS.go:344:26:344:37 | cipherSuites | provenance | | +| UnsafeTLS.go:344:19:344:44 | []type{args} [array] | UnsafeTLS.go:344:19:344:44 | call to append | provenance | MaD:29 | +| UnsafeTLS.go:344:19:344:44 | []type{args} [array] | UnsafeTLS.go:344:19:344:44 | call to append [array] | provenance | MaD:29 | | UnsafeTLS.go:344:19:344:44 | call to append | UnsafeTLS.go:346:25:346:36 | cipherSuites | provenance | | -| UnsafeTLS.go:344:26:344:37 | cipherSuites | UnsafeTLS.go:344:19:344:44 | call to append | provenance | FunctionModel | -| UnsafeTLS.go:344:40:344:43 | selection of ID | UnsafeTLS.go:344:19:344:44 | call to append | provenance | FunctionModel | +| UnsafeTLS.go:344:19:344:44 | call to append [array] | UnsafeTLS.go:344:26:344:37 | cipherSuites [array] | provenance | | +| UnsafeTLS.go:344:26:344:37 | cipherSuites [array] | UnsafeTLS.go:344:19:344:44 | call to append | provenance | MaD:28 | +| UnsafeTLS.go:344:26:344:37 | cipherSuites [array] | UnsafeTLS.go:344:19:344:44 | call to append [array] | provenance | MaD:28 | +| UnsafeTLS.go:344:40:344:43 | selection of ID | UnsafeTLS.go:344:19:344:44 | []type{args} [array] | provenance | | | UnsafeTLS.go:351:13:351:38 | call to InsecureCipherSuites | UnsafeTLS.go:353:40:353:51 | selection of ID | provenance | | -| UnsafeTLS.go:353:19:353:52 | call to append | UnsafeTLS.go:353:26:353:37 | cipherSuites | provenance | | +| UnsafeTLS.go:353:19:353:52 | []type{args} [array] | UnsafeTLS.go:353:19:353:52 | call to append | provenance | MaD:29 | +| UnsafeTLS.go:353:19:353:52 | []type{args} [array] | UnsafeTLS.go:353:19:353:52 | call to append [array] | provenance | MaD:29 | | UnsafeTLS.go:353:19:353:52 | call to append | UnsafeTLS.go:355:25:355:36 | cipherSuites | provenance | | -| UnsafeTLS.go:353:26:353:37 | cipherSuites | UnsafeTLS.go:353:19:353:52 | call to append | provenance | FunctionModel | -| UnsafeTLS.go:353:40:353:51 | selection of ID | UnsafeTLS.go:353:19:353:52 | call to append | provenance | FunctionModel | +| UnsafeTLS.go:353:19:353:52 | call to append [array] | UnsafeTLS.go:353:26:353:37 | cipherSuites [array] | provenance | | +| UnsafeTLS.go:353:26:353:37 | cipherSuites [array] | UnsafeTLS.go:353:19:353:52 | call to append | provenance | MaD:28 | +| UnsafeTLS.go:353:26:353:37 | cipherSuites [array] | UnsafeTLS.go:353:19:353:52 | call to append [array] | provenance | MaD:28 | +| UnsafeTLS.go:353:40:353:51 | selection of ID | UnsafeTLS.go:353:19:353:52 | []type{args} [array] | provenance | | | UnsafeTLS.go:363:5:363:47 | selection of TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | UnsafeTLS.go:362:18:364:4 | slice literal | provenance | | | UnsafeTLS.go:371:5:371:47 | selection of TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | UnsafeTLS.go:370:18:372:4 | slice literal | provenance | | | UnsafeTLS.go:379:5:379:47 | selection of TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | UnsafeTLS.go:378:18:380:4 | slice literal | provenance | | @@ -99,19 +107,25 @@ nodes | UnsafeTLS.go:305:5:305:47 | selection of TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | semmle.label | selection of TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 | | UnsafeTLS.go:312:18:314:4 | slice literal | semmle.label | slice literal | | UnsafeTLS.go:313:5:313:45 | selection of TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 | semmle.label | selection of TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 | +| UnsafeTLS.go:329:25:329:94 | []type{args} [array] | semmle.label | []type{args} [array] | | UnsafeTLS.go:329:25:329:94 | call to append | semmle.label | call to append | | UnsafeTLS.go:329:53:329:93 | selection of TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 | semmle.label | selection of TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 | | UnsafeTLS.go:334:13:334:38 | call to InsecureCipherSuites | semmle.label | call to InsecureCipherSuites | +| UnsafeTLS.go:336:26:336:58 | []type{args} [array] | semmle.label | []type{args} [array] | | UnsafeTLS.go:336:26:336:58 | call to append | semmle.label | call to append | | UnsafeTLS.go:336:54:336:57 | selection of ID | semmle.label | selection of ID | | UnsafeTLS.go:342:13:342:38 | call to InsecureCipherSuites | semmle.label | call to InsecureCipherSuites | +| UnsafeTLS.go:344:19:344:44 | []type{args} [array] | semmle.label | []type{args} [array] | | UnsafeTLS.go:344:19:344:44 | call to append | semmle.label | call to append | -| UnsafeTLS.go:344:26:344:37 | cipherSuites | semmle.label | cipherSuites | +| UnsafeTLS.go:344:19:344:44 | call to append [array] | semmle.label | call to append [array] | +| UnsafeTLS.go:344:26:344:37 | cipherSuites [array] | semmle.label | cipherSuites [array] | | UnsafeTLS.go:344:40:344:43 | selection of ID | semmle.label | selection of ID | | UnsafeTLS.go:346:25:346:36 | cipherSuites | semmle.label | cipherSuites | | UnsafeTLS.go:351:13:351:38 | call to InsecureCipherSuites | semmle.label | call to InsecureCipherSuites | +| UnsafeTLS.go:353:19:353:52 | []type{args} [array] | semmle.label | []type{args} [array] | | UnsafeTLS.go:353:19:353:52 | call to append | semmle.label | call to append | -| UnsafeTLS.go:353:26:353:37 | cipherSuites | semmle.label | cipherSuites | +| UnsafeTLS.go:353:19:353:52 | call to append [array] | semmle.label | call to append [array] | +| UnsafeTLS.go:353:26:353:37 | cipherSuites [array] | semmle.label | cipherSuites [array] | | UnsafeTLS.go:353:40:353:51 | selection of ID | semmle.label | selection of ID | | UnsafeTLS.go:355:25:355:36 | cipherSuites | semmle.label | cipherSuites | | UnsafeTLS.go:362:18:364:4 | slice literal | semmle.label | slice literal | diff --git a/go/ql/test/query-tests/Security/CWE-338/InsecureRandomness/InsecureRandomness.expected b/go/ql/test/query-tests/Security/CWE-338/InsecureRandomness/InsecureRandomness.expected index 7faf95dfde5..721e49b35e0 100644 --- a/go/ql/test/query-tests/Security/CWE-338/InsecureRandomness/InsecureRandomness.expected +++ b/go/ql/test/query-tests/Security/CWE-338/InsecureRandomness/InsecureRandomness.expected @@ -1,7 +1,7 @@ edges | sample.go:15:10:15:64 | call to Sum256 | sample.go:16:9:16:15 | slice expression | provenance | | | sample.go:15:24:15:63 | type conversion | sample.go:15:10:15:64 | call to Sum256 | provenance | FunctionModel | -| sample.go:15:31:15:62 | []type{args} [array] | sample.go:15:31:15:62 | call to Sprintf | provenance | MaD:242 | +| sample.go:15:31:15:62 | []type{args} [array] | sample.go:15:31:15:62 | call to Sprintf | provenance | MaD:245 | | sample.go:15:31:15:62 | call to Sprintf | sample.go:15:24:15:63 | type conversion | provenance | | | sample.go:15:49:15:61 | call to Uint32 | sample.go:15:31:15:62 | []type{args} [array] | provenance | | | sample.go:15:49:15:61 | call to Uint32 | sample.go:15:31:15:62 | call to Sprintf | provenance | FunctionModel | @@ -9,7 +9,7 @@ edges | sample.go:33:2:33:6 | definition of nonce | sample.go:37:25:37:29 | nonce | provenance | | | sample.go:33:2:33:6 | definition of nonce | sample.go:37:32:37:36 | nonce | provenance | | | sample.go:34:12:34:40 | call to New | sample.go:35:14:35:19 | random | provenance | | -| sample.go:35:14:35:19 | random | sample.go:33:2:33:6 | definition of nonce | provenance | MaD:546 | +| sample.go:35:14:35:19 | random | sample.go:33:2:33:6 | definition of nonce | provenance | MaD:549 | | sample.go:55:17:55:42 | call to Intn | sample.go:56:29:56:38 | randNumber | provenance | | | sample.go:56:11:56:40 | type conversion | sample.go:58:32:58:43 | type conversion | provenance | | | sample.go:56:18:56:39 | index expression | sample.go:56:11:56:40 | type conversion | provenance | | diff --git a/go/ql/test/query-tests/Security/CWE-347/MissingJwtSignatureCheck.expected b/go/ql/test/query-tests/Security/CWE-347/MissingJwtSignatureCheck.expected index e4d826db287..3bbaa18bcfa 100644 --- a/go/ql/test/query-tests/Security/CWE-347/MissingJwtSignatureCheck.expected +++ b/go/ql/test/query-tests/Security/CWE-347/MissingJwtSignatureCheck.expected @@ -1,16 +1,16 @@ edges -| go-jose.v3.go:25:16:25:20 | selection of URL | go-jose.v3.go:25:16:25:28 | call to Query | provenance | MaD:732 | -| go-jose.v3.go:25:16:25:28 | call to Query | go-jose.v3.go:25:16:25:47 | call to Get | provenance | MaD:739 | +| go-jose.v3.go:25:16:25:20 | selection of URL | go-jose.v3.go:25:16:25:28 | call to Query | provenance | MaD:735 | +| go-jose.v3.go:25:16:25:28 | call to Query | go-jose.v3.go:25:16:25:47 | call to Get | provenance | MaD:742 | | go-jose.v3.go:25:16:25:47 | call to Get | go-jose.v3.go:26:15:26:25 | signedToken | provenance | | | go-jose.v3.go:26:15:26:25 | signedToken | go-jose.v3.go:29:19:29:29 | definition of signedToken | provenance | | | go-jose.v3.go:29:19:29:29 | definition of signedToken | go-jose.v3.go:31:37:31:47 | signedToken | provenance | | -| go-jose.v3.go:31:2:31:48 | ... := ...[0] | go-jose.v3.go:33:12:33:23 | DecodedToken | provenance | Sink:MaD:318 | -| go-jose.v3.go:31:37:31:47 | signedToken | go-jose.v3.go:31:2:31:48 | ... := ...[0] | provenance | MaD:320 | -| golang-jwt-v5.go:28:16:28:20 | selection of URL | golang-jwt-v5.go:28:16:28:28 | call to Query | provenance | MaD:732 | -| golang-jwt-v5.go:28:16:28:28 | call to Query | golang-jwt-v5.go:28:16:28:47 | call to Get | provenance | MaD:739 | +| go-jose.v3.go:31:2:31:48 | ... := ...[0] | go-jose.v3.go:33:12:33:23 | DecodedToken | provenance | Sink:MaD:321 | +| go-jose.v3.go:31:37:31:47 | signedToken | go-jose.v3.go:31:2:31:48 | ... := ...[0] | provenance | MaD:323 | +| golang-jwt-v5.go:28:16:28:20 | selection of URL | golang-jwt-v5.go:28:16:28:28 | call to Query | provenance | MaD:735 | +| golang-jwt-v5.go:28:16:28:28 | call to Query | golang-jwt-v5.go:28:16:28:47 | call to Get | provenance | MaD:742 | | golang-jwt-v5.go:28:16:28:47 | call to Get | golang-jwt-v5.go:29:25:29:35 | signedToken | provenance | | | golang-jwt-v5.go:29:25:29:35 | signedToken | golang-jwt-v5.go:32:29:32:39 | definition of signedToken | provenance | | -| golang-jwt-v5.go:32:29:32:39 | definition of signedToken | golang-jwt-v5.go:34:58:34:68 | signedToken | provenance | Sink:MaD:332 | +| golang-jwt-v5.go:32:29:32:39 | definition of signedToken | golang-jwt-v5.go:34:58:34:68 | signedToken | provenance | Sink:MaD:335 | nodes | go-jose.v3.go:25:16:25:20 | selection of URL | semmle.label | selection of URL | | go-jose.v3.go:25:16:25:28 | call to Query | semmle.label | call to Query | diff --git a/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/BadRedirectCheck.expected b/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/BadRedirectCheck.expected index 9fafce7a9c7..df944f74e0f 100644 --- a/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/BadRedirectCheck.expected +++ b/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/BadRedirectCheck.expected @@ -12,8 +12,8 @@ edges | main.go:68:17:68:24 | argument corresponding to redirect | main.go:73:20:73:27 | redirect | provenance | | | main.go:68:17:68:24 | definition of redirect | main.go:73:20:73:27 | redirect | provenance | | | main.go:73:9:73:28 | call to Clean | main.go:77:25:77:39 | call to getTarget1 | provenance | | -| main.go:73:20:73:27 | redirect | main.go:73:9:73:28 | call to Clean | provenance | MaD:758 | -| main.go:73:20:73:27 | redirect | main.go:73:9:73:28 | call to Clean | provenance | MaD:758 | +| main.go:73:20:73:27 | redirect | main.go:73:9:73:28 | call to Clean | provenance | MaD:761 | +| main.go:73:20:73:27 | redirect | main.go:73:9:73:28 | call to Clean | provenance | MaD:761 | | main.go:76:19:76:21 | argument corresponding to url | main.go:77:36:77:38 | url | provenance | | | main.go:77:36:77:38 | url | main.go:68:17:68:24 | definition of redirect | provenance | | | main.go:77:36:77:38 | url | main.go:77:25:77:39 | call to getTarget1 | provenance | | diff --git a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected index 10af2ea535c..21f4b4e1d77 100644 --- a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected +++ b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.expected @@ -54,11 +54,11 @@ edges | stdlib.go:173:35:173:39 | selection of URL | stdlib.go:173:35:173:52 | call to RequestURI | provenance | | | stdlib.go:173:35:173:52 | call to RequestURI | stdlib.go:173:24:173:52 | ...+... | provenance | | | stdlib.go:182:3:182:8 | definition of target | stdlib.go:184:23:184:28 | target | provenance | | -| stdlib.go:182:13:182:33 | call to FormValue | stdlib.go:182:3:182:8 | definition of target | provenance | Src:MaD:667 | +| stdlib.go:182:13:182:33 | call to FormValue | stdlib.go:182:3:182:8 | definition of target | provenance | Src:MaD:670 | | stdlib.go:190:3:190:8 | definition of target | stdlib.go:192:23:192:28 | target | provenance | | | stdlib.go:190:3:190:8 | definition of target | stdlib.go:194:23:194:28 | target | provenance | | | stdlib.go:190:3:190:57 | ... := ...[0] | stdlib.go:190:3:190:8 | definition of target | provenance | | -| stdlib.go:190:36:190:56 | call to FormValue | stdlib.go:190:3:190:57 | ... := ...[0] | provenance | Src:MaD:667 | +| stdlib.go:190:36:190:56 | call to FormValue | stdlib.go:190:3:190:57 | ... := ...[0] | provenance | Src:MaD:670 | | stdlib.go:192:23:192:28 | implicit dereference | stdlib.go:190:3:190:8 | definition of target | provenance | | | stdlib.go:192:23:192:28 | implicit dereference | stdlib.go:192:23:192:33 | selection of Path | provenance | | | stdlib.go:192:23:192:28 | target | stdlib.go:192:23:192:28 | implicit dereference | provenance | | diff --git a/go/ql/test/query-tests/Security/CWE-640/EmailInjection.expected b/go/ql/test/query-tests/Security/CWE-640/EmailInjection.expected index 104d4837c57..91125540c6c 100644 --- a/go/ql/test/query-tests/Security/CWE-640/EmailInjection.expected +++ b/go/ql/test/query-tests/Security/CWE-640/EmailInjection.expected @@ -1,23 +1,23 @@ edges -| EmailBad.go:9:10:9:17 | selection of Header | EmailBad.go:9:10:9:29 | call to Get | provenance | MaD:652 | +| EmailBad.go:9:10:9:17 | selection of Header | EmailBad.go:9:10:9:29 | call to Get | provenance | MaD:655 | | EmailBad.go:9:10:9:29 | call to Get | EmailBad.go:12:56:12:67 | type conversion | provenance | | -| main.go:29:21:29:31 | call to Referer | main.go:31:57:31:78 | type conversion | provenance | Src:MaD:670 | -| main.go:37:21:37:31 | call to Referer | main.go:41:25:41:38 | untrustedInput | provenance | Src:MaD:670 | -| main.go:41:25:41:38 | untrustedInput | main.go:40:3:40:7 | definition of write | provenance | MaD:549 | -| main.go:46:21:46:31 | call to Referer | main.go:52:46:52:59 | untrustedInput | provenance | Src:MaD:670 | -| main.go:46:21:46:31 | call to Referer | main.go:53:52:53:65 | untrustedInput | provenance | Src:MaD:670 | -| main.go:58:21:58:31 | call to Referer | main.go:60:47:60:60 | untrustedInput | provenance | Src:MaD:670 | +| main.go:29:21:29:31 | call to Referer | main.go:31:57:31:78 | type conversion | provenance | Src:MaD:673 | +| main.go:37:21:37:31 | call to Referer | main.go:41:25:41:38 | untrustedInput | provenance | Src:MaD:673 | +| main.go:41:25:41:38 | untrustedInput | main.go:40:3:40:7 | definition of write | provenance | MaD:552 | +| main.go:46:21:46:31 | call to Referer | main.go:52:46:52:59 | untrustedInput | provenance | Src:MaD:673 | +| main.go:46:21:46:31 | call to Referer | main.go:53:52:53:65 | untrustedInput | provenance | Src:MaD:673 | +| main.go:58:21:58:31 | call to Referer | main.go:60:47:60:60 | untrustedInput | provenance | Src:MaD:673 | | main.go:60:14:60:61 | call to NewContent | main.go:63:16:63:22 | content | provenance | | -| main.go:60:47:60:60 | untrustedInput | main.go:60:14:60:61 | call to NewContent | provenance | MaD:381 | -| main.go:68:21:68:31 | call to Referer | main.go:74:47:74:60 | untrustedInput | provenance | Src:MaD:670 | +| main.go:60:47:60:60 | untrustedInput | main.go:60:14:60:61 | call to NewContent | provenance | MaD:384 | +| main.go:68:21:68:31 | call to Referer | main.go:74:47:74:60 | untrustedInput | provenance | Src:MaD:673 | | main.go:74:14:74:61 | call to NewContent | main.go:76:50:76:56 | content | provenance | | | main.go:74:14:74:61 | call to NewContent | main.go:76:59:76:65 | content | provenance | | | main.go:74:14:74:61 | call to NewContent | main.go:77:16:77:22 | content | provenance | | -| main.go:74:47:74:60 | untrustedInput | main.go:74:14:74:61 | call to NewContent | provenance | MaD:381 | -| main.go:82:21:82:31 | call to Referer | main.go:89:37:89:50 | untrustedInput | provenance | Src:MaD:670 | -| main.go:82:21:82:31 | call to Referer | main.go:91:48:91:61 | untrustedInput | provenance | Src:MaD:670 | +| main.go:74:47:74:60 | untrustedInput | main.go:74:14:74:61 | call to NewContent | provenance | MaD:384 | +| main.go:82:21:82:31 | call to Referer | main.go:89:37:89:50 | untrustedInput | provenance | Src:MaD:673 | +| main.go:82:21:82:31 | call to Referer | main.go:91:48:91:61 | untrustedInput | provenance | Src:MaD:673 | | main.go:91:15:91:62 | call to NewContent | main.go:93:16:93:23 | content2 | provenance | | -| main.go:91:48:91:61 | untrustedInput | main.go:91:15:91:62 | call to NewContent | provenance | MaD:381 | +| main.go:91:48:91:61 | untrustedInput | main.go:91:15:91:62 | call to NewContent | provenance | MaD:384 | nodes | EmailBad.go:9:10:9:17 | selection of Header | semmle.label | selection of Header | | EmailBad.go:9:10:9:29 | call to Get | semmle.label | call to Get | diff --git a/go/ql/test/query-tests/Security/CWE-643/XPathInjection.expected b/go/ql/test/query-tests/Security/CWE-643/XPathInjection.expected index ac7f8b44ef3..e9cce302e7d 100644 --- a/go/ql/test/query-tests/Security/CWE-643/XPathInjection.expected +++ b/go/ql/test/query-tests/Security/CWE-643/XPathInjection.expected @@ -1,16 +1,16 @@ edges -| XPathInjection.go:13:14:13:19 | selection of Form | XPathInjection.go:13:14:13:35 | call to Get | provenance | MaD:739 | +| XPathInjection.go:13:14:13:19 | selection of Form | XPathInjection.go:13:14:13:35 | call to Get | provenance | MaD:742 | | XPathInjection.go:13:14:13:35 | call to Get | XPathInjection.go:16:29:16:91 | ...+... | provenance | | -| tst.go:34:14:34:19 | selection of Form | tst.go:34:14:34:35 | call to Get | provenance | MaD:739 | +| tst.go:34:14:34:19 | selection of Form | tst.go:34:14:34:35 | call to Get | provenance | MaD:742 | | tst.go:34:14:34:35 | call to Get | tst.go:37:23:37:85 | ...+... | provenance | | | tst.go:34:14:34:35 | call to Get | tst.go:40:24:40:86 | ...+... | provenance | | | tst.go:34:14:34:35 | call to Get | tst.go:43:24:43:82 | ...+... | provenance | | -| tst.go:48:14:48:19 | selection of Form | tst.go:48:14:48:35 | call to Get | provenance | MaD:739 | +| tst.go:48:14:48:19 | selection of Form | tst.go:48:14:48:35 | call to Get | provenance | MaD:742 | | tst.go:48:14:48:35 | call to Get | tst.go:51:26:51:84 | ...+... | provenance | | | tst.go:48:14:48:35 | call to Get | tst.go:54:29:54:87 | ...+... | provenance | | | tst.go:48:14:48:35 | call to Get | tst.go:57:33:57:91 | ...+... | provenance | | | tst.go:48:14:48:35 | call to Get | tst.go:60:30:60:88 | ...+... | provenance | | -| tst.go:65:14:65:19 | selection of Form | tst.go:65:14:65:35 | call to Get | provenance | MaD:739 | +| tst.go:65:14:65:19 | selection of Form | tst.go:65:14:65:35 | call to Get | provenance | MaD:742 | | tst.go:65:14:65:35 | call to Get | tst.go:68:25:68:83 | ...+... | provenance | | | tst.go:65:14:65:35 | call to Get | tst.go:71:28:71:86 | ...+... | provenance | | | tst.go:65:14:65:35 | call to Get | tst.go:74:25:74:83 | ...+... | provenance | | @@ -19,38 +19,38 @@ edges | tst.go:65:14:65:35 | call to Get | tst.go:83:29:83:87 | ...+... | provenance | | | tst.go:65:14:65:35 | call to Get | tst.go:86:23:86:85 | ...+... | provenance | | | tst.go:65:14:65:35 | call to Get | tst.go:89:22:89:84 | ...+... | provenance | | -| tst.go:94:14:94:19 | selection of Form | tst.go:94:14:94:35 | call to Get | provenance | MaD:739 | +| tst.go:94:14:94:19 | selection of Form | tst.go:94:14:94:35 | call to Get | provenance | MaD:742 | | tst.go:94:14:94:35 | call to Get | tst.go:97:26:97:84 | ...+... | provenance | | | tst.go:94:14:94:35 | call to Get | tst.go:100:29:100:87 | ...+... | provenance | | | tst.go:94:14:94:35 | call to Get | tst.go:103:33:103:91 | ...+... | provenance | | | tst.go:94:14:94:35 | call to Get | tst.go:106:30:106:88 | ...+... | provenance | | -| tst.go:111:14:111:19 | selection of Form | tst.go:111:14:111:35 | call to Get | provenance | MaD:739 | +| tst.go:111:14:111:19 | selection of Form | tst.go:111:14:111:35 | call to Get | provenance | MaD:742 | | tst.go:111:14:111:35 | call to Get | tst.go:114:25:114:87 | ...+... | provenance | | | tst.go:111:14:111:35 | call to Get | tst.go:117:26:117:88 | ...+... | provenance | | -| tst.go:122:14:122:19 | selection of Form | tst.go:122:14:122:35 | call to Get | provenance | MaD:739 | +| tst.go:122:14:122:19 | selection of Form | tst.go:122:14:122:35 | call to Get | provenance | MaD:742 | | tst.go:122:14:122:35 | call to Get | tst.go:126:23:126:126 | ...+... | provenance | | | tst.go:122:14:122:35 | call to Get | tst.go:129:24:129:127 | ...+... | provenance | | | tst.go:122:14:122:35 | call to Get | tst.go:132:27:132:122 | ...+... | provenance | | -| tst.go:123:14:123:19 | selection of Form | tst.go:123:14:123:35 | call to Get | provenance | MaD:739 | +| tst.go:123:14:123:19 | selection of Form | tst.go:123:14:123:35 | call to Get | provenance | MaD:742 | | tst.go:123:14:123:35 | call to Get | tst.go:126:23:126:126 | ...+... | provenance | | | tst.go:123:14:123:35 | call to Get | tst.go:129:24:129:127 | ...+... | provenance | | | tst.go:123:14:123:35 | call to Get | tst.go:132:27:132:122 | ...+... | provenance | | -| tst.go:140:14:140:19 | selection of Form | tst.go:140:14:140:35 | call to Get | provenance | MaD:739 | +| tst.go:140:14:140:19 | selection of Form | tst.go:140:14:140:35 | call to Get | provenance | MaD:742 | | tst.go:140:14:140:35 | call to Get | tst.go:143:27:143:89 | ...+... | provenance | | | tst.go:140:14:140:35 | call to Get | tst.go:146:28:146:90 | ...+... | provenance | | -| tst.go:151:14:151:19 | selection of Form | tst.go:151:14:151:35 | call to Get | provenance | MaD:739 | +| tst.go:151:14:151:19 | selection of Form | tst.go:151:14:151:35 | call to Get | provenance | MaD:742 | | tst.go:151:14:151:35 | call to Get | tst.go:155:33:155:136 | ...+... | provenance | | | tst.go:151:14:151:35 | call to Get | tst.go:158:18:158:121 | ...+... | provenance | | | tst.go:151:14:151:35 | call to Get | tst.go:164:31:164:126 | ...+... | provenance | | | tst.go:151:14:151:35 | call to Get | tst.go:173:21:173:116 | ...+... | provenance | | | tst.go:151:14:151:35 | call to Get | tst.go:182:27:182:122 | ...+... | provenance | | -| tst.go:152:14:152:19 | selection of Form | tst.go:152:14:152:35 | call to Get | provenance | MaD:739 | +| tst.go:152:14:152:19 | selection of Form | tst.go:152:14:152:35 | call to Get | provenance | MaD:742 | | tst.go:152:14:152:35 | call to Get | tst.go:155:33:155:136 | ...+... | provenance | | | tst.go:152:14:152:35 | call to Get | tst.go:158:18:158:121 | ...+... | provenance | | | tst.go:152:14:152:35 | call to Get | tst.go:164:31:164:126 | ...+... | provenance | | | tst.go:152:14:152:35 | call to Get | tst.go:173:21:173:116 | ...+... | provenance | | | tst.go:152:14:152:35 | call to Get | tst.go:182:27:182:122 | ...+... | provenance | | -| tst.go:193:14:193:19 | selection of Form | tst.go:193:14:193:35 | call to Get | provenance | MaD:739 | +| tst.go:193:14:193:19 | selection of Form | tst.go:193:14:193:35 | call to Get | provenance | MaD:742 | | tst.go:193:14:193:35 | call to Get | tst.go:198:23:198:85 | ...+... | provenance | | nodes | XPathInjection.go:13:14:13:19 | selection of Form | semmle.label | selection of Form | diff --git a/go/ql/test/query-tests/Security/CWE-918/RequestForgery.expected b/go/ql/test/query-tests/Security/CWE-918/RequestForgery.expected index 48bc45d7499..6397dbaeff0 100644 --- a/go/ql/test/query-tests/Security/CWE-918/RequestForgery.expected +++ b/go/ql/test/query-tests/Security/CWE-918/RequestForgery.expected @@ -1,12 +1,12 @@ edges -| RequestForgery.go:8:12:8:34 | call to FormValue | RequestForgery.go:11:24:11:65 | ...+... | provenance | Src:MaD:667 | -| tst.go:10:13:10:35 | call to FormValue | tst.go:14:11:14:17 | tainted | provenance | Src:MaD:667 | -| tst.go:10:13:10:35 | call to FormValue | tst.go:18:12:18:18 | tainted | provenance | Src:MaD:667 | -| tst.go:10:13:10:35 | call to FormValue | tst.go:21:34:21:40 | tainted | provenance | Src:MaD:667 | -| tst.go:10:13:10:35 | call to FormValue | tst.go:24:66:24:72 | tainted | provenance | Src:MaD:667 | -| tst.go:10:13:10:35 | call to FormValue | tst.go:27:11:27:29 | ...+... | provenance | Src:MaD:667 | -| tst.go:10:13:10:35 | call to FormValue | tst.go:29:11:29:40 | ...+... | provenance | Src:MaD:667 | -| tst.go:10:13:10:35 | call to FormValue | tst.go:36:11:36:17 | tainted | provenance | Src:MaD:667 | +| RequestForgery.go:8:12:8:34 | call to FormValue | RequestForgery.go:11:24:11:65 | ...+... | provenance | Src:MaD:670 | +| tst.go:10:13:10:35 | call to FormValue | tst.go:14:11:14:17 | tainted | provenance | Src:MaD:670 | +| tst.go:10:13:10:35 | call to FormValue | tst.go:18:12:18:18 | tainted | provenance | Src:MaD:670 | +| tst.go:10:13:10:35 | call to FormValue | tst.go:21:34:21:40 | tainted | provenance | Src:MaD:670 | +| tst.go:10:13:10:35 | call to FormValue | tst.go:24:66:24:72 | tainted | provenance | Src:MaD:670 | +| tst.go:10:13:10:35 | call to FormValue | tst.go:27:11:27:29 | ...+... | provenance | Src:MaD:670 | +| tst.go:10:13:10:35 | call to FormValue | tst.go:29:11:29:40 | ...+... | provenance | Src:MaD:670 | +| tst.go:10:13:10:35 | call to FormValue | tst.go:36:11:36:17 | tainted | provenance | Src:MaD:670 | | tst.go:35:2:35:2 | definition of u [pointer] | tst.go:36:2:36:2 | u [pointer] | provenance | | | tst.go:36:2:36:2 | implicit dereference | tst.go:35:2:35:2 | definition of u [pointer] | provenance | | | tst.go:36:2:36:2 | implicit dereference | tst.go:36:2:36:2 | u | provenance | | @@ -17,16 +17,16 @@ edges | tst.go:36:2:36:2 | u [pointer] | tst.go:36:2:36:2 | implicit dereference | provenance | | | tst.go:36:11:36:17 | tainted | tst.go:36:2:36:2 | u | provenance | | | tst.go:36:11:36:17 | tainted | tst.go:37:11:37:11 | u | provenance | | -| tst.go:37:11:37:11 | u | tst.go:37:11:37:20 | call to String | provenance | MaD:232 | -| websocket.go:60:21:60:31 | call to Referer | websocket.go:65:27:65:40 | untrustedInput | provenance | Src:MaD:670 | -| websocket.go:74:21:74:31 | call to Referer | websocket.go:78:36:78:49 | untrustedInput | provenance | Src:MaD:670 | -| websocket.go:88:21:88:31 | call to Referer | websocket.go:91:31:91:44 | untrustedInput | provenance | Src:MaD:670 | -| websocket.go:107:21:107:31 | call to Referer | websocket.go:110:15:110:28 | untrustedInput | provenance | Src:MaD:670 | -| websocket.go:126:21:126:31 | call to Referer | websocket.go:129:38:129:51 | untrustedInput | provenance | Src:MaD:670 | -| websocket.go:154:21:154:31 | call to Referer | websocket.go:155:31:155:44 | untrustedInput | provenance | Src:MaD:670 | -| websocket.go:160:21:160:31 | call to Referer | websocket.go:162:31:162:44 | untrustedInput | provenance | Src:MaD:670 | -| websocket.go:195:21:195:31 | call to Referer | websocket.go:197:18:197:31 | untrustedInput | provenance | Src:MaD:670 | -| websocket.go:202:21:202:31 | call to Referer | websocket.go:204:11:204:24 | untrustedInput | provenance | Src:MaD:670 | +| tst.go:37:11:37:11 | u | tst.go:37:11:37:20 | call to String | provenance | MaD:235 | +| websocket.go:60:21:60:31 | call to Referer | websocket.go:65:27:65:40 | untrustedInput | provenance | Src:MaD:673 | +| websocket.go:74:21:74:31 | call to Referer | websocket.go:78:36:78:49 | untrustedInput | provenance | Src:MaD:673 | +| websocket.go:88:21:88:31 | call to Referer | websocket.go:91:31:91:44 | untrustedInput | provenance | Src:MaD:673 | +| websocket.go:107:21:107:31 | call to Referer | websocket.go:110:15:110:28 | untrustedInput | provenance | Src:MaD:673 | +| websocket.go:126:21:126:31 | call to Referer | websocket.go:129:38:129:51 | untrustedInput | provenance | Src:MaD:673 | +| websocket.go:154:21:154:31 | call to Referer | websocket.go:155:31:155:44 | untrustedInput | provenance | Src:MaD:673 | +| websocket.go:160:21:160:31 | call to Referer | websocket.go:162:31:162:44 | untrustedInput | provenance | Src:MaD:673 | +| websocket.go:195:21:195:31 | call to Referer | websocket.go:197:18:197:31 | untrustedInput | provenance | Src:MaD:673 | +| websocket.go:202:21:202:31 | call to Referer | websocket.go:204:11:204:24 | untrustedInput | provenance | Src:MaD:673 | nodes | RequestForgery.go:8:12:8:34 | call to FormValue | semmle.label | call to FormValue | | RequestForgery.go:11:24:11:65 | ...+... | semmle.label | ...+... | diff --git a/java/integration-tests-lib/toolchains_test_utils.py b/java/integration-tests-lib/toolchains_test_utils.py new file mode 100644 index 00000000000..938096dbb4b --- /dev/null +++ b/java/integration-tests-lib/toolchains_test_utils.py @@ -0,0 +1,42 @@ +import os.path +import sys +import tempfile + +def actions_expose_all_toolchains(): + + # On actions, expose all usable toolchains so that we can test version-selection logic. + + toolchains_dir = tempfile.mkdtemp(prefix="integration-tests-toolchains-") + toolchains_file = os.path.join(toolchains_dir, "toolchains.xml") + + def none_or_blank(s): + return s is None or s == "" + + with open(toolchains_file, "w") as f: + f.write('\n\n') + + for v in [8, 11, 17, 21]: + homedir = os.getenv("JAVA_HOME_%d_X64" % v) + if none_or_blank(homedir): + homedir = os.getenv("JAVA_HOME_%d_arm64" % v) + if none_or_blank(homedir) and v == 8 and not none_or_blank(os.getenv("JAVA_HOME_11_arm64")): + print("Mocking a toolchain entry using Java 11 install as a fake Java 8 entry, so this test behaves the same on x64 and arm64 runners", file = sys.stderr) + homedir = os.getenv("JAVA_HOME_11_arm64") + if homedir is not None and homedir != "": + f.write(""" + + jdk + + %d + oracle + + + %s + + + """ % (v, homedir)) + + f.write("") + + return toolchains_file + diff --git a/java/kotlin-extractor/src/main/java/com/semmle/util/process/Env.java b/java/kotlin-extractor/src/main/java/com/semmle/util/process/Env.java index 71a03b0bf45..0b4b2a829fb 100644 --- a/java/kotlin-extractor/src/main/java/com/semmle/util/process/Env.java +++ b/java/kotlin-extractor/src/main/java/com/semmle/util/process/Env.java @@ -36,14 +36,6 @@ public class Env { /* * Core toolchain variables */ - /** - * The location of the toolchain. - * - * Deprecated in favour of {@link Var#SEMMLE_DIST}, {@link Var#SEMMLE_HOME}, and - * {@link Var#SEMMLE_DATA}. - */ - @Deprecated - ODASA_HOME, /** * The location of the user's configuration files, including project configurations, * dashboard configurations, team insight configurations, licenses etc. @@ -82,10 +74,6 @@ public class Env { * The location where our queries are kept. */ ODASA_QUERIES, - /** - * The location of the 'tools' directory - */ - ODASA_TOOLS, /** * Whether we are running in 'prototyping mode'. */ @@ -197,10 +185,6 @@ public class Env { * The platform we are running on; one of "linux", "osx" and "win". */ SEMMLE_PLATFORM, - /** - * Location of platform specific tools, currently only used in universal LGTM distributions - */ - SEMMLE_PLATFORM_TOOLS, /** * PATH to use to look up tooling required by macOS Relocator scripts. */ @@ -284,7 +268,6 @@ public class Env { /* * Layout variables */ - ODASA_JAVA_LAYOUT, ODASA_CPP_LAYOUT, ODASA_CSHARP_LAYOUT, ODASA_PYTHON_LAYOUT, diff --git a/java/ql/automodel/src/AutomodelAlertSinkUtil.qll b/java/ql/automodel/src/AutomodelAlertSinkUtil.qll index 8b0b19d1388..ce0305f6095 100644 --- a/java/ql/automodel/src/AutomodelAlertSinkUtil.qll +++ b/java/ql/automodel/src/AutomodelAlertSinkUtil.qll @@ -159,11 +159,7 @@ predicate sinkModelTallyPerQuery(string queryName, int alertCount, SinkModel sin SinkTallier::getSinkModelCount(alertCount, sinkModel) or queryName = "java/command-line-injection" and - exists(int c1, int c2 | - SinkTallier::getSinkModelCount(c1, sinkModel) and - SinkTallier::getSinkModelCount(c2, sinkModel) and - alertCount = c1 + c2 - ) + SinkTallier::getSinkModelCount(alertCount, sinkModel) or queryName = "java/concatenated-sql-query" and SinkTallier::getSinkModelCount(alertCount, sinkModel) diff --git a/java/ql/automodel/src/CHANGELOG.md b/java/ql/automodel/src/CHANGELOG.md index d8475687370..f088448f068 100644 --- a/java/ql/automodel/src/CHANGELOG.md +++ b/java/ql/automodel/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.23 + +No user-facing changes. + ## 0.0.22 No user-facing changes. diff --git a/java/ql/automodel/src/change-notes/released/0.0.23.md b/java/ql/automodel/src/change-notes/released/0.0.23.md new file mode 100644 index 00000000000..e89a1284bb8 --- /dev/null +++ b/java/ql/automodel/src/change-notes/released/0.0.23.md @@ -0,0 +1,3 @@ +## 0.0.23 + +No user-facing changes. diff --git a/java/ql/automodel/src/codeql-pack.release.yml b/java/ql/automodel/src/codeql-pack.release.yml index 11aaa2243f5..cc2195603d8 100644 --- a/java/ql/automodel/src/codeql-pack.release.yml +++ b/java/ql/automodel/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.22 +lastReleaseVersion: 0.0.23 diff --git a/java/ql/automodel/src/qlpack.yml b/java/ql/automodel/src/qlpack.yml index 79c6f172bcc..73a22a9cae1 100644 --- a/java/ql/automodel/src/qlpack.yml +++ b/java/ql/automodel/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-automodel-queries -version: 0.0.23-dev +version: 0.0.24-dev groups: - java - automodel diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/.gitattributes b/java/ql/integration-tests/all-platforms/java/android-8-sample/.gitattributes new file mode 100644 index 00000000000..00a51aff5e5 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/.gitignore b/java/ql/integration-tests/all-platforms/java/android-8-sample/.gitignore new file mode 100644 index 00000000000..c2065bc2620 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/.gitignore @@ -0,0 +1,37 @@ +HELP.md +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/build.gradle b/java/ql/integration-tests/all-platforms/java/android-8-sample/build.gradle new file mode 100644 index 00000000000..e58b4558743 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/build.gradle @@ -0,0 +1,13 @@ +plugins { + + /** + * Use `apply false` in the top-level build.gradle file to add a Gradle + * plugin as a build dependency but not apply it to the current (root) + * project. Don't use `apply false` in sub-projects. For more information, + * see Applying external plugins with same version to subprojects. + */ + + id 'com.android.application' version '8.0.0' apply false + id 'com.android.library' version '8.0.0' apply false + id 'org.jetbrains.kotlin.android' version '1.7.20' apply false +} diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/android-8-sample/force_sequential_test_execution new file mode 100644 index 00000000000..4947fd6fe51 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/force_sequential_test_execution @@ -0,0 +1,4 @@ +# We currently have a bug where gradle tests become flaky when executed in parallel +# - sometimes, gradle fails to connect to the gradle daemon. +# Therefore, force this test to run sequentially. +# Additionally, Android SDK on-demand downloading can fail when multiple tests try to download the same SDK in parallel. diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/gradle/wrapper/gradle-wrapper.jar b/java/ql/integration-tests/all-platforms/java/android-8-sample/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000000..249e5832f09 Binary files /dev/null and b/java/ql/integration-tests/all-platforms/java/android-8-sample/gradle/wrapper/gradle-wrapper.jar differ diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/gradle/wrapper/gradle-wrapper.properties b/java/ql/integration-tests/all-platforms/java/android-8-sample/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..da1db5f04e8 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/gradlew b/java/ql/integration-tests/all-platforms/java/android-8-sample/gradlew new file mode 100755 index 00000000000..a69d9cb6c20 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/gradlew @@ -0,0 +1,240 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/gradlew.bat b/java/ql/integration-tests/all-platforms/java/android-8-sample/gradlew.bat new file mode 100644 index 00000000000..f127cfd49d4 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/gradlew.bat @@ -0,0 +1,91 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/project/build.gradle b/java/ql/integration-tests/all-platforms/java/android-8-sample/project/build.gradle new file mode 100644 index 00000000000..7751b92ae54 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/project/build.gradle @@ -0,0 +1,58 @@ +/** + * The first line in the build configuration applies the Android Gradle plugin + * to this build and makes the android block available to specify + * Android-specific build options. + */ + +plugins { + id 'com.android.application' +} + +/** + * The android block is where you configure all your Android-specific + * build options. + */ + +android { + + /** + * The app's namespace. Used primarily to access app resources. + */ + + namespace 'com.github.androidsample' + + /** + * compileSdk specifies the Android API level Gradle should use to + * compile your app. This means your app can use the API features included in + * this API level and lower. + */ + + compileSdk 33 + + /** + * The defaultConfig block encapsulates default settings and entries for all + * build variants and can override some attributes in main/AndroidManifest.xml + * dynamically from the build system. You can configure product flavors to override + * these values for different versions of your app. + */ + + defaultConfig { + + // Uniquely identifies the package for publishing. + applicationId 'com.github.androidsample' + + // Defines the minimum API level required to run the app. + minSdk 21 + + // Specifies the API level used to test the app. + targetSdk 33 + + // Defines the version number of your app. + versionCode 1 + + // Defines a user-friendly version name for your app. + versionName "1.0" + } + + variantFilter { variant -> if (variant.buildType.name == "debug") { setIgnore(true) } } +} diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/AndroidManifest.xml new file mode 100644 index 00000000000..1352b0d90fa --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/AndroidManifest.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/java/com/github/androidsample/Main.java new file mode 100644 index 00000000000..000b12d036d --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/java/com/github/androidsample/Main.java @@ -0,0 +1,11 @@ +package com.github.androidsample; + +import android.app.Activity; +import android.os.Bundle; + +public class Main extends Activity +{ + @Override + public void onCreate(Bundle savedInstanceState) { + } +} diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/settings.gradle b/java/ql/integration-tests/all-platforms/java/android-8-sample/settings.gradle new file mode 100644 index 00000000000..1fa19406e1a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/settings.gradle @@ -0,0 +1,40 @@ +pluginManagement { + + /** + * The pluginManagement {repositories {...}} block configures the + * repositories Gradle uses to search or download the Gradle plugins and + * their transitive dependencies. Gradle pre-configures support for remote + * repositories such as JCenter, Maven Central, and Ivy. You can also use + * local repositories or define your own remote repositories. The code below + * defines the Gradle Plugin Portal, Google's Maven repository, + * and the Maven Central Repository as the repositories Gradle should use to look for its + * dependencies. + */ + + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +dependencyResolutionManagement { + + /** + * The dependencyResolutionManagement {repositories {...}} + * block is where you configure the repositories and dependencies used by + * all modules in your project, such as libraries that you are using to + * create your application. However, you should configure module-specific + * dependencies in each module-level build.gradle file. For new projects, + * Android Studio includes Google's Maven repository and the Maven Central + * Repository by default, but it does not configure any dependencies (unless + * you select a template that requires some). + */ + + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +rootProject.name = "Android Sample" +include ':project' diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/test.expected b/java/ql/integration-tests/all-platforms/java/android-8-sample/test.expected new file mode 100644 index 00000000000..64ce68113e7 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/test.expected @@ -0,0 +1,20 @@ +#select +| project/src/main/java/com/github/androidsample/Main.java:0:0:0:0 | Main | +xmlFiles +| project/build/intermediates/incremental/lintVitalAnalyzeRelease/module.xml:0:0:0:0 | project/build/intermediates/incremental/lintVitalAnalyzeRelease/module.xml | +| project/build/intermediates/incremental/lintVitalAnalyzeRelease/release-mainArtifact-dependencies.xml:0:0:0:0 | project/build/intermediates/incremental/lintVitalAnalyzeRelease/release-mainArtifact-dependencies.xml | +| project/build/intermediates/incremental/lintVitalAnalyzeRelease/release-mainArtifact-libraries.xml:0:0:0:0 | project/build/intermediates/incremental/lintVitalAnalyzeRelease/release-mainArtifact-libraries.xml | +| project/build/intermediates/incremental/lintVitalAnalyzeRelease/release.xml:0:0:0:0 | project/build/intermediates/incremental/lintVitalAnalyzeRelease/release.xml | +| project/build/intermediates/incremental/lintVitalReportRelease/module.xml:0:0:0:0 | project/build/intermediates/incremental/lintVitalReportRelease/module.xml | +| project/build/intermediates/incremental/lintVitalReportRelease/release-mainArtifact-dependencies.xml:0:0:0:0 | project/build/intermediates/incremental/lintVitalReportRelease/release-mainArtifact-dependencies.xml | +| project/build/intermediates/incremental/lintVitalReportRelease/release-mainArtifact-libraries.xml:0:0:0:0 | project/build/intermediates/incremental/lintVitalReportRelease/release-mainArtifact-libraries.xml | +| project/build/intermediates/incremental/lintVitalReportRelease/release.xml:0:0:0:0 | project/build/intermediates/incremental/lintVitalReportRelease/release.xml | +| project/build/intermediates/incremental/mergeReleaseAssets/merger.xml:0:0:0:0 | project/build/intermediates/incremental/mergeReleaseAssets/merger.xml | +| project/build/intermediates/incremental/mergeReleaseJniLibFolders/merger.xml:0:0:0:0 | project/build/intermediates/incremental/mergeReleaseJniLibFolders/merger.xml | +| project/build/intermediates/incremental/mergeReleaseShaders/merger.xml:0:0:0:0 | project/build/intermediates/incremental/mergeReleaseShaders/merger.xml | +| project/build/intermediates/incremental/release/mergeReleaseResources/merger.xml:0:0:0:0 | project/build/intermediates/incremental/release/mergeReleaseResources/merger.xml | +| project/build/intermediates/incremental/release/packageReleaseResources/merger.xml:0:0:0:0 | project/build/intermediates/incremental/release/packageReleaseResources/merger.xml | +| project/build/intermediates/merged_manifest/release/AndroidManifest.xml:0:0:0:0 | project/build/intermediates/merged_manifest/release/AndroidManifest.xml | +| project/build/intermediates/merged_manifests/release/AndroidManifest.xml:0:0:0:0 | project/build/intermediates/merged_manifests/release/AndroidManifest.xml | +| project/build/intermediates/packaged_manifests/release/AndroidManifest.xml:0:0:0:0 | project/build/intermediates/packaged_manifests/release/AndroidManifest.xml | +| project/src/main/AndroidManifest.xml:0:0:0:0 | project/src/main/AndroidManifest.xml | diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/test.py b/java/ql/integration-tests/all-platforms/java/android-8-sample/test.py new file mode 100644 index 00000000000..3a0b27fe5ce --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/test.py @@ -0,0 +1,10 @@ +import sys + +from create_database_utils import * + +# Put Java 11 on the path so as to challenge our version selection logic: Java 11 is unsuitable for Android Gradle Plugin 8+, +# so it will be necessary to notice Java 17 available in the environment and actively select it. + +try_use_java11() + +run_codeql_database_create([], lang="java") diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/test.ql b/java/ql/integration-tests/all-platforms/java/android-8-sample/test.ql new file mode 100644 index 00000000000..c11b8fba707 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/android-8-sample/test.ql @@ -0,0 +1,7 @@ +import java + +from File f +where f.isSourceFile() +select f + +query predicate xmlFiles(XmlFile x) { any() } diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/test.py b/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/test.py index 1cc3411fbdc..36702f6bb24 100644 --- a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/test.py +++ b/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/test.py @@ -1,6 +1,8 @@ -import sys from create_database_utils import * +from toolchains_test_utils import * try_use_java11() -run_codeql_database_create([], lang="java") +toolchains_file = actions_expose_all_toolchains() + +run_codeql_database_create([], lang="java", extra_env={"LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": toolchains_file}) diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/test.py b/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/test.py index 7f379da0a07..36702f6bb24 100644 --- a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/test.py +++ b/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/test.py @@ -1,7 +1,8 @@ -import sys - from create_database_utils import * +from toolchains_test_utils import * try_use_java11() -run_codeql_database_create([], lang="java") +toolchains_file = actions_expose_all_toolchains() + +run_codeql_database_create([], lang="java", extra_env={"LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": toolchains_file}) diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.py b/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.py index 1e75d97113e..6d0437d3ae2 100644 --- a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.py +++ b/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.py @@ -4,6 +4,7 @@ from create_database_utils import * from buildless_test_utils import * import subprocess +# Each of these serves the "repo" and "repo2" directories on http://localhost:924[89] repo_server_process = subprocess.Popen(["python3", "-m", "http.server", "9428"], cwd = "repo") repo_server_process2 = subprocess.Popen(["python3", "-m", "http.server", "9429"], cwd = "repo2") diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitattributes b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitattributes new file mode 100644 index 00000000000..00a51aff5e5 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitignore b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitignore new file mode 100644 index 00000000000..1b6985c0094 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitignore @@ -0,0 +1,5 @@ +# Ignore Gradle project-specific cache directory +.gradle + +# Ignore Gradle build output directory +build diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/build.gradle b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/build.gradle new file mode 100644 index 00000000000..071a12b7691 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/build.gradle @@ -0,0 +1,30 @@ +/* + * This build file was auto generated by running the Gradle 'init' task + * by 'arthur' at '28/11/20 22:29' with Gradle 3.0 + * + * This generated file contains a sample Java project to get you started. + * For more details take a look at the Java Quickstart chapter in the Gradle + * user guide available at https://docs.gradle.org/3.0/userguide/tutorial_java_projects.html + */ + +// Apply the java plugin to add support for Java +apply plugin: 'java' + +// In this section you declare where to find the dependencies of your project +repositories { + // Use 'jcenter' for resolving your dependencies. + // You can declare any Maven/Ivy/file repository here. + jcenter() +} + +// In this section you declare the dependencies for your production and test code +dependencies { + // The production code uses the SLF4J logging API at compile time + compile 'org.slf4j:slf4j-api:1.7.21' + + // Declare the dependency for your favourite test framework you want to use in your tests. + // TestNG is also supported by the Gradle Test task. Just change the + // testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add + // 'test.useTestNG()' to your build script. + testCompile 'junit:junit:4.12' +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/diagnostics.expected new file mode 100644 index 00000000000..3ff66207877 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/diagnostics.expected @@ -0,0 +1,98 @@ +{ + "markdownMessage": "A Gradle process was aborted because it didn't write to the console for 5 seconds. Consider either lengthening the timeout if appropriate by setting CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT to a higher value or zero for no timeout, or else investigate why Gradle timed out. Java analysis will continue, but the analysis may be of reduced quality.", + "severity": "warning", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/gradle-timed-out", + "name": "Java analysis timed out running Gradle" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "markdownMessage": "Build tool(s) should have been able to provide a recommended classpath but the attempt failed. Extraction will continue, but external dependencies will be inferred from the Java package names used. Consider troubleshooting the build tool error or using a build mode other than 'none'.", + "severity": "warning", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/classpath-from-tool-failed", + "name": "Failed to extract dependency information from build tool tool Gradle" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "markdownMessage": "Java analysis used build tool Gradle to pick a JDK version and/or to recommend external dependencies.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/using-build-tool-advice", + "name": "Java analysis used build tool Gradle to pick a JDK version and/or to recommend external dependencies" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java analysis used the system default JDK.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/jdk-system-default", + "name": "Java analysis used the system default JDK" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java analysis with build-mode 'none' completed.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/complete", + "name": "Java analysis with build-mode 'none' completed" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java was extracted with build-mode set to 'none'. This means that all Java source in the working directory will be scanned, with build tools such as Maven and Gradle only contributing information about external dependencies.", + "severity": "note", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/mode-active", + "name": "Java was extracted with build-mode set to 'none'" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "markdownMessage": "Running the Gradle plugin `org.gradle:github-dependency-graph-gradle-plugin` failed. This means precise dependency information will be unavailable, and so dependencies will be guessed based on Java package names. Consider investigating why this plugin fails to run.", + "severity": "warning", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/github-dependency-graph-gradle-plugin-failed", + "name": "Java analysis failed to extract a dependency graph from Gradle" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/force_sequential_test_execution new file mode 100644 index 00000000000..b0e2500b259 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/force_sequential_test_execution @@ -0,0 +1,3 @@ +# We currently have a bug where gradle tests become flaky when executed in parallel +# - sometimes, gradle fails to connect to the gradle daemon. +# Therefore, force this test to run sequentially. diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/verification-metadata.xml b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/verification-metadata.xml new file mode 100644 index 00000000000..14a69b8178b --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/verification-metadata.xml @@ -0,0 +1,7 @@ + + + + true + false + + \ No newline at end of file diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.jar b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000000..e708b1c023e Binary files /dev/null and b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.jar differ diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.properties b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..a6a58a15673 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://192.0.2.0/distributions/gradle-99.99.99-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew new file mode 100755 index 00000000000..4f906e0c811 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew.bat b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew.bat new file mode 100644 index 00000000000..107acd32c4e --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/settings.gradle b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/settings.gradle new file mode 100644 index 00000000000..233410459f6 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/settings.gradle @@ -0,0 +1,19 @@ +/* + * This settings file was auto generated by the Gradle buildInit task + * by 'arthur' at '28/11/20 22:29' with Gradle 3.0 + * + * The settings file is used to specify which projects to include in your build. + * In a single project build this file can be empty or even removed. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user guide at https://docs.gradle.org/3.0/userguide/multi_project_builds.html + */ + +/* +// To declare projects as part of a multi-project build use the 'include' method +include 'shared' +include 'api' +include 'services:webservice' +*/ + +rootProject.name = 'gradle-sample' diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/main/java/com/example/App.java b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/main/java/com/example/App.java new file mode 100644 index 00000000000..1c13f7d885e --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/main/java/com/example/App.java @@ -0,0 +1,14 @@ +/* + * This Java source file was generated by the Gradle 'init' task. + */ +package com.example; + +public class App { + public String getGreeting() { + return "Hello world."; + } + + public static void main(String[] args) { + System.out.println(new App().getGreeting()); + } +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/test/java/com/example/AppTest.java new file mode 100644 index 00000000000..813bc5e1a2a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/test/java/com/example/AppTest.java @@ -0,0 +1,14 @@ +/* + * This Java source file was generated by the Gradle 'init' task. + */ +package com.example; + +import org.junit.Test; +import static org.junit.Assert.*; + +public class AppTest { + @Test public void testAppHasAGreeting() { + App classUnderTest = new App(); + assertNotNull("app should have a greeting", classUnderTest.getGreeting()); + } +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.expected b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.expected new file mode 100644 index 00000000000..82f7ee275a1 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.expected @@ -0,0 +1,5 @@ +xmlFiles +| gradle/verification-metadata.xml:0:0:0:0 | gradle/verification-metadata.xml | +#select +| src/main/java/com/example/App.java:0:0:0:0 | App | +| src/test/java/com/example/AppTest.java:0:0:0:0 | AppTest | diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.py b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.py new file mode 100644 index 00000000000..5e02cc11397 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.py @@ -0,0 +1,9 @@ +import sys + +from create_database_utils import * +from diagnostics_test_utils import * + +# gradlew has been rigged to stall for a long time by trying to fetch from a black-hole IP. We should find the timeout logic fires and buildless aborts the Gradle run quickly. + +run_codeql_database_create([], lang="java", extra_args=["--build-mode=none"], extra_env={"CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT": "5"}) +check_diagnostics() diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.ql b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.ql new file mode 100644 index 00000000000..c11b8fba707 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.ql @@ -0,0 +1,7 @@ +import java + +from File f +where f.isSourceFile() +select f + +query predicate xmlFiles(XmlFile x) { any() } diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/buildless-fetches.expected b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/buildless-fetches.expected new file mode 100644 index 00000000000..25f252ec481 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/buildless-fetches.expected @@ -0,0 +1 @@ +https://localhost:4443/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/cert.pem b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/cert.pem new file mode 100644 index 00000000000..1a09542a48a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/cert.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDgTCCAmmgAwIBAgIUP5OLGP5M6AlodzWUwsOgEFAeS5IwDQYJKoZIhvcNAQEL +BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM +GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA1MTAxODA2MTNaFw0yNTA1 +MTAxODA2MTNaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw +HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCjonLrp9w3TKEzvjNxu0q7T717SBiTYQBJAliIO69V +dKC9/PELTc/L4APIkLlB4YCFWTHblc1i5dGolWi6W1fTS+S8txD1HP2hWW20pvSP +yDQSE7P40Ha6dLf9hGU5tIZyqxkJQJ1vsne3+YicB6SOa8Ub5dVaCK06IVTcmzkX ++3zae+OaTgBOfzxXpd3b8JGm0pLAjp7+theJzmToId2ZxDtb5Ot6fvEd1/voQ8i+ +wlYhpwpM0+KCL8R0P57XB1hXxvz/25OUSQQvcUF9TeckvVm+4P01Zip4/WublBue +q9b4ctA3TZotdN/FO1rLZ74v1+uqWSvso+47YWH7OVjLAgMBAAGjaTBnMB0GA1Ud +DgQWBBQ9xal7NPTWMjgQc45zfTPTuC/IWjAfBgNVHSMEGDAWgBQ9xal7NPTWMjgQ +c45zfTPTuC/IWjAPBgNVHRMBAf8EBTADAQH/MBQGA1UdEQQNMAuCCWxvY2FsaG9z +dDANBgkqhkiG9w0BAQsFAAOCAQEAC7s9WsRYQD5U1jb+PTsUPgYga/SPnmJ7Y2e6 +0Wtdj5ggG/DyGOVOWXVTiv7qI36N2iNfv2XfR1i9jnr/7HcEJPOgXHjCM6m/bg3v +9xamt5VIjM6ZeVStgPZe1kuXP9CinhuRfa2ypfqZKXXIj4Ri+cv9qCRmLyTcJCpa ++WrlP/NdpQQ3WhghCzoD4dlXGVwcAWV7lAhWgnZbxq+CjMCXt+cIOhCX8tyzsDAK +0BnLokXfFPwHrIvniayQJWcMFbEQuLuLgG/KlChbsCgKBfTY/jYnr5tl5ukcEUrr +hci9Ww25oELOoghZAIKV2Mstc4aZHx7EBCygZap6/Z+PmOBkjw== +-----END CERTIFICATE----- diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/diagnostics.expected new file mode 100644 index 00000000000..766db40aa62 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/diagnostics.expected @@ -0,0 +1,70 @@ +{ + "markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/using-build-tool-advice", + "name": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java analysis used the system default JDK.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/jdk-system-default", + "name": "Java analysis used the system default JDK" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java analysis with build-mode 'none' completed.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/complete", + "name": "Java analysis with build-mode 'none' completed" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java was extracted with build-mode set to 'none'. This means that all Java source in the working directory will be scanned, with build tools such as Maven and Gradle only contributing information about external dependencies.", + "severity": "note", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/mode-active", + "name": "Java was extracted with build-mode set to 'none'" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "markdownMessage": "Reading the dependency graph from build files provided 1 classpath entries", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/depgraph-provided-by-maven", + "name": "Java analysis extracted precise dependency graph information from tool Maven" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/jdk8_shipped_cacerts_plus_cert_pem b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/jdk8_shipped_cacerts_plus_cert_pem new file mode 100644 index 00000000000..6ec352b52e5 Binary files /dev/null and b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/jdk8_shipped_cacerts_plus_cert_pem differ diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/key.pem b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/key.pem new file mode 100644 index 00000000000..faee3a2251d --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCjonLrp9w3TKEz +vjNxu0q7T717SBiTYQBJAliIO69VdKC9/PELTc/L4APIkLlB4YCFWTHblc1i5dGo +lWi6W1fTS+S8txD1HP2hWW20pvSPyDQSE7P40Ha6dLf9hGU5tIZyqxkJQJ1vsne3 ++YicB6SOa8Ub5dVaCK06IVTcmzkX+3zae+OaTgBOfzxXpd3b8JGm0pLAjp7+theJ +zmToId2ZxDtb5Ot6fvEd1/voQ8i+wlYhpwpM0+KCL8R0P57XB1hXxvz/25OUSQQv +cUF9TeckvVm+4P01Zip4/WublBueq9b4ctA3TZotdN/FO1rLZ74v1+uqWSvso+47 +YWH7OVjLAgMBAAECgf8xdXxjQPivkL4jB8CyZrahotkxCVsDi9xoEr84NU87aK+q +Vsm334jBxv9dwhD+KF3jfomqGZ1ErZ5K5I5oCbxrPa0NUezqpo6iFBYPAY9ynCHA +Q/ALIoWNNrSIMFRzpS4PKxQWhKRyJB6T+iJWF/lKAdznUy/2Su1a9EZifmYveFKk +71bso/KPZLKslf0VwwebvH7BSwjZUISLJzgP4gorBCI2CHo6qai963XA+7POgoPk +Oz1g1QQOypHCAPaONBAuzqbUGoezQtWSBmshmRTTgz1ZYSvxf9iVvPUutT7jsKaC +TKa18UMN0tvXk0SzGZiSX/fgGUQCybe6ydevQcECgYEA0TvP80Y/B0M5NjG7278l +nSYrpGILW81frYr7i2W6B5sD/XTNjGMBsTh14FA90J2oii9OxZrH8TIku/+WXb8i +T6aEz5javHe0qtYSgSO/99uP7/r/AXQcuLvyZAmGF+q3vsM6wpc1E4dwEAXy2m1l +pyyWbXZmy/dWtwCuqZzPTrsCgYEAyDV+HX6esGdMAfRgrxfiP9Aqx4q83R3zDPI8 +xSrMhF17T3Url0a9lRdyfzEZHopqfK/DsHH+I+RPr3FxDT+09oE8n2N5oAgYrtLH +CnTZi84yV3l9TRqG3pCKtGMT8z4qQgtniExgX3lBYyjkzyePctLUElQTEO2gBBxZ +tHN65TECgYEArqa/uXDskbJiYkN3bUGMMzY2fbu9gX7YG7OEr2JVu52A4iOKpGHM +etMHShuQzb+cfORqW3YM6d+SXD9Hk69FA7ma6PLNuz4s1+FjhtqBlnJ3Hrmj/OGg +S+/OsARnIzWw9RJfzSiMjGWkfCuLARsKHFaSpoKL4jvu7Ukrgrc7MJsCgYEAl8Os +8RC9nD0Bae3kqHWzZOoYs6AgoIEGcAbkOBXEaIYwZkAMpiTSq0TV30LJptQH+rKF +5afTnUOBgB2/M+rZ845t9OjEFqJsi4Ftrih7jDXnBVYrvJniKK5q5mjAg7/Y6q2Y +csJqv5S8Ez25jKqRW9ojNi2TMl7e0J7pBRgQzdECgYAFQ06YB1w4Sgw7fRtMJwyT +8E7Bbi3BeD/sLEXuNRBDVbbyHMvPYu2qEwRTdXpXKwN5P0dGw/JAGYzTeq6EKiFz +lajQVGs6l1yOz7a4e62qPQtjSUGzkYHsCopARTOjCpHt1yxL/Mzh3u0qW6yIeaB4 +4QQRjB9++Jpci2GQiTPhyg== +-----END PRIVATE KEY----- diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/pom.xml b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/pom.xml new file mode 100644 index 00000000000..1868f0a9de2 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/pom.xml @@ -0,0 +1,35 @@ + + 4.0.0 + + com.mycompany.app + my-app + 1.0-SNAPSHOT + + + 8 + 8 + + + + + snapshot-test-repo + https://localhost:4443/snapshots + + false + + + true + always + + + + + + + com.github.my.snapshot.test + snapshottest + 1.0-SNAPSHOT + + + diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml new file mode 100644 index 00000000000..cad1b0efc60 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml @@ -0,0 +1,24 @@ + + com.github.my.snapshot.test + snapshottest + 1.0-SNAPSHOT + + 20230101020304 + + 20230901.050514 + 100 + + + + jar + 1.0-20230901.050514-100 + 20230101020304 + + + pom + 1.0-20230901.050514-100 + 20230101020304 + + + + diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 new file mode 100644 index 00000000000..4dbc3c93d9b --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 @@ -0,0 +1 @@ +cf2064037098dc6d4294ef6f1a12dc75 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 new file mode 100644 index 00000000000..9b090ce73ad --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 @@ -0,0 +1 @@ +aeabf1dbf735290f5317d78459b3219d267dbb0e diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar new file mode 100644 index 00000000000..4c905cefca8 Binary files /dev/null and b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar differ diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 new file mode 100644 index 00000000000..99cb14715c0 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 @@ -0,0 +1 @@ +dbb202adb2f6c5504c9b29b93610dd9e diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 new file mode 100644 index 00000000000..0ad4fb49ea9 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 @@ -0,0 +1 @@ +6db6f637a68116728830d5610cbafb608bc58a21 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom new file mode 100644 index 00000000000..e5d6da7cab0 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom @@ -0,0 +1,13 @@ + + 4.0.0 + + com.github.my.snapshot.test + snapshottest + 1.0-SNAPSHOT + + + 1.8 + 1.8 + + diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 new file mode 100644 index 00000000000..f596dfe5019 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 @@ -0,0 +1 @@ +66c5f73407153610dc3f5743eef678f3 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 new file mode 100644 index 00000000000..d5b75cd08e6 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 @@ -0,0 +1 @@ +f895a88d2490dbcec8228c2a528bde029d80409e diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/server.py b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/server.py new file mode 100644 index 00000000000..60b3f408a05 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/server.py @@ -0,0 +1,12 @@ +from http.server import HTTPServer, SimpleHTTPRequestHandler +import ssl + + +httpd = HTTPServer(('localhost', 4443), SimpleHTTPRequestHandler) + +sslctx = ssl.SSLContext() +sslctx.load_cert_chain(certfile="../cert.pem", keyfile="../key.pem") + +httpd.socket = sslctx.wrap_socket (httpd.socket, server_side=True) + +httpd.serve_forever() diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/src/main/java/Test.java b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/src/main/java/Test.java new file mode 100644 index 00000000000..98b6d35b15b --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/src/main/java/Test.java @@ -0,0 +1,7 @@ +import testpkg.DepClass; + +public class Test { + + DepClass dc; + +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.expected b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.expected new file mode 100644 index 00000000000..5179970f7c4 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.expected @@ -0,0 +1,3 @@ +diagnostics +#select +| DepClass | diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.py b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.py new file mode 100644 index 00000000000..973a10c931c --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.py @@ -0,0 +1,22 @@ +import sys + +from create_database_utils import * +from buildless_test_utils import * +from diagnostics_test_utils import * +import subprocess +import os.path + +# This serves the "repo" directory on https://locahost:4443 +repo_server_process = subprocess.Popen(["python3", "../server.py"], cwd = "repo") + +mypath = os.path.abspath(os.path.dirname(__file__)) +certspath = os.path.join(mypath, "jdk8_shipped_cacerts_plus_cert_pem") +maven_certs_option = "-Djavax.net.ssl.trustStore=" + certspath + +try: + run_codeql_database_create([], lang="java", extra_args=["--build-mode=none"], extra_env={"MAVEN_OPTS": maven_certs_option, "CODEQL_JAVA_EXTRACTOR_TRUST_STORE_PATH": certspath}) +finally: + repo_server_process.kill() + +check_buildless_fetches() +check_diagnostics() diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.ql b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.ql new file mode 100644 index 00000000000..66153bcc083 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.ql @@ -0,0 +1,8 @@ +import java +import semmle.code.java.Diagnostics + +query predicate diagnostics(Diagnostic d) { any() } + +from Class c +where c.getName() = "DepClass" +select c.toString() diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.gitattributes b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.gitattributes new file mode 100644 index 00000000000..36e4b9d7df9 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.jar b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000000..bf82ff01c6c Binary files /dev/null and b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.jar differ diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000000..d43cff35777 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# This distribution URL will intentionally stall forever: 240.0.0.0 is a black-hole IP, and Maven 9.9.9 should certainly not be present on the local system already. + +distributionUrl=https://192.0.2.0/maven2/org/apache/maven/apache-maven/9.9.9/apache-maven-9.9.9-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/diagnostics.expected new file mode 100644 index 00000000000..f2693c7b704 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/diagnostics.expected @@ -0,0 +1,98 @@ +{ + "markdownMessage": "A Maven process was aborted because it didn't write to the console for 5 seconds. Consider either lenghtening the timeout if appropriate by setting CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT to a higher value or zero for no timeout, or else investigate why Maven timed out. Java analysis will continue, but the analysis may be of reduced quality.", + "severity": "warning", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/maven-timed-out", + "name": "Java analysis timed out running Maven" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "markdownMessage": "Build tool(s) should have been able to provide a recommended classpath but the attempt failed. Extraction will continue, but external dependencies will be inferred from the Java package names used. Consider troubleshooting the build tool error or using a build mode other than 'none'.", + "severity": "warning", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/classpath-from-tool-failed", + "name": "Failed to extract dependency information from build tool tool Maven" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "markdownMessage": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/using-build-tool-advice", + "name": "Java analysis used build tool Maven to pick a JDK version and/or to recommend external dependencies" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java analysis used the system default JDK.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/jdk-system-default", + "name": "Java analysis used the system default JDK" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java analysis with build-mode 'none' completed.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/complete", + "name": "Java analysis with build-mode 'none' completed" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java was extracted with build-mode set to 'none'. This means that all Java source in the working directory will be scanned, with build tools such as Maven and Gradle only contributing information about external dependencies.", + "severity": "note", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/mode-active", + "name": "Java was extracted with build-mode set to 'none'" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "markdownMessage": "Running the Maven plugin `com.github.ferstl:depgraph-maven-plugin:4.0.2:graph` failed. This means precise dependency information will be unavailable, and so dependencies will be guessed based on Java package names. Consider investigating why this plugin fails to run.", + "severity": "warning", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/depgraph-maven-plugin-failed", + "name": "Java buildless mode failed to extract a dependency graph from Maven" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/force_sequential_test_execution new file mode 100644 index 00000000000..44bcad8d582 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/force_sequential_test_execution @@ -0,0 +1 @@ +The wrapper downloading a Maven distribution multiple times in parallel is not safe. diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw new file mode 100755 index 00000000000..b7f064624f8 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw @@ -0,0 +1,287 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.1.1 +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + JAVA_HOME="`/usr/libexec/java_home`"; export JAVA_HOME + else + JAVA_HOME="/Library/Java/Home"; export JAVA_HOME + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`\\unset -f command; \\command -v java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + printf '%s' "$(cd "$basedir"; pwd)" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname $0)") +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + else + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $wrapperUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + QUIET="--quiet" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + QUIET="" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" + else + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" + fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" + elif command -v curl > /dev/null; then + QUIET="--silent" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + QUIET="" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L + else + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L + fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaSource=`cygpath --path --windows "$javaSource"` + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaSource") + fi + if [ -e "$javaClass" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw.cmd b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw.cmd new file mode 100644 index 00000000000..474c9d6b74c --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw.cmd @@ -0,0 +1,187 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.1.1 +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %WRAPPER_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/pom.xml b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/pom.xml new file mode 100644 index 00000000000..ec4aaf128c1 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/pom.xml @@ -0,0 +1,114 @@ + + + + 4.0.0 + + com.example + maven-sample + 1.0-SNAPSHOT + + maven-sample + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + + + + + exec-maven-plugin + org.codehaus.mojo + 1.1.1 + + + check-maven-version + package + + java + + + + + com.example.App + + + + com.diffplug.spotless + spotless-maven-plugin + 2.19.1 + + + + check + + compile + + + + + + /* FAIL ME */ + + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + \ No newline at end of file diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/java/com/example/App.java b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/java/com/example/App.java new file mode 100644 index 00000000000..c9eec918587 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/java/com/example/App.java @@ -0,0 +1,30 @@ +package com.example; + +import java.util.regex.Pattern; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + String expectedVersion = System.getenv("EXPECT_MAVEN"); + Path mavenHome = Paths.get(System.getProperty("maven.home")).normalize(); + String observedVersion = mavenHome.getFileName().toString(); + if (expectedVersion != null && !expectedVersion.equals(observedVersion)) { + System.err.println("Wrong maven version, expected '" + expectedVersion + "' but got '" + observedVersion + "'" + mavenHome); + System.exit(1); + } + String commandMatcher = System.getenv("EXPECT_COMMAND_REGEX"); + String command = System.getProperty("sun.java.command"); + if (commandMatcher != null && !Pattern.matches(commandMatcher, command)) { + System.err.println("Wrong command line, '" + command + "' does not match '" + commandMatcher + "'"); + System.exit(1); + } + } +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/my-app.properties b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/my-app.properties new file mode 100644 index 00000000000..e566b49a29a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/my-app.properties @@ -0,0 +1 @@ +version=1.0 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/page.xml b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/page.xml new file mode 100644 index 00000000000..2bab459cb03 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/page.xml @@ -0,0 +1,8 @@ + + +A sample + + +

    Hello world!

    + + diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/struts.xml b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/struts.xml new file mode 100644 index 00000000000..73fc0c6b9cb --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/struts.xml @@ -0,0 +1,4 @@ + + +This is a sample file + diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/test/java/com/example/AppTest.java new file mode 100644 index 00000000000..22a94ca6f01 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/test/java/com/example/AppTest.java @@ -0,0 +1,20 @@ +package com.example; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.expected b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.expected new file mode 100644 index 00000000000..0728284fc94 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.expected @@ -0,0 +1,11 @@ +#select +| src/main/java/com/example/App.java:0:0:0:0 | App | +| src/test/java/com/example/AppTest.java:0:0:0:0 | AppTest | +xmlFiles +| pom.xml:0:0:0:0 | pom.xml | +| src/main/resources/page.xml:0:0:0:0 | src/main/resources/page.xml | +| src/main/resources/struts.xml:0:0:0:0 | src/main/resources/struts.xml | +propertiesFiles +| .mvn/wrapper/maven-wrapper.properties:0:0:0:0 | .mvn/wrapper/maven-wrapper.properties | +| src/main/resources/my-app.properties:0:0:0:0 | src/main/resources/my-app.properties | +| test-db/log/ext/javac.properties:0:0:0:0 | test-db/log/ext/javac.properties | diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.py b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.py new file mode 100644 index 00000000000..948d030eb9d --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.py @@ -0,0 +1,9 @@ +import sys + +from create_database_utils import * +from diagnostics_test_utils import * + +# mvnw has been rigged to stall for a long time by trying to fetch from a black-hole IP. We should find the timeout logic fires and buildless aborts the Maven run quickly. + +run_codeql_database_create([], lang="java", extra_args=["--build-mode=none"], extra_env={"CODEQL_EXTRACTOR_JAVA_BUILDLESS_CHILD_PROCESS_IDLE_TIMEOUT": "5"}) +check_diagnostics() diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.ql b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.ql new file mode 100644 index 00000000000..25cd26fdd14 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.ql @@ -0,0 +1,9 @@ +import java + +from File f +where f.isSourceFile() +select f + +query predicate xmlFiles(XmlFile x) { any() } + +query predicate propertiesFiles(File f) { f.getExtension() = "properties" } diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/test.py b/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/test.py index 47a693ea0cd..6971aa508db 100644 --- a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/test.py +++ b/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/test.py @@ -1,47 +1,12 @@ from create_database_utils import * from diagnostics_test_utils import * from buildless_test_utils import * - -import tempfile -import os.path -import sys +from toolchains_test_utils import * #The version of gradle used doesn't work on java 17 try_use_java11() -# On actions, expose all usable toolchains so that we can test version-selection logic. - -toolchains_dir = tempfile.mkdtemp(prefix="integration-tests-toolchains-") -toolchains_file = os.path.join(toolchains_dir, "toolchains.xml") - -def none_or_blank(s): - return s is None or s == "" - -with open(toolchains_file, "w") as f: - f.write('\n\n') - - for v in [8, 11, 17, 21]: - homedir = os.getenv("JAVA_HOME_%d_X64" % v) - if none_or_blank(homedir): - homedir = os.getenv("JAVA_HOME_%d_arm64" % v) - if none_or_blank(homedir) and v == 8 and not none_or_blank(os.getenv("JAVA_HOME_11_arm64")): - print("Mocking a toolchain entry using Java 11 install as a fake Java 8 entry, so this test behaves the same on x64 and arm64 runners", file = sys.stderr) - homedir = os.getenv("JAVA_HOME_11_arm64") - if homedir is not None and homedir != "": - f.write(""" - - jdk - - %d - oracle - - - %s - - - """ % (v, homedir)) - - f.write("") +toolchains_file = actions_expose_all_toolchains() run_codeql_database_create([], lang="java", extra_env={"CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS": "true", "CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true", "LGTM_INDEX_MAVEN_TOOLCHAINS_FILE": toolchains_file}) diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.py b/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.py index 5fc07d8bd06..cc9d91c7792 100644 --- a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.py +++ b/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.py @@ -4,6 +4,7 @@ from create_database_utils import * from buildless_test_utils import * import subprocess +# This serves the "repo" directory on http://localhost:9427 repo_server_process = subprocess.Popen(["python3", "-m", "http.server", "9427"], cwd = "repo") try: diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/.gitattributes b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/.gitattributes new file mode 100644 index 00000000000..00a51aff5e5 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/.gitignore b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/.gitignore new file mode 100644 index 00000000000..c2065bc2620 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/.gitignore @@ -0,0 +1,37 @@ +HELP.md +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/README b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/README new file mode 100644 index 00000000000..4074f053479 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/README @@ -0,0 +1,3 @@ +Generated using start.spring.io, using Java 17 and Spring Boot 3.2.5. + +I also added a JSR305 dependency to circumvent a harmless database inconsistency that arose because annotations on Spring Core classes weren't included in the compile classpath (the Java extractor touches more classes than actual compilation) diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/build.gradle b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/build.gradle new file mode 100644 index 00000000000..6c918f95048 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/build.gradle @@ -0,0 +1,25 @@ +plugins { + id 'java' + id 'org.springframework.boot' version '3.2.5' + id 'io.spring.dependency-management' version '1.1.4' +} + +group = 'com.github' +version = '0.0.1-SNAPSHOT' + +// The generated sample would explicitly set sourceCompatibility to Java 17 here, +// but I omit it to test we recognise the Spring Boot plugin version. + +repositories { + mavenCentral() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + implementation 'com.google.code.findbugs:jsr305:3.0.2' +} + +tasks.named('test') { + useJUnitPlatform() +} diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/force_sequential_test_execution new file mode 100644 index 00000000000..b0e2500b259 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/force_sequential_test_execution @@ -0,0 +1,3 @@ +# We currently have a bug where gradle tests become flaky when executed in parallel +# - sometimes, gradle fails to connect to the gradle daemon. +# Therefore, force this test to run sequentially. diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradle/wrapper/gradle-wrapper.jar b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000000..e6441136f3d Binary files /dev/null and b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradle/wrapper/gradle-wrapper.jar differ diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradle/wrapper/gradle-wrapper.properties b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..b82aa23a4f0 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradlew b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradlew new file mode 100755 index 00000000000..1aa94a42690 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradlew.bat b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradlew.bat new file mode 100644 index 00000000000..25da30dbdee --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/settings.gradle b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/settings.gradle new file mode 100644 index 00000000000..ea3c5b624bc --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'spring-boot-sample' diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/java/com/github/springbootsample/SpringBootSampleApplication.java b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/java/com/github/springbootsample/SpringBootSampleApplication.java new file mode 100644 index 00000000000..f8f3804dd07 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/java/com/github/springbootsample/SpringBootSampleApplication.java @@ -0,0 +1,13 @@ +package com.github.springbootsample; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringBootSampleApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringBootSampleApplication.class, args); + } + +} diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/resources/application.properties b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/resources/application.properties new file mode 100644 index 00000000000..fc4a014f453 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/resources/application.properties @@ -0,0 +1 @@ +spring.application.name=spring-boot-sample diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/test/java/com/github/springbootsample/SpringBootSampleApplicationTests.java b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/test/java/com/github/springbootsample/SpringBootSampleApplicationTests.java new file mode 100644 index 00000000000..0df5de88977 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/test/java/com/github/springbootsample/SpringBootSampleApplicationTests.java @@ -0,0 +1,13 @@ +package com.github.springbootsample; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class SpringBootSampleApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.expected b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.expected new file mode 100644 index 00000000000..f8e614cd984 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.expected @@ -0,0 +1,4 @@ +#select +| src/main/java/com/github/springbootsample/SpringBootSampleApplication.java:0:0:0:0 | SpringBootSampleApplication | +| src/test/java/com/github/springbootsample/SpringBootSampleApplicationTests.java:0:0:0:0 | SpringBootSampleApplicationTests | +xmlFiles diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.py b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.py new file mode 100644 index 00000000000..1cb6e142763 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.py @@ -0,0 +1,8 @@ +import sys + +from create_database_utils import * + +#The version of gradle used doesn't work on java 17 +try_use_java11() + +run_codeql_database_create([], lang="java") diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.ql b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.ql new file mode 100644 index 00000000000..c11b8fba707 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.ql @@ -0,0 +1,7 @@ +import java + +from File f +where f.isSourceFile() +select f + +query predicate xmlFiles(XmlFile x) { any() } diff --git a/java/ql/lib/CHANGELOG.md b/java/ql/lib/CHANGELOG.md index 4265865ea37..dd4d35e882a 100644 --- a/java/ql/lib/CHANGELOG.md +++ b/java/ql/lib/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.11.0 + +### Breaking Changes + +* The Java extractor no longer supports the `ODASA_JAVA_LAYOUT`, `ODASA_TOOLS` and `ODASA_HOME` legacy environment variables. +* The Java extractor no longer supports the `ODASA_BUILD_ERROR_DIR` legacy environment variable. + ## 0.10.0 ### Breaking Changes diff --git a/java/ql/lib/change-notes/2024-04-26-env-vars.md b/java/ql/lib/change-notes/2024-04-26-env-vars.md deleted file mode 100644 index cb2003740ef..00000000000 --- a/java/ql/lib/change-notes/2024-04-26-env-vars.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: breaking ---- -* The Java extractor no longer supports the `ODASA_BUILD_ERROR_DIR` legacy environment variable. diff --git a/java/ql/lib/change-notes/released/0.11.0.md b/java/ql/lib/change-notes/released/0.11.0.md new file mode 100644 index 00000000000..abed5aee703 --- /dev/null +++ b/java/ql/lib/change-notes/released/0.11.0.md @@ -0,0 +1,6 @@ +## 0.11.0 + +### Breaking Changes + +* The Java extractor no longer supports the `ODASA_JAVA_LAYOUT`, `ODASA_TOOLS` and `ODASA_HOME` legacy environment variables. +* The Java extractor no longer supports the `ODASA_BUILD_ERROR_DIR` legacy environment variable. diff --git a/java/ql/lib/codeql-pack.release.yml b/java/ql/lib/codeql-pack.release.yml index b21db623245..fce68697d68 100644 --- a/java/ql/lib/codeql-pack.release.yml +++ b/java/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.10.0 +lastReleaseVersion: 0.11.0 diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index d3bcafad03c..49994227d7c 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-all -version: 0.10.1-dev +version: 0.11.1-dev groups: java dbscheme: config/semmlecode.dbscheme extractor: java diff --git a/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll b/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll index 6befe289a17..3d5b74f4a35 100644 --- a/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll +++ b/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll @@ -301,7 +301,7 @@ class EnvReadMethod extends Method { /** The type `java.net.InetAddress`. */ class TypeInetAddr extends RefType { - TypeInetAddr() { this.getQualifiedName() = "java.net.InetAddress" } + TypeInetAddr() { this.hasQualifiedName("java.net", "InetAddress") } } /** A reverse DNS method. */ diff --git a/java/ql/lib/semmle/code/java/frameworks/ApacheHttp.qll b/java/ql/lib/semmle/code/java/frameworks/ApacheHttp.qll index 64e38a19e9d..61f6aa9a34e 100644 --- a/java/ql/lib/semmle/code/java/frameworks/ApacheHttp.qll +++ b/java/ql/lib/semmle/code/java/frameworks/ApacheHttp.qll @@ -6,16 +6,12 @@ import java private import semmle.code.java.dataflow.FlowSteps class ApacheHttpGetParams extends Method { - ApacheHttpGetParams() { - this.getDeclaringType().getQualifiedName() = "org.apache.http.HttpMessage" and - this.getName() = "getParams" - } + ApacheHttpGetParams() { this.hasQualifiedName("org.apache.http", "HttpMessage", "getParams") } } class ApacheHttpEntityGetContent extends Method { ApacheHttpEntityGetContent() { - this.getDeclaringType().getQualifiedName() = "org.apache.http.HttpEntity" and - this.getName() = "getContent" + this.hasQualifiedName("org.apache.http", "HttpEntity", "getContent") } } diff --git a/java/ql/lib/semmle/code/java/frameworks/JAXB.qll b/java/ql/lib/semmle/code/java/frameworks/JAXB.qll index 7d60673508d..e25add17ccb 100644 --- a/java/ql/lib/semmle/code/java/frameworks/JAXB.qll +++ b/java/ql/lib/semmle/code/java/frameworks/JAXB.qll @@ -4,14 +4,14 @@ import semmle.code.java.Type class JaxbElement extends Class { JaxbElement() { - this.getAnAncestor().getQualifiedName() = "javax.xml.bind.JAXBElement" or + this.getAnAncestor().hasQualifiedName("javax.xml.bind", "JAXBElement") or this.getAnAnnotation().getType().getName() = "XmlRootElement" } } class JaxbMarshalMethod extends Method { JaxbMarshalMethod() { - this.getDeclaringType().getQualifiedName() = "javax.xml.bind.Marshaller" and + this.getDeclaringType().hasQualifiedName("javax.xml.bind", "Marshaller") and this.getName() = "marshal" } } diff --git a/java/ql/lib/semmle/code/java/security/ArithmeticTaintedLocalQuery.qll b/java/ql/lib/semmle/code/java/security/ArithmeticTaintedLocalQuery.qll index 979f4b23466..45311174967 100644 --- a/java/ql/lib/semmle/code/java/security/ArithmeticTaintedLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ArithmeticTaintedLocalQuery.qll @@ -5,9 +5,11 @@ private import semmle.code.java.dataflow.FlowSources private import semmle.code.java.security.ArithmeticCommon /** + * DEPRECATED: Use `ArithmeticOverflowConfig` instead. + * * A taint-tracking configuration to reason about arithmetic overflow using local-user-controlled data. */ -module ArithmeticTaintedLocalOverflowConfig implements DataFlow::ConfigSig { +deprecated module ArithmeticTaintedLocalOverflowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { overflowSink(_, sink.asExpr()) } @@ -18,15 +20,17 @@ module ArithmeticTaintedLocalOverflowConfig implements DataFlow::ConfigSig { } /** + * DEPRECATED: Use `ArithmeticOverflow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for arithmetic overflow using local-user-controlled data. */ -module ArithmeticTaintedLocalOverflowFlow = +deprecated module ArithmeticTaintedLocalOverflowFlow = TaintTracking::Global; /** * A taint-tracking configuration to reason about arithmetic underflow using local-user-controlled data. */ -module ArithmeticTaintedLocalUnderflowConfig implements DataFlow::ConfigSig { +deprecated module ArithmeticTaintedLocalUnderflowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { underflowSink(_, sink.asExpr()) } @@ -37,7 +41,9 @@ module ArithmeticTaintedLocalUnderflowConfig implements DataFlow::ConfigSig { } /** + * DEPRECATED: Use `ArithmeticUnderflow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for arithmetic underflow using local-user-controlled data. */ -module ArithmeticTaintedLocalUnderflowFlow = +deprecated module ArithmeticTaintedLocalUnderflowFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/ArithmeticTaintedQuery.qll b/java/ql/lib/semmle/code/java/security/ArithmeticTaintedQuery.qll index 5003ceb8a3a..7d58de46a67 100644 --- a/java/ql/lib/semmle/code/java/security/ArithmeticTaintedQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ArithmeticTaintedQuery.qll @@ -1,11 +1,11 @@ -/** Provides taint-tracking configurations to reason about arithmetic with unvalidated user input. */ +/** Provides taint-tracking configurations to reason about arithmetic with unvalidated input. */ import java private import semmle.code.java.dataflow.FlowSources private import semmle.code.java.security.ArithmeticCommon -/** A taint-tracking configuration to reason about overflow from unvalidated user input. */ -module RemoteUserInputOverflowConfig implements DataFlow::ConfigSig { +/** A taint-tracking configuration to reason about overflow from unvalidated input. */ +module ArithmeticOverflowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } predicate isSink(DataFlow::Node sink) { overflowSink(_, sink.asExpr()) } @@ -15,8 +15,13 @@ module RemoteUserInputOverflowConfig implements DataFlow::ConfigSig { predicate isBarrierIn(DataFlow::Node node) { isSource(node) } } -/** A taint-tracking configuration to reason about underflow from unvalidated user input. */ -module RemoteUserInputUnderflowConfig implements DataFlow::ConfigSig { +/** + * DEPRECATED: Use `ArithmeticOverflowConfig` instead. + */ +deprecated module RemoteUserInputOverflowConfig = ArithmeticOverflowConfig; + +/** A taint-tracking configuration to reason about underflow from unvalidated input. */ +module ArithmeticUnderflowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } predicate isSink(DataFlow::Node sink) { underflowSink(_, sink.asExpr()) } @@ -26,8 +31,23 @@ module RemoteUserInputUnderflowConfig implements DataFlow::ConfigSig { predicate isBarrierIn(DataFlow::Node node) { isSource(node) } } -/** Taint-tracking flow for overflow from unvalidated user input. */ -module RemoteUserInputOverflow = TaintTracking::Global; +/** + * DEPRECATED: Use `ArithmeticUnderflowConfig` instead. + */ +deprecated module RemoteUserInputUnderflowConfig = ArithmeticUnderflowConfig; -/** Taint-tracking flow for underflow from unvalidated user input. */ -module RemoteUserInputUnderflow = TaintTracking::Global; +/** Taint-tracking flow for overflow from unvalidated input. */ +module ArithmeticOverflow = TaintTracking::Global; + +/** + * DEPRECATED: Use `ArithmeticOverflow` instead. + */ +deprecated module RemoteUserInputOverflow = ArithmeticOverflow; + +/** Taint-tracking flow for underflow from unvalidated input. */ +module ArithmeticUnderflow = TaintTracking::Global; + +/** + * DEPRECATED: Use `ArithmeticUnderflow` instead. + */ +deprecated module RemoteUserInputUnderflow = ArithmeticUnderflow; diff --git a/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll b/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll index 7aa602bf3c7..903dae5d67e 100644 --- a/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll +++ b/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll @@ -48,7 +48,7 @@ private class DefaultCommandInjectionSanitizer extends CommandInjectionSanitizer /** * A taint-tracking configuration for unvalidated user input that is used to run an external process. */ -module RemoteUserInputToArgumentToExecFlowConfig implements DataFlow::ConfigSig { +module InputToArgumentToExecFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } predicate isSink(DataFlow::Node sink) { sink instanceof CommandInjectionSink } @@ -61,15 +61,24 @@ module RemoteUserInputToArgumentToExecFlowConfig implements DataFlow::ConfigSig } /** - * Taint-tracking flow for unvalidated user input that is used to run an external process. + * DEPRECATED: Use `InputToArgumentToExecFlowConfig` instead. */ -module RemoteUserInputToArgumentToExecFlow = - TaintTracking::Global; +deprecated module RemoteUserInputToArgumentToExecFlowConfig = InputToArgumentToExecFlowConfig; + +/** + * Taint-tracking flow for unvalidated input that is used to run an external process. + */ +module InputToArgumentToExecFlow = TaintTracking::Global; + +/** + * DEPRECATED: Use `InputToArgumentToExecFlow` instead. + */ +deprecated module RemoteUserInputToArgumentToExecFlow = InputToArgumentToExecFlow; /** * A taint-tracking configuration for unvalidated local user input that is used to run an external process. */ -module LocalUserInputToArgumentToExecFlowConfig implements DataFlow::ConfigSig { +deprecated module LocalUserInputToArgumentToExecFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { sink instanceof CommandInjectionSink } @@ -82,9 +91,11 @@ module LocalUserInputToArgumentToExecFlowConfig implements DataFlow::ConfigSig { } /** + * DEPRECATED: Use `InputToArgumentToExecFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for unvalidated local user input that is used to run an external process. */ -module LocalUserInputToArgumentToExecFlow = +deprecated module LocalUserInputToArgumentToExecFlow = TaintTracking::Global; /** @@ -93,10 +104,9 @@ module LocalUserInputToArgumentToExecFlow = * reporting overlapping results. */ predicate execIsTainted( - RemoteUserInputToArgumentToExecFlow::PathNode source, - RemoteUserInputToArgumentToExecFlow::PathNode sink, Expr execArg + InputToArgumentToExecFlow::PathNode source, InputToArgumentToExecFlow::PathNode sink, Expr execArg ) { - RemoteUserInputToArgumentToExecFlow::flowPath(source, sink) and + InputToArgumentToExecFlow::flowPath(source, sink) and argumentToExec(execArg, sink.getNode()) } diff --git a/java/ql/lib/semmle/code/java/security/Encryption.qll b/java/ql/lib/semmle/code/java/security/Encryption.qll index a3973d3efad..6fc7f6b7d16 100644 --- a/java/ql/lib/semmle/code/java/security/Encryption.qll +++ b/java/ql/lib/semmle/code/java/security/Encryption.qll @@ -284,8 +284,7 @@ abstract class JavaxCryptoAlgoSpec extends CryptoAlgoSpec { } class JavaxCryptoCipher extends JavaxCryptoAlgoSpec { JavaxCryptoCipher() { exists(Method m | m.getAReference() = this | - m.getDeclaringType().getQualifiedName() = "javax.crypto.Cipher" and - m.getName() = "getInstance" + m.hasQualifiedName("javax.crypto", "Cipher", "getInstance") ) } @@ -295,7 +294,7 @@ class JavaxCryptoCipher extends JavaxCryptoAlgoSpec { class JavaxCryptoSecretKey extends JavaxCryptoAlgoSpec { JavaxCryptoSecretKey() { exists(Constructor c | c.getAReference() = this | - c.getDeclaringType().getQualifiedName() = "javax.crypto.spec.SecretKeySpec" + c.getDeclaringType().hasQualifiedName("javax.crypto.spec", "SecretKeySpec") ) } @@ -320,8 +319,7 @@ class JavaxCryptoKeyGenerator extends JavaxCryptoAlgoSpec { class JavaxCryptoKeyAgreement extends JavaxCryptoAlgoSpec { JavaxCryptoKeyAgreement() { exists(Method m | m.getAReference() = this | - m.getDeclaringType().getQualifiedName() = "javax.crypto.KeyAgreement" and - m.getName() = "getInstance" + m.hasQualifiedName("javax.crypto", "KeyAgreement", "getInstance") ) } @@ -331,8 +329,7 @@ class JavaxCryptoKeyAgreement extends JavaxCryptoAlgoSpec { class JavaxCryptoKeyFactory extends JavaxCryptoAlgoSpec { JavaxCryptoKeyFactory() { exists(Method m | m.getAReference() = this | - m.getDeclaringType().getQualifiedName() = "javax.crypto.SecretKeyFactory" and - m.getName() = "getInstance" + m.hasQualifiedName("javax.crypto", "SecretKeyFactory", "getInstance") ) } @@ -348,8 +345,7 @@ class JavaSecurityMessageDigest extends JavaSecurityAlgoSpec { ) or exists(Method m | m.getAReference() = this | - m.getDeclaringType().hasQualifiedName("java.security", "MessageDigest") and - m.getName() = "getInstance" + m.hasQualifiedName("java.security", "MessageDigest", "getInstance") ) } @@ -359,7 +355,7 @@ class JavaSecurityMessageDigest extends JavaSecurityAlgoSpec { class JavaSecuritySignature extends JavaSecurityAlgoSpec { JavaSecuritySignature() { exists(Constructor c | c.getAReference() = this | - c.getDeclaringType().getQualifiedName() = "java.security.Signature" + c.getDeclaringType().hasQualifiedName("java.security", "Signature") ) } diff --git a/java/ql/lib/semmle/code/java/security/ExecTaintedLocalQuery.qll b/java/ql/lib/semmle/code/java/security/ExecTaintedLocalQuery.qll index ea36338fcb9..7a2d5b0947d 100644 --- a/java/ql/lib/semmle/code/java/security/ExecTaintedLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ExecTaintedLocalQuery.qll @@ -7,7 +7,7 @@ private import semmle.code.java.security.CommandArguments private import semmle.code.java.security.Sanitizers /** A taint-tracking configuration to reason about use of externally controlled strings to make command line commands. */ -module ExecTaintedLocalConfig implements DataFlow::ConfigSig { +deprecated module ExecTaintedLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { sink.asExpr() instanceof ArgumentToExec } @@ -20,6 +20,8 @@ module ExecTaintedLocalConfig implements DataFlow::ConfigSig { } /** + * DEPRCATED: Unused. + * * Taint-tracking flow for use of externally controlled strings to make command line commands. */ -module ExecTaintedLocalFlow = TaintTracking::Global; +deprecated module ExecTaintedLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringLocalQuery.qll b/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringLocalQuery.qll index 4d07e8bddd0..482673bacc9 100644 --- a/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ExternallyControlledFormatStringLocalQuery.qll @@ -5,7 +5,7 @@ private import semmle.code.java.dataflow.FlowSources private import semmle.code.java.StringFormat /** A taint-tracking configuration to reason about externally-controlled format strings from local sources. */ -module ExternallyControlledFormatStringLocalConfig implements DataFlow::ConfigSig { +deprecated module ExternallyControlledFormatStringLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { @@ -18,7 +18,9 @@ module ExternallyControlledFormatStringLocalConfig implements DataFlow::ConfigSi } /** + * DEPRECATED: Use `ExternallyControlledFormatStringFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for externally-controlled format strings from local sources. */ -module ExternallyControlledFormatStringLocalFlow = +deprecated module ExternallyControlledFormatStringLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayConstructionLocalQuery.qll b/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayConstructionLocalQuery.qll index f1d21fbfa80..1d31d7afb87 100644 --- a/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayConstructionLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayConstructionLocalQuery.qll @@ -7,7 +7,7 @@ private import semmle.code.java.dataflow.FlowSources /** * A taint-tracking configuration to reason about improper validation of local user-provided size used for array construction. */ -module ImproperValidationOfArrayConstructionLocalConfig implements DataFlow::ConfigSig { +deprecated module ImproperValidationOfArrayConstructionLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { @@ -16,7 +16,9 @@ module ImproperValidationOfArrayConstructionLocalConfig implements DataFlow::Con } /** + * DEPRECATED: Use `ImproperValidationOfArrayConstructionFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for improper validation of local user-provided size used for array construction. */ -module ImproperValidationOfArrayConstructionLocalFlow = +deprecated module ImproperValidationOfArrayConstructionLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayIndexLocalQuery.qll b/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayIndexLocalQuery.qll index d21de6c7fdf..5f1e7c81e01 100644 --- a/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayIndexLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ImproperValidationOfArrayIndexLocalQuery.qll @@ -7,7 +7,7 @@ private import semmle.code.java.dataflow.FlowSources /** * A taint-tracking configuration to reason about improper validation of local user-provided array index. */ -module ImproperValidationOfArrayIndexLocalConfig implements DataFlow::ConfigSig { +deprecated module ImproperValidationOfArrayIndexLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { @@ -20,7 +20,9 @@ module ImproperValidationOfArrayIndexLocalConfig implements DataFlow::ConfigSig } /** + * DEPRECATED: Use `ImproperValidationOfArrayIndexFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for improper validation of local user-provided array index. */ -module ImproperValidationOfArrayIndexLocalFlow = +deprecated module ImproperValidationOfArrayIndexLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll b/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll index b2754057b4c..b6bd505c38b 100644 --- a/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll +++ b/java/ql/lib/semmle/code/java/security/NumericCastTaintedQuery.qll @@ -113,7 +113,7 @@ module NumericCastFlow = TaintTracking::Global; * A taint-tracking configuration for reasoning about local user input that is * used in a numeric cast. */ -module NumericCastLocalFlowConfig implements DataFlow::ConfigSig { +deprecated module NumericCastLocalFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { @@ -134,6 +134,8 @@ module NumericCastLocalFlowConfig implements DataFlow::ConfigSig { } /** + * DEPRECATED: Use `NumericCastFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for local user input that is used in a numeric cast. */ -module NumericCastLocalFlow = TaintTracking::Global; +deprecated module NumericCastLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/ResponseSplittingLocalQuery.qll b/java/ql/lib/semmle/code/java/security/ResponseSplittingLocalQuery.qll index 23816caa1f8..e5845b630ec 100644 --- a/java/ql/lib/semmle/code/java/security/ResponseSplittingLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ResponseSplittingLocalQuery.qll @@ -7,7 +7,7 @@ private import semmle.code.java.security.ResponseSplitting /** * A taint-tracking configuration to reason about response splitting vulnerabilities from local user input. */ -module ResponseSplittingLocalConfig implements DataFlow::ConfigSig { +deprecated module ResponseSplittingLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { sink instanceof HeaderSplittingSink } @@ -32,6 +32,8 @@ module ResponseSplittingLocalConfig implements DataFlow::ConfigSig { } /** + * DEPRECATED: Use `ResponseSplittingFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for response splitting vulnerabilities from local user input. */ -module ResponseSplittingLocalFlow = TaintTracking::Global; +deprecated module ResponseSplittingLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/SqlTaintedLocalQuery.qll b/java/ql/lib/semmle/code/java/security/SqlTaintedLocalQuery.qll index 9f32bd00b57..7ff4b300ce8 100644 --- a/java/ql/lib/semmle/code/java/security/SqlTaintedLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SqlTaintedLocalQuery.qll @@ -12,7 +12,7 @@ private import semmle.code.java.security.Sanitizers * A taint-tracking configuration for reasoning about local user input that is * used in a SQL query. */ -module LocalUserInputToQueryInjectionFlowConfig implements DataFlow::ConfigSig { +deprecated module LocalUserInputToQueryInjectionFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { sink instanceof QueryInjectionSink } @@ -25,7 +25,9 @@ module LocalUserInputToQueryInjectionFlowConfig implements DataFlow::ConfigSig { } /** + * DEPRECATED: Use `QueryInjectionFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for local user input that is used in a SQL query. */ -module LocalUserInputToQueryInjectionFlow = +deprecated module LocalUserInputToQueryInjectionFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll b/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll index 63bd4949699..c396b48a7b8 100644 --- a/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll +++ b/java/ql/lib/semmle/code/java/security/TaintedPathQuery.qll @@ -80,7 +80,7 @@ module TaintedPathFlow = TaintTracking::Global; /** * A taint-tracking configuration for tracking flow from local user input to the creation of a path. */ -module TaintedPathLocalConfig implements DataFlow::ConfigSig { +deprecated module TaintedPathLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { sink instanceof TaintedPathSink } @@ -95,5 +95,9 @@ module TaintedPathLocalConfig implements DataFlow::ConfigSig { } } -/** Tracks flow from local user input to the creation of a path. */ -module TaintedPathLocalFlow = TaintTracking::Global; +/** + * DEPRECATED: Use `TaintedPathFlow` instead and configure threat model sources to include `local`. + * + * Tracks flow from local user input to the creation of a path. + */ +deprecated module TaintedPathLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/UrlRedirectLocalQuery.qll b/java/ql/lib/semmle/code/java/security/UrlRedirectLocalQuery.qll index 8b2e0374322..f68fb959ea5 100644 --- a/java/ql/lib/semmle/code/java/security/UrlRedirectLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UrlRedirectLocalQuery.qll @@ -7,13 +7,15 @@ private import semmle.code.java.security.UrlRedirect /** * A taint-tracking configuration to reason about URL redirection from local sources. */ -module UrlRedirectLocalConfig implements DataFlow::ConfigSig { +deprecated module UrlRedirectLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { sink instanceof UrlRedirectSink } } /** + * DEPRECATED: Use `UrlRedirectFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for URL redirection from local sources. */ -module UrlRedirectLocalFlow = TaintTracking::Global; +deprecated module UrlRedirectLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/XSS.qll b/java/ql/lib/semmle/code/java/security/XSS.qll index 777e5fae062..e35f8f9e643 100644 --- a/java/ql/lib/semmle/code/java/security/XSS.qll +++ b/java/ql/lib/semmle/code/java/security/XSS.qll @@ -97,8 +97,7 @@ class XssVulnerableWriterSource extends MethodCall { this.getMethod() instanceof ServletResponseGetOutputStreamMethod or exists(Method m | m = this.getMethod() | - m.getDeclaringType().getQualifiedName() = "javax.servlet.jsp.JspContext" and - m.getName() = "getOut" + m.hasQualifiedName("javax.servlet.jsp", "JspContext", "getOut") ) or this.getMethod() instanceof FacesGetResponseWriterMethod diff --git a/java/ql/lib/semmle/code/java/security/XssLocalQuery.qll b/java/ql/lib/semmle/code/java/security/XssLocalQuery.qll index f19872bb489..5e1098865aa 100644 --- a/java/ql/lib/semmle/code/java/security/XssLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XssLocalQuery.qll @@ -8,7 +8,7 @@ private import semmle.code.java.security.XSS /** * A taint-tracking configuration for reasoning about cross-site scripting vulnerabilities from a local source. */ -module XssLocalConfig implements DataFlow::ConfigSig { +deprecated module XssLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { sink instanceof XssSink } @@ -23,6 +23,8 @@ module XssLocalConfig implements DataFlow::ConfigSig { } /** + * DEPRECATED: Use `XssFlow` instead and configure threat model sources to include `local`. + * * Taint-tracking flow for cross-site scripting vulnerabilities from a local source. */ -module XssLocalFlow = TaintTracking::Global; +deprecated module XssLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/XxeLocalQuery.qll b/java/ql/lib/semmle/code/java/security/XxeLocalQuery.qll index d3ac09798a6..f6bfa8850b2 100644 --- a/java/ql/lib/semmle/code/java/security/XxeLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XxeLocalQuery.qll @@ -27,7 +27,7 @@ deprecated class XxeLocalConfig extends TaintTracking::Configuration { /** * A taint-tracking configuration for unvalidated local user input that is used in XML external entity expansion. */ -module XxeLocalConfig implements DataFlow::ConfigSig { +deprecated module XxeLocalConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof LocalUserInput } predicate isSink(DataFlow::Node sink) { sink instanceof XxeSink } @@ -40,6 +40,8 @@ module XxeLocalConfig implements DataFlow::ConfigSig { } /** + * DEPRECATED: Use `XxeFlow` instead and configure threat model sources to include `local`. + * * Detect taint flow of unvalidated local user input that is used in XML external entity expansion. */ -module XxeLocalFlow = TaintTracking::Global; +deprecated module XxeLocalFlow = TaintTracking::Global; diff --git a/java/ql/lib/upgrades/8ab354e68e86100ee3abe28bd44f491ecc77c1dd/upgrade.properties b/java/ql/lib/upgrades/8ab354e68e86100ee3abe28bd44f491ecc77c1dd/upgrade.properties index a0c4ba602a1..3e361d800fb 100644 --- a/java/ql/lib/upgrades/8ab354e68e86100ee3abe28bd44f491ecc77c1dd/upgrade.properties +++ b/java/ql/lib/upgrades/8ab354e68e86100ee3abe28bd44f491ecc77c1dd/upgrade.properties @@ -1,4 +1,4 @@ description: Removed unused column from the `folders` and `files` relations compatibility: full -files.rel: reorder files.rel (int id, string name, string simple, string ext, int fromSource) id name -folders.rel: reorder folders.rel (int id, string name, string simple) id name \ No newline at end of file +files.rel: reorder files.rel (@file id, string name, string simple, string ext, int fromSource) id name +folders.rel: reorder folders.rel (@folder id, string name, string simple) id name \ No newline at end of file diff --git a/java/ql/lib/upgrades/b4e689c90426b017ad550e30a439cab2763ff424/upgrade.properties b/java/ql/lib/upgrades/b4e689c90426b017ad550e30a439cab2763ff424/upgrade.properties index 459f9588323..1add7b1ff3a 100644 --- a/java/ql/lib/upgrades/b4e689c90426b017ad550e30a439cab2763ff424/upgrade.properties +++ b/java/ql/lib/upgrades/b4e689c90426b017ad550e30a439cab2763ff424/upgrade.properties @@ -1,4 +1,4 @@ description: Java 16: allow local interfaces compatibility: backwards -isLocalClassOrInterface.rel: reorder isLocalClass.rel(int id, int parent) id parent +isLocalClassOrInterface.rel: reorder isLocalClass.rel(@class id, @localclassdeclstmt parent) id parent isLocalClass.rel: delete diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index a242e40221e..349e1baa630 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.16 + +No user-facing changes. + ## 0.8.15 No user-facing changes. diff --git a/java/ql/src/Likely Bugs/Concurrency/WaitOutsideLoop.ql b/java/ql/src/Likely Bugs/Concurrency/WaitOutsideLoop.ql index 6e1356ff1a1..bcbf3ffcbbe 100644 --- a/java/ql/src/Likely Bugs/Concurrency/WaitOutsideLoop.ql +++ b/java/ql/src/Likely Bugs/Concurrency/WaitOutsideLoop.ql @@ -16,7 +16,7 @@ import java class WaitMethod extends Method { WaitMethod() { this.getName() = "wait" and - this.getDeclaringType().getQualifiedName() = "java.lang.Object" + this.getDeclaringType() instanceof TypeObject } } diff --git a/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.qhelp b/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.qhelp deleted file mode 100644 index 25fb4f6153a..00000000000 --- a/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.ql b/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.ql deleted file mode 100644 index 60dc6b54be8..00000000000 --- a/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.ql +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @name Local-user-controlled data in path expression - * @description Accessing paths influenced by users can allow an attacker to access unexpected resources. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 7.5 - * @precision medium - * @id java/path-injection-local - * @tags security - * external/cwe/cwe-022 - * external/cwe/cwe-023 - * external/cwe/cwe-036 - * external/cwe/cwe-073 - */ - -import java -import semmle.code.java.security.PathCreation -import semmle.code.java.security.TaintedPathQuery -import TaintedPathLocalFlow::PathGraph - -from TaintedPathLocalFlow::PathNode source, TaintedPathLocalFlow::PathNode sink -where TaintedPathLocalFlow::flowPath(source, sink) -select sink.getNode(), source, sink, "This path depends on a $@.", source.getNode(), - "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-078/ExecTainted.ql b/java/ql/src/Security/CWE/CWE-078/ExecTainted.ql index c5f8b085878..b6f2894ad67 100644 --- a/java/ql/src/Security/CWE/CWE-078/ExecTainted.ql +++ b/java/ql/src/Security/CWE/CWE-078/ExecTainted.ql @@ -14,11 +14,10 @@ import java import semmle.code.java.security.CommandLineQuery -import RemoteUserInputToArgumentToExecFlow::PathGraph +import InputToArgumentToExecFlow::PathGraph from - RemoteUserInputToArgumentToExecFlow::PathNode source, - RemoteUserInputToArgumentToExecFlow::PathNode sink, Expr execArg + InputToArgumentToExecFlow::PathNode source, InputToArgumentToExecFlow::PathNode sink, Expr execArg where execIsTainted(source, sink, execArg) select execArg, source, sink, "This command line depends on a $@.", source.getNode(), "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.qhelp b/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.qhelp deleted file mode 100644 index d2f3018b0cd..00000000000 --- a/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.ql b/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.ql deleted file mode 100644 index 38b79c468cd..00000000000 --- a/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.ql +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @name Local-user-controlled command line - * @description Using externally controlled strings in a command line is vulnerable to malicious - * changes in the strings. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 9.8 - * @precision medium - * @id java/command-line-injection-local - * @tags security - * external/cwe/cwe-078 - * external/cwe/cwe-088 - */ - -import java -import semmle.code.java.security.CommandLineQuery -import semmle.code.java.security.ExternalProcess -import LocalUserInputToArgumentToExecFlow::PathGraph - -from - LocalUserInputToArgumentToExecFlow::PathNode source, - LocalUserInputToArgumentToExecFlow::PathNode sink, Expr e -where - LocalUserInputToArgumentToExecFlow::flowPath(source, sink) and - argumentToExec(e, sink.getNode()) -select e, source, sink, "This command line depends on a $@.", source.getNode(), - "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-079/XSSLocal.qhelp b/java/ql/src/Security/CWE/CWE-079/XSSLocal.qhelp deleted file mode 100644 index b35c7d781ff..00000000000 --- a/java/ql/src/Security/CWE/CWE-079/XSSLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-079/XSSLocal.ql b/java/ql/src/Security/CWE/CWE-079/XSSLocal.ql deleted file mode 100644 index 09a7849fd56..00000000000 --- a/java/ql/src/Security/CWE/CWE-079/XSSLocal.ql +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @name Cross-site scripting from local source - * @description Writing user input directly to a web page - * allows for a cross-site scripting vulnerability. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 6.1 - * @precision medium - * @id java/xss-local - * @tags security - * external/cwe/cwe-079 - */ - -import java -import semmle.code.java.security.XssLocalQuery -import XssLocalFlow::PathGraph - -from XssLocalFlow::PathNode source, XssLocalFlow::PathNode sink -where XssLocalFlow::flowPath(source, sink) -select sink.getNode(), source, sink, "Cross-site scripting vulnerability due to $@.", - source.getNode(), "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.qhelp b/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.qhelp deleted file mode 100644 index accf2aee854..00000000000 --- a/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.ql b/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.ql deleted file mode 100644 index 8b95ee597be..00000000000 --- a/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.ql +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @name Query built from local-user-controlled sources - * @description Building a SQL or Java Persistence query from user-controlled sources is vulnerable to insertion of - * malicious code by the user. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 8.8 - * @precision medium - * @id java/sql-injection-local - * @tags security - * external/cwe/cwe-089 - * external/cwe/cwe-564 - */ - -import java -import semmle.code.java.security.SqlTaintedLocalQuery -import LocalUserInputToQueryInjectionFlow::PathGraph - -from - LocalUserInputToQueryInjectionFlow::PathNode source, - LocalUserInputToQueryInjectionFlow::PathNode sink -where LocalUserInputToQueryInjectionFlow::flowPath(source, sink) -select sink.getNode(), source, sink, "This query depends on a $@.", source.getNode(), - "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.qhelp b/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.qhelp deleted file mode 100644 index 17afa6275fc..00000000000 --- a/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.ql b/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.ql deleted file mode 100644 index 804ead11a35..00000000000 --- a/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.ql +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @name HTTP response splitting from local source - * @description Writing user input directly to an HTTP header - * makes code vulnerable to attack by header splitting. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 6.1 - * @precision medium - * @id java/http-response-splitting-local - * @tags security - * external/cwe/cwe-113 - */ - -import java -import semmle.code.java.security.ResponseSplittingLocalQuery -import ResponseSplittingLocalFlow::PathGraph - -from ResponseSplittingLocalFlow::PathNode source, ResponseSplittingLocalFlow::PathNode sink -where ResponseSplittingLocalFlow::flowPath(source, sink) -select sink.getNode(), source, sink, - "This header depends on a $@, which may cause a response-splitting vulnerability.", - source.getNode(), "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.qhelp b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.qhelp deleted file mode 100644 index 3f467edeca3..00000000000 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql deleted file mode 100644 index 1ba0521ee4d..00000000000 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @name Improper validation of local user-provided size used for array construction - * @description Using unvalidated local input as the argument to - * a construction of an array can lead to index out of bound exceptions. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 8.8 - * @precision medium - * @id java/improper-validation-of-array-construction-local - * @tags security - * external/cwe/cwe-129 - */ - -import java -import semmle.code.java.security.internal.ArraySizing -import semmle.code.java.security.ImproperValidationOfArrayConstructionLocalQuery -import ImproperValidationOfArrayConstructionLocalFlow::PathGraph - -from - ImproperValidationOfArrayConstructionLocalFlow::PathNode source, - ImproperValidationOfArrayConstructionLocalFlow::PathNode sink, Expr sizeExpr, - ArrayCreationExpr arrayCreation, CheckableArrayAccess arrayAccess -where - arrayAccess.canThrowOutOfBoundsDueToEmptyArray(sizeExpr, arrayCreation) and - sizeExpr = sink.getNode().asExpr() and - ImproperValidationOfArrayConstructionLocalFlow::flowPath(source, sink) -select arrayAccess.getIndexExpr(), source, sink, - "This accesses the $@, but the array is initialized using a $@ which may be zero.", arrayCreation, - "array", source.getNode(), "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.qhelp b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.qhelp deleted file mode 100644 index 554a27b1fdc..00000000000 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql deleted file mode 100644 index 7302ea676d1..00000000000 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @name Improper validation of local user-provided array index - * @description Using local user input as an index to an array, without - * proper validation, can lead to index out of bound exceptions. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 8.8 - * @precision medium - * @id java/improper-validation-of-array-index-local - * @tags security - * external/cwe/cwe-129 - */ - -import java -import semmle.code.java.security.internal.ArraySizing -import semmle.code.java.security.ImproperValidationOfArrayIndexLocalQuery -import ImproperValidationOfArrayIndexLocalFlow::PathGraph - -from - ImproperValidationOfArrayIndexLocalFlow::PathNode source, - ImproperValidationOfArrayIndexLocalFlow::PathNode sink, CheckableArrayAccess arrayAccess -where - arrayAccess.canThrowOutOfBounds(sink.getNode().asExpr()) and - ImproperValidationOfArrayIndexLocalFlow::flowPath(source, sink) -select arrayAccess.getIndexExpr(), source, sink, - "This index depends on a $@ which can cause an ArrayIndexOutOfBoundsException.", source.getNode(), - "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.qhelp b/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.qhelp deleted file mode 100644 index cb33b0d27ba..00000000000 --- a/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.ql b/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.ql deleted file mode 100644 index ef37ebac1c9..00000000000 --- a/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.ql +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @name Use of externally-controlled format string from local source - * @description Using external input in format strings can lead to exceptions or information leaks. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 9.3 - * @precision medium - * @id java/tainted-format-string-local - * @tags security - * external/cwe/cwe-134 - */ - -import java -import semmle.code.java.StringFormat -import semmle.code.java.security.ExternallyControlledFormatStringLocalQuery -import ExternallyControlledFormatStringLocalFlow::PathGraph - -from - ExternallyControlledFormatStringLocalFlow::PathNode source, - ExternallyControlledFormatStringLocalFlow::PathNode sink, StringFormat formatCall -where - ExternallyControlledFormatStringLocalFlow::flowPath(source, sink) and - sink.getNode().asExpr() = formatCall.getFormatArgument() -select formatCall.getFormatArgument(), source, sink, "Format string depends on a $@.", - source.getNode(), "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql b/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql index c32b70e30ee..1de66916f41 100644 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql +++ b/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql @@ -18,18 +18,18 @@ import semmle.code.java.security.ArithmeticCommon import semmle.code.java.security.ArithmeticTaintedQuery module Flow = - DataFlow::MergePathGraph; + DataFlow::MergePathGraph; import Flow::PathGraph from Flow::PathNode source, Flow::PathNode sink, ArithExpr exp, string effect where - RemoteUserInputOverflow::flowPath(source.asPathNode1(), sink.asPathNode1()) and + ArithmeticOverflow::flowPath(source.asPathNode1(), sink.asPathNode1()) and overflowSink(exp, sink.getNode().asExpr()) and effect = "overflow" or - RemoteUserInputUnderflow::flowPath(source.asPathNode2(), sink.asPathNode2()) and + ArithmeticUnderflow::flowPath(source.asPathNode2(), sink.asPathNode2()) and underflowSink(exp, sink.getNode().asExpr()) and effect = "underflow" select exp, source, sink, diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.qhelp b/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.qhelp deleted file mode 100644 index 5a193f13666..00000000000 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.ql b/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.ql deleted file mode 100644 index be7092ee3e0..00000000000 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.ql +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @name Local-user-controlled data in arithmetic expression - * @description Arithmetic operations on user-controlled data that is not validated can cause - * overflows. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 8.6 - * @precision medium - * @id java/tainted-arithmetic-local - * @tags security - * external/cwe/cwe-190 - * external/cwe/cwe-191 - */ - -import java -import semmle.code.java.dataflow.DataFlow -import semmle.code.java.security.ArithmeticCommon -import semmle.code.java.security.ArithmeticTaintedLocalQuery - -module Flow = - DataFlow::MergePathGraph; - -import Flow::PathGraph - -from Flow::PathNode source, Flow::PathNode sink, ArithExpr exp, string effect -where - ArithmeticTaintedLocalOverflowFlow::flowPath(source.asPathNode1(), sink.asPathNode1()) and - overflowSink(exp, sink.getNode().asExpr()) and - effect = "overflow" - or - ArithmeticTaintedLocalUnderflowFlow::flowPath(source.asPathNode2(), sink.asPathNode2()) and - underflowSink(exp, sink.getNode().asExpr()) and - effect = "underflow" -select exp, source, sink, - "This arithmetic expression depends on a $@, potentially causing an " + effect + ".", - source.getNode(), "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql b/java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql index 7ca19969d88..c249f595f6e 100644 --- a/java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql +++ b/java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql @@ -16,43 +16,20 @@ import java import semmle.code.java.arithmetic.Overflow -int leftWidth(ComparisonExpr e) { result = e.getLeftOperand().getType().(NumType).getWidthRank() } +int widthRank(Expr e) { result = e.getType().(NumType).getWidthRank() } -int rightWidth(ComparisonExpr e) { result = e.getRightOperand().getType().(NumType).getWidthRank() } - -abstract class WideningComparison extends BinaryExpr instanceof ComparisonExpr { - abstract Expr getNarrower(); - - abstract Expr getWider(); +predicate wideningComparison(ComparisonExpr c, Expr lesserOperand, Expr greaterOperand) { + lesserOperand = c.getLesserOperand() and + greaterOperand = c.getGreaterOperand() and + widthRank(lesserOperand) < widthRank(greaterOperand) } -class LTWideningComparison extends WideningComparison { - LTWideningComparison() { - (this instanceof LEExpr or this instanceof LTExpr) and - leftWidth(this) < rightWidth(this) - } - - override Expr getNarrower() { result = this.getLeftOperand() } - - override Expr getWider() { result = this.getRightOperand() } -} - -class GTWideningComparison extends WideningComparison { - GTWideningComparison() { - (this instanceof GEExpr or this instanceof GTExpr) and - leftWidth(this) > rightWidth(this) - } - - override Expr getNarrower() { result = this.getRightOperand() } - - override Expr getWider() { result = this.getLeftOperand() } -} - -from WideningComparison c, LoopStmt l +from ComparisonExpr c, LoopStmt l, Expr lesserOperand, Expr greaterOperand where + wideningComparison(c, lesserOperand, greaterOperand) and not c.getAnOperand().isCompileTimeConstant() and l.getCondition().getAChildExpr*() = c select c, - "Comparison between $@ of type " + c.getNarrower().getType().getName() + " and $@ of wider type " + - c.getWider().getType().getName() + ".", c.getNarrower(), "expression", c.getWider(), + "Comparison between $@ of type " + lesserOperand.getType().getName() + " and $@ of wider type " + + greaterOperand.getType().getName() + ".", lesserOperand, "expression", greaterOperand, "expression" diff --git a/java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql b/java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql index 1ea08ca7319..13843884651 100644 --- a/java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql +++ b/java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql @@ -16,23 +16,24 @@ import semmle.code.java.security.Encryption class NetworkClass extends Class { NetworkClass() { - this.getAnAncestor().getQualifiedName().matches("java.rmi.%") or - this.getAnAncestor().getQualifiedName().matches("java.net.%") or - this.getAnAncestor().getQualifiedName().matches("javax.net.%") + this.getAnAncestor() + .getPackage() + .getName() + .regexpMatch("(java\\.net|java\\.rmi|javax\\.net)(\\..*)?") } } class SocketFactoryType extends RefType { SocketFactoryType() { - this.getQualifiedName() = "java.rmi.server.RMIServerSocketFactory" or - this.getQualifiedName() = "java.rmi.server.RMIClientSocketFactory" or - this.getQualifiedName() = "javax.net.SocketFactory" or - this.getQualifiedName() = "java.net.SocketImplFactory" + this.hasQualifiedName("java.rmi.server", "RMIServerSocketFactory") or + this.hasQualifiedName("java.rmi.server", "RMIClientSocketFactory") or + this.hasQualifiedName("javax.net", "SocketFactory") or + this.hasQualifiedName("java.net", "SocketImplFactory") } } /** Holds if the method `m` has a factory parameter at location `p`. */ -cached +pragma[nomagic] predicate usesFactory(Method m, int p) { m.getParameter(p).getType().(RefType).getAnAncestor() instanceof SocketFactoryType } diff --git a/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.qhelp b/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.qhelp deleted file mode 100644 index 05e5cf6fb49..00000000000 --- a/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.ql b/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.ql deleted file mode 100644 index 0ba8f5ec38c..00000000000 --- a/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.ql +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @name URL redirection from local source - * @description URL redirection based on unvalidated user-input - * may cause redirection to malicious web sites. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 6.1 - * @precision medium - * @id java/unvalidated-url-redirection-local - * @tags security - * external/cwe/cwe-601 - */ - -import java -import semmle.code.java.security.UrlRedirectLocalQuery -import UrlRedirectLocalFlow::PathGraph - -from UrlRedirectLocalFlow::PathNode source, UrlRedirectLocalFlow::PathNode sink -where UrlRedirectLocalFlow::flowPath(source, sink) -select sink.getNode(), source, sink, "Untrusted URL redirection depends on a $@.", source.getNode(), - "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-611/XXELocal.qhelp b/java/ql/src/Security/CWE/CWE-611/XXELocal.qhelp deleted file mode 100644 index 718e8437486..00000000000 --- a/java/ql/src/Security/CWE/CWE-611/XXELocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-611/XXELocal.ql b/java/ql/src/Security/CWE/CWE-611/XXELocal.ql deleted file mode 100644 index 5e306a65349..00000000000 --- a/java/ql/src/Security/CWE/CWE-611/XXELocal.ql +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @name Resolving XML external entity in user-controlled data from local source - * @description Parsing user-controlled XML documents and allowing expansion of external entity - * references may lead to disclosure of confidential data or denial of service. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 9.1 - * @precision medium - * @id java/xxe-local - * @tags security - * external/cwe/cwe-611 - * external/cwe/cwe-776 - * external/cwe/cwe-827 - */ - -import java -import semmle.code.java.dataflow.DataFlow -import semmle.code.java.security.XxeLocalQuery -import XxeLocalFlow::PathGraph - -from XxeLocalFlow::PathNode source, XxeLocalFlow::PathNode sink -where XxeLocalFlow::flowPath(source, sink) -select sink.getNode(), source, sink, - "XML parsing depends on a $@ without guarding against external entity expansion.", - source.getNode(), "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-676/PotentiallyDangerousFunction.ql b/java/ql/src/Security/CWE/CWE-676/PotentiallyDangerousFunction.ql index 0387a16eff6..c2405df11c9 100644 --- a/java/ql/src/Security/CWE/CWE-676/PotentiallyDangerousFunction.ql +++ b/java/ql/src/Security/CWE/CWE-676/PotentiallyDangerousFunction.ql @@ -13,11 +13,13 @@ import java -predicate dangerousMethod(string descriptor) { descriptor = "java.lang.Thread.stop" } +predicate dangerousMethod(string pack, string type, string name) { + pack = "java.lang" and type = "Thread" and name = "stop" +} -from MethodCall call, Method target, string descriptor +from MethodCall call, Method target, string pack, string type, string name where call.getCallee() = target and - descriptor = target.getDeclaringType().getQualifiedName() + "." + target.getName() and - dangerousMethod(descriptor) -select call, "Call to " + descriptor + " is potentially dangerous." + target.hasQualifiedName(pack, type, name) and + dangerousMethod(pack, type, name) +select call, "Call to " + pack + "." + type + "." + name + " is potentially dangerous." diff --git a/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.qhelp b/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.qhelp deleted file mode 100644 index d225599aca1..00000000000 --- a/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.qhelp +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql b/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql deleted file mode 100644 index 86bd1a5b048..00000000000 --- a/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @name Local-user-controlled data in numeric cast - * @description Casting user-controlled numeric data to a narrower type without validation - * can cause unexpected truncation. - * @kind path-problem - * @problem.severity recommendation - * @security-severity 9.0 - * @precision medium - * @id java/tainted-numeric-cast-local - * @tags security - * external/cwe/cwe-197 - * external/cwe/cwe-681 - */ - -import java -import semmle.code.java.security.NumericCastTaintedQuery -import NumericCastLocalFlow::PathGraph - -from - NumericCastLocalFlow::PathNode source, NumericCastLocalFlow::PathNode sink, - NumericNarrowingCastExpr exp, VarAccess tainted -where - exp.getExpr() = tainted and - sink.getNode().asExpr() = tainted and - NumericCastLocalFlow::flowPath(source, sink) and - not exists(RightShiftOp e | e.getShiftedVariable() = tainted.getVariable()) -select exp, source, sink, - "This cast to a narrower type depends on a $@, potentially causing truncation.", source.getNode(), - "user-provided value" diff --git a/java/ql/src/change-notes/2024-05-01-remove-local-query-variants.md b/java/ql/src/change-notes/2024-05-01-remove-local-query-variants.md new file mode 100644 index 00000000000..dbf638969ff --- /dev/null +++ b/java/ql/src/change-notes/2024-05-01-remove-local-query-variants.md @@ -0,0 +1,4 @@ +--- +category: breaking +--- +* Removed `local` query variants. The results pertaining to local sources can be found using the non-local counterpart query. As an example, the results previously found by `java/unvalidated-url-redirection-local` can be found by `java/unvalidated-url-redirection`, if the `local` threat model is enabled. The removed queries are `java/path-injection-local`, `java/command-line-injection-local`, `java/xss-local`, `java/sql-injection-local`, `java/http-response-splitting-local`, `java/improper-validation-of-array-construction-local`, `java/improper-validation-of-array-index-local`, `java/tainted-format-string-local`, `java/tainted-arithmetic-local`, `java/unvalidated-url-redirection-local`, `java/xxe-local` and `java/tainted-numeric-cast-local`. diff --git a/java/ql/src/change-notes/released/0.8.16.md b/java/ql/src/change-notes/released/0.8.16.md new file mode 100644 index 00000000000..f11c58a3b38 --- /dev/null +++ b/java/ql/src/change-notes/released/0.8.16.md @@ -0,0 +1,3 @@ +## 0.8.16 + +No user-facing changes. diff --git a/java/ql/src/codeql-pack.release.yml b/java/ql/src/codeql-pack.release.yml index 2e3c183bb7a..c735422e23a 100644 --- a/java/ql/src/codeql-pack.release.yml +++ b/java/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.8.15 +lastReleaseVersion: 0.8.16 diff --git a/java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.qll b/java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.qll index a9ea1049187..280d6608aad 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExec.qll @@ -72,7 +72,7 @@ class ArrayInitAtNonZeroIndex extends DataFlow::Node { class StreamConcatAtNonZeroIndex extends DataFlow::Node { StreamConcatAtNonZeroIndex() { exists(MethodCall call, int index | - call.getMethod().getQualifiedName() = "java.util.stream.Stream.concat" and + call.getMethod().hasQualifiedName("java.util.stream", "Stream", "concat") and call.getArgument(index) = this.asExpr() and index != 0 ) diff --git a/java/ql/src/experimental/Security/CWE/CWE-078/ExecTainted.ql b/java/ql/src/experimental/Security/CWE/CWE-078/ExecTainted.ql index 5d543d65011..8e3c34c0dc4 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-078/ExecTainted.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-078/ExecTainted.ql @@ -14,7 +14,7 @@ import java import semmle.code.java.security.CommandLineQuery -import RemoteUserInputToArgumentToExecFlow::PathGraph +import InputToArgumentToExecFlow::PathGraph private import semmle.code.java.dataflow.ExternalFlow private class ActivateModels extends ActiveExperimentalModels { @@ -23,8 +23,7 @@ private class ActivateModels extends ActiveExperimentalModels { // This is a clone of query `java/command-line-injection` that also includes experimental sinks. from - RemoteUserInputToArgumentToExecFlow::PathNode source, - RemoteUserInputToArgumentToExecFlow::PathNode sink, Expr execArg + InputToArgumentToExecFlow::PathNode source, InputToArgumentToExecFlow::PathNode sink, Expr execArg where execIsTainted(source, sink, execArg) select execArg, source, sink, "This command line depends on a $@.", source.getNode(), "user-provided value" diff --git a/java/ql/src/experimental/Security/CWE/CWE-939/IncorrectURLVerification.ql b/java/ql/src/experimental/Security/CWE/CWE-939/IncorrectURLVerification.ql index d12ea262aed..844e6760101 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-939/IncorrectURLVerification.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-939/IncorrectURLVerification.ql @@ -72,8 +72,7 @@ class HostVerificationMethodCall extends MethodCall { exists(MethodCall ma, Method m, Field f | this.getArgument(0) = ma and ma.getMethod() = m and - m.hasName("getString") and - m.getDeclaringType().getQualifiedName() = "android.content.res.Resources" and + m.hasQualifiedName("android.content.res", "Resources", "getString") and ma.getArgument(0).(FieldRead).getField() = f and f.getDeclaringType() instanceof AndroidRString ) //Check resource properties in /res/values/strings.xml in Android mobile applications using res.getString(R.string.key) diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml index 1279345f196..d031ea871f2 100644 --- a/java/ql/src/qlpack.yml +++ b/java/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-queries -version: 0.8.16-dev +version: 0.8.17-dev groups: - java - queries diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll index 0a22178d108..295d022889f 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -7,7 +7,7 @@ private import CaptureModelsSpecific private import CaptureModelsPrinting class DataFlowTargetApi extends TargetApiSpecific { - DataFlowTargetApi() { isRelevantForDataFlowModels(this) } + DataFlowTargetApi() { not isUninterestingForDataFlowModels(this) } } private module Printing implements PrintingSig { diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll b/java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll index 2b69c7d0aff..e9802d14fd4 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll @@ -24,38 +24,59 @@ class Unit = J::Unit; class Callable = J::Callable; -private J::Method superImpl(J::Method m) { - result = m.getAnOverride() and - not exists(result.getAnOverride()) and - not m instanceof J::ToStringMethod -} - private predicate isInfrequentlyUsed(J::CompilationUnit cu) { cu.getPackage().getName().matches("javax.swing%") or cu.getPackage().getName().matches("java.awt%") } -/** - * Holds if it is relevant to generate models for `api`. - */ -private predicate isRelevantForModels(Callable api) { +private predicate relevant(Callable api) { + api.isPublic() and + api.getDeclaringType().isPublic() and + api.fromSource() and not isUninterestingForModels(api) and - not isInfrequentlyUsed(api.getCompilationUnit()) and - // Disregard all APIs that have a manual model. - not api = any(FlowSummaryImpl::Public::SummarizedCallable sc | sc.applyManualModel()).asCallable() and - not api = - any(FlowSummaryImpl::Public::NeutralSummaryCallable sc | sc.hasManualModel()).asCallable() + not isInfrequentlyUsed(api.getCompilationUnit()) +} + +private J::Method getARelevantOverride(J::Method m) { + result = m.getAnOverride() and + relevant(result) and + // Other exclusions for overrides. + not m instanceof J::ToStringMethod } /** - * Holds if it is relevant to generate models for `api` based on data flow analysis. + * Gets the super implementation of `m` if it is relevant. + * If such a super implementations does not exist, returns `m` if it is relevant. */ -predicate isRelevantForDataFlowModels(Callable api) { - isRelevantForModels(api) and - (not api.getDeclaringType() instanceof J::Interface or exists(api.getBody())) +private J::Callable liftedImpl(J::Callable m) { + ( + result = getARelevantOverride(m) + or + result = m and relevant(m) + ) and + not exists(getARelevantOverride(result)) } -predicate isRelevantForTypeBasedFlowModels = isRelevantForModels/1; +private predicate hasManualModel(Callable api) { + api = any(FlowSummaryImpl::Public::SummarizedCallable sc | sc.applyManualModel()).asCallable() or + api = any(FlowSummaryImpl::Public::NeutralSummaryCallable sc | sc.hasManualModel()).asCallable() +} + +/** + * Holds if it is irrelevant to generate models for `api` based on data flow analysis. + * + * This serves as an extra filter for the `relevant` predicate. + */ +predicate isUninterestingForDataFlowModels(Callable api) { + api.getDeclaringType() instanceof J::Interface and not exists(api.getBody()) +} + +/** + * Holds if it is irrelevant to generate models for `api` based on type-based analysis. + * + * This serves as an extra filter for the `relevant` predicate. + */ +predicate isUninterestingForTypeBasedFlowModels(Callable api) { none() } /** * A class of Callables that are relevant for generating summary, source and sinks models for. @@ -64,63 +85,54 @@ predicate isRelevantForTypeBasedFlowModels = isRelevantForModels/1; * from outside the library itself. */ class TargetApiSpecific extends Callable { + private Callable lift; + TargetApiSpecific() { - this.isPublic() and - this.fromSource() and - ( - this.getDeclaringType().isPublic() or - superImpl(this).getDeclaringType().isPublic() - ) and - isRelevantForModels(this) + lift = liftedImpl(this) and + not hasManualModel(lift) } /** - * Gets the callable that a model will be lifted to, if any. + * Gets the callable that a model will be lifted to. */ - Callable lift() { - exists(Method m | m = superImpl(this) and m.fromSource() | result = m) - or - not exists(superImpl(this)) and result = this - } + Callable lift() { result = lift } } -private string isExtensible(J::RefType ref) { - if ref.isFinal() then result = "false" else result = "true" -} - -private string typeAsModel(J::RefType type) { - result = - type.getCompilationUnit().getPackage().getName() + ";" + - type.getErasure().(J::RefType).nestedName() -} - -private J::RefType bestTypeForModel(TargetApiSpecific api) { - result = api.lift().getDeclaringType() +private string isExtensible(Callable c) { + if c.getDeclaringType().isFinal() then result = "false" else result = "true" } /** - * Returns the appropriate type name for the model. Either the type - * declaring the method or the supertype introducing the method. + * Returns the appropriate type name for the model. */ -private string typeAsSummaryModel(TargetApiSpecific api) { - result = typeAsModel(bestTypeForModel(api)) +private string typeAsModel(Callable c) { + exists(RefType type | type = c.getDeclaringType() | + result = + type.getCompilationUnit().getPackage().getName() + ";" + + type.getErasure().(J::RefType).nestedName() + ) } -private predicate partialModel(TargetApiSpecific api, string type, string name, string parameters) { - type = typeAsSummaryModel(api) and - name = api.getName() and - parameters = ExternalFlow::paramsString(api) +private predicate partialLiftedModel( + TargetApiSpecific api, string type, string extensible, string name, string parameters +) { + exists(Callable c | c = api.lift() | + type = typeAsModel(c) and + extensible = isExtensible(c) and + name = c.getName() and + parameters = ExternalFlow::paramsString(c) + ) } /** * Computes the first 6 columns for MaD rows. */ string asPartialModel(TargetApiSpecific api) { - exists(string type, string name, string parameters | - partialModel(api, type, name, parameters) and + exists(string type, string extensible, string name, string parameters | + partialLiftedModel(api, type, extensible, name, parameters) and result = type + ";" // - + isExtensible(bestTypeForModel(api)) + ";" // + + extensible + ";" // + name + ";" // + parameters + ";" // + /* ext + */ ";" // @@ -132,7 +144,7 @@ string asPartialModel(TargetApiSpecific api) { */ string asPartialNeutralModel(TargetApiSpecific api) { exists(string type, string name, string parameters | - partialModel(api, type, name, parameters) and + partialLiftedModel(api, type, _, name, parameters) and result = type + ";" // + name + ";" // @@ -228,6 +240,15 @@ predicate sinkModelSanitizer(DataFlow::Node node) { ) } +private class ManualNeutralSinkCallable extends Callable { + ManualNeutralSinkCallable() { + this = + any(FlowSummaryImpl::Public::NeutralCallable nc | + nc.hasManualModel() and nc.getKind() = "sink" + ).asCallable() + } +} + /** * Holds if `source` is an api entrypoint relevant for creating sink models. */ @@ -236,14 +257,15 @@ predicate apiSource(DataFlow::Node source) { source.asExpr().(J::FieldAccess).isOwnFieldAccess() or source instanceof DataFlow::ParameterNode ) and - source.getEnclosingCallable().isPublic() and - exists(J::RefType t | - t = source.getEnclosingCallable().getDeclaringType().getAnAncestor() and - not t instanceof J::TypeObject and - t.isPublic() - ) and - isRelevantForModels(source.getEnclosingCallable()) and - exists(asPartialModel(source.getEnclosingCallable())) + exists(Callable enclosing | enclosing = source.getEnclosingCallable() | + exists(liftedImpl(enclosing)) and + not enclosing instanceof ManualNeutralSinkCallable and + exists(J::RefType t | + t = enclosing.getDeclaringType().getAnAncestor() and + not t instanceof J::TypeObject and + t.isPublic() + ) + ) } /** diff --git a/java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll b/java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll index 90833748715..fb2b8141c2e 100644 --- a/java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll +++ b/java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll @@ -296,7 +296,7 @@ private module ModelPrinting = PrintingImpl; * on the Theorems for Free approach. */ class TypeBasedFlowTargetApi extends Specific::TargetApiSpecific { - TypeBasedFlowTargetApi() { Specific::isRelevantForTypeBasedFlowModels(this) } + TypeBasedFlowTargetApi() { not Specific::isUninterestingForTypeBasedFlowModels(this) } /** * Gets the string representation of all type based summaries for `this` diff --git a/java/ql/test/TestUtilities/InlineMadTest.qll b/java/ql/test/TestUtilities/InlineMadTest.qll new file mode 100644 index 00000000000..a336fa6b3a9 --- /dev/null +++ b/java/ql/test/TestUtilities/InlineMadTest.qll @@ -0,0 +1,65 @@ +import java as J + +private signature module InlineMadTestLangSig { + /** + * A base class of callables for modeling. + */ + class Callable; + + /** + * Gets a relevant code comment for `c`, if any. + */ + string getComment(Callable c); +} + +private module InlineMadTestImpl { + private class Callable = Lang::Callable; + + signature module InlineMadTestConfigSig { + /** + * Gets the kind of a captured model. + */ + string getKind(); + + /** + * Gets a captured model for `c`, if any. + */ + string getCapturedModel(Callable c); + } + + module InlineMadTest { + private string expects(Callable c) { + Lang::getComment(c).regexpCapture(" *(SPURIOUS-)?" + Input::getKind() + "=(.*)", 2) = result + } + + query predicate unexpectedModel(string msg) { + exists(Callable c, string flow | + flow = Input::getCapturedModel(c) and + not flow = expects(c) and + msg = "Unexpected " + Input::getKind() + " found: " + flow + ) + } + + query predicate expectedModel(string msg) { + exists(Callable c, string e | + e = expects(c) and + not e = Input::getCapturedModel(c) and + msg = "Expected " + Input::getKind() + " missing: " + e + ) + } + } +} + +private module InlineMadTestLang implements InlineMadTestLangSig { + class Callable = J::Callable; + + string getComment(Callable c) { + exists(J::Javadoc doc | + hasJavadoc(c, doc) and + isNormalComment(doc) and + result = doc.getChild(0).toString() + ) + } +} + +import InlineMadTestImpl diff --git a/java/ql/test/query-tests/security/CWE-078/ExecTaintedLocal.expected b/java/ql/test/query-tests/security/CWE-078/ExecTainted.expected similarity index 100% rename from java/ql/test/query-tests/security/CWE-078/ExecTaintedLocal.expected rename to java/ql/test/query-tests/security/CWE-078/ExecTainted.expected diff --git a/java/ql/test/query-tests/security/CWE-078/ExecTainted.ext.yml b/java/ql/test/query-tests/security/CWE-078/ExecTainted.ext.yml new file mode 100644 index 00000000000..63507f47738 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-078/ExecTainted.ext.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/java/ql/test/query-tests/security/CWE-078/ExecTainted.qlref b/java/ql/test/query-tests/security/CWE-078/ExecTainted.qlref new file mode 100644 index 00000000000..1de765a2fdf --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-078/ExecTainted.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-078/ExecTainted.ql diff --git a/java/ql/test/query-tests/security/CWE-078/ExecTaintedLocal.qlref b/java/ql/test/query-tests/security/CWE-078/ExecTaintedLocal.qlref deleted file mode 100644 index 18f968747e9..00000000000 --- a/java/ql/test/query-tests/security/CWE-078/ExecTaintedLocal.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-078/ExecTaintedLocal.ql diff --git a/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTaintedLocal.expected b/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.expected similarity index 100% rename from java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTaintedLocal.expected rename to java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.expected diff --git a/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.ext.yml b/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.ext.yml new file mode 100644 index 00000000000..63507f47738 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.ext.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.qlref b/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.qlref new file mode 100644 index 00000000000..21a12e5eadd --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-089/SqlTainted.ql diff --git a/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTaintedLocal.qlref b/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTaintedLocal.qlref deleted file mode 100644 index ac5a020be5a..00000000000 --- a/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTaintedLocal.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-089/SqlTaintedLocal.ql diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionLocal.expected b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.expected similarity index 100% rename from java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionLocal.expected rename to java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.expected diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.ext.yml b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.ext.yml new file mode 100644 index 00000000000..63507f47738 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.ext.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.qlref b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.qlref new file mode 100644 index 00000000000..02a179783ca --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionLocal.qlref b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionLocal.qlref deleted file mode 100644 index eee8ded0f3c..00000000000 --- a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionLocal.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexLocal.expected b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.expected similarity index 100% rename from java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexLocal.expected rename to java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.expected diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.ext.yml b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.ext.yml new file mode 100644 index 00000000000..63507f47738 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.ext.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.qlref b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.qlref new file mode 100644 index 00000000000..cb216ecd6a5 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-129/ImproperValidationOfArrayIndex.ql diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexLocal.qlref b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexLocal.qlref deleted file mode 100644 index 12530489744..00000000000 --- a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexLocal.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql diff --git a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.expected b/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.expected index 8fe019c2b2f..32cc3c6925e 100644 --- a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.expected +++ b/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.expected @@ -1,12 +1,28 @@ edges +| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:19:19:19:30 | userProperty | provenance | Src:MaD:43040 | +| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:21:23:21:34 | userProperty | provenance | Src:MaD:43040 Sink:MaD:42905 | +| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:23:23:23:34 | userProperty | provenance | Src:MaD:43040 Sink:MaD:42908 | +| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:25:28:25:39 | userProperty | provenance | Src:MaD:43040 | +| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:27:44:27:55 | userProperty | provenance | Src:MaD:43040 | | Test.java:33:30:33:74 | getParameter(...) : String | Test.java:34:20:34:32 | userParameter : String | provenance | Src:MaD:44662 | | Test.java:34:20:34:32 | userParameter : String | Test.java:37:31:37:43 | format : String | provenance | | | Test.java:37:31:37:43 | format : String | Test.java:39:25:39:30 | format | provenance | Sink:MaD:42905 | nodes +| Test.java:17:27:17:60 | getProperty(...) : String | semmle.label | getProperty(...) : String | +| Test.java:19:19:19:30 | userProperty | semmle.label | userProperty | +| Test.java:21:23:21:34 | userProperty | semmle.label | userProperty | +| Test.java:23:23:23:34 | userProperty | semmle.label | userProperty | +| Test.java:25:28:25:39 | userProperty | semmle.label | userProperty | +| Test.java:27:44:27:55 | userProperty | semmle.label | userProperty | | Test.java:33:30:33:74 | getParameter(...) : String | semmle.label | getParameter(...) : String | | Test.java:34:20:34:32 | userParameter : String | semmle.label | userParameter : String | | Test.java:37:31:37:43 | format : String | semmle.label | format : String | | Test.java:39:25:39:30 | format | semmle.label | format | subpaths #select +| Test.java:19:19:19:30 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:19:19:19:30 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | +| Test.java:21:23:21:34 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:21:23:21:34 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | +| Test.java:23:23:23:34 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:23:23:23:34 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | +| Test.java:25:28:25:39 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:25:28:25:39 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | +| Test.java:27:44:27:55 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:27:44:27:55 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | | Test.java:39:25:39:30 | format | Test.java:33:30:33:74 | getParameter(...) : String | Test.java:39:25:39:30 | format | Format string depends on a $@. | Test.java:33:30:33:74 | getParameter(...) | user-provided value | diff --git a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.ext.yml b/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.ext.yml new file mode 100644 index 00000000000..63507f47738 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.ext.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatStringLocal.expected b/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatStringLocal.expected deleted file mode 100644 index 69a8314c94e..00000000000 --- a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatStringLocal.expected +++ /dev/null @@ -1,20 +0,0 @@ -edges -| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:19:19:19:30 | userProperty | provenance | Src:MaD:43040 | -| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:21:23:21:34 | userProperty | provenance | Src:MaD:43040 Sink:MaD:42905 | -| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:23:23:23:34 | userProperty | provenance | Src:MaD:43040 Sink:MaD:42908 | -| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:25:28:25:39 | userProperty | provenance | Src:MaD:43040 | -| Test.java:17:27:17:60 | getProperty(...) : String | Test.java:27:44:27:55 | userProperty | provenance | Src:MaD:43040 | -nodes -| Test.java:17:27:17:60 | getProperty(...) : String | semmle.label | getProperty(...) : String | -| Test.java:19:19:19:30 | userProperty | semmle.label | userProperty | -| Test.java:21:23:21:34 | userProperty | semmle.label | userProperty | -| Test.java:23:23:23:34 | userProperty | semmle.label | userProperty | -| Test.java:25:28:25:39 | userProperty | semmle.label | userProperty | -| Test.java:27:44:27:55 | userProperty | semmle.label | userProperty | -subpaths -#select -| Test.java:19:19:19:30 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:19:19:19:30 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | -| Test.java:21:23:21:34 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:21:23:21:34 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | -| Test.java:23:23:23:34 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:23:23:23:34 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | -| Test.java:25:28:25:39 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:25:28:25:39 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | -| Test.java:27:44:27:55 | userProperty | Test.java:17:27:17:60 | getProperty(...) : String | Test.java:27:44:27:55 | userProperty | Format string depends on a $@. | Test.java:17:27:17:60 | getProperty(...) | user-provided value | diff --git a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatStringLocal.qlref b/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatStringLocal.qlref deleted file mode 100644 index d8502c264e4..00000000000 --- a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatStringLocal.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.ql diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTaintedLocal.expected b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.expected similarity index 100% rename from java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTaintedLocal.expected rename to java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.expected diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.ext.yml b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.ext.yml new file mode 100644 index 00000000000..63507f47738 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.ext.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.qlref b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.qlref new file mode 100644 index 00000000000..3939653db1c --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-190/ArithmeticTainted.ql diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTaintedLocal.qlref b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTaintedLocal.qlref deleted file mode 100644 index 70ad2522b60..00000000000 --- a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTaintedLocal.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-190/ArithmeticTaintedLocal.ql \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.expected b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.expected new file mode 100644 index 00000000000..5e92fffb0ef --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.expected @@ -0,0 +1,2 @@ +| ComparisonWithWiderType.java:4:25:4:29 | ... < ... | Comparison between $@ of type int and $@ of wider type long. | ComparisonWithWiderType.java:4:25:4:25 | i | expression | ComparisonWithWiderType.java:4:29:4:29 | l | expression | +| ComparisonWithWiderType.java:16:26:16:30 | ... > ... | Comparison between $@ of type byte and $@ of wider type short. | ComparisonWithWiderType.java:16:30:16:30 | b | expression | ComparisonWithWiderType.java:16:26:16:26 | c | expression | diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.java b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.java new file mode 100644 index 00000000000..88c520307a4 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.java @@ -0,0 +1,27 @@ +public class ComparisonWithWiderType { + public void testLt(long l) { + // BAD: loop variable is an int, but the upper bound is a long + for (int i = 0; i < l; i++) { + System.out.println(i); + } + + // GOOD: loop variable is a long + for (long i = 0; i < l; i++) { + System.out.println(i); + } + } + + public void testGt(short c) { + // BAD: loop variable is a byte, but the upper bound is a short + for (byte b = 0; c > b; b++) { + System.out.println(b); + } + } + + public void testLe(int i) { + // GOOD: loop variable is a long, and the upper bound is an int + for (long l = 0; l <= i; l++) { + System.out.println(l); + } + } +} \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.qlref b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.qlref new file mode 100644 index 00000000000..4605189317f --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ComparisonWithWiderType.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-190/ComparisonWithWiderType.ql \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTaintedLocal.expected b/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.expected similarity index 100% rename from java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTaintedLocal.expected rename to java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.expected diff --git a/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.ext.yml b/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.ext.yml new file mode 100644 index 00000000000..63507f47738 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.ext.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.qlref b/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.qlref new file mode 100644 index 00000000000..4f32338184f --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-681/NumericCastTainted.ql diff --git a/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTaintedLocal.qlref b/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTaintedLocal.qlref deleted file mode 100644 index 708b9f635ee..00000000000 --- a/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTaintedLocal.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-681/NumericCastTaintedLocal.ql diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.expected b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.expected index df6a7bfc854..cb6fc390349 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.expected +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.expected @@ -1,25 +1,2 @@ -| p;Factory;getIntValue;();summary;df-generated | -| p;FinalClass;returnsConstant;();summary;df-generated | -| p;FluentAPI$Inner;notThis;(String);summary;df-generated | -| p;ImmutablePojo;getX;();summary;df-generated | -| p;Joiner;length;();summary;df-generated | -| p;ParamFlow;ignorePrimitiveReturnValue;(String);summary;df-generated | -| p;ParamFlow;mapType;(Class);summary;df-generated | -| p;Pojo;doNotSetValue;(String);summary;df-generated | -| p;Pojo;getBigDecimal;();summary;df-generated | -| p;Pojo;getBigInt;();summary;df-generated | -| p;Pojo;getBoxedArray;();summary;df-generated | -| p;Pojo;getBoxedCollection;();summary;df-generated | -| p;Pojo;getBoxedValue;();summary;df-generated | -| p;Pojo;getFloatArray;();summary;df-generated | -| p;Pojo;getIntValue;();summary;df-generated | -| p;Pojo;getPrimitiveArray;();summary;df-generated | -| p;PrivateFlowViaPublicInterface$SPI;openStreamNone;();summary;df-generated | -| p;PrivateFlowViaPublicInterface;createAnSPIWithoutTrackingFile;(File);summary;df-generated | -| p;Sinks;copyFileToDirectory;(Path,Path,CopyOption[]);summary;df-generated | -| p;Sinks;propagate;(String);summary;df-generated | -| p;Sinks;readUrl;(URL,Charset);summary;df-generated | -| p;Sources;readUrl;(URL);summary;df-generated | -| p;Sources;socketStream;();summary;df-generated | -| p;Sources;sourceToParameter;(InputStream[],List);summary;df-generated | -| p;Sources;wrappedSocketStream;();summary;df-generated | +unexpectedModel +expectedModel diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql new file mode 100644 index 00000000000..e68730cc0ed --- /dev/null +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql @@ -0,0 +1,11 @@ +import java +import utils.modelgenerator.internal.CaptureSummaryFlowQuery +import TestUtilities.InlineMadTest + +module InlineMadTestConfig implements InlineMadTestConfigSig { + string getCapturedModel(Callable c) { result = captureNoFlow(c) } + + string getKind() { result = "neutral" } +} + +import InlineMadTest diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.qlref b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.qlref deleted file mode 100644 index 851ddc0d294..00000000000 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.qlref +++ /dev/null @@ -1 +0,0 @@ -utils/modelgenerator/CaptureNeutralModels.ql \ No newline at end of file diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.expected b/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.expected index 799a1a37dd4..cb6fc390349 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.expected +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.expected @@ -1,5 +1,2 @@ -| p;PrivateFlowViaPublicInterface$SPI;true;openStream;();;Argument[this];path-injection;df-generated | -| p;Sinks;true;copyFileToDirectory;(Path,Path,CopyOption[]);;Argument[0];path-injection;df-generated | -| p;Sinks;true;copyFileToDirectory;(Path,Path,CopyOption[]);;Argument[1];path-injection;df-generated | -| p;Sinks;true;readUrl;(URL,Charset);;Argument[0];request-forgery;df-generated | -| p;Sources;true;readUrl;(URL);;Argument[0];request-forgery;df-generated | +unexpectedModel +expectedModel diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql new file mode 100644 index 00000000000..1acde2ade49 --- /dev/null +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql @@ -0,0 +1,11 @@ +import java +import utils.modelgenerator.internal.CaptureModels +import TestUtilities.InlineMadTest + +module InlineMadTestConfig implements InlineMadTestConfigSig { + string getCapturedModel(Callable c) { result = captureSink(c) } + + string getKind() { result = "sink" } +} + +import InlineMadTest diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.qlref b/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.qlref deleted file mode 100644 index 36d2f144247..00000000000 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.qlref +++ /dev/null @@ -1 +0,0 @@ -utils/modelgenerator/CaptureSinkModels.ql \ No newline at end of file diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.expected b/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.expected index 0f8d0ff1f32..cb6fc390349 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.expected +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.expected @@ -1,5 +1,2 @@ -| p;Sources;true;readUrl;(URL);;ReturnValue;remote;df-generated | -| p;Sources;true;socketStream;();;ReturnValue;remote;df-generated | -| p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[0].ArrayElement;remote;df-generated | -| p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[1].Element;remote;df-generated | -| p;Sources;true;wrappedSocketStream;();;ReturnValue;remote;df-generated | +unexpectedModel +expectedModel diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql new file mode 100644 index 00000000000..7596f4f8cc1 --- /dev/null +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql @@ -0,0 +1,11 @@ +import java +import utils.modelgenerator.internal.CaptureModels +import TestUtilities.InlineMadTest + +module InlineMadTestConfig implements InlineMadTestConfigSig { + string getCapturedModel(Callable c) { result = captureSource(c) } + + string getKind() { result = "source" } +} + +import InlineMadTest diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.qlref b/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.qlref deleted file mode 100644 index 6bbb499fc27..00000000000 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.qlref +++ /dev/null @@ -1 +0,0 @@ -utils/modelgenerator/CaptureSourceModels.ql \ No newline at end of file diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.expected b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.expected index 50536e850d9..cb6fc390349 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.expected +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.expected @@ -1,47 +1,2 @@ -| p;Factory;false;create;(String);;Argument[0];ReturnValue;taint;df-generated | -| p;Factory;false;create;(String,int);;Argument[0];ReturnValue;taint;df-generated | -| p;Factory;false;getValue;();;Argument[this];ReturnValue;taint;df-generated | -| p;FinalClass;false;returnsInput;(String);;Argument[0];ReturnValue;taint;df-generated | -| p;FluentAPI;false;returnsThis;(String);;Argument[this];ReturnValue;value;df-generated | -| p;ImmutablePojo;false;ImmutablePojo;(String,int);;Argument[0];Argument[this];taint;df-generated | -| p;ImmutablePojo;false;getValue;();;Argument[this];ReturnValue;taint;df-generated | -| p;ImmutablePojo;false;or;(String);;Argument[0];ReturnValue;taint;df-generated | -| p;ImmutablePojo;false;or;(String);;Argument[this];ReturnValue;taint;df-generated | -| p;InnerClasses$CaptureMe;true;yesCm;(String);;Argument[0];ReturnValue;taint;df-generated | -| p;InnerClasses;true;yes;(String);;Argument[0];ReturnValue;taint;df-generated | -| p;InnerHolder;false;append;(String);;Argument[0];Argument[this];taint;df-generated | -| p;InnerHolder;false;explicitSetContext;(String);;Argument[0];Argument[this];taint;df-generated | -| p;InnerHolder;false;getValue;();;Argument[this];ReturnValue;taint;df-generated | -| p;InnerHolder;false;setContext;(String);;Argument[0];Argument[this];taint;df-generated | -| p;Joiner;false;Joiner;(CharSequence);;Argument[0];Argument[this];taint;df-generated | -| p;Joiner;false;Joiner;(CharSequence,CharSequence,CharSequence);;Argument[0];Argument[this];taint;df-generated | -| p;Joiner;false;Joiner;(CharSequence,CharSequence,CharSequence);;Argument[1];Argument[this];taint;df-generated | -| p;Joiner;false;Joiner;(CharSequence,CharSequence,CharSequence);;Argument[2];Argument[this];taint;df-generated | -| p;Joiner;false;add;(CharSequence);;Argument[this];ReturnValue;value;df-generated | -| p;Joiner;false;merge;(Joiner);;Argument[this];ReturnValue;value;df-generated | -| p;Joiner;false;setEmptyValue;(CharSequence);;Argument[0];Argument[this];taint;df-generated | -| p;Joiner;false;setEmptyValue;(CharSequence);;Argument[this];ReturnValue;value;df-generated | -| p;MultipleImpl2$IInterface;true;m;(Object);;Argument[0];ReturnValue;taint;df-generated | -| p;MultipleImpls$Strat2;true;getValue;();;Argument[this];ReturnValue;taint;df-generated | -| p;MultipleImpls$Strategy;true;doSomething;(String);;Argument[0];Argument[this];taint;df-generated | -| p;MultipleImpls$Strategy;true;doSomething;(String);;Argument[0];ReturnValue;taint;df-generated | -| p;ParamFlow;true;addTo;(String,List);;Argument[0];Argument[1].Element;taint;df-generated | -| p;ParamFlow;true;returnArrayElement;(String[]);;Argument[0].ArrayElement;ReturnValue;taint;df-generated | -| p;ParamFlow;true;returnCollectionElement;(List);;Argument[0].Element;ReturnValue;taint;df-generated | -| p;ParamFlow;true;returnIterableElement;(Iterable);;Argument[0].Element;ReturnValue;taint;df-generated | -| p;ParamFlow;true;returnIteratorElement;(Iterator);;Argument[0].Element;ReturnValue;taint;df-generated | -| p;ParamFlow;true;returnMultipleParameters;(String,String);;Argument[0];ReturnValue;taint;df-generated | -| p;ParamFlow;true;returnMultipleParameters;(String,String);;Argument[1];ReturnValue;taint;df-generated | -| p;ParamFlow;true;returnVarArgElement;(String[]);;Argument[0].ArrayElement;ReturnValue;taint;df-generated | -| p;ParamFlow;true;returnsInput;(String);;Argument[0];ReturnValue;taint;df-generated | -| p;ParamFlow;true;writeChunked;(byte[],OutputStream);;Argument[0];Argument[1];taint;df-generated | -| p;ParamFlow;true;writeChunked;(char[],OutputStream);;Argument[0];Argument[1];taint;df-generated | -| p;Pojo;false;fillIn;(List);;Argument[this];Argument[0].Element;taint;df-generated | -| p;Pojo;false;getBoxedBytes;();;Argument[this];ReturnValue;taint;df-generated | -| p;Pojo;false;getBoxedChars;();;Argument[this];ReturnValue;taint;df-generated | -| p;Pojo;false;getByteArray;();;Argument[this];ReturnValue;taint;df-generated | -| p;Pojo;false;getCharArray;();;Argument[this];ReturnValue;taint;df-generated | -| p;Pojo;false;getValue;();;Argument[this];ReturnValue;taint;df-generated | -| p;Pojo;false;setValue;(String);;Argument[0];Argument[this];taint;df-generated | -| p;PrivateFlowViaPublicInterface$SPI;true;openStream;();;Argument[this];ReturnValue;taint;df-generated | -| p;PrivateFlowViaPublicInterface;true;createAnSPI;(File);;Argument[0];ReturnValue;taint;df-generated | +unexpectedModel +expectedModel diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql new file mode 100644 index 00000000000..415ebab1343 --- /dev/null +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql @@ -0,0 +1,11 @@ +import java +import utils.modelgenerator.internal.CaptureSummaryFlowQuery +import TestUtilities.InlineMadTest + +module InlineMadTestConfig implements InlineMadTestConfigSig { + string getCapturedModel(Callable c) { result = captureFlow(c) } + + string getKind() { result = "summary" } +} + +import InlineMadTest diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.qlref b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.qlref deleted file mode 100644 index d751f3823f3..00000000000 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.qlref +++ /dev/null @@ -1 +0,0 @@ -utils/modelgenerator/CaptureSummaryModels.ql \ No newline at end of file diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/AbstractImplOfExternalSPI.java b/java/ql/test/utils/modelgenerator/dataflow/p/AbstractImplOfExternalSPI.java index 05d2d2037fc..41212d4e542 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/AbstractImplOfExternalSPI.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/AbstractImplOfExternalSPI.java @@ -5,9 +5,9 @@ import java.io.FileFilter; public abstract class AbstractImplOfExternalSPI implements FileFilter { - @Override - public boolean accept(File pathname) { - return false; - } - -} \ No newline at end of file + // neutral=p;AbstractImplOfExternalSPI;accept;(File);summary;df-generated + @Override + public boolean accept(File pathname) { + return false; + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/Factory.java b/java/ql/test/utils/modelgenerator/dataflow/p/Factory.java index a6e7ce5fff6..1887e0ca73e 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/Factory.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/Factory.java @@ -2,29 +2,32 @@ package p; public final class Factory { - private String value; + private String value; - private int intValue; + private int intValue; - public static Factory create(String value, int foo) { - return new Factory(value, foo); - } + // summary=p;Factory;false;create;(String,int);;Argument[0];ReturnValue;taint;df-generated + public static Factory create(String value, int foo) { + return new Factory(value, foo); + } - public static Factory create(String value) { - return new Factory(value, 0); - } + // summary=p;Factory;false;create;(String);;Argument[0];ReturnValue;taint;df-generated + public static Factory create(String value) { + return new Factory(value, 0); + } - private Factory(String value, int intValue) { - this.value = value; - this.intValue = intValue; - } + private Factory(String value, int intValue) { + this.value = value; + this.intValue = intValue; + } - public String getValue() { - return value; - } + // summary=p;Factory;false;getValue;();;Argument[this];ReturnValue;taint;df-generated + public String getValue() { + return value; + } - public int getIntValue() { - return intValue; - } - -} \ No newline at end of file + // neutral=p;Factory;getIntValue;();summary;df-generated + public int getIntValue() { + return intValue; + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/FinalClass.java b/java/ql/test/utils/modelgenerator/dataflow/p/FinalClass.java index 224fc44a0bc..2638f818854 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/FinalClass.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/FinalClass.java @@ -2,14 +2,15 @@ package p; public final class FinalClass { - private static final String C = "constant"; + private static final String C = "constant"; - public String returnsInput(String input) { - return input; - } + // summary=p;FinalClass;false;returnsInput;(String);;Argument[0];ReturnValue;taint;df-generated + public String returnsInput(String input) { + return input; + } - public String returnsConstant() { - return C; - } - -} \ No newline at end of file + // neutral=p;FinalClass;returnsConstant;();summary;df-generated + public String returnsConstant() { + return C; + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/FluentAPI.java b/java/ql/test/utils/modelgenerator/dataflow/p/FluentAPI.java index 65887625d27..b7793e30666 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/FluentAPI.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/FluentAPI.java @@ -2,14 +2,15 @@ package p; public final class FluentAPI { - public FluentAPI returnsThis(String input) { - return this; - } + // summary=p;FluentAPI;false;returnsThis;(String);;Argument[this];ReturnValue;value;df-generated + public FluentAPI returnsThis(String input) { + return this; + } - public class Inner { - public FluentAPI notThis(String input) { - return FluentAPI.this; - } + public class Inner { + // neutral=p;FluentAPI$Inner;notThis;(String);summary;df-generated + public FluentAPI notThis(String input) { + return FluentAPI.this; } - -} \ No newline at end of file + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/ImmutablePojo.java b/java/ql/test/utils/modelgenerator/dataflow/p/ImmutablePojo.java index 660c1970bd3..0a2cf2d7dbd 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/ImmutablePojo.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/ImmutablePojo.java @@ -2,25 +2,29 @@ package p; public final class ImmutablePojo { - private final String value; + private final String value; - private final long x; + private final long x; - public ImmutablePojo(String value, int x) { - this.value = value; - this.x = x; - } + // summary=p;ImmutablePojo;false;ImmutablePojo;(String,int);;Argument[0];Argument[this];taint;df-generated + public ImmutablePojo(String value, int x) { + this.value = value; + this.x = x; + } - public String getValue() { - return value; - } + // summary=p;ImmutablePojo;false;getValue;();;Argument[this];ReturnValue;taint;df-generated + public String getValue() { + return value; + } - public long getX() { - return x; - } + // neutral=p;ImmutablePojo;getX;();summary;df-generated + public long getX() { + return x; + } - public String or(String defaultValue) { - return value != null ? value : defaultValue; - } - -} \ No newline at end of file + // summary=p;ImmutablePojo;false;or;(String);;Argument[0];ReturnValue;taint;df-generated + // summary=p;ImmutablePojo;false;or;(String);;Argument[this];ReturnValue;taint;df-generated + public String or(String defaultValue) { + return value != null ? value : defaultValue; + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/ImplOfExternalSPI.java b/java/ql/test/utils/modelgenerator/dataflow/p/ImplOfExternalSPI.java index c16cdc544fb..596be687c23 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/ImplOfExternalSPI.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/ImplOfExternalSPI.java @@ -6,14 +6,15 @@ import java.nio.file.Files; public class ImplOfExternalSPI extends AbstractImplOfExternalSPI { - @Override - public boolean accept(File pathname) { - try { - Files.createFile(pathname.toPath()); - } catch (IOException e) { - e.printStackTrace(); - } - return false; + // sink=p;AbstractImplOfExternalSPI;true;accept;(File);;Argument[0];path-injection;df-generated + // neutral=p;AbstractImplOfExternalSPI;accept;(File);summary;df-generated + @Override + public boolean accept(File pathname) { + try { + Files.createFile(pathname.toPath()); + } catch (IOException e) { + e.printStackTrace(); } - -} \ No newline at end of file + return false; + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/Inheritance.java b/java/ql/test/utils/modelgenerator/dataflow/p/Inheritance.java new file mode 100644 index 00000000000..f21c8d89747 --- /dev/null +++ b/java/ql/test/utils/modelgenerator/dataflow/p/Inheritance.java @@ -0,0 +1,91 @@ +package p; + +public class Inheritance { + private abstract class BasePrivate { + public abstract String id(String s); + } + + public abstract class BasePublic { + public abstract String id(String s); + } + + public class AImplBasePrivateImpl extends BasePrivate { + // summary=p;Inheritance$AImplBasePrivateImpl;true;id;(String);;Argument[0];ReturnValue;taint;df-generated + @Override + public String id(String s) { + return s; + } + } + + public class AImplBasePublic extends BasePublic { + // summary=p;Inheritance$BasePublic;true;id;(String);;Argument[0];ReturnValue;taint;df-generated + @Override + public String id(String s) { + return s; + } + } + + private interface IPrivate1 { + String id(String s); + } + + private interface IPrivate2 { + String id(String s); + } + + public interface IPublic1 { + String id(String s); + } + + public interface IPublic2 { + String id(String s); + } + + public abstract class B implements IPublic1 { + public abstract String id(String s); + } + + public abstract class C implements IPrivate1 { + public abstract String id(String s); + } + + private abstract class D implements IPublic2 { + public abstract String id(String s); + } + + private abstract class E implements IPrivate2 { + public abstract String id(String s); + } + + public class BImpl extends B { + // summary=p;Inheritance$IPublic1;true;id;(String);;Argument[0];ReturnValue;taint;df-generated + @Override + public String id(String s) { + return s; + } + } + + public class CImpl extends C { + // summary=p;Inheritance$C;true;id;(String);;Argument[0];ReturnValue;taint;df-generated + @Override + public String id(String s) { + return s; + } + } + + public class DImpl extends D { + // summary=p;Inheritance$IPublic2;true;id;(String);;Argument[0];ReturnValue;taint;df-generated + @Override + public String id(String s) { + return s; + } + } + + public class EImpl extends E { + // summary=p;Inheritance$EImpl;true;id;(String);;Argument[0];ReturnValue;taint;df-generated + @Override + public String id(String s) { + return s; + } + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/InnerClasses.java b/java/ql/test/utils/modelgenerator/dataflow/p/InnerClasses.java index 936166eddf3..5b6a8427a3f 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/InnerClasses.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/InnerClasses.java @@ -1,21 +1,22 @@ package p; public class InnerClasses { - - class IgnoreMe { - public String no(String input) { - return input; - } - } - - public class CaptureMe { - public String yesCm(String input) { - return input; - } - } - public String yes(String input) { - return input; + class IgnoreMe { + public String no(String input) { + return input; } + } + public class CaptureMe { + // summary=p;InnerClasses$CaptureMe;true;yesCm;(String);;Argument[0];ReturnValue;taint;df-generated + public String yesCm(String input) { + return input; + } + } + + // summary=p;InnerClasses;true;yes;(String);;Argument[0];ReturnValue;taint;df-generated + public String yes(String input) { + return input; + } } diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/InnerHolder.java b/java/ql/test/utils/modelgenerator/dataflow/p/InnerHolder.java index 5dc07cadd51..e09680dad52 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/InnerHolder.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/InnerHolder.java @@ -2,36 +2,39 @@ package p; public final class InnerHolder { - private class Context { - private String value; + private class Context { + private String value; - Context(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - } - - private Context context = null; - - private StringBuilder sb = new StringBuilder(); - - public void setContext(String value) { - context = new Context(value); - } - - public void explicitSetContext(String value) { - this.context = new Context(value); - } - - public void append(String value) { - sb.append(value); + Context(String value) { + this.value = value; } public String getValue() { - return context.getValue(); + return value; } + } -} \ No newline at end of file + private Context context = null; + + private StringBuilder sb = new StringBuilder(); + + // summary=p;InnerHolder;false;setContext;(String);;Argument[0];Argument[this];taint;df-generated + public void setContext(String value) { + context = new Context(value); + } + + // summary=p;InnerHolder;false;explicitSetContext;(String);;Argument[0];Argument[this];taint;df-generated + public void explicitSetContext(String value) { + this.context = new Context(value); + } + + // summary=p;InnerHolder;false;append;(String);;Argument[0];Argument[this];taint;df-generated + public void append(String value) { + sb.append(value); + } + + // summary=p;InnerHolder;false;getValue;();;Argument[this];ReturnValue;taint;df-generated + public String getValue() { + return context.getValue(); + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/Joiner.java b/java/ql/test/utils/modelgenerator/dataflow/p/Joiner.java index d9869815bc5..10fc72c907f 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/Joiner.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/Joiner.java @@ -4,115 +4,123 @@ import java.util.Arrays; import java.util.Objects; public final class Joiner { - private final String prefix; - private final String delimiter; - private final String suffix; - private String[] elts; - private int size; - private int len; - private String emptyValue; - public Joiner(CharSequence delimiter) { - this(delimiter, "", ""); - } + private final String prefix; + private final String delimiter; + private final String suffix; + private String[] elts; + private int size; + private int len; + private String emptyValue; - public Joiner(CharSequence delimiter, - CharSequence prefix, - CharSequence suffix) { - Objects.requireNonNull(prefix, "The prefix must not be null"); - Objects.requireNonNull(delimiter, "The delimiter must not be null"); - Objects.requireNonNull(suffix, "The suffix must not be null"); - this.prefix = prefix.toString(); - this.delimiter = delimiter.toString(); - this.suffix = suffix.toString(); - checkAddLength(0, 0); - } + // summary=p;Joiner;false;Joiner;(CharSequence);;Argument[0];Argument[this];taint;df-generated + public Joiner(CharSequence delimiter) { + this(delimiter, "", ""); + } - public Joiner setEmptyValue(CharSequence emptyValue) { - this.emptyValue = Objects.requireNonNull(emptyValue, - "The empty value must not be null").toString(); - return this; - } + // summary=p;Joiner;false;Joiner;(CharSequence,CharSequence,CharSequence);;Argument[0];Argument[this];taint;df-generated + // summary=p;Joiner;false;Joiner;(CharSequence,CharSequence,CharSequence);;Argument[1];Argument[this];taint;df-generated + // summary=p;Joiner;false;Joiner;(CharSequence,CharSequence,CharSequence);;Argument[2];Argument[this];taint;df-generated + public Joiner(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { + Objects.requireNonNull(prefix, "The prefix must not be null"); + Objects.requireNonNull(delimiter, "The delimiter must not be null"); + Objects.requireNonNull(suffix, "The suffix must not be null"); + this.prefix = prefix.toString(); + this.delimiter = delimiter.toString(); + this.suffix = suffix.toString(); + checkAddLength(0, 0); + } - private static int getChars(String s, char[] chars, int start) { - int len = s.length(); - s.getChars(0, len, chars, start); - return len; - } + // summary=p;Joiner;false;setEmptyValue;(CharSequence);;Argument[0];Argument[this];taint;df-generated + // summary=p;Joiner;false;setEmptyValue;(CharSequence);;Argument[this];ReturnValue;value;df-generated + public Joiner setEmptyValue(CharSequence emptyValue) { + this.emptyValue = + Objects.requireNonNull(emptyValue, "The empty value must not be null").toString(); + return this; + } - @Override - public String toString() { - final String[] elts = this.elts; - if (elts == null && emptyValue != null) { - return emptyValue; - } - final int size = this.size; - final int addLen = prefix.length() + suffix.length(); - if (addLen == 0) { - compactElts(); - return size == 0 ? "" : elts[0]; - } - final String delimiter = this.delimiter; - final char[] chars = new char[len + addLen]; - int k = getChars(prefix, chars, 0); - if (size > 0) { - k += getChars(elts[0], chars, k); - for (int i = 1; i < size; i++) { - k += getChars(delimiter, chars, k); - k += getChars(elts[i], chars, k); - } - } - k += getChars(suffix, chars, k); - return new String(chars); - } + private static int getChars(String s, char[] chars, int start) { + int len = s.length(); + s.getChars(0, len, chars, start); + return len; + } - public Joiner add(CharSequence newElement) { - final String elt = String.valueOf(newElement); - if (elts == null) { - elts = new String[8]; - } else { - if (size == elts.length) - elts = Arrays.copyOf(elts, 2 * size); - len = checkAddLength(len, delimiter.length()); - } - len = checkAddLength(len, elt.length()); - elts[size++] = elt; - return this; + @Override + public String toString() { + final String[] elts = this.elts; + if (elts == null && emptyValue != null) { + return emptyValue; } + final int size = this.size; + final int addLen = prefix.length() + suffix.length(); + if (addLen == 0) { + compactElts(); + return size == 0 ? "" : elts[0]; + } + final String delimiter = this.delimiter; + final char[] chars = new char[len + addLen]; + int k = getChars(prefix, chars, 0); + if (size > 0) { + k += getChars(elts[0], chars, k); + for (int i = 1; i < size; i++) { + k += getChars(delimiter, chars, k); + k += getChars(elts[i], chars, k); + } + } + k += getChars(suffix, chars, k); + return new String(chars); + } - private int checkAddLength(int oldLen, int inc) { - long newLen = (long)oldLen + (long)inc; - long tmpLen = newLen + (long)prefix.length() + (long)suffix.length(); - if (tmpLen != (int)tmpLen) { - throw new OutOfMemoryError("Requested array size exceeds VM limit"); - } - return (int)newLen; + // summary=p;Joiner;false;add;(CharSequence);;Argument[this];ReturnValue;value;df-generated + public Joiner add(CharSequence newElement) { + final String elt = String.valueOf(newElement); + if (elts == null) { + elts = new String[8]; + } else { + if (size == elts.length) elts = Arrays.copyOf(elts, 2 * size); + len = checkAddLength(len, delimiter.length()); } + len = checkAddLength(len, elt.length()); + elts[size++] = elt; + return this; + } - public Joiner merge(Joiner other) { - Objects.requireNonNull(other); - if (other.elts == null) { - return this; - } - other.compactElts(); - return add(other.elts[0]); + private int checkAddLength(int oldLen, int inc) { + long newLen = (long) oldLen + (long) inc; + long tmpLen = newLen + (long) prefix.length() + (long) suffix.length(); + if (tmpLen != (int) tmpLen) { + throw new OutOfMemoryError("Requested array size exceeds VM limit"); } + return (int) newLen; + } - private void compactElts() { - if (size > 1) { - final char[] chars = new char[len]; - int i = 1, k = getChars(elts[0], chars, 0); - do { - k += getChars(delimiter, chars, k); - k += getChars(elts[i], chars, k); - elts[i] = null; - } while (++i < size); - size = 1; - elts[0] = new String(chars); - } + // summary=p;Joiner;false;merge;(Joiner);;Argument[this];ReturnValue;value;df-generated + public Joiner merge(Joiner other) { + Objects.requireNonNull(other); + if (other.elts == null) { + return this; } + other.compactElts(); + return add(other.elts[0]); + } - public int length() { - return (size == 0 && emptyValue != null) ? emptyValue.length() : - len + prefix.length() + suffix.length(); + private void compactElts() { + if (size > 1) { + final char[] chars = new char[len]; + int i = 1, k = getChars(elts[0], chars, 0); + do { + k += getChars(delimiter, chars, k); + k += getChars(elts[i], chars, k); + elts[i] = null; + } while (++i < size); + size = 1; + elts[0] = new String(chars); } -} \ No newline at end of file + } + + // neutral=p;Joiner;length;();summary;df-generated + public int length() { + return (size == 0 && emptyValue != null) + ? emptyValue.length() + : len + prefix.length() + suffix.length(); + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpl2.java b/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpl2.java index 9de2d59b2e4..3e5d9abd768 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpl2.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpl2.java @@ -2,22 +2,23 @@ package p; class MultipleImpl2 { - // Multiple implementations of the same interface. - // This is used to test that we only generate a summary model and - // not neutral summary model for `IInterface.m`. - public interface IInterface { - Object m(Object value); - } + // Multiple implementations of the same interface. + // This is used to test that we only generate a summary model and + // not neutral summary model for `IInterface.m`. + public interface IInterface { + Object m(Object value); + } - public class Impl1 implements IInterface { - public Object m(Object value) { - return null; - } + public class Impl1 implements IInterface { + public Object m(Object value) { + return null; } + } - public class Impl2 implements IInterface { - public Object m(Object value) { - return value; - } + public class Impl2 implements IInterface { + // summary=p;MultipleImpl2$IInterface;true;m;(Object);;Argument[0];ReturnValue;taint;df-generated + public Object m(Object value) { + return value; } + } } diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpls.java b/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpls.java index a6697393dbc..1bf73599588 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpls.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/MultipleImpls.java @@ -4,35 +4,39 @@ import java.util.concurrent.Callable; public class MultipleImpls { - public static interface Strategy { - String doSomething(String value); + public static interface Strategy { + String doSomething(String value); + } + + public static class Strat1 implements Strategy { + // summary=p;MultipleImpls$Strategy;true;doSomething;(String);;Argument[0];ReturnValue;taint;df-generated + public String doSomething(String value) { + return value; + } + } + + // implements in different library should not count as impl + public static class Strat3 implements Callable { + + // neutral=p;MultipleImpls$Strat3;call;();summary;df-generated + @Override + public String call() throws Exception { + return null; + } + } + + public static class Strat2 implements Strategy { + private String foo; + + // summary=p;MultipleImpls$Strategy;true;doSomething;(String);;Argument[0];Argument[this];taint;df-generated + public String doSomething(String value) { + this.foo = value; + return "none"; } - public static class Strat1 implements Strategy { - public String doSomething(String value) { - return value; - } - } - - // implements in different library should not count as impl - public static class Strat3 implements Callable { - - @Override - public String call() throws Exception { - return null; - } - - } - public static class Strat2 implements Strategy { - private String foo; - - public String doSomething(String value) { - this.foo = value; - return "none"; - } - - public String getValue() { - return this.foo; - } + // summary=p;MultipleImpls$Strat2;true;getValue;();;Argument[this];ReturnValue;taint;df-generated + public String getValue() { + return this.foo; } + } } diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/ParamFlow.java b/java/ql/test/utils/modelgenerator/dataflow/p/ParamFlow.java index 8b58c377316..d175ee9c71e 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/ParamFlow.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/ParamFlow.java @@ -1,64 +1,73 @@ package p; -import java.util.Iterator; -import java.util.List; import java.io.IOException; import java.io.OutputStream; - +import java.util.Iterator; +import java.util.List; public class ParamFlow { - public String returnsInput(String input) { - return input; - } + // summary=p;ParamFlow;true;returnsInput;(String);;Argument[0];ReturnValue;taint;df-generated + public String returnsInput(String input) { + return input; + } - public int ignorePrimitiveReturnValue(String input) { - return input.length(); - } + // neutral=p;ParamFlow;ignorePrimitiveReturnValue;(String);summary;df-generated + public int ignorePrimitiveReturnValue(String input) { + return input.length(); + } - public String returnMultipleParameters(String one, String two) { - if (System.currentTimeMillis() > 100) { - return two; - } - return one; + // summary=p;ParamFlow;true;returnMultipleParameters;(String,String);;Argument[0];ReturnValue;taint;df-generated + // summary=p;ParamFlow;true;returnMultipleParameters;(String,String);;Argument[1];ReturnValue;taint;df-generated + public String returnMultipleParameters(String one, String two) { + if (System.currentTimeMillis() > 100) { + return two; } + return one; + } - public String returnArrayElement(String[] input) { - return input[0]; - } + // summary=p;ParamFlow;true;returnArrayElement;(String[]);;Argument[0].ArrayElement;ReturnValue;taint;df-generated + public String returnArrayElement(String[] input) { + return input[0]; + } - public String returnVarArgElement(String... input) { - return input[0]; - } + // summary=p;ParamFlow;true;returnVarArgElement;(String[]);;Argument[0].ArrayElement;ReturnValue;taint;df-generated + public String returnVarArgElement(String... input) { + return input[0]; + } - public String returnCollectionElement(List input) { - return input.get(0); - } + // summary=p;ParamFlow;true;returnCollectionElement;(List);;Argument[0].Element;ReturnValue;taint;df-generated + public String returnCollectionElement(List input) { + return input.get(0); + } - public String returnIteratorElement(Iterator input) { - return input.next(); - } + // summary=p;ParamFlow;true;returnIteratorElement;(Iterator);;Argument[0].Element;ReturnValue;taint;df-generated + public String returnIteratorElement(Iterator input) { + return input.next(); + } - public String returnIterableElement(Iterable input) { - return input.iterator().next(); - } + // summary=p;ParamFlow;true;returnIterableElement;(Iterable);;Argument[0].Element;ReturnValue;taint;df-generated + public String returnIterableElement(Iterable input) { + return input.iterator().next(); + } - public Class mapType(Class input) { - return input; - } + // neutral=p;ParamFlow;mapType;(Class);summary;df-generated + public Class mapType(Class input) { + return input; + } - public void writeChunked(byte[] data, OutputStream output) - throws IOException { - output.write(data, 0, data.length); - } - - public void writeChunked(char[] data, OutputStream output) - throws IOException { - output.write(String.valueOf(data).getBytes(), 0, data.length); - } + // summary=p;ParamFlow;true;writeChunked;(byte[],OutputStream);;Argument[0];Argument[1];taint;df-generated + public void writeChunked(byte[] data, OutputStream output) throws IOException { + output.write(data, 0, data.length); + } - public void addTo(String data, List target) { - target.add(data); - } + // summary=p;ParamFlow;true;writeChunked;(char[],OutputStream);;Argument[0];Argument[1];taint;df-generated + public void writeChunked(char[] data, OutputStream output) throws IOException { + output.write(String.valueOf(data).getBytes(), 0, data.length); + } -} \ No newline at end of file + // summary=p;ParamFlow;true;addTo;(String,List);;Argument[0];Argument[1].Element;taint;df-generated + public void addTo(String data, List target) { + target.add(data); + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/Pojo.java b/java/ql/test/utils/modelgenerator/dataflow/p/Pojo.java index 40dfa56ae86..9d5de0517e1 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/Pojo.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/Pojo.java @@ -8,91 +8,106 @@ import java.util.List; public final class Pojo { - private class Holder { - private String value; - - Holder(String value) { - this.value = value; - } - - int length() { - return value.length(); - } - } - + private class Holder { private String value; - private int intValue = 2; - - private byte[] byteArray = new byte[] {1, 2, 3} ; - private float[] floatArray = new float[] {1, 2, 3} ; - private char[] charArray = new char[] {'a', 'b', 'c'} ; - private List charList = Arrays.asList('a', 'b', 'c'); - private Byte[] byteObjectArray = new Byte[] { 1, 2, 3 }; - - public String getValue() { - return value; + Holder(String value) { + this.value = value; } - public void setValue(String value) { - this.value = value; + int length() { + return value.length(); } + } - public int doNotSetValue(String value) { - Holder h = new Holder(value); - return h.length(); - } + private String value; - public int getIntValue() { - return intValue; - } + private int intValue = 2; - public Integer getBoxedValue() { - return Integer.valueOf(intValue); - } + private byte[] byteArray = new byte[] {1, 2, 3}; + private float[] floatArray = new float[] {1, 2, 3}; + private char[] charArray = new char[] {'a', 'b', 'c'}; + private List charList = Arrays.asList('a', 'b', 'c'); + private Byte[] byteObjectArray = new Byte[] {1, 2, 3}; - public int[] getPrimitiveArray() { - return new int[] { intValue }; - } + // summary=p;Pojo;false;getValue;();;Argument[this];ReturnValue;taint;df-generated + public String getValue() { + return value; + } - public char[] getCharArray() { - return charArray; - } + // summary=p;Pojo;false;setValue;(String);;Argument[0];Argument[this];taint;df-generated + public void setValue(String value) { + this.value = value; + } - public byte[] getByteArray() { - return byteArray; - } - - public float[] getFloatArray() { - return floatArray; - } + // neutral=p;Pojo;doNotSetValue;(String);summary;df-generated + public int doNotSetValue(String value) { + Holder h = new Holder(value); + return h.length(); + } - public Integer[] getBoxedArray() { - return new Integer[] { Integer.valueOf(intValue) }; - } - - public Collection getBoxedCollection() { - return List.of(Integer.valueOf(intValue)); - } + // neutral=p;Pojo;getIntValue;();summary;df-generated + public int getIntValue() { + return intValue; + } - public List getBoxedChars() { - return charList; - } + // neutral=p;Pojo;getBoxedValue;();summary;df-generated + public Integer getBoxedValue() { + return Integer.valueOf(intValue); + } - public Byte[] getBoxedBytes() { - return byteObjectArray; - } - - public BigInteger getBigInt() { - return BigInteger.valueOf(intValue); - } + // neutral=p;Pojo;getPrimitiveArray;();summary;df-generated + public int[] getPrimitiveArray() { + return new int[] {intValue}; + } - public BigDecimal getBigDecimal() { - return new BigDecimal(value); - } + // summary=p;Pojo;false;getCharArray;();;Argument[this];ReturnValue;taint;df-generated + public char[] getCharArray() { + return charArray; + } - public void fillIn(List target) { - target.add(value); - } + // summary=p;Pojo;false;getByteArray;();;Argument[this];ReturnValue;taint;df-generated + public byte[] getByteArray() { + return byteArray; + } -} \ No newline at end of file + // neutral=p;Pojo;getFloatArray;();summary;df-generated + public float[] getFloatArray() { + return floatArray; + } + + // neutral=p;Pojo;getBoxedArray;();summary;df-generated + public Integer[] getBoxedArray() { + return new Integer[] {Integer.valueOf(intValue)}; + } + + // neutral=p;Pojo;getBoxedCollection;();summary;df-generated + public Collection getBoxedCollection() { + return List.of(Integer.valueOf(intValue)); + } + + // summary=p;Pojo;false;getBoxedChars;();;Argument[this];ReturnValue;taint;df-generated + public List getBoxedChars() { + return charList; + } + + // summary=p;Pojo;false;getBoxedBytes;();;Argument[this];ReturnValue;taint;df-generated + public Byte[] getBoxedBytes() { + return byteObjectArray; + } + + // neutral=p;Pojo;getBigInt;();summary;df-generated + public BigInteger getBigInt() { + return BigInteger.valueOf(intValue); + } + + // neutral=p;Pojo;getBigDecimal;();summary;df-generated + public BigDecimal getBigDecimal() { + return new BigDecimal(value); + } + + // summary=p;Pojo;false;fillIn;(List);;Argument[this];Argument[0].Element;taint;df-generated + public void fillIn(List target) { + target.add(value); + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/PrivateFlowViaPublicInterface.java b/java/ql/test/utils/modelgenerator/dataflow/p/PrivateFlowViaPublicInterface.java index 59247bfe471..25c62172121 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/PrivateFlowViaPublicInterface.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/PrivateFlowViaPublicInterface.java @@ -7,55 +7,58 @@ import java.io.OutputStream; public class PrivateFlowViaPublicInterface { - static class RandomPojo { - public File someFile = new File("someFile"); - } - public static interface SPI { - OutputStream openStream() throws IOException; + static class RandomPojo { + public File someFile = new File("someFile"); + } - default OutputStream openStreamNone() throws IOException { - return null; - }; + public static interface SPI { + OutputStream openStream() throws IOException; + + // neutral=p;PrivateFlowViaPublicInterface$SPI;openStreamNone;();summary;df-generated + default OutputStream openStreamNone() throws IOException { + return null; + } + } + + private static final class PrivateImplWithSink implements SPI { + + private File file; + + public PrivateImplWithSink(File file) { + this.file = file; } - private static final class PrivateImplWithSink implements SPI { - - private File file; - - public PrivateImplWithSink(File file) { - this.file = file; - } - - @Override - public OutputStream openStream() throws IOException { - return new FileOutputStream(file); - } - + // summary=p;PrivateFlowViaPublicInterface$SPI;true;openStream;();;Argument[this];ReturnValue;taint;df-generated + // sink=p;PrivateFlowViaPublicInterface$SPI;true;openStream;();;Argument[this];path-injection;df-generated + @Override + public OutputStream openStream() throws IOException { + return new FileOutputStream(file); } - - private static final class PrivateImplWithRandomField implements SPI { + } - public PrivateImplWithRandomField(File file) { - } + private static final class PrivateImplWithRandomField implements SPI { - @Override - public OutputStream openStream() throws IOException { - return null; - } - - @Override - public OutputStream openStreamNone() throws IOException { - return new FileOutputStream(new RandomPojo().someFile); - } + public PrivateImplWithRandomField(File file) {} + @Override + public OutputStream openStream() throws IOException { + return null; } - public static SPI createAnSPI(File file) { - return new PrivateImplWithSink(file); - } - - public static SPI createAnSPIWithoutTrackingFile(File file) { - return new PrivateImplWithRandomField(file); + // neutral=p;PrivateFlowViaPublicInterface$SPI;openStreamNone;();summary;df-generated + @Override + public OutputStream openStreamNone() throws IOException { + return new FileOutputStream(new RandomPojo().someFile); } + } -} \ No newline at end of file + // summary=p;PrivateFlowViaPublicInterface;true;createAnSPI;(File);;Argument[0];ReturnValue;taint;df-generated + public static SPI createAnSPI(File file) { + return new PrivateImplWithSink(file); + } + + // neutral=p;PrivateFlowViaPublicInterface;createAnSPIWithoutTrackingFile;(File);summary;df-generated + public static SPI createAnSPIWithoutTrackingFile(File file) { + return new PrivateImplWithRandomField(file); + } +} diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/Sinks.java b/java/ql/test/utils/modelgenerator/dataflow/p/Sinks.java index 260f235920a..e9868b26073 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/Sinks.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/Sinks.java @@ -3,32 +3,39 @@ package p; import java.io.IOException; import java.io.InputStream; import java.net.URL; -import java.nio.file.CopyOption; import java.nio.charset.Charset; +import java.nio.file.CopyOption; import java.nio.file.Files; import java.nio.file.Path; import java.util.logging.Logger; public class Sinks { - - public Path copyFileToDirectory(final Path sourceFile, final Path targetFile, final CopyOption... copyOptions) throws IOException { - return Files.copy(sourceFile, targetFile, copyOptions); - } - public String readUrl(final URL url, Charset encoding) throws IOException { - try (InputStream in = url.openStream()) { - byte[] bytes = in.readAllBytes(); - return new String(bytes, encoding); - } - } + // sink=p;Sinks;true;copyFileToDirectory;(Path,Path,CopyOption[]);;Argument[0];path-injection;df-generated + // sink=p;Sinks;true;copyFileToDirectory;(Path,Path,CopyOption[]);;Argument[1];path-injection;df-generated + // neutral=p;Sinks;copyFileToDirectory;(Path,Path,CopyOption[]);summary;df-generated + public Path copyFileToDirectory( + final Path sourceFile, final Path targetFile, final CopyOption... copyOptions) + throws IOException { + return Files.copy(sourceFile, targetFile, copyOptions); + } - public static void main(String[] args) throws IOException { - String foo = new Sinks().readUrl(new URL(args[0]), Charset.defaultCharset()); + // sink=p;Sinks;true;readUrl;(URL,Charset);;Argument[0];request-forgery;df-generated + // neutral=p;Sinks;readUrl;(URL,Charset);summary;df-generated + public String readUrl(final URL url, Charset encoding) throws IOException { + try (InputStream in = url.openStream()) { + byte[] bytes = in.readAllBytes(); + return new String(bytes, encoding); } + } - public void propagate(String s) { - Logger logger = Logger.getLogger(Sinks.class.getSimpleName()); - logger.warning(s); - } + public static void main(String[] args) throws IOException { + String foo = new Sinks().readUrl(new URL(args[0]), Charset.defaultCharset()); + } + // neutral=p;Sinks;propagate;(String);summary;df-generated + public void propagate(String s) { + Logger logger = Logger.getLogger(Sinks.class.getSimpleName()); + logger.warning(s); + } } diff --git a/java/ql/test/utils/modelgenerator/dataflow/p/Sources.java b/java/ql/test/utils/modelgenerator/dataflow/p/Sources.java index 7b008ff378f..436bf16797c 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/p/Sources.java +++ b/java/ql/test/utils/modelgenerator/dataflow/p/Sources.java @@ -4,29 +4,37 @@ import java.io.IOException; import java.io.InputStream; import java.net.ServerSocket; import java.net.URL; -import java.util.function.Consumer; import java.util.List; - public class Sources { - - public InputStream readUrl(final URL url) throws IOException { - return url.openConnection().getInputStream(); - } - public InputStream socketStream() throws IOException { - ServerSocket socket = new ServerSocket(123); - return socket.accept().getInputStream(); - } + // source=p;Sources;true;readUrl;(URL);;ReturnValue;remote;df-generated + // sink=p;Sources;true;readUrl;(URL);;Argument[0];request-forgery;df-generated + // neutral=p;Sources;readUrl;(URL);summary;df-generated + public InputStream readUrl(final URL url) throws IOException { + return url.openConnection().getInputStream(); + } - public InputStream wrappedSocketStream() throws IOException { - return socketStream(); - } + // source=p;Sources;true;socketStream;();;ReturnValue;remote;df-generated + // neutral=p;Sources;socketStream;();summary;df-generated + public InputStream socketStream() throws IOException { + ServerSocket socket = new ServerSocket(123); + return socket.accept().getInputStream(); + } - public void sourceToParameter(InputStream[] streams, List otherStreams) throws IOException { - ServerSocket socket = new ServerSocket(123); - streams[0] = socket.accept().getInputStream(); - otherStreams.add(socket.accept().getInputStream()); - } + // source=p;Sources;true;wrappedSocketStream;();;ReturnValue;remote;df-generated + // neutral=p;Sources;wrappedSocketStream;();summary;df-generated + public InputStream wrappedSocketStream() throws IOException { + return socketStream(); + } + // source=p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[0].ArrayElement;remote;df-generated + // source=p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[1].Element;remote;df-generated + // neutral=p;Sources;sourceToParameter;(InputStream[],List);summary;df-generated + public void sourceToParameter(InputStream[] streams, List otherStreams) + throws IOException { + ServerSocket socket = new ServerSocket(123); + streams[0] = socket.accept().getInputStream(); + otherStreams.add(socket.accept().getInputStream()); + } } diff --git a/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.expected b/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.expected index ee55a9c6ba6..cb6fc390349 100644 --- a/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.expected +++ b/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.expected @@ -1,2 +1,2 @@ -unexpectedSummary -expectedSummary +unexpectedModel +expectedModel diff --git a/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql b/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql index fe77abaa6df..2bf4e08d2c1 100644 --- a/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql +++ b/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql @@ -1,26 +1,11 @@ import java +import TestUtilities.InlineMadTest import utils.modelgenerator.internal.CaptureTypeBasedSummaryModels -private string expects() { - exists(Javadoc doc | - doc.getChild(0).toString().regexpCapture(" *(SPURIOUS-)?MaD=(.*)", 2) = result - ) +module InlineMadTestConfig implements InlineMadTestConfigSig { + string getCapturedModel(Callable c) { result = captureFlow(c) } + + string getKind() { result = "summary" } } -private string flows() { result = captureFlow(_) } - -query predicate unexpectedSummary(string msg) { - exists(string flow | - flow = flows() and - not flow = expects() and - msg = "Unexpected summary found: " + flow - ) -} - -query predicate expectedSummary(string msg) { - exists(string e | - e = expects() and - not e = flows() and - msg = "Expected summary missing: " + e - ) -} +import InlineMadTest diff --git a/java/ql/test/utils/modelgenerator/typebasedflow/p/MyFunction.java b/java/ql/test/utils/modelgenerator/typebasedflow/p/MyFunction.java index 04683952f83..e3589bf5f6c 100644 --- a/java/ql/test/utils/modelgenerator/typebasedflow/p/MyFunction.java +++ b/java/ql/test/utils/modelgenerator/typebasedflow/p/MyFunction.java @@ -3,8 +3,8 @@ package p; @FunctionalInterface public interface MyFunction { - // MaD=p;MyFunction;true;apply;(Object,Object);;Argument[this].SyntheticField[ArgType2];ReturnValue;value;tb-generated - // MaD=p;MyFunction;true;apply;(Object,Object);;Argument[0];Argument[this].SyntheticField[ArgType0];value;tb-generated - // MaD=p;MyFunction;true;apply;(Object,Object);;Argument[1];Argument[this].SyntheticField[ArgType1];value;tb-generated - T3 apply(T1 x, T2 y); -} \ No newline at end of file + // summary=p;MyFunction;true;apply;(Object,Object);;Argument[this].SyntheticField[ArgType2];ReturnValue;value;tb-generated + // summary=p;MyFunction;true;apply;(Object,Object);;Argument[0];Argument[this].SyntheticField[ArgType0];value;tb-generated + // summary=p;MyFunction;true;apply;(Object,Object);;Argument[1];Argument[this].SyntheticField[ArgType1];value;tb-generated + T3 apply(T1 x, T2 y); +} diff --git a/java/ql/test/utils/modelgenerator/typebasedflow/p/Stream.java b/java/ql/test/utils/modelgenerator/typebasedflow/p/Stream.java index 86d25088645..8e99fc7ca7c 100644 --- a/java/ql/test/utils/modelgenerator/typebasedflow/p/Stream.java +++ b/java/ql/test/utils/modelgenerator/typebasedflow/p/Stream.java @@ -2,246 +2,244 @@ package p; import java.util.*; import java.util.function.*; -import java.util.stream.LongStream; -import java.util.stream.IntStream; -import java.util.stream.DoubleStream; import java.util.stream.Collector; +import java.util.stream.DoubleStream; +import java.util.stream.IntStream; +import java.util.stream.LongStream; -/** - * This is a stub implementation of the Java Stream API. - */ +/** This is a stub implementation of the Java Stream API. */ public class Stream { - // MaD=p;Stream;true;iterator;();;Argument[this].Element;ReturnValue.Element;value;tb-generated - public Iterator iterator() { - return null; - } + // summary=p;Stream;true;iterator;();;Argument[this].Element;ReturnValue.Element;value;tb-generated + public Iterator iterator() { + return null; + } - // MaD=p;Stream;true;allMatch;(Predicate);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public boolean allMatch(Predicate predicate) { - return false; - } + // summary=p;Stream;true;allMatch;(Predicate);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public boolean allMatch(Predicate predicate) { + return false; + } - // MaD=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[this].Element;Argument[1].Parameter[1];value;tb-generated - // MaD=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[0].ReturnValue;Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[0].ReturnValue;Argument[2].Parameter[0];value;tb-generated - // MaD=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[0].ReturnValue;Argument[2].Parameter[1];value;tb-generated - // MaD=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[0].ReturnValue;ReturnValue;value;tb-generated - public R collect(Supplier supplier, BiConsumer accumulator, BiConsumer combiner) { - return null; - } + // summary=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[this].Element;Argument[1].Parameter[1];value;tb-generated + // summary=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[0].ReturnValue;Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[0].ReturnValue;Argument[2].Parameter[0];value;tb-generated + // summary=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[0].ReturnValue;Argument[2].Parameter[1];value;tb-generated + // summary=p;Stream;true;collect;(Supplier,BiConsumer,BiConsumer);;Argument[0].ReturnValue;ReturnValue;value;tb-generated + public R collect( + Supplier supplier, BiConsumer accumulator, BiConsumer combiner) { + return null; + } - // Collector is not a functional interface, so this is not supported - public R collect(Collector collector) { - return null; - } + // Collector is not a functional interface, so this is not supported + public R collect(Collector collector) { + return null; + } - // MaD=p;Stream;true;concat;(Stream,Stream);;Argument[0].Element;ReturnValue.Element;value;tb-generated - // MaD=p;Stream;true;concat;(Stream,Stream);;Argument[1].Element;ReturnValue.Element;value;tb-generated - public static Stream concat(Stream a, Stream b) { - return null; - } + // summary=p;Stream;true;concat;(Stream,Stream);;Argument[0].Element;ReturnValue.Element;value;tb-generated + // summary=p;Stream;true;concat;(Stream,Stream);;Argument[1].Element;ReturnValue.Element;value;tb-generated + public static Stream concat(Stream a, Stream b) { + return null; + } - // MaD=p;Stream;true;distinct;();;Argument[this].Element;ReturnValue.Element;value;tb-generated - public Stream distinct() { - return null; - } + // summary=p;Stream;true;distinct;();;Argument[this].Element;ReturnValue.Element;value;tb-generated + public Stream distinct() { + return null; + } - public static Stream empty() { - return null; - } + public static Stream empty() { + return null; + } - // MaD=p;Stream;true;filter;(Predicate);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - // MaD=p;Stream;true;filter;(Predicate);;Argument[this].Element;ReturnValue.Element;value;tb-generated - public Stream filter(Predicate predicate) { - return null; - } + // summary=p;Stream;true;filter;(Predicate);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + // summary=p;Stream;true;filter;(Predicate);;Argument[this].Element;ReturnValue.Element;value;tb-generated + public Stream filter(Predicate predicate) { + return null; + } - // MaD=p;Stream;true;findAny;();;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated - public Optional findAny() { - return null; - } + // summary=p;Stream;true;findAny;();;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated + public Optional findAny() { + return null; + } - // MaD=p;Stream;true;findFirst;();;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated - public Optional findFirst() { - return null; - } + // summary=p;Stream;true;findFirst;();;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated + public Optional findFirst() { + return null; + } - // MaD=p;Stream;true;flatMap;(Function);;Argument[0].ReturnValue.Element;ReturnValue.Element;value;tb-generated - // MaD=p;Stream;true;flatMap;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public Stream flatMap(Function> mapper) { - return null; - } + // summary=p;Stream;true;flatMap;(Function);;Argument[0].ReturnValue.Element;ReturnValue.Element;value;tb-generated + // summary=p;Stream;true;flatMap;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public Stream flatMap(Function> mapper) { + return null; + } - // MaD=p;Stream;true;flatMapToDouble;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public DoubleStream flatMapToDouble(Function mapper) { - return null; - } + // summary=p;Stream;true;flatMapToDouble;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public DoubleStream flatMapToDouble(Function mapper) { + return null; + } - // MaD=p;Stream;true;flatMapToInt;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public IntStream flatMapToInt(Function mapper) { - return null; - } + // summary=p;Stream;true;flatMapToInt;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public IntStream flatMapToInt(Function mapper) { + return null; + } - // MaD=p;Stream;true;flatMapToLong;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public LongStream flatMapToLong(Function mapper) { - return null; - } + // summary=p;Stream;true;flatMapToLong;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public LongStream flatMapToLong(Function mapper) { + return null; + } - // MaD=p;Stream;true;forEach;(Consumer);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public void forEach(Consumer action) { - } + // summary=p;Stream;true;forEach;(Consumer);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public void forEach(Consumer action) {} - // MaD=p;Stream;true;forEachOrdered;(Consumer);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public void forEachOrdered(Consumer action) { - } + // summary=p;Stream;true;forEachOrdered;(Consumer);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public void forEachOrdered(Consumer action) {} - // MaD=p;Stream;true;generate;(Supplier);;Argument[0].ReturnValue;ReturnValue.Element;value;tb-generated - public static Stream generate(Supplier s) { - return null; - } + // summary=p;Stream;true;generate;(Supplier);;Argument[0].ReturnValue;ReturnValue.Element;value;tb-generated + public static Stream generate(Supplier s) { + return null; + } - // MaD=p;Stream;true;iterate;(Object,UnaryOperator);;Argument[0];Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;iterate;(Object,UnaryOperator);;Argument[0];ReturnValue.Element;value;tb-generated - // MaD=p;Stream;true;iterate;(Object,UnaryOperator);;Argument[1].ReturnValue;Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;iterate;(Object,UnaryOperator);;Argument[1].ReturnValue;ReturnValue.Element;value;tb-generated - public static Stream iterate(T seed, UnaryOperator f) { - return null; - } + // summary=p;Stream;true;iterate;(Object,UnaryOperator);;Argument[0];Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;iterate;(Object,UnaryOperator);;Argument[0];ReturnValue.Element;value;tb-generated + // summary=p;Stream;true;iterate;(Object,UnaryOperator);;Argument[1].ReturnValue;Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;iterate;(Object,UnaryOperator);;Argument[1].ReturnValue;ReturnValue.Element;value;tb-generated + public static Stream iterate(T seed, UnaryOperator f) { + return null; + } - // MaD=p;Stream;true;limit;(long);;Argument[this].Element;ReturnValue.Element;value;tb-generated - public Stream limit(long maxSize) { - return null; - } + // summary=p;Stream;true;limit;(long);;Argument[this].Element;ReturnValue.Element;value;tb-generated + public Stream limit(long maxSize) { + return null; + } - // MaD=p;Stream;true;map;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - // MaD=p;Stream;true;map;(Function);;Argument[0].ReturnValue;ReturnValue.Element;value;tb-generated - public Stream map(Function mapper) { - return null; - } + // summary=p;Stream;true;map;(Function);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + // summary=p;Stream;true;map;(Function);;Argument[0].ReturnValue;ReturnValue.Element;value;tb-generated + public Stream map(Function mapper) { + return null; + } - // MaD=p;Stream;true;mapToDouble;(ToDoubleFunction);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public DoubleStream mapToDouble(ToDoubleFunction mapper) { - return null; - } + // summary=p;Stream;true;mapToDouble;(ToDoubleFunction);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public DoubleStream mapToDouble(ToDoubleFunction mapper) { + return null; + } - // MaD=p;Stream;true;mapToInt;(ToIntFunction);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public IntStream mapToInt(ToIntFunction mapper) { - return null; - } + // summary=p;Stream;true;mapToInt;(ToIntFunction);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public IntStream mapToInt(ToIntFunction mapper) { + return null; + } - // MaD=p;Stream;true;mapToLong;(ToLongFunction);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public LongStream mapToLong(ToLongFunction mapper) { - return null; - } + // summary=p;Stream;true;mapToLong;(ToLongFunction);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public LongStream mapToLong(ToLongFunction mapper) { + return null; + } - // MaD=p;Stream;true;max;(Comparator);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - // MaD=p;Stream;true;max;(Comparator);;Argument[this].Element;Argument[0].Parameter[1];value;tb-generated - // MaD=p;Stream;true;max;(Comparator);;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated - public Optional max(Comparator comparator) { - return null; - } + // summary=p;Stream;true;max;(Comparator);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + // summary=p;Stream;true;max;(Comparator);;Argument[this].Element;Argument[0].Parameter[1];value;tb-generated + // summary=p;Stream;true;max;(Comparator);;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated + public Optional max(Comparator comparator) { + return null; + } - // MaD=p;Stream;true;min;(Comparator);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - // MaD=p;Stream;true;min;(Comparator);;Argument[this].Element;Argument[0].Parameter[1];value;tb-generated - // MaD=p;Stream;true;min;(Comparator);;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated - public Optional min(Comparator comparator) { - return null; - } + // summary=p;Stream;true;min;(Comparator);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + // summary=p;Stream;true;min;(Comparator);;Argument[this].Element;Argument[0].Parameter[1];value;tb-generated + // summary=p;Stream;true;min;(Comparator);;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated + public Optional min(Comparator comparator) { + return null; + } - // MaD=p;Stream;true;noneMatch;(Predicate);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - public boolean noneMatch(Predicate predicate) { - return false; - } + // summary=p;Stream;true;noneMatch;(Predicate);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + public boolean noneMatch(Predicate predicate) { + return false; + } - // MaD=p;Stream;true;of;(Object[]);;Argument[0].ArrayElement;ReturnValue.Element;value;tb-generated - public static Stream of(T... t) { - return null; - } + // summary=p;Stream;true;of;(Object[]);;Argument[0].ArrayElement;ReturnValue.Element;value;tb-generated + public static Stream of(T... t) { + return null; + } - // MaD=p;Stream;true;of;(Object);;Argument[0];ReturnValue.Element;value;tb-generated - public static Stream of(T t) { - return null; - } + // summary=p;Stream;true;of;(Object);;Argument[0];ReturnValue.Element;value;tb-generated + public static Stream of(T t) { + return null; + } - // MaD=p;Stream;true;peek;(Consumer);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - // MaD=p;Stream;true;peek;(Consumer);;Argument[this].Element;ReturnValue.Element;value;tb-generated - public Stream peek(Consumer action) { - return null; - } + // summary=p;Stream;true;peek;(Consumer);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + // summary=p;Stream;true;peek;(Consumer);;Argument[this].Element;ReturnValue.Element;value;tb-generated + public Stream peek(Consumer action) { + return null; + } - // The generated models are only partially correct. - // MaD=p;Stream;true;reduce;(BinaryOperator);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(BinaryOperator);;Argument[this].Element;Argument[0].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(BinaryOperator);;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated - // MaD=p;Stream;true;reduce;(BinaryOperator);;Argument[0].ReturnValue;Argument[0].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(BinaryOperator);;Argument[0].ReturnValue;Argument[0].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(BinaryOperator);;Argument[0].ReturnValue;ReturnValue.SyntheticField[ArgType0];value;tb-generated - // SPURIOUS-MaD=p;Stream;true;reduce;(BinaryOperator);;Argument[0].ReturnValue;Argument[this].Element;value;tb-generated - public Optional reduce(BinaryOperator accumulator) { - return null; - } + // The generated models are only partially correct. + // summary=p;Stream;true;reduce;(BinaryOperator);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(BinaryOperator);;Argument[this].Element;Argument[0].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(BinaryOperator);;Argument[this].Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated + // summary=p;Stream;true;reduce;(BinaryOperator);;Argument[0].ReturnValue;Argument[0].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(BinaryOperator);;Argument[0].ReturnValue;Argument[0].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(BinaryOperator);;Argument[0].ReturnValue;ReturnValue.SyntheticField[ArgType0];value;tb-generated + // SPURIOUS-summary=p;Stream;true;reduce;(BinaryOperator);;Argument[0].ReturnValue;Argument[this].Element;value;tb-generated + public Optional reduce(BinaryOperator accumulator) { + return null; + } - // The generated models are only partially correct. - // MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[this].Element;Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[this].Element;Argument[1].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[0];Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[0];Argument[1].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[0];ReturnValue;value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[1].ReturnValue;Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[1].ReturnValue;Argument[1].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[1].ReturnValue;ReturnValue;value;tb-generated - // SPURIOUS-MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[this].Element;ReturnValue;value;tb-generated - // SPURIOUS-MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[0];Argument[this].Element;value;tb-generated - // SPURIOUS-MaD=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[1].ReturnValue;Argument[this].Element;value;tb-generated - public T reduce(T identity, BinaryOperator accumulator) { - return null; - } + // The generated models are only partially correct. + // summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[this].Element;Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[this].Element;Argument[1].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[0];Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[0];Argument[1].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[0];ReturnValue;value;tb-generated + // summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[1].ReturnValue;Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[1].ReturnValue;Argument[1].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[1].ReturnValue;ReturnValue;value;tb-generated + // SPURIOUS-summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[this].Element;ReturnValue;value;tb-generated + // SPURIOUS-summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[0];Argument[this].Element;value;tb-generated + // SPURIOUS-summary=p;Stream;true;reduce;(Object,BinaryOperator);;Argument[1].ReturnValue;Argument[this].Element;value;tb-generated + public T reduce(T identity, BinaryOperator accumulator) { + return null; + } - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[this].Element;Argument[1].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[0];Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[0];Argument[2].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[0];Argument[2].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[0];ReturnValue;value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[1].ReturnValue;Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[1].ReturnValue;Argument[2].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[1].ReturnValue;Argument[2].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[1].ReturnValue;ReturnValue;value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[2].ReturnValue;Argument[1].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[2].ReturnValue;Argument[2].Parameter[0];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[2].ReturnValue;Argument[2].Parameter[1];value;tb-generated - // MaD=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[2].ReturnValue;ReturnValue;value;tb-generated - public U reduce(U identity, BiFunction accumulator, BinaryOperator combiner) { - return null; - } + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[this].Element;Argument[1].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[0];Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[0];Argument[2].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[0];Argument[2].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[0];ReturnValue;value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[1].ReturnValue;Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[1].ReturnValue;Argument[2].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[1].ReturnValue;Argument[2].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[1].ReturnValue;ReturnValue;value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[2].ReturnValue;Argument[1].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[2].ReturnValue;Argument[2].Parameter[0];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[2].ReturnValue;Argument[2].Parameter[1];value;tb-generated + // summary=p;Stream;true;reduce;(Object,BiFunction,BinaryOperator);;Argument[2].ReturnValue;ReturnValue;value;tb-generated + public U reduce( + U identity, BiFunction accumulator, BinaryOperator combiner) { + return null; + } - // MaD=p;Stream;true;skip;(long);;Argument[this].Element;ReturnValue.Element;value;tb-generated - public Stream skip(long n) { - return null; - } + // summary=p;Stream;true;skip;(long);;Argument[this].Element;ReturnValue.Element;value;tb-generated + public Stream skip(long n) { + return null; + } - // MaD=p;Stream;true;sorted;();;Argument[this].Element;ReturnValue.Element;value;tb-generated - public Stream sorted() { - return null; - } + // summary=p;Stream;true;sorted;();;Argument[this].Element;ReturnValue.Element;value;tb-generated + public Stream sorted() { + return null; + } - // MaD=p;Stream;true;sorted;(Comparator);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated - // MaD=p;Stream;true;sorted;(Comparator);;Argument[this].Element;Argument[0].Parameter[1];value;tb-generated - // MaD=p;Stream;true;sorted;(Comparator);;Argument[this].Element;ReturnValue.Element;value;tb-generated - public Stream sorted(Comparator comparator) { - return null; - } + // summary=p;Stream;true;sorted;(Comparator);;Argument[this].Element;Argument[0].Parameter[0];value;tb-generated + // summary=p;Stream;true;sorted;(Comparator);;Argument[this].Element;Argument[0].Parameter[1];value;tb-generated + // summary=p;Stream;true;sorted;(Comparator);;Argument[this].Element;ReturnValue.Element;value;tb-generated + public Stream sorted(Comparator comparator) { + return null; + } - // Models can never be generated correctly based on the type information - // as it involves downcasting. - public Object[] toArray() { - return null; - } + // Models can never be generated correctly based on the type information + // as it involves downcasting. + public Object[] toArray() { + return null; + } - // The generated result is only partially correct as there is no mentioning of - // the type T in the method definition. - // MaD=p;Stream;true;toArray;(IntFunction);;Argument[0].ReturnValue.ArrayElement;ReturnValue.ArrayElement;value;tb-generated - public A[] toArray(IntFunction generator) { - return null; - } -} \ No newline at end of file + // The generated result is only partially correct as there is no mentioning of + // the type T in the method definition. + // summary=p;Stream;true;toArray;(IntFunction);;Argument[0].ReturnValue.ArrayElement;ReturnValue.ArrayElement;value;tb-generated + public A[] toArray(IntFunction generator) { + return null; + } +} diff --git a/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedCollection.java b/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedCollection.java index b1c95dc415a..e66189e7ded 100644 --- a/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedCollection.java +++ b/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedCollection.java @@ -1,25 +1,23 @@ package p; -import java.util.List; import java.util.ArrayList; +import java.util.List; public class TypeBasedCollection extends ArrayList { - // MaD=p;TypeBasedCollection;true;addT;(Object);;Argument[0];Argument[this].Element;value;tb-generated - public void addT(T x) { - } + // summary=p;TypeBasedCollection;true;addT;(Object);;Argument[0];Argument[this].Element;value;tb-generated + public void addT(T x) {} - // MaD=p;TypeBasedCollection;true;addManyT;(List);;Argument[0].Element;Argument[this].Element;value;tb-generated - public void addManyT(List xs) { - } + // summary=p;TypeBasedCollection;true;addManyT;(List);;Argument[0].Element;Argument[this].Element;value;tb-generated + public void addManyT(List xs) {} - // MaD=p;TypeBasedCollection;true;firstT;();;Argument[this].Element;ReturnValue;value;tb-generated - public T firstT() { - return null; - } + // summary=p;TypeBasedCollection;true;firstT;();;Argument[this].Element;ReturnValue;value;tb-generated + public T firstT() { + return null; + } - // MaD=p;TypeBasedCollection;true;getManyT;();;Argument[this].Element;ReturnValue.Element;value;tb-generated - public List getManyT() { - return null; - } -} \ No newline at end of file + // summary=p;TypeBasedCollection;true;getManyT;();;Argument[this].Element;ReturnValue.Element;value;tb-generated + public List getManyT() { + return null; + } +} diff --git a/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedComplex.java b/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedComplex.java index ffca17457a0..a6e6c220475 100644 --- a/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedComplex.java +++ b/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedComplex.java @@ -5,87 +5,85 @@ import java.util.function.Function; public class TypeBasedComplex { - // MaD=p;TypeBasedComplex;true;addMany;(List);;Argument[0].Element;Argument[this].SyntheticField[ArgType0];value;tb-generated - public void addMany(List xs) { - } + // summary=p;TypeBasedComplex;true;addMany;(List);;Argument[0].Element;Argument[this].SyntheticField[ArgType0];value;tb-generated + public void addMany(List xs) {} - // MaD=p;TypeBasedComplex;true;getMany;();;Argument[this].SyntheticField[ArgType0];ReturnValue.Element;value;tb-generated - public List getMany() { - return null; - } + // summary=p;TypeBasedComplex;true;getMany;();;Argument[this].SyntheticField[ArgType0];ReturnValue.Element;value;tb-generated + public List getMany() { + return null; + } - // MaD=p;TypeBasedComplex;true;apply;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - public Integer apply(Function f) { - return null; - } + // summary=p;TypeBasedComplex;true;apply;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + public Integer apply(Function f) { + return null; + } - // A method that doesn't mention `T` in its type signature. - // This is for testing that we don't generate a summary that involves the - // implicit field for `T`. - // MaD=p;TypeBasedComplex;true;apply2;(Object,Function);;Argument[0];Argument[1].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;apply2;(Object,Function);;Argument[1].ReturnValue;ReturnValue;value;tb-generated - public T2 apply2(T1 x, Function f) { - return null; - } + // A method that doesn't mention `T` in its type signature. + // This is for testing that we don't generate a summary that involves the + // implicit field for `T`. + // summary=p;TypeBasedComplex;true;apply2;(Object,Function);;Argument[0];Argument[1].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;apply2;(Object,Function);;Argument[1].ReturnValue;ReturnValue;value;tb-generated + public T2 apply2(T1 x, Function f) { + return null; + } - // MaD=p;TypeBasedComplex;true;flatMap;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;flatMap;(Function);;Argument[this].SyntheticField[ArgType0];ReturnValue.SyntheticField[ArgType0];value;tb-generated - // MaD=p;TypeBasedComplex;true;flatMap;(Function);;Argument[0].ReturnValue.Element;Argument[this].SyntheticField[ArgType0];value;tb-generated - // MaD=p;TypeBasedComplex;true;flatMap;(Function);;Argument[0].ReturnValue.Element;Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;flatMap;(Function);;Argument[0].ReturnValue.Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated - public TypeBasedComplex flatMap(Function> f) { - return null; - } + // summary=p;TypeBasedComplex;true;flatMap;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;flatMap;(Function);;Argument[this].SyntheticField[ArgType0];ReturnValue.SyntheticField[ArgType0];value;tb-generated + // summary=p;TypeBasedComplex;true;flatMap;(Function);;Argument[0].ReturnValue.Element;Argument[this].SyntheticField[ArgType0];value;tb-generated + // summary=p;TypeBasedComplex;true;flatMap;(Function);;Argument[0].ReturnValue.Element;Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;flatMap;(Function);;Argument[0].ReturnValue.Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated + public TypeBasedComplex flatMap(Function> f) { + return null; + } - // MaD=p;TypeBasedComplex;true;flatMap2;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;flatMap2;(Function);;Argument[0].ReturnValue.Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated - public TypeBasedComplex flatMap2(Function> f) { - return null; - } + // summary=p;TypeBasedComplex;true;flatMap2;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;flatMap2;(Function);;Argument[0].ReturnValue.Element;ReturnValue.SyntheticField[ArgType0];value;tb-generated + public TypeBasedComplex flatMap2(Function> f) { + return null; + } - // MaD=p;TypeBasedComplex;true;map;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;map;(Function);;Argument[0].ReturnValue;ReturnValue;value;tb-generated - public S map(Function f) { - return null; - } + // summary=p;TypeBasedComplex;true;map;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;map;(Function);;Argument[0].ReturnValue;ReturnValue;value;tb-generated + public S map(Function f) { + return null; + } - // MaD=p;TypeBasedComplex;true;mapComplex;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;mapComplex;(Function);;Argument[0].ReturnValue;ReturnValue.SyntheticField[ArgType0];value;tb-generated - public TypeBasedComplex mapComplex(Function f) { - return null; - } + // summary=p;TypeBasedComplex;true;mapComplex;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;mapComplex;(Function);;Argument[0].ReturnValue;ReturnValue.SyntheticField[ArgType0];value;tb-generated + public TypeBasedComplex mapComplex(Function f) { + return null; + } - // MaD=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[this].SyntheticField[ArgType0];ReturnValue.SyntheticField[ArgType0];value;tb-generated - // MaD=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[0].ReturnValue.SyntheticField[ArgType0];Argument[this].SyntheticField[ArgType0];value;tb-generated - // MaD=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[0].ReturnValue.SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[0].ReturnValue.SyntheticField[ArgType0];ReturnValue.SyntheticField[ArgType0];value;tb-generated - public TypeBasedComplex returnComplex(Function> f) { - return null; - } + // summary=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[this].SyntheticField[ArgType0];ReturnValue.SyntheticField[ArgType0];value;tb-generated + // summary=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[0].ReturnValue.SyntheticField[ArgType0];Argument[this].SyntheticField[ArgType0];value;tb-generated + // summary=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[0].ReturnValue.SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;returnComplex;(Function);;Argument[0].ReturnValue.SyntheticField[ArgType0];ReturnValue.SyntheticField[ArgType0];value;tb-generated + public TypeBasedComplex returnComplex(Function> f) { + return null; + } - // MaD=p;TypeBasedComplex;true;set;(Integer,Function);;Argument[1].ReturnValue;Argument[this].SyntheticField[ArgType0];value;tb-generated - public void set(Integer x, Function f) { - } + // summary=p;TypeBasedComplex;true;set;(Integer,Function);;Argument[1].ReturnValue;Argument[this].SyntheticField[ArgType0];value;tb-generated + public void set(Integer x, Function f) {} - // MaD=p;TypeBasedComplex;true;applyMyFunction;(MyFunction,Integer);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;applyMyFunction;(MyFunction,Integer);;Argument[0].ReturnValue;Argument[this].SyntheticField[ArgType0];value;tb-generated - // MaD=p;TypeBasedComplex;true;applyMyFunction;(MyFunction,Integer);;Argument[0].ReturnValue;Argument[0].Parameter[0];value;tb-generated - public Integer applyMyFunction(MyFunction f, Integer x) { - return null; - } + // summary=p;TypeBasedComplex;true;applyMyFunction;(MyFunction,Integer);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;applyMyFunction;(MyFunction,Integer);;Argument[0].ReturnValue;Argument[this].SyntheticField[ArgType0];value;tb-generated + // summary=p;TypeBasedComplex;true;applyMyFunction;(MyFunction,Integer);;Argument[0].ReturnValue;Argument[0].Parameter[0];value;tb-generated + public Integer applyMyFunction(MyFunction f, Integer x) { + return null; + } - // MaD=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object);;Argument[0].ReturnValue;ReturnValue;value;tb-generated - // MaD=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object);;Argument[1];Argument[0].Parameter[1];value;tb-generated - public S2 applyMyFunctionGeneric(MyFunction f, S1 x) { - return null; - } + // summary=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object);;Argument[this].SyntheticField[ArgType0];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object);;Argument[0].ReturnValue;ReturnValue;value;tb-generated + // summary=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object);;Argument[1];Argument[0].Parameter[1];value;tb-generated + public S2 applyMyFunctionGeneric(MyFunction f, S1 x) { + return null; + } - // MaD=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object,Object);;Argument[0].ReturnValue;ReturnValue;value;tb-generated - // MaD=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object,Object);;Argument[1];Argument[0].Parameter[0];value;tb-generated - // MaD=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object,Object);;Argument[2];Argument[0].Parameter[1];value;tb-generated - public S3 applyMyFunctionGeneric(MyFunction f, S1 x, S2 y) { - return null; - } -} \ No newline at end of file + // summary=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object,Object);;Argument[0].ReturnValue;ReturnValue;value;tb-generated + // summary=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object,Object);;Argument[1];Argument[0].Parameter[0];value;tb-generated + // summary=p;TypeBasedComplex;true;applyMyFunctionGeneric;(MyFunction,Object,Object);;Argument[2];Argument[0].Parameter[1];value;tb-generated + public S3 applyMyFunctionGeneric(MyFunction f, S1 x, S2 y) { + return null; + } +} diff --git a/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedSimple.java b/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedSimple.java index 8715bc2feeb..17b710922eb 100644 --- a/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedSimple.java +++ b/java/ql/test/utils/modelgenerator/typebasedflow/p/TypeBasedSimple.java @@ -2,41 +2,37 @@ package p; public class TypeBasedSimple { - // MaD=p;TypeBasedSimple;true;TypeBasedSimple;(Object);;Argument[0];Argument[this].SyntheticField[ArgType0];value;tb-generated - public TypeBasedSimple(T t) { - } + // summary=p;TypeBasedSimple;true;TypeBasedSimple;(Object);;Argument[0];Argument[this].SyntheticField[ArgType0];value;tb-generated + public TypeBasedSimple(T t) {} - // MaD=p;TypeBasedSimple;true;get;();;Argument[this].SyntheticField[ArgType0];ReturnValue;value;tb-generated - public T get() { - return null; - } + // summary=p;TypeBasedSimple;true;get;();;Argument[this].SyntheticField[ArgType0];ReturnValue;value;tb-generated + public T get() { + return null; + } - // MaD=p;TypeBasedSimple;true;get;(Object);;Argument[this].SyntheticField[ArgType0];ReturnValue;value;tb-generated - public T get(Object o) { - return null; - } + // summary=p;TypeBasedSimple;true;get;(Object);;Argument[this].SyntheticField[ArgType0];ReturnValue;value;tb-generated + public T get(Object o) { + return null; + } - // MaD=p;TypeBasedSimple;true;id;(Object);;Argument[this].SyntheticField[ArgType0];ReturnValue;value;tb-generated - // MaD=p;TypeBasedSimple;true;id;(Object);;Argument[0];Argument[this].SyntheticField[ArgType0];value;tb-generated - // MaD=p;TypeBasedSimple;true;id;(Object);;Argument[0];ReturnValue;value;tb-generated - public T id(T x) { - return null; - } + // summary=p;TypeBasedSimple;true;id;(Object);;Argument[this].SyntheticField[ArgType0];ReturnValue;value;tb-generated + // summary=p;TypeBasedSimple;true;id;(Object);;Argument[0];Argument[this].SyntheticField[ArgType0];value;tb-generated + // summary=p;TypeBasedSimple;true;id;(Object);;Argument[0];ReturnValue;value;tb-generated + public T id(T x) { + return null; + } - // MaD=p;TypeBasedSimple;true;id2;(Object);;Argument[0];ReturnValue;value;tb-generated - public S id2(S x) { - return null; - } + // summary=p;TypeBasedSimple;true;id2;(Object);;Argument[0];ReturnValue;value;tb-generated + public S id2(S x) { + return null; + } - // MaD=p;TypeBasedSimple;true;set;(Object);;Argument[0];Argument[this].SyntheticField[ArgType0];value;tb-generated - public void set(T x) { - } + // summary=p;TypeBasedSimple;true;set;(Object);;Argument[0];Argument[this].SyntheticField[ArgType0];value;tb-generated + public void set(T x) {} - // MaD=p;TypeBasedSimple;true;set;(int,Object);;Argument[1];Argument[this].SyntheticField[ArgType0];value;tb-generated - public void set(int x, T y) { - } + // summary=p;TypeBasedSimple;true;set;(int,Object);;Argument[1];Argument[this].SyntheticField[ArgType0];value;tb-generated + public void set(int x, T y) {} - // No summary as S is unrelated to T - public void set2(S x) { - } -} \ No newline at end of file + // No summary as S is unrelated to T + public void set2(S x) {} +} diff --git a/javascript/ql/lib/CHANGELOG.md b/javascript/ql/lib/CHANGELOG.md index abe221bc6d2..7073c4201f5 100644 --- a/javascript/ql/lib/CHANGELOG.md +++ b/javascript/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.1 + +No user-facing changes. + ## 0.9.0 ### Breaking Changes diff --git a/javascript/ql/lib/change-notes/released/0.9.1.md b/javascript/ql/lib/change-notes/released/0.9.1.md new file mode 100644 index 00000000000..5ab7a1ee037 --- /dev/null +++ b/javascript/ql/lib/change-notes/released/0.9.1.md @@ -0,0 +1,3 @@ +## 0.9.1 + +No user-facing changes. diff --git a/javascript/ql/lib/codeql-pack.release.yml b/javascript/ql/lib/codeql-pack.release.yml index 8b9fc185202..6789dcd18b7 100644 --- a/javascript/ql/lib/codeql-pack.release.yml +++ b/javascript/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.9.0 +lastReleaseVersion: 0.9.1 diff --git a/javascript/ql/lib/qlpack.yml b/javascript/ql/lib/qlpack.yml index d0321a60db4..87ae2a54e09 100644 --- a/javascript/ql/lib/qlpack.yml +++ b/javascript/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-all -version: 0.9.1-dev +version: 0.9.2-dev groups: javascript dbscheme: semmlecode.javascript.dbscheme extractor: javascript diff --git a/javascript/ql/lib/semmle/javascript/frameworks/NodeJSLib.qll b/javascript/ql/lib/semmle/javascript/frameworks/NodeJSLib.qll index b3d93383ed7..98bb0f615b6 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/NodeJSLib.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/NodeJSLib.qll @@ -1003,7 +1003,7 @@ module NodeJSLib { exists(ClientRequestLoginCallback callback | this = callback.getACall().getArgument(0)) } - override string getCredentialsKind() { result = "Node.js http(s) client login username" } + override string getCredentialsKind() { result = "user name" } } /** @@ -1014,7 +1014,7 @@ module NodeJSLib { exists(ClientRequestLoginCallback callback | this = callback.getACall().getArgument(1)) } - override string getCredentialsKind() { result = "Node.js http(s) client login password" } + override string getCredentialsKind() { result = "password" } } /** diff --git a/javascript/ql/lib/upgrades/9ca3692b65fd8d751431861d1a25c57f3e61d15b/upgrade.properties b/javascript/ql/lib/upgrades/9ca3692b65fd8d751431861d1a25c57f3e61d15b/upgrade.properties index a0c4ba602a1..3e361d800fb 100644 --- a/javascript/ql/lib/upgrades/9ca3692b65fd8d751431861d1a25c57f3e61d15b/upgrade.properties +++ b/javascript/ql/lib/upgrades/9ca3692b65fd8d751431861d1a25c57f3e61d15b/upgrade.properties @@ -1,4 +1,4 @@ description: Removed unused column from the `folders` and `files` relations compatibility: full -files.rel: reorder files.rel (int id, string name, string simple, string ext, int fromSource) id name -folders.rel: reorder folders.rel (int id, string name, string simple) id name \ No newline at end of file +files.rel: reorder files.rel (@file id, string name, string simple, string ext, int fromSource) id name +folders.rel: reorder folders.rel (@folder id, string name, string simple) id name \ No newline at end of file diff --git a/javascript/ql/lib/upgrades/c73fbfca57f3d593b9ff50c6aa3a886d6888efec/upgrade.properties b/javascript/ql/lib/upgrades/c73fbfca57f3d593b9ff50c6aa3a886d6888efec/upgrade.properties index 3b782318fcb..bc2c60321f1 100644 --- a/javascript/ql/lib/upgrades/c73fbfca57f3d593b9ff50c6aa3a886d6888efec/upgrade.properties +++ b/javascript/ql/lib/upgrades/c73fbfca57f3d593b9ff50c6aa3a886d6888efec/upgrade.properties @@ -1,94 +1,94 @@ description: Rename multiple relation names. compatibility: backwards -is_externs.rel: reorder isExterns.rel(int toplevel) toplevel +is_externs.rel: reorder isExterns.rel(@toplevel toplevel) toplevel isExterns.rel: delete -is_module.rel: reorder isModule.rel(int toplevel) toplevel +is_module.rel: reorder isModule.rel(@toplevel toplevel) toplevel isModule.rel: delete -is_nodejs.rel: reorder isNodejs.rel(int toplevel) toplevel +is_nodejs.rel: reorder isNodejs.rel(@toplevel toplevel) toplevel isNodejs.rel: delete -is_es2015_module.rel: reorder isES2015Module.rel(int toplevel) toplevel +is_es2015_module.rel: reorder isES2015Module.rel(@toplevel toplevel) toplevel isES2015Module.rel: delete -is_closure_module.rel: reorder isClosureModule.rel(int toplevel) toplevel +is_closure_module.rel: reorder isClosureModule.rel(@toplevel toplevel) toplevel isClosureModule.rel: delete -stmt_containers.rel: reorder stmtContainers.rel(int stmt, int container) stmt container +stmt_containers.rel: reorder stmtContainers.rel(@stmt stmt, @stmt_container container) stmt container stmtContainers.rel: delete -jump_targets.rel: reorder jumpTargets.rel(int jump, int target) jump target +jump_targets.rel: reorder jumpTargets.rel(@stmt jump, @stmt target) jump target jumpTargets.rel: delete -is_instantiated.rel: reorder isInstantiated.rel(int decl) decl +is_instantiated.rel: reorder isInstantiated.rel(@namespacedeclaration decl) decl isInstantiated.rel: delete -has_declare_keyword.rel: reorder hasDeclareKeyword.rel(int stmt) stmt +has_declare_keyword.rel: reorder hasDeclareKeyword.rel(@declarablenode stmt) stmt hasDeclareKeyword.rel: delete -is_for_await_of.rel: reorder isForAwaitOf.rel(int forof) forof +is_for_await_of.rel: reorder isForAwaitOf.rel(@forofstmt forof) forof isForAwaitOf.rel: delete -enclosing_stmt.rel: reorder enclosingStmt.rel(int expr, int stmt) expr stmt +enclosing_stmt.rel: reorder enclosingStmt.rel(@exprortype expr, @stmt stmt) expr stmt enclosingStmt.rel: delete -expr_containers.rel: reorder exprContainers.rel(int expr, int container) expr container +expr_containers.rel: reorder exprContainers.rel(@exprortype expr, @stmt_container container) expr container exprContainers.rel: delete -array_size.rel: reorder arraySize.rel(int ae, int sz) ae sz +array_size.rel: reorder arraySize.rel(@arraylike ae, int sz) ae sz arraySize.rel: delete -is_delegating.rel: reorder isDelegating.rel(int yield) yield +is_delegating.rel: reorder isDelegating.rel(@yieldexpr yield) yield isDelegating.rel: delete -is_arguments_object.rel: reorder isArgumentsObject.rel(int id) id +is_arguments_object.rel: reorder isArgumentsObject.rel(@variable id) id isArgumentsObject.rel: delete -is_computed.rel: reorder isComputed.rel(int prop) prop +is_computed.rel: reorder isComputed.rel(@property prop) prop isComputed.rel: delete -is_method.rel: reorder isMethod.rel(int prop) prop +is_method.rel: reorder isMethod.rel(@property prop) prop isMethod.rel: delete -is_static.rel: reorder isStatic.rel(int prop) prop +is_static.rel: reorder isStatic.rel(@property prop) prop isStatic.rel: delete -is_abstract_member.rel: reorder isAbstractMember.rel(int prop) prop +is_abstract_member.rel: reorder isAbstractMember.rel(@property prop) prop isAbstractMember.rel: delete -is_const_enum.rel: reorder isConstEnum.rel(int id) id +is_const_enum.rel: reorder isConstEnum.rel(@enumdeclaration id) id isConstEnum.rel: delete -is_abstract_class.rel: reorder isAbstractClass.rel(int id) id +is_abstract_class.rel: reorder isAbstractClass.rel(@classdeclstmt id) id isAbstractClass.rel: delete -has_public_keyword.rel: reorder hasPublicKeyword.rel(int prop) prop +has_public_keyword.rel: reorder hasPublicKeyword.rel(@property prop) prop hasPublicKeyword.rel: delete -has_private_keyword.rel: reorder hasPrivateKeyword.rel(int prop) prop +has_private_keyword.rel: reorder hasPrivateKeyword.rel(@property prop) prop hasPrivateKeyword.rel: delete -has_protected_keyword.rel: reorder hasProtectedKeyword.rel(int prop) prop +has_protected_keyword.rel: reorder hasProtectedKeyword.rel(@property prop) prop hasProtectedKeyword.rel: delete -has_readonly_keyword.rel: reorder hasReadonlyKeyword.rel(int prop) prop +has_readonly_keyword.rel: reorder hasReadonlyKeyword.rel(@property prop) prop hasReadonlyKeyword.rel: delete -has_type_keyword.rel: reorder hasTypeKeyword.rel(int id) id +has_type_keyword.rel: reorder hasTypeKeyword.rel(@import_or_export_declaration id) id hasTypeKeyword.rel: delete -is_optional_member.rel: reorder isOptionalMember.rel(int id) id +is_optional_member.rel: reorder isOptionalMember.rel(@property id) id isOptionalMember.rel: delete -has_definite_assignment_assertion.rel: reorder hasDefiniteAssignmentAssertion.rel(int id) id +has_definite_assignment_assertion.rel: reorder hasDefiniteAssignmentAssertion.rel(@field_or_vardeclarator id) id hasDefiniteAssignmentAssertion.rel: delete -is_optional_parameter_declaration.rel: reorder isOptionalParameterDeclaration.rel(int parameter) parameter +is_optional_parameter_declaration.rel: reorder isOptionalParameterDeclaration.rel(@pattern parameter) parameter isOptionalParameterDeclaration.rel: delete -has_asserts_keyword.rel: reorder hasAssertsKeyword.rel(int node) node +has_asserts_keyword.rel: reorder hasAssertsKeyword.rel(@predicatetypeexpr node) node hasAssertsKeyword.rel: delete -js_parse_errors.rel: reorder jsParseErrors.rel(int id, int toplevel, string message, string line) id toplevel message line +js_parse_errors.rel: reorder jsParseErrors.rel(@js_parse_error id, @toplevel toplevel, string message, string line) id toplevel message line jsParseErrors.rel: delete -regexp_parse_errors.rel: reorder regexpParseErrors.rel(int id, int regexp, string message) id regexp message +regexp_parse_errors.rel: reorder regexpParseErrors.rel(@regexp_parse_error id, @regexpterm regexp, string message) id regexp message regexpParseErrors.rel: delete -is_greedy.rel: reorder isGreedy.rel(int id) id +is_greedy.rel: reorder isGreedy.rel(@regexp_quantifier id) id isGreedy.rel: delete -range_quantifier_lower_bound.rel: reorder rangeQuantifierLowerBound.rel(int id, int lo) id lo +range_quantifier_lower_bound.rel: reorder rangeQuantifierLowerBound.rel(@regexp_range id, int lo) id lo rangeQuantifierLowerBound.rel: delete -range_quantifier_upper_bound.rel: reorder rangeQuantifierUpperBound.rel(int id, int hi) id hi +range_quantifier_upper_bound.rel: reorder rangeQuantifierUpperBound.rel(@regexp_range id, int hi) id hi rangeQuantifierUpperBound.rel: delete -is_capture.rel: reorder isCapture.rel(int id, int number) id number +is_capture.rel: reorder isCapture.rel(@regexp_group id, int number) id number isCapture.rel: delete -is_named_capture.rel: reorder isNamedCapture.rel(int id, string name) id name +is_named_capture.rel: reorder isNamedCapture.rel(@regexp_group id, string name) id name isNamedCapture.rel: delete -is_inverted.rel: reorder isInverted.rel(int id) id +is_inverted.rel: reorder isInverted.rel(@regexp_char_class id) id isInverted.rel: delete -regexp_const_value.rel: reorder regexpConstValue.rel(int id, string value) id value +regexp_const_value.rel: reorder regexpConstValue.rel(@regexp_constant id, string value) id value regexpConstValue.rel: delete -char_class_escape.rel: reorder charClassEscape.rel(int id, string value) id value +char_class_escape.rel: reorder charClassEscape.rel(@regexp_char_class_escape id, string value) id value charClassEscape.rel: delete -named_backref.rel: reorder namedBackref.rel(int id, string name) id name +named_backref.rel: reorder namedBackref.rel(@regexp_backref id, string name) id name namedBackref.rel: delete -unicode_property_escapename.rel: reorder unicodePropertyEscapeName.rel(int id, string name) id name +unicode_property_escapename.rel: reorder unicodePropertyEscapeName.rel(@regexp_unicode_property_escape id, string name) id name unicodePropertyEscapeName.rel: delete -unicode_property_escapevalue.rel: reorder unicodePropertyEscapeValue.rel(int id, string value) id value +unicode_property_escapevalue.rel: reorder unicodePropertyEscapeValue.rel(@regexp_unicode_property_escape id, string value) id value unicodePropertyEscapeValue.rel: delete -is_generator.rel: reorder isGenerator.rel(int fun) fun +is_generator.rel: reorder isGenerator.rel(@function fun) fun isGenerator.rel: delete -has_rest_parameter.rel: reorder hasRestParameter.rel(int fun) fun +has_rest_parameter.rel: reorder hasRestParameter.rel(@function fun) fun hasRestParameter.rel: delete -is_async.rel: reorder isAsync.rel(int fun) fun +is_async.rel: reorder isAsync.rel(@function fun) fun isAsync.rel: delete diff --git a/javascript/ql/src/CHANGELOG.md b/javascript/ql/src/CHANGELOG.md index 7499f8b3669..1b72f496c78 100644 --- a/javascript/ql/src/CHANGELOG.md +++ b/javascript/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.16 + +No user-facing changes. + ## 0.8.15 ### Minor Analysis Improvements diff --git a/javascript/ql/src/Security/CWE-338/InsecureRandomness.qhelp b/javascript/ql/src/Security/CWE-338/InsecureRandomness.qhelp index 5835a8060c1..83786a014a0 100644 --- a/javascript/ql/src/Security/CWE-338/InsecureRandomness.qhelp +++ b/javascript/ql/src/Security/CWE-338/InsecureRandomness.qhelp @@ -36,7 +36,7 @@

    For JavaScript in the browser, - RandomSource.getRandomValues provides a cryptographically + crypto.getRandomValues provides a cryptographically secure pseudo-random number generator.

    @@ -69,7 +69,7 @@
  • Wikipedia: Pseudo-random number generator.
  • -
  • Mozilla Developer Network: RandomSource.getRandomValues.
  • +
  • Mozilla Developer Network: Crypto: getRandomValues().
  • NodeJS: crypto.randomBytes
  • diff --git a/javascript/ql/src/Security/CWE-338/examples/InsecureRandomness_fixed.js b/javascript/ql/src/Security/CWE-338/examples/InsecureRandomness_fixed.js index e3f96cf1680..54a3094932c 100644 --- a/javascript/ql/src/Security/CWE-338/examples/InsecureRandomness_fixed.js +++ b/javascript/ql/src/Security/CWE-338/examples/InsecureRandomness_fixed.js @@ -2,5 +2,7 @@ function securePassword() { // GOOD: the random suffix is cryptographically secure var suffix = window.crypto.getRandomValues(new Uint32Array(1))[0]; var password = "myPassword" + suffix; - return password; + + // GOOD: if a random value between 0 and 1 is desired + var secret = window.crypto.getRandomValues(new Uint32Array(1))[0] * Math.pow(2,-32); } diff --git a/javascript/ql/src/Security/CWE-798/HardcodedCredentials.qhelp b/javascript/ql/src/Security/CWE-798/HardcodedCredentials.qhelp index adcd6fc4715..b2d00e38c28 100644 --- a/javascript/ql/src/Security/CWE-798/HardcodedCredentials.qhelp +++ b/javascript/ql/src/Security/CWE-798/HardcodedCredentials.qhelp @@ -19,6 +19,10 @@ If possible, store configuration files including credential data separately from the source code, in a secure location with restricted access.

    +

    + If the credentials are a placeholder value, make sure the value is obviously a placeholder by + using a name such as "SampleToken" or "MyPassword". +

    diff --git a/javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql b/javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql index 3cc63e51dcf..1c13ad78bfa 100644 --- a/javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql +++ b/javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql @@ -30,7 +30,7 @@ where // exclude dummy passwords and templates not ( sink.getNode().(Sink).(DefaultCredentialsSink).getKind() = - ["password", "credentials", "token"] and + ["password", "credentials", "token", "key"] and PasswordHeuristics::isDummyPassword(val) or sink.getNode().(Sink).getKind() = "authorization header" and diff --git a/javascript/ql/src/change-notes/released/0.8.16.md b/javascript/ql/src/change-notes/released/0.8.16.md new file mode 100644 index 00000000000..f11c58a3b38 --- /dev/null +++ b/javascript/ql/src/change-notes/released/0.8.16.md @@ -0,0 +1,3 @@ +## 0.8.16 + +No user-facing changes. diff --git a/javascript/ql/src/codeql-pack.release.yml b/javascript/ql/src/codeql-pack.release.yml index 2e3c183bb7a..c735422e23a 100644 --- a/javascript/ql/src/codeql-pack.release.yml +++ b/javascript/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.8.15 +lastReleaseVersion: 0.8.16 diff --git a/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.qhelp b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.qhelp new file mode 100644 index 00000000000..3c02fba397f --- /dev/null +++ b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.qhelp @@ -0,0 +1,43 @@ + + + +

    Extracting Compressed files with any compression algorithm like gzip can cause to denial of service attacks.

    +

    Attackers can compress a huge file which created by repeated similiar byte and convert it to a small compressed file.

    + +
    + + +

    When you want to decompress a user-provided compressed file you must be careful about the decompression ratio or read these files within a loop byte by byte to be able to manage the decompressed size in each cycle of the loop.

    + +
    + + +

    +JsZip: check uncompressedSize Object Field before extraction. +

    + + +

    +nodejs Zlib: use maxOutputLength option which it'll limit the buffer read size +

    + + +

    +node-tar: use maxReadSize option which it'll limit the buffer read size +

    + + +
    + + +
  • +CVE-2017-16129 +
  • +
  • +A great research to gain more impact by this kind of attacks +
  • + +
    +
    diff --git a/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.ql b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.ql new file mode 100644 index 00000000000..0e734f4c0c6 --- /dev/null +++ b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.ql @@ -0,0 +1,35 @@ +/** + * @name User-controlled file decompression + * @description User-controlled data that flows into decompression library APIs without checking the compression rate is dangerous + * @kind path-problem + * @problem.severity error + * @security-severity 7.8 + * @precision high + * @id js/user-controlled-data-decompression + * @tags security + * experimental + * external/cwe/cwe-522 + */ + +import javascript +import DataFlow::PathGraph +import DecompressionBombs + +class BombConfiguration extends TaintTracking::Configuration { + BombConfiguration() { this = "DecompressionBombs" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof DecompressionBomb::Sink } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(DecompressionBomb::AdditionalTaintStep addstep | + addstep.isAdditionalTaintStep(pred, succ) + ) + } +} + +from BombConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink +where cfg.hasFlowPath(source, sink) +select sink.getNode(), source, sink, "This Decompression depends on a $@.", source.getNode(), + "potentially untrusted source" diff --git a/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.qll b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.qll new file mode 100644 index 00000000000..8a20fea499b --- /dev/null +++ b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.qll @@ -0,0 +1,432 @@ +import javascript +import experimental.semmle.javascript.FormParsers +import experimental.semmle.javascript.ReadableStream +import DataFlow::PathGraph + +module DecompressionBomb { + /** + * The Sinks of uncontrolled data decompression + */ + class Sink extends DataFlow::Node { + Sink() { this = any(Range r).sink() } + } + + /** + * The additional taint steps that need for creating taint tracking or dataflow. + */ + abstract class AdditionalTaintStep extends string { + AdditionalTaintStep() { this = "AdditionalTaintStep" } + + /** + * Holds if there is a additional taint step between pred and succ. + */ + abstract predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ); + } + + /** + * A abstract class responsible for extending new decompression sinks + */ + abstract class Range extends API::Node { + /** + * Gets the sink of responsible for decompression node + * + * it can be a path, stream of compressed data, + * or a call to function that use pipe + */ + abstract DataFlow::Node sink(); + } +} + +/** + * Provides additional taint steps for Readable Stream object + */ +module ReadableStream { + class ReadableStreamAdditionalTaintStep extends DecompressionBomb::AdditionalTaintStep { + ReadableStreamAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + ( + readablePipeAdditionalTaintStep(pred, succ) + or + streamPipelineAdditionalTaintStep(pred, succ) + or + promisesFileHandlePipeAdditionalTaintStep(pred, succ) + ) + } + } +} + +/** + * Provides additional taint steps for File system access functions + */ +module FileSystemAccessAdditionalTaintStep { + class ReadableStreamAdditionalTaintStep extends DecompressionBomb::AdditionalTaintStep { + ReadableStreamAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + // additional taint step for fs.readFile(pred) + // It can be global additional step too + exists(DataFlow::CallNode n | n = DataFlow::moduleMember("fs", "readFile").getACall() | + pred = n.getArgument(0) and succ = n.getABoundCallbackParameter(1, 1) + ) + or + exists(FileSystemReadAccess cn | + pred = cn.getAPathArgument() and + succ = cn.getADataNode() + ) + } + } +} + +/** + * Provides Models for [jszip](https://www.npmjs.com/package/jszip) package + */ +module JsZip { + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + DecompressionBomb() { this = API::moduleImport("jszip").getMember("loadAsync") } + + override DataFlow::Node sink() { + result = this.getParameter(0).asSink() and not this.sanitizer(this) + } + + /** + * Gets a jszip `loadAsync` instance + * and Holds if member of name `uncompressedSize` exists + */ + predicate sanitizer(API::Node loadAsync) { + exists(loadAsync.getASuccessor*().getMember("_data").getMember("uncompressedSize")) + } + } +} + +/** + * Provides Models for [node-tar](https://www.npmjs.com/package/tar) package + */ +module NodeTar { + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + DecompressionBomb() { this = API::moduleImport("tar").getMember(["x", "extract"]) } + + override DataFlow::Node sink() { + ( + // piping tar.x() + result = this.getACall() + or + // tar.x({file: filename}) + result = this.getParameter(0).getMember("file").asSink() + ) and + // and there shouldn't be a "maxReadSize: ANum" option + not this.sanitizer(this.getParameter(0)) + } + + /** + * Gets a options parameter that belong to a `tar` instance + * and Holds if "maxReadSize: ANumber" option exists + */ + predicate sanitizer(API::Node tarExtract) { exists(tarExtract.getMember("maxReadSize")) } + } + + /** + * The decompression Additional Taint Steps + */ + class DecompressionAdditionalSteps extends DecompressionBomb::AdditionalTaintStep { + DecompressionAdditionalSteps() { this = "AdditionalTaintStep" } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node n | n = API::moduleImport("tar") | + pred = n.asSource() and + ( + succ = n.getMember("x").getACall() or + succ = n.getMember("x").getACall().getArgument(0) + ) + ) + } + } +} + +/** + * Provides Models for `node:zlib` package + */ +module Zlib { + /** + * The decompression sinks of `node:zlib` + */ + class DecompressionBomb extends DecompressionBomb::Range { + boolean isSynk; + + DecompressionBomb() { + this = + API::moduleImport("zlib") + .getMember([ + "gunzip", "gunzipSync", "unzip", "unzipSync", "brotliDecompress", + "brotliDecompressSync", "inflateSync", "inflateRawSync", "inflate", "inflateRaw" + ]) and + isSynk = true + or + this = + API::moduleImport("zlib") + .getMember([ + "createGunzip", "createBrotliDecompress", "createUnzip", "createInflate", + "createInflateRaw" + ]) and + isSynk = false + } + + override DataFlow::Node sink() { + result = this.getACall() and + not this.sanitizer(this.getParameter(0)) and + isSynk = false + or + result = this.getACall().getArgument(0) and + not this.sanitizer(this.getParameter(1)) and + isSynk = true + } + + /** + * Gets a options parameter that belong to a zlib instance + * and Holds if "maxOutputLength: ANumber" option exists + */ + predicate sanitizer(API::Node zlib) { exists(zlib.getMember("maxOutputLength")) } + } +} + +/** + * Provides Models for [pako](https://www.npmjs.com/package/pako) package + */ +module Pako { + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + DecompressionBomb() { + this = API::moduleImport("pako").getMember(["inflate", "inflateRaw", "ungzip"]) + } + + override DataFlow::Node sink() { result = this.getParameter(0).asSink() } + } + + /** + * The decompression Additional Taint Steps + */ + class DecompressionAdditionalSteps extends DecompressionBomb::AdditionalTaintStep { + DecompressionAdditionalSteps() { this = "AdditionalTaintStep" } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + // succ = new Uint8Array(pred) + exists(DataFlow::Node n, NewExpr ne | ne = n.asExpr() | + pred.asExpr() = ne.getArgument(0) and + succ.asExpr() = ne and + ne.getCalleeName() = "Uint8Array" + ) + } + } +} + +/** + * Provides Models for [adm-zip](https://www.npmjs.com/package/adm-zip) package + */ +module AdmZip { + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + DecompressionBomb() { this = API::moduleImport("adm-zip").getInstance() } + + override DataFlow::Node sink() { + result = + this.getMember(["extractAllTo", "extractEntryTo", "readAsText"]).getReturn().asSource() + or + result = this.getASuccessor*().getMember("getData").getReturn().asSource() + } + } + + /** + * The decompression Additional Taint Steps + */ + class DecompressionAdditionalSteps extends DecompressionBomb::AdditionalTaintStep { + DecompressionAdditionalSteps() { this = "AdditionalTaintStep" } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node n | n = API::moduleImport("adm-zip") | + pred = n.getParameter(0).asSink() and + ( + succ = + n.getInstance() + .getMember(["extractAllTo", "extractEntryTo", "readAsText"]) + .getReturn() + .asSource() + or + succ = + n.getInstance() + .getMember("getEntries") + .getASuccessor*() + .getMember("getData") + .getReturn() + .asSource() + ) + ) + } + } +} + +/** + * Provides Models for [decompress](https://www.npmjs.com/package/decompress) package + */ +module Decompress { + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + DecompressionBomb() { this = API::moduleImport("decompress") } + + override DataFlow::Node sink() { result = this.getACall().getArgument(0) } + } +} + +/** + * Provides Models for [gunzip-maybe][https://www.npmjs.com/package/gunzip-maybe] package + */ +module GunzipMaybe { + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + DecompressionBomb() { this = API::moduleImport("gunzip-maybe") } + + override DataFlow::Node sink() { result = this.getACall() } + } +} + +/** + * Provides Models for [unbzip2-stream](https://www.npmjs.com/package/unbzip2-stream) package + */ +module Unbzip2Stream { + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + DecompressionBomb() { this = API::moduleImport("unbzip2-stream") } + + override DataFlow::Node sink() { result = this.getACall() } + } +} + +/** + * Provides Models for [unzipper](https://www.npmjs.com/package/unzipper) package + */ +module Unzipper { + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + string funcName; + + DecompressionBomb() { + this = API::moduleImport("unzipper").getMember(["Extract", "Parse", "ParseOne"]) and + funcName = ["Extract", "Parse", "ParseOne"] + or + this = API::moduleImport("unzipper").getMember("Open") and + // open has some functions which will be specified in sink predicate + funcName = "Open" + } + + override DataFlow::Node sink() { + result = this.getMember(["buffer", "file", "url", "file"]).getACall().getArgument(0) and + funcName = "Open" + or + result = this.getACall() and + funcName = ["Extract", "Parse", "ParseOne"] + } + + /** + * Gets a + * and Holds if unzipper instance has a member `uncompressedSize` + * + * it is really difficult to implement this sanitizer, + * so i'm going to check if there is a member like `vars.uncompressedSize` in whole DB or not! + */ + predicate sanitizer() { + exists(this.getASuccessor*().getMember("vars").getMember("uncompressedSize")) and + funcName = ["Extract", "Parse", "ParseOne"] + } + } +} + +/** + * Provides Models for [yauzl](https://www.npmjs.com/package/yauzl) package + */ +module Yauzl { + API::Node test() { result = API::moduleImport("yauzl").getASuccessor*() } + + /** + * The decompression bomb sinks + */ + class DecompressionBomb extends DecompressionBomb::Range { + // open function has a sanitizer + string methodName; + + DecompressionBomb() { + this = + API::moduleImport("yauzl").getMember(["fromFd", "fromBuffer", "fromRandomAccessReader"]) and + methodName = "from" + or + this = API::moduleImport("yauzl").getMember("open") and + methodName = "open" + } + + override DataFlow::Node sink() { + ( + result = this.getParameter(2).getParameter(1).getMember("readEntry").getACall() or + result = + this.getParameter(2) + .getParameter(1) + .getMember("openReadStream") + .getParameter(1) + .getParameter(1) + .asSource() + ) and + not this.sanitizer() and + methodName = "open" + or + result = this.getParameter(0).asSink() and + methodName = "from" + } + + /** + * Gets a + * and Holds if yauzl `open` instance has a member `uncompressedSize` + */ + predicate sanitizer() { + exists(this.getASuccessor*().getMember("uncompressedSize")) and + methodName = ["readStream", "open"] + } + } + + /** + * The decompression Additional Taint Steps + */ + class DecompressionAdditionalSteps extends DecompressionBomb::AdditionalTaintStep { + DecompressionAdditionalSteps() { this = "AdditionalTaintStep" } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node open | open = API::moduleImport("yauzl").getMember("open") | + pred = open.getParameter(0).asSink() and + ( + succ = open.getParameter(2).getParameter(1).getMember("readEntry").getACall() or + succ = + open.getParameter(2) + .getParameter(1) + .getMember("openReadStream") + .getParameter(1) + .getParameter(1) + .asSource() + ) + ) + } + } +} diff --git a/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/jszip_good.js b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/jszip_good.js new file mode 100644 index 00000000000..49697865ff5 --- /dev/null +++ b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/jszip_good.js @@ -0,0 +1,11 @@ +const jszipp = require("jszip"); +function zipBombSafe(zipFile) { + jszipp.loadAsync(zipFile.data).then(function (zip) { + if (zip.file("10GB")["_data"]["uncompressedSize"] > 1024 * 1024 * 8) { + console.log("error") + } + zip.file("10GB").async("uint8array").then(function (u8) { + console.log(u8); + }); + }); +} \ No newline at end of file diff --git a/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/node-tar_good.js b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/node-tar_good.js new file mode 100644 index 00000000000..9f3a4c36705 --- /dev/null +++ b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/node-tar_good.js @@ -0,0 +1,8 @@ +const tar = require("tar"); + +tar.x({ + file: tarFileName, + strip: 1, + C: 'some-dir', + maxReadSize: 16 * 1024 * 1024 // 16 MB +}) \ No newline at end of file diff --git a/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/zlib_good.js b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/zlib_good.js new file mode 100644 index 00000000000..c8bcae173ff --- /dev/null +++ b/javascript/ql/src/experimental/Security/CWE-522-DecompressionBombs/zlib_good.js @@ -0,0 +1,11 @@ +const zlib = require("zlib"); + +zlib.gunzip( + inputZipFile.data, + { maxOutputLength: 1024 * 1024 * 5 }, + (err, buffer) => { + doSomeThingWithData(buffer); + }); +zlib.gunzipSync(inputZipFile.data, { maxOutputLength: 1024 * 1024 * 5 }); + +inputZipFile.pipe(zlib.createGunzip({ maxOutputLength: 1024 * 1024 * 5 })).pipe(outputFile); \ No newline at end of file diff --git a/javascript/ql/src/experimental/semmle/javascript/FormParsers.qll b/javascript/ql/src/experimental/semmle/javascript/FormParsers.qll new file mode 100644 index 00000000000..e6b32ec8c45 --- /dev/null +++ b/javascript/ql/src/experimental/semmle/javascript/FormParsers.qll @@ -0,0 +1,179 @@ +/** + * Provides classes for modeling the server-side form/file parsing libraries. + */ + +import javascript +import experimental.semmle.javascript.ReadableStream + +/** + * A module for modeling [busboy](https://www.npmjs.com/package/busboy) package + */ +module BusBoy { + /** + * A source of remote flow from the `Busboy` library. + */ + private class BusBoyRemoteFlow extends RemoteFlowSource { + BusBoyRemoteFlow() { + exists(API::Node busboyOnEvent | + busboyOnEvent = API::moduleImport("busboy").getReturn().getMember("on") + | + // Files + busboyOnEvent.getParameter(0).asSink().mayHaveStringValue("file") and + // second param of 'file' event is a Readable stream + this = readableStreamDataNode(busboyOnEvent.getParameter(1).getParameter(1)) + or + // Fields + busboyOnEvent.getParameter(0).asSink().mayHaveStringValue(["file", "field"]) and + this = + API::moduleImport("busboy") + .getReturn() + .getMember("on") + .getParameter(1) + .getAParameter() + .asSource() + ) + } + + override string getSourceType() { result = "parsed user value from Busbuy" } + } + + /** + * A busboy file data step according to a Readable Stream type + */ + private class AdditionalTaintStep extends TaintTracking::SharedTaintStep { + override predicate step(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node busboyOnEvent | + busboyOnEvent = API::moduleImport("busboy").getReturn().getMember("on") + | + busboyOnEvent.getParameter(0).asSink().mayHaveStringValue("file") and + customStreamPipeAdditionalTaintStep(busboyOnEvent.getParameter(1).getParameter(1), pred, + succ) + ) + } + } +} + +/** + * A module for modeling [formidable](https://www.npmjs.com/package/formidable) package + */ +module Formidable { + /** + * A source of remote flow from the `Formidable` library parsing a HTTP request. + */ + private class FormidableRemoteFlow extends RemoteFlowSource { + FormidableRemoteFlow() { + exists(API::Node formidable | + formidable = API::moduleImport("formidable").getReturn() + or + formidable = API::moduleImport("formidable").getMember("formidable").getReturn() + or + formidable = + API::moduleImport("formidable").getMember(["IncomingForm", "Formidable"]).getInstance() + | + this = + formidable.getMember("parse").getACall().getABoundCallbackParameter(1, any(int i | i > 0)) + or + // if callback is not provide a promise will be returned, + // return values contains [fields,files] members + exists(API::Node parseMethod | + parseMethod = formidable.getMember("parse") and parseMethod.getNumParameter() = 1 + | + this = parseMethod.getReturn().asSource() + ) + or + // event handler + this = formidable.getMember("on").getParameter(1).getAParameter().asSource() + ) + } + + override string getSourceType() { result = "parsed user value from Formidable" } + } +} + +/** + * A module for modeling [multiparty](https://www.npmjs.com/package/multiparty) package + */ +module Multiparty { + /** + * A source of remote flow from the `Multiparty` library. + */ + private class MultipartyRemoteFlow extends RemoteFlowSource { + MultipartyRemoteFlow() { + exists(API::Node form | + form = API::moduleImport("multiparty").getMember("Form").getInstance() + | + exists(API::CallNode parse | parse = form.getMember("parse").getACall() | + this = parse.getParameter(1).getParameter([1, 2]).asSource() + ) + or + exists(API::Node on | on = form.getMember("on") | + ( + on.getParameter(0).asSink().mayHaveStringValue(["file", "field"]) and + this = on.getParameter(1).getParameter([0, 1]).asSource() + or + on.getParameter(0).asSink().mayHaveStringValue("part") and + this = readableStreamDataNode(on.getParameter(1).getParameter(0)) + ) + ) + ) + } + + override string getSourceType() { result = "parsed user value from Multiparty" } + } + + /** + * A multiparty part data step according to a Readable Stream type + */ + private class AdditionalTaintStep extends TaintTracking::SharedTaintStep { + override predicate step(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node multipartyOnEvent | + multipartyOnEvent = + API::moduleImport("multiparty").getMember("Form").getInstance().getMember("on") + | + multipartyOnEvent.getParameter(0).asSink().mayHaveStringValue("part") and + customStreamPipeAdditionalTaintStep(multipartyOnEvent.getParameter(1).getParameter(0), pred, + succ) + ) + } + } +} + +/** + * A module for modeling [dicer](https://www.npmjs.com/package/dicer) package + */ +module Dicer { + /** + * A source of remote flow from the `dicer` library. + */ + private class DicerRemoteFlow extends RemoteFlowSource { + DicerRemoteFlow() { + exists(API::Node dicer | dicer = API::moduleImport("dicer").getInstance() | + exists(API::Node on | on = dicer.getMember("on") | + on.getParameter(0).asSink().mayHaveStringValue("part") and + this = readableStreamDataNode(on.getParameter(1).getParameter(0)) + or + exists(API::Node onPart | onPart = on.getParameter(1).getParameter(0).getMember("on") | + onPart.getParameter(0).asSink().mayHaveStringValue("header") and + this = onPart.getParameter(1).getParameter(0).asSource() + ) + ) + ) + } + + override string getSourceType() { result = "parsed user value from Dicer" } + } + + /** + * A dicer part data step according to a Readable Stream type + */ + private class AdditionalTaintStep extends TaintTracking::SharedTaintStep { + override predicate step(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node onEvent | + onEvent = API::moduleImport("dicer").getInstance().getMember("on") + | + onEvent.getParameter(0).asSink().mayHaveStringValue("part") and + customStreamPipeAdditionalTaintStep(onEvent.getParameter(1).getParameter(0), pred, succ) + ) + } + } +} diff --git a/javascript/ql/src/experimental/semmle/javascript/ReadableStream.qll b/javascript/ql/src/experimental/semmle/javascript/ReadableStream.qll new file mode 100644 index 00000000000..fa432ba55e3 --- /dev/null +++ b/javascript/ql/src/experimental/semmle/javascript/ReadableStream.qll @@ -0,0 +1,147 @@ +/** + * Provides helper predicates to work with any Readable Stream in dataflow queries + * + * main predicate in which you can use by passing a Readable Stream is `customStreamPipeAdditionalTaintStep` + */ + +import javascript + +/** + * Holds if there is a step between `fs.createReadStream` and `stream.Readable.from` first parameters to all other piped parameters + * + * It can be global additional step too + */ +predicate readablePipeAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node receiver | + receiver = + [ + API::moduleImport("fs").getMember("createReadStream"), + API::moduleImport("stream").getMember("Readable").getMember("from") + ] + | + customStreamPipeAdditionalTaintStep(receiver, pred, succ) + or + pred = receiver.getParameter(0).asSink() and + succ = receiver.getReturn().asSource() + ) +} + +/** + * additional taint steps for piped stream from `createReadStream` method of `fs/promises.open` + * + * It can be global additional step too + */ +predicate promisesFileHandlePipeAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node receiver | receiver = nodeJsPromisesFileSystem().getMember("open") | + customStreamPipeAdditionalTaintStep(receiver, pred, succ) + or + pred = receiver.getParameter(0).asSink() and + succ = receiver.getReturn().asSource() + ) +} + +/** + * Gets nodejs `fs` Promises API + */ +API::Node nodeJsPromisesFileSystem() { + result = [API::moduleImport("fs").getMember("promises"), API::moduleImport("fs/promises")] +} + +/** + * Holds if + * or `receiver.pipe(pred).pipe(sth).pipe(succ)` + * + * or `receiver.pipe(sth).pipe(pred).pipe(succ)` + * + * or `receiver.pipe(succ)` and receiver is pred + * + * Receiver is a Readable Stream object + */ +predicate customStreamPipeAdditionalTaintStep( + API::Node receiver, DataFlow::Node pred, DataFlow::Node succ +) { + // following connect the first pipe parameter to the last pipe parameter + exists(API::Node firstPipe | firstPipe = receiver.getMember("pipe") | + pred = firstPipe.getParameter(0).asSink() and + succ = firstPipe.getASuccessor*().getMember("pipe").getParameter(0).asSink() + ) + or + // following connect a pipe parameter to the next pipe parameter + exists(API::Node cn | cn = receiver.getASuccessor+() | + pred = cn.getParameter(0).asSink() and + succ = cn.getReturn().getMember("pipe").getParameter(0).asSink() + ) + or + // it is a function that its return value is a Readable stream object + pred = receiver.getReturn().asSource() and + succ = receiver.getReturn().getMember("pipe").getParameter(0).asSink() + or + // it is a Readable stream object + pred = receiver.asSource() and + succ = receiver.getMember("pipe").getParameter(0).asSink() +} + +/** + * Holds if + * + * ```js + * await pipeline( + * pred, + * succ_or_pred, + * succ + * ) + * ``` + * + * It can be global additional step too + */ +predicate streamPipelineAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + // this step connect the a pipeline parameter to the next pipeline parameter + exists(API::CallNode cn, int i | + // we assume that there are maximum 10 pipes mostly or maybe less + i in [0 .. 10] and + cn = nodeJsStream().getMember("pipeline").getACall() + | + pred = cn.getParameter(i).asSink() and + succ = cn.getParameter(i + 1).asSink() + ) + or + // this step connect the first pipeline parameter to the next parameters + exists(API::CallNode cn, int i | + // we assume that there are maximum 10 pipes mostly or maybe less + i in [1 .. 10] and + cn = nodeJsStream().getMember("pipeline").getACall() + | + pred = cn.getParameter(0).asSink() and + succ = cn.getParameter(i).asSink() + ) +} + +/** + * Gets `stream` Promises API + */ +API::Node nodeJsStream() { + result = [API::moduleImport("stream/promises"), API::moduleImport("stream").getMember("promises")] +} + +/** + * Gets a Readable stream object, + * and returns all nodes responsible for a data read of this Readable stream + */ +DataFlow::Node readableStreamDataNode(API::Node stream) { + result = stream.asSource() + or + // 'data' event + exists(API::CallNode onEvent | onEvent = stream.getMember("on").getACall() | + result = onEvent.getParameter(1).getParameter(0).asSource() and + onEvent.getParameter(0).asSink().mayHaveStringValue("data") + ) + or + // 'Readable' event + exists(API::CallNode onEvent | onEvent = stream.getMember("on").getACall() | + ( + result = onEvent.getParameter(1).getReceiver().getMember("read").getReturn().asSource() or + result = stream.getMember("read").getReturn().asSource() + ) and + onEvent.getParameter(0).asSink().mayHaveStringValue("readable") + ) +} diff --git a/javascript/ql/src/qlpack.yml b/javascript/ql/src/qlpack.yml index 97c6c232c9e..b70237f13cb 100644 --- a/javascript/ql/src/qlpack.yml +++ b/javascript/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-queries -version: 0.8.16-dev +version: 0.8.17-dev groups: - javascript - queries diff --git a/javascript/ql/test/experimental/FormParsers/RemoteFlowSource.expected b/javascript/ql/test/experimental/FormParsers/RemoteFlowSource.expected new file mode 100644 index 00000000000..bbd62023e24 --- /dev/null +++ b/javascript/ql/test/experimental/FormParsers/RemoteFlowSource.expected @@ -0,0 +1,234 @@ +nodes +| busybus.js:9:30:9:33 | file | +| busybus.js:9:30:9:33 | file | +| busybus.js:9:36:9:39 | info | +| busybus.js:9:36:9:39 | info | +| busybus.js:10:19:10:50 | { filen ... eType } | +| busybus.js:10:19:10:57 | encoding | +| busybus.js:10:19:10:57 | filename | +| busybus.js:10:19:10:57 | mimeType | +| busybus.js:10:21:10:28 | filename | +| busybus.js:10:31:10:38 | encoding | +| busybus.js:10:41:10:48 | mimeType | +| busybus.js:10:54:10:57 | info | +| busybus.js:12:18:12:25 | filename | +| busybus.js:12:18:12:25 | filename | +| busybus.js:12:28:12:35 | encoding | +| busybus.js:12:28:12:35 | encoding | +| busybus.js:12:38:12:45 | mimeType | +| busybus.js:12:38:12:45 | mimeType | +| busybus.js:13:23:13:23 | z | +| busybus.js:13:31:13:36 | sink() | +| busybus.js:13:31:13:36 | sink() | +| busybus.js:15:30:15:33 | data | +| busybus.js:15:30:15:33 | data | +| busybus.js:16:22:16:25 | data | +| busybus.js:16:22:16:25 | data | +| busybus.js:22:25:22:42 | data | +| busybus.js:22:32:22:42 | this.read() | +| busybus.js:22:32:22:42 | this.read() | +| busybus.js:23:26:23:29 | data | +| busybus.js:23:26:23:29 | data | +| busybus.js:27:25:27:28 | name | +| busybus.js:27:25:27:28 | name | +| busybus.js:27:31:27:33 | val | +| busybus.js:27:31:27:33 | val | +| busybus.js:27:36:27:39 | info | +| busybus.js:27:36:27:39 | info | +| busybus.js:28:18:28:21 | name | +| busybus.js:28:18:28:21 | name | +| busybus.js:28:24:28:26 | val | +| busybus.js:28:24:28:26 | val | +| busybus.js:28:29:28:32 | info | +| busybus.js:28:29:28:32 | info | +| dicer.js:12:23:12:26 | part | +| dicer.js:12:23:12:26 | part | +| dicer.js:13:19:13:24 | sink() | +| dicer.js:13:19:13:24 | sink() | +| dicer.js:14:28:14:33 | header | +| dicer.js:14:28:14:33 | header | +| dicer.js:16:22:16:27 | header | +| dicer.js:16:22:16:30 | header[h] | +| dicer.js:16:22:16:30 | header[h] | +| dicer.js:19:26:19:29 | data | +| dicer.js:19:26:19:29 | data | +| dicer.js:20:18:20:21 | data | +| dicer.js:20:18:20:21 | data | +| formidable.js:7:11:7:25 | [fields, files] | +| formidable.js:7:11:7:49 | fields | +| formidable.js:7:11:7:49 | files | +| formidable.js:7:12:7:17 | fields | +| formidable.js:7:20:7:24 | files | +| formidable.js:7:29:7:49 | await f ... se(req) | +| formidable.js:7:35:7:49 | form.parse(req) | +| formidable.js:7:35:7:49 | form.parse(req) | +| formidable.js:8:10:8:15 | fields | +| formidable.js:8:10:8:15 | fields | +| formidable.js:8:18:8:22 | files | +| formidable.js:8:18:8:22 | files | +| formidable.js:9:27:9:34 | formname | +| formidable.js:9:27:9:34 | formname | +| formidable.js:9:37:9:40 | file | +| formidable.js:9:37:9:40 | file | +| formidable.js:10:14:10:21 | formname | +| formidable.js:10:14:10:21 | formname | +| formidable.js:10:24:10:27 | file | +| formidable.js:10:24:10:27 | file | +| formidable.js:12:22:12:29 | formname | +| formidable.js:12:22:12:29 | formname | +| formidable.js:12:32:12:35 | file | +| formidable.js:12:32:12:35 | file | +| formidable.js:13:14:13:21 | formname | +| formidable.js:13:14:13:21 | formname | +| formidable.js:13:24:13:27 | file | +| formidable.js:13:24:13:27 | file | +| formidable.js:15:23:15:31 | fieldName | +| formidable.js:15:23:15:31 | fieldName | +| formidable.js:15:34:15:43 | fieldValue | +| formidable.js:15:34:15:43 | fieldValue | +| formidable.js:16:14:16:22 | fieldName | +| formidable.js:16:14:16:22 | fieldName | +| formidable.js:16:25:16:34 | fieldValue | +| formidable.js:16:25:16:34 | fieldValue | +| multiparty.js:8:22:8:25 | part | +| multiparty.js:8:22:8:25 | part | +| multiparty.js:9:14:9:17 | part | +| multiparty.js:9:14:9:17 | part | +| multiparty.js:10:19:10:24 | sink() | +| multiparty.js:10:19:10:24 | sink() | +| multiparty.js:14:37:14:42 | fields | +| multiparty.js:14:37:14:42 | fields | +| multiparty.js:14:45:14:49 | files | +| multiparty.js:14:45:14:49 | files | +| multiparty.js:15:14:15:19 | fields | +| multiparty.js:15:14:15:19 | fields | +| multiparty.js:15:22:15:26 | files | +| multiparty.js:15:22:15:26 | files | +edges +| busybus.js:9:30:9:33 | file | busybus.js:13:23:13:23 | z | +| busybus.js:9:30:9:33 | file | busybus.js:13:23:13:23 | z | +| busybus.js:9:36:9:39 | info | busybus.js:10:54:10:57 | info | +| busybus.js:9:36:9:39 | info | busybus.js:10:54:10:57 | info | +| busybus.js:10:19:10:50 | { filen ... eType } | busybus.js:10:21:10:28 | filename | +| busybus.js:10:19:10:50 | { filen ... eType } | busybus.js:10:31:10:38 | encoding | +| busybus.js:10:19:10:50 | { filen ... eType } | busybus.js:10:41:10:48 | mimeType | +| busybus.js:10:19:10:57 | encoding | busybus.js:12:28:12:35 | encoding | +| busybus.js:10:19:10:57 | encoding | busybus.js:12:28:12:35 | encoding | +| busybus.js:10:19:10:57 | filename | busybus.js:12:18:12:25 | filename | +| busybus.js:10:19:10:57 | filename | busybus.js:12:18:12:25 | filename | +| busybus.js:10:19:10:57 | mimeType | busybus.js:12:38:12:45 | mimeType | +| busybus.js:10:19:10:57 | mimeType | busybus.js:12:38:12:45 | mimeType | +| busybus.js:10:21:10:28 | filename | busybus.js:10:19:10:57 | filename | +| busybus.js:10:31:10:38 | encoding | busybus.js:10:19:10:57 | encoding | +| busybus.js:10:41:10:48 | mimeType | busybus.js:10:19:10:57 | mimeType | +| busybus.js:10:54:10:57 | info | busybus.js:10:19:10:50 | { filen ... eType } | +| busybus.js:13:23:13:23 | z | busybus.js:13:31:13:36 | sink() | +| busybus.js:13:23:13:23 | z | busybus.js:13:31:13:36 | sink() | +| busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data | +| busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data | +| busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data | +| busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data | +| busybus.js:22:25:22:42 | data | busybus.js:23:26:23:29 | data | +| busybus.js:22:25:22:42 | data | busybus.js:23:26:23:29 | data | +| busybus.js:22:32:22:42 | this.read() | busybus.js:22:25:22:42 | data | +| busybus.js:22:32:22:42 | this.read() | busybus.js:22:25:22:42 | data | +| busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name | +| busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name | +| busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name | +| busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name | +| busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val | +| busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val | +| busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val | +| busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val | +| busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info | +| busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info | +| busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info | +| busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info | +| dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() | +| dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() | +| dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() | +| dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() | +| dicer.js:14:28:14:33 | header | dicer.js:16:22:16:27 | header | +| dicer.js:14:28:14:33 | header | dicer.js:16:22:16:27 | header | +| dicer.js:16:22:16:27 | header | dicer.js:16:22:16:30 | header[h] | +| dicer.js:16:22:16:27 | header | dicer.js:16:22:16:30 | header[h] | +| dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data | +| dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data | +| dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data | +| dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data | +| formidable.js:7:11:7:25 | [fields, files] | formidable.js:7:12:7:17 | fields | +| formidable.js:7:11:7:25 | [fields, files] | formidable.js:7:20:7:24 | files | +| formidable.js:7:11:7:49 | fields | formidable.js:8:10:8:15 | fields | +| formidable.js:7:11:7:49 | fields | formidable.js:8:10:8:15 | fields | +| formidable.js:7:11:7:49 | files | formidable.js:8:18:8:22 | files | +| formidable.js:7:11:7:49 | files | formidable.js:8:18:8:22 | files | +| formidable.js:7:12:7:17 | fields | formidable.js:7:11:7:49 | fields | +| formidable.js:7:20:7:24 | files | formidable.js:7:11:7:49 | files | +| formidable.js:7:29:7:49 | await f ... se(req) | formidable.js:7:11:7:25 | [fields, files] | +| formidable.js:7:35:7:49 | form.parse(req) | formidable.js:7:29:7:49 | await f ... se(req) | +| formidable.js:7:35:7:49 | form.parse(req) | formidable.js:7:29:7:49 | await f ... se(req) | +| formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname | +| formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname | +| formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname | +| formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname | +| formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file | +| formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file | +| formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file | +| formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file | +| formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname | +| formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname | +| formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname | +| formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname | +| formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file | +| formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file | +| formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file | +| formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file | +| formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName | +| formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName | +| formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName | +| formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName | +| formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue | +| formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue | +| formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue | +| formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue | +| multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part | +| multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part | +| multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part | +| multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part | +| multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() | +| multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() | +| multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() | +| multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() | +| multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields | +| multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields | +| multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields | +| multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields | +| multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files | +| multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files | +| multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files | +| multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files | +#select +| busybus.js:12:18:12:25 | filename | busybus.js:9:36:9:39 | info | busybus.js:12:18:12:25 | filename | This entity depends on a $@. | busybus.js:9:36:9:39 | info | user-provided value | +| busybus.js:12:28:12:35 | encoding | busybus.js:9:36:9:39 | info | busybus.js:12:28:12:35 | encoding | This entity depends on a $@. | busybus.js:9:36:9:39 | info | user-provided value | +| busybus.js:12:38:12:45 | mimeType | busybus.js:9:36:9:39 | info | busybus.js:12:38:12:45 | mimeType | This entity depends on a $@. | busybus.js:9:36:9:39 | info | user-provided value | +| busybus.js:13:31:13:36 | sink() | busybus.js:9:30:9:33 | file | busybus.js:13:31:13:36 | sink() | This entity depends on a $@. | busybus.js:9:30:9:33 | file | user-provided value | +| busybus.js:16:22:16:25 | data | busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data | This entity depends on a $@. | busybus.js:15:30:15:33 | data | user-provided value | +| busybus.js:23:26:23:29 | data | busybus.js:22:32:22:42 | this.read() | busybus.js:23:26:23:29 | data | This entity depends on a $@. | busybus.js:22:32:22:42 | this.read() | user-provided value | +| busybus.js:28:18:28:21 | name | busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name | This entity depends on a $@. | busybus.js:27:25:27:28 | name | user-provided value | +| busybus.js:28:24:28:26 | val | busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val | This entity depends on a $@. | busybus.js:27:31:27:33 | val | user-provided value | +| busybus.js:28:29:28:32 | info | busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info | This entity depends on a $@. | busybus.js:27:36:27:39 | info | user-provided value | +| dicer.js:13:19:13:24 | sink() | dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() | This entity depends on a $@. | dicer.js:12:23:12:26 | part | user-provided value | +| dicer.js:16:22:16:30 | header[h] | dicer.js:14:28:14:33 | header | dicer.js:16:22:16:30 | header[h] | This entity depends on a $@. | dicer.js:14:28:14:33 | header | user-provided value | +| dicer.js:20:18:20:21 | data | dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data | This entity depends on a $@. | dicer.js:19:26:19:29 | data | user-provided value | +| formidable.js:8:10:8:15 | fields | formidable.js:7:35:7:49 | form.parse(req) | formidable.js:8:10:8:15 | fields | This entity depends on a $@. | formidable.js:7:35:7:49 | form.parse(req) | user-provided value | +| formidable.js:8:18:8:22 | files | formidable.js:7:35:7:49 | form.parse(req) | formidable.js:8:18:8:22 | files | This entity depends on a $@. | formidable.js:7:35:7:49 | form.parse(req) | user-provided value | +| formidable.js:10:14:10:21 | formname | formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname | This entity depends on a $@. | formidable.js:9:27:9:34 | formname | user-provided value | +| formidable.js:10:24:10:27 | file | formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file | This entity depends on a $@. | formidable.js:9:37:9:40 | file | user-provided value | +| formidable.js:13:14:13:21 | formname | formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname | This entity depends on a $@. | formidable.js:12:22:12:29 | formname | user-provided value | +| formidable.js:13:24:13:27 | file | formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file | This entity depends on a $@. | formidable.js:12:32:12:35 | file | user-provided value | +| formidable.js:16:14:16:22 | fieldName | formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName | This entity depends on a $@. | formidable.js:15:23:15:31 | fieldName | user-provided value | +| formidable.js:16:25:16:34 | fieldValue | formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue | This entity depends on a $@. | formidable.js:15:34:15:43 | fieldValue | user-provided value | +| multiparty.js:9:14:9:17 | part | multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part | This entity depends on a $@. | multiparty.js:8:22:8:25 | part | user-provided value | +| multiparty.js:10:19:10:24 | sink() | multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() | This entity depends on a $@. | multiparty.js:8:22:8:25 | part | user-provided value | +| multiparty.js:15:14:15:19 | fields | multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields | This entity depends on a $@. | multiparty.js:14:37:14:42 | fields | user-provided value | +| multiparty.js:15:22:15:26 | files | multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files | This entity depends on a $@. | multiparty.js:14:45:14:49 | files | user-provided value | diff --git a/javascript/ql/test/experimental/FormParsers/RemoteFlowSource.ql b/javascript/ql/test/experimental/FormParsers/RemoteFlowSource.ql new file mode 100644 index 00000000000..ab526eeb54a --- /dev/null +++ b/javascript/ql/test/experimental/FormParsers/RemoteFlowSource.ql @@ -0,0 +1,34 @@ +/** + * @name Remote Form Flow Sources + * @description Using remote user controlled sources from Forms + * @kind path-problem + * @problem.severity error + * @security-severity 5 + * @precision high + * @id js/remote-flow-source + * @tags correctness + * security + */ + +import javascript +import DataFlow::PathGraph +import experimental.semmle.javascript.FormParsers + +/** + * A taint-tracking configuration for test + */ +class Configuration extends TaintTracking::Configuration { + Configuration() { this = "RemoteFlowSourcesOUserForm" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { + sink = API::moduleImport("sink").getAParameter().asSink() or + sink = API::moduleImport("sink").getReturn().asSource() + } +} + +from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink +where cfg.hasFlowPath(source, sink) +select sink.getNode(), source, sink, "This entity depends on a $@.", source.getNode(), + "user-provided value" diff --git a/javascript/ql/test/experimental/FormParsers/busybus.js b/javascript/ql/test/experimental/FormParsers/busybus.js new file mode 100644 index 00000000000..fe9d33be176 --- /dev/null +++ b/javascript/ql/test/experimental/FormParsers/busybus.js @@ -0,0 +1,33 @@ +const http = require('http'); +const zlib = require('node:zlib'); +const busboy = require('busboy'); +const sink = require('sink'); + +http.createServer((req, res) => { + if (req.method === 'POST') { + const bb = busboy({ headers: req.headers }); + bb.on('file', (name, file, info) => { + const { filename, encoding, mimeType } = info; + const z = zlib.createGzip(); + sink(filename, encoding, mimeType) // sink + file.pipe(z).pipe(sink()) + + file.on('data', (data) => { + sink(data) + }) + + file.on('readable', function () { + // There is some data to read now. + let data; + while ((data = this.read()) !== null) { + sink(data) + } + }); + }); + bb.on('field', (name, val, info) => { + sink(name, val, info) + }); + } +}).listen(8000, () => { + console.log('Listening for requests'); +}); \ No newline at end of file diff --git a/javascript/ql/test/experimental/FormParsers/dicer.js b/javascript/ql/test/experimental/FormParsers/dicer.js new file mode 100644 index 00000000000..20d908ac9dd --- /dev/null +++ b/javascript/ql/test/experimental/FormParsers/dicer.js @@ -0,0 +1,25 @@ +const { inspect } = require('util'); +const http = require('http'); +const Dicer = require('dicer'); +const sink = require('sink'); + +const PORT = 8080; + +http.createServer((req, res) => { + let m; + const dicer = new Dicer({ boundary: m[1] || m[2] }); + + dicer.on('part', (part) => { + part.pipe(sink()) + part.on('header', (header) => { + for (h in header) { + sink(header[h]) + } + }); + part.on('data', (data) => { + sink(data) + }); + }); +}).listen(PORT, () => { + console.log(`Listening for requests on port ${PORT}`); +}); \ No newline at end of file diff --git a/javascript/ql/test/experimental/FormParsers/formidable.js b/javascript/ql/test/experimental/FormParsers/formidable.js new file mode 100644 index 00000000000..aa4e692ae9a --- /dev/null +++ b/javascript/ql/test/experimental/FormParsers/formidable.js @@ -0,0 +1,22 @@ +import http from 'node:http'; +import formidable from 'formidable'; +const sink = require('sink'); + +const server = http.createServer(async (req, res) => { + const form = formidable({}); + const [fields, files] = await form.parse(req); + sink(fields, files) + form.on('fileBegin', (formname, file) => { + sink(formname, file) + }); + form.on('file', (formname, file) => { + sink(formname, file) + }); + form.on('field', (fieldName, fieldValue) => { + sink(fieldName, fieldValue) + }); +}); + +server.listen(8080, () => { + console.log('Server listening on http://localhost:8080/ ...'); +}); \ No newline at end of file diff --git a/javascript/ql/test/experimental/FormParsers/multiparty.js b/javascript/ql/test/experimental/FormParsers/multiparty.js new file mode 100644 index 00000000000..dabdb7ce004 --- /dev/null +++ b/javascript/ql/test/experimental/FormParsers/multiparty.js @@ -0,0 +1,19 @@ +var multiparty = require('multiparty'); +var http = require('http'); +var util = require('util'); +const sink = require('sink'); + +http.createServer(function (req, res) { + var form = new multiparty.Form(); + form.on('part', (part) => { + sink(part) + part.pipe(sink()) + }); + + var form2 = new multiparty.Form(); + form2.parse(req, function (err, fields, files) { + sink(fields, files) + }); + form2.parse(req); + +}).listen(8080); \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/DecompressionBombs.expected b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/DecompressionBombs.expected new file mode 100644 index 00000000000..659e49339d1 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/DecompressionBombs.expected @@ -0,0 +1,391 @@ +nodes +| adm-zip.js:13:13:13:21 | req.files | +| adm-zip.js:13:13:13:21 | req.files | +| adm-zip.js:13:13:13:33 | req.fil ... ombFile | +| adm-zip.js:17:18:17:24 | tarFile | +| adm-zip.js:24:22:24:28 | tarFile | +| adm-zip.js:24:22:24:33 | tarFile.data | +| adm-zip.js:28:25:28:42 | zipEntry.getData() | +| adm-zip.js:28:25:28:42 | zipEntry.getData() | +| adm-zip.js:32:17:32:41 | admZip. ... "10GB") | +| adm-zip.js:32:17:32:41 | admZip. ... "10GB") | +| adm-zip.js:34:5:34:55 | admZip. ... , true) | +| adm-zip.js:34:5:34:55 | admZip. ... , true) | +| adm-zip.js:36:5:36:38 | admZip. ... , true) | +| adm-zip.js:36:5:36:38 | admZip. ... , true) | +| decompress.js:11:16:11:33 | req.query.filePath | +| decompress.js:11:16:11:33 | req.query.filePath | +| decompress.js:11:16:11:33 | req.query.filePath | +| jszip.js:12:13:12:21 | req.files | +| jszip.js:12:13:12:21 | req.files | +| jszip.js:12:13:12:33 | req.fil ... ombFile | +| jszip.js:12:13:12:38 | req.fil ... le.data | +| jszip.js:32:18:32:24 | zipFile | +| jszip.js:33:22:33:28 | zipFile | +| jszip.js:33:22:33:33 | zipFile.data | +| jszip.js:33:22:33:33 | zipFile.data | +| node-tar.js:15:13:15:21 | req.files | +| node-tar.js:15:13:15:21 | req.files | +| node-tar.js:15:13:15:33 | req.fil ... ombFile | +| node-tar.js:15:13:15:38 | req.fil ... le.data | +| node-tar.js:19:18:19:24 | tarFile | +| node-tar.js:21:23:21:49 | Readabl ... e.data) | +| node-tar.js:21:37:21:43 | tarFile | +| node-tar.js:21:37:21:48 | tarFile.data | +| node-tar.js:24:9:24:15 | tar.x() | +| node-tar.js:24:9:24:15 | tar.x() | +| node-tar.js:29:5:29:37 | fs.crea ... e.name) | +| node-tar.js:29:25:29:31 | tarFile | +| node-tar.js:29:25:29:36 | tarFile.name | +| node-tar.js:30:9:33:10 | tar.x({ ... }) | +| node-tar.js:30:9:33:10 | tar.x({ ... }) | +| node-tar.js:45:5:45:37 | fs.crea ... e.name) | +| node-tar.js:45:25:45:31 | tarFile | +| node-tar.js:45:25:45:36 | tarFile.name | +| node-tar.js:46:9:46:20 | decompressor | +| node-tar.js:48:9:50:10 | tar.x({ ... }) | +| node-tar.js:48:9:50:10 | tar.x({ ... }) | +| node-tar.js:58:19:58:25 | tarFile | +| node-tar.js:58:19:58:30 | tarFile.name | +| node-tar.js:58:19:58:30 | tarFile.name | +| node-tar.js:59:25:59:31 | tarFile | +| node-tar.js:59:25:59:36 | tarFile.name | +| node-tar.js:59:25:59:36 | tarFile.name | +| pako.js:12:14:12:22 | req.files | +| pako.js:12:14:12:22 | req.files | +| pako.js:12:14:12:34 | req.fil ... ombFile | +| pako.js:12:14:12:39 | req.fil ... le.data | +| pako.js:13:14:13:22 | req.files | +| pako.js:13:14:13:22 | req.files | +| pako.js:13:14:13:34 | req.fil ... ombFile | +| pako.js:13:14:13:39 | req.fil ... le.data | +| pako.js:17:19:17:25 | zipFile | +| pako.js:18:11:18:68 | myArray | +| pako.js:18:21:18:68 | Buffer. ... uffer)) | +| pako.js:18:33:18:67 | new Uin ... buffer) | +| pako.js:18:48:18:54 | zipFile | +| pako.js:18:48:18:59 | zipFile.data | +| pako.js:18:48:18:66 | zipFile.data.buffer | +| pako.js:21:31:21:37 | myArray | +| pako.js:21:31:21:37 | myArray | +| pako.js:28:19:28:25 | zipFile | +| pako.js:29:11:29:62 | myArray | +| pako.js:29:21:29:55 | new Uin ... buffer) | +| pako.js:29:21:29:62 | new Uin ... .buffer | +| pako.js:29:36:29:42 | zipFile | +| pako.js:29:36:29:47 | zipFile.data | +| pako.js:29:36:29:54 | zipFile.data.buffer | +| pako.js:32:31:32:37 | myArray | +| pako.js:32:31:32:37 | myArray | +| unbzip2.js:12:5:12:43 | fs.crea ... lePath) | +| unbzip2.js:12:25:12:42 | req.query.FilePath | +| unbzip2.js:12:25:12:42 | req.query.FilePath | +| unbzip2.js:12:50:12:54 | bz2() | +| unbzip2.js:12:50:12:54 | bz2() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | +| unzipper.js:13:40:13:48 | req.files | +| unzipper.js:13:40:13:48 | req.files | +| unzipper.js:13:40:13:56 | req.files.ZipFile | +| unzipper.js:13:40:13:61 | req.fil ... le.data | +| unzipper.js:16:23:16:63 | unzippe ... ath' }) | +| unzipper.js:16:23:16:63 | unzippe ... ath' }) | +| unzipper.js:19:23:19:41 | unzipper.ParseOne() | +| unzipper.js:19:23:19:41 | unzipper.ParseOne() | +| unzipper.js:24:15:24:30 | unzipper.Parse() | +| unzipper.js:24:15:24:30 | unzipper.Parse() | +| unzipper.js:34:15:34:30 | unzipper.Parse() | +| unzipper.js:34:15:34:30 | unzipper.Parse() | +| unzipper.js:41:35:41:71 | unzippe ... true }) | +| unzipper.js:41:35:41:71 | unzippe ... true }) | +| unzipper.js:51:36:51:72 | unzippe ... true }) | +| unzipper.js:51:36:51:72 | unzippe ... true }) | +| unzipper.js:60:23:60:38 | unzipper.Parse() | +| unzipper.js:60:23:60:38 | unzipper.Parse() | +| unzipper.js:73:23:73:38 | unzipper.Parse() | +| unzipper.js:73:23:73:38 | unzipper.Parse() | +| yauzl.js:12:18:12:26 | req.files | +| yauzl.js:12:18:12:26 | req.files | +| yauzl.js:12:18:12:34 | req.files.zipFile | +| yauzl.js:12:18:12:39 | req.fil ... le.data | +| yauzl.js:12:18:12:39 | req.fil ... le.data | +| yauzl.js:13:22:13:30 | req.files | +| yauzl.js:13:22:13:30 | req.files | +| yauzl.js:13:22:13:38 | req.files.zipFile | +| yauzl.js:13:22:13:43 | req.fil ... le.data | +| yauzl.js:13:22:13:43 | req.fil ... le.data | +| yauzl.js:14:34:14:42 | req.files | +| yauzl.js:14:34:14:42 | req.files | +| yauzl.js:14:34:14:50 | req.files.zipFile | +| yauzl.js:14:34:14:55 | req.fil ... le.data | +| yauzl.js:14:34:14:55 | req.fil ... le.data | +| yauzl.js:37:16:37:33 | req.query.filePath | +| yauzl.js:37:16:37:33 | req.query.filePath | +| yauzl.js:39:9:39:27 | zipfile.readEntry() | +| yauzl.js:39:9:39:27 | zipfile.readEntry() | +| yauzl.js:41:64:41:73 | readStream | +| yauzl.js:41:64:41:73 | readStream | +| yauzl.js:43:21:43:39 | zipfile.readEntry() | +| yauzl.js:43:21:43:39 | zipfile.readEntry() | +| zlib.js:15:19:15:27 | req.files | +| zlib.js:15:19:15:27 | req.files | +| zlib.js:15:19:15:39 | req.fil ... ombFile | +| zlib.js:15:19:15:44 | req.fil ... le.data | +| zlib.js:17:18:17:26 | req.files | +| zlib.js:17:18:17:26 | req.files | +| zlib.js:17:18:17:38 | req.fil ... ombFile | +| zlib.js:17:18:17:43 | req.fil ... le.data | +| zlib.js:19:24:19:32 | req.files | +| zlib.js:19:24:19:32 | req.files | +| zlib.js:19:24:19:44 | req.fil ... ombFile | +| zlib.js:19:24:19:49 | req.fil ... le.data | +| zlib.js:21:32:21:40 | req.files | +| zlib.js:21:32:21:40 | req.files | +| zlib.js:21:32:21:52 | req.fil ... ombFile | +| zlib.js:21:32:21:57 | req.fil ... le.data | +| zlib.js:27:24:27:30 | zipFile | +| zlib.js:29:9:29:15 | zipFile | +| zlib.js:29:9:29:20 | zipFile.data | +| zlib.js:29:9:29:20 | zipFile.data | +| zlib.js:33:9:33:15 | zipFile | +| zlib.js:33:9:33:20 | zipFile.data | +| zlib.js:33:9:33:20 | zipFile.data | +| zlib.js:38:9:38:15 | zipFile | +| zlib.js:38:9:38:20 | zipFile.data | +| zlib.js:38:9:38:20 | zipFile.data | +| zlib.js:62:23:62:29 | zipFile | +| zlib.js:63:21:63:27 | zipFile | +| zlib.js:63:21:63:32 | zipFile.data | +| zlib.js:63:21:63:32 | zipFile.data | +| zlib.js:64:20:64:26 | zipFile | +| zlib.js:64:20:64:31 | zipFile.data | +| zlib.js:64:20:64:31 | zipFile.data | +| zlib.js:65:31:65:37 | zipFile | +| zlib.js:65:31:65:42 | zipFile.data | +| zlib.js:65:31:65:42 | zipFile.data | +| zlib.js:74:29:74:35 | zipFile | +| zlib.js:75:25:75:51 | Readabl ... e.data) | +| zlib.js:75:39:75:45 | zipFile | +| zlib.js:75:39:75:50 | zipFile.data | +| zlib.js:77:22:77:40 | zlib.createGunzip() | +| zlib.js:77:22:77:40 | zlib.createGunzip() | +| zlib.js:78:22:78:39 | zlib.createUnzip() | +| zlib.js:78:22:78:39 | zlib.createUnzip() | +| zlib.js:79:22:79:50 | zlib.cr ... press() | +| zlib.js:79:22:79:50 | zlib.cr ... press() | +| zlib.js:82:43:82:49 | zipFile | +| zlib.js:83:11:83:51 | inputStream | +| zlib.js:83:25:83:51 | Readabl ... e.data) | +| zlib.js:83:39:83:45 | zipFile | +| zlib.js:83:39:83:50 | zipFile.data | +| zlib.js:86:9:86:19 | inputStream | +| zlib.js:87:9:87:27 | zlib.createGunzip() | +| zlib.js:87:9:87:27 | zlib.createGunzip() | +edges +| adm-zip.js:13:13:13:21 | req.files | adm-zip.js:13:13:13:33 | req.fil ... ombFile | +| adm-zip.js:13:13:13:21 | req.files | adm-zip.js:13:13:13:33 | req.fil ... ombFile | +| adm-zip.js:13:13:13:33 | req.fil ... ombFile | adm-zip.js:17:18:17:24 | tarFile | +| adm-zip.js:17:18:17:24 | tarFile | adm-zip.js:24:22:24:28 | tarFile | +| adm-zip.js:24:22:24:28 | tarFile | adm-zip.js:24:22:24:33 | tarFile.data | +| adm-zip.js:24:22:24:33 | tarFile.data | adm-zip.js:28:25:28:42 | zipEntry.getData() | +| adm-zip.js:24:22:24:33 | tarFile.data | adm-zip.js:28:25:28:42 | zipEntry.getData() | +| adm-zip.js:24:22:24:33 | tarFile.data | adm-zip.js:32:17:32:41 | admZip. ... "10GB") | +| adm-zip.js:24:22:24:33 | tarFile.data | adm-zip.js:32:17:32:41 | admZip. ... "10GB") | +| adm-zip.js:24:22:24:33 | tarFile.data | adm-zip.js:34:5:34:55 | admZip. ... , true) | +| adm-zip.js:24:22:24:33 | tarFile.data | adm-zip.js:34:5:34:55 | admZip. ... , true) | +| adm-zip.js:24:22:24:33 | tarFile.data | adm-zip.js:36:5:36:38 | admZip. ... , true) | +| adm-zip.js:24:22:24:33 | tarFile.data | adm-zip.js:36:5:36:38 | admZip. ... , true) | +| decompress.js:11:16:11:33 | req.query.filePath | decompress.js:11:16:11:33 | req.query.filePath | +| jszip.js:12:13:12:21 | req.files | jszip.js:12:13:12:33 | req.fil ... ombFile | +| jszip.js:12:13:12:21 | req.files | jszip.js:12:13:12:33 | req.fil ... ombFile | +| jszip.js:12:13:12:33 | req.fil ... ombFile | jszip.js:12:13:12:38 | req.fil ... le.data | +| jszip.js:12:13:12:38 | req.fil ... le.data | jszip.js:32:18:32:24 | zipFile | +| jszip.js:32:18:32:24 | zipFile | jszip.js:33:22:33:28 | zipFile | +| jszip.js:33:22:33:28 | zipFile | jszip.js:33:22:33:33 | zipFile.data | +| jszip.js:33:22:33:28 | zipFile | jszip.js:33:22:33:33 | zipFile.data | +| node-tar.js:15:13:15:21 | req.files | node-tar.js:15:13:15:33 | req.fil ... ombFile | +| node-tar.js:15:13:15:21 | req.files | node-tar.js:15:13:15:33 | req.fil ... ombFile | +| node-tar.js:15:13:15:33 | req.fil ... ombFile | node-tar.js:15:13:15:38 | req.fil ... le.data | +| node-tar.js:15:13:15:38 | req.fil ... le.data | node-tar.js:19:18:19:24 | tarFile | +| node-tar.js:19:18:19:24 | tarFile | node-tar.js:21:37:21:43 | tarFile | +| node-tar.js:19:18:19:24 | tarFile | node-tar.js:29:25:29:31 | tarFile | +| node-tar.js:19:18:19:24 | tarFile | node-tar.js:45:25:45:31 | tarFile | +| node-tar.js:19:18:19:24 | tarFile | node-tar.js:58:19:58:25 | tarFile | +| node-tar.js:19:18:19:24 | tarFile | node-tar.js:59:25:59:31 | tarFile | +| node-tar.js:21:23:21:49 | Readabl ... e.data) | node-tar.js:24:9:24:15 | tar.x() | +| node-tar.js:21:23:21:49 | Readabl ... e.data) | node-tar.js:24:9:24:15 | tar.x() | +| node-tar.js:21:37:21:43 | tarFile | node-tar.js:21:37:21:48 | tarFile.data | +| node-tar.js:21:37:21:48 | tarFile.data | node-tar.js:21:23:21:49 | Readabl ... e.data) | +| node-tar.js:29:5:29:37 | fs.crea ... e.name) | node-tar.js:30:9:33:10 | tar.x({ ... }) | +| node-tar.js:29:5:29:37 | fs.crea ... e.name) | node-tar.js:30:9:33:10 | tar.x({ ... }) | +| node-tar.js:29:25:29:31 | tarFile | node-tar.js:29:25:29:36 | tarFile.name | +| node-tar.js:29:25:29:36 | tarFile.name | node-tar.js:29:5:29:37 | fs.crea ... e.name) | +| node-tar.js:45:5:45:37 | fs.crea ... e.name) | node-tar.js:46:9:46:20 | decompressor | +| node-tar.js:45:25:45:31 | tarFile | node-tar.js:45:25:45:36 | tarFile.name | +| node-tar.js:45:25:45:36 | tarFile.name | node-tar.js:45:5:45:37 | fs.crea ... e.name) | +| node-tar.js:46:9:46:20 | decompressor | node-tar.js:48:9:50:10 | tar.x({ ... }) | +| node-tar.js:46:9:46:20 | decompressor | node-tar.js:48:9:50:10 | tar.x({ ... }) | +| node-tar.js:58:19:58:25 | tarFile | node-tar.js:58:19:58:30 | tarFile.name | +| node-tar.js:58:19:58:25 | tarFile | node-tar.js:58:19:58:30 | tarFile.name | +| node-tar.js:59:25:59:31 | tarFile | node-tar.js:59:25:59:36 | tarFile.name | +| node-tar.js:59:25:59:31 | tarFile | node-tar.js:59:25:59:36 | tarFile.name | +| pako.js:12:14:12:22 | req.files | pako.js:12:14:12:34 | req.fil ... ombFile | +| pako.js:12:14:12:22 | req.files | pako.js:12:14:12:34 | req.fil ... ombFile | +| pako.js:12:14:12:34 | req.fil ... ombFile | pako.js:12:14:12:39 | req.fil ... le.data | +| pako.js:12:14:12:39 | req.fil ... le.data | pako.js:17:19:17:25 | zipFile | +| pako.js:13:14:13:22 | req.files | pako.js:13:14:13:34 | req.fil ... ombFile | +| pako.js:13:14:13:22 | req.files | pako.js:13:14:13:34 | req.fil ... ombFile | +| pako.js:13:14:13:34 | req.fil ... ombFile | pako.js:13:14:13:39 | req.fil ... le.data | +| pako.js:13:14:13:39 | req.fil ... le.data | pako.js:28:19:28:25 | zipFile | +| pako.js:17:19:17:25 | zipFile | pako.js:18:48:18:54 | zipFile | +| pako.js:18:11:18:68 | myArray | pako.js:21:31:21:37 | myArray | +| pako.js:18:11:18:68 | myArray | pako.js:21:31:21:37 | myArray | +| pako.js:18:21:18:68 | Buffer. ... uffer)) | pako.js:18:11:18:68 | myArray | +| pako.js:18:33:18:67 | new Uin ... buffer) | pako.js:18:21:18:68 | Buffer. ... uffer)) | +| pako.js:18:48:18:54 | zipFile | pako.js:18:48:18:59 | zipFile.data | +| pako.js:18:48:18:59 | zipFile.data | pako.js:18:48:18:66 | zipFile.data.buffer | +| pako.js:18:48:18:66 | zipFile.data.buffer | pako.js:18:33:18:67 | new Uin ... buffer) | +| pako.js:28:19:28:25 | zipFile | pako.js:29:36:29:42 | zipFile | +| pako.js:29:11:29:62 | myArray | pako.js:32:31:32:37 | myArray | +| pako.js:29:11:29:62 | myArray | pako.js:32:31:32:37 | myArray | +| pako.js:29:21:29:55 | new Uin ... buffer) | pako.js:29:21:29:62 | new Uin ... .buffer | +| pako.js:29:21:29:62 | new Uin ... .buffer | pako.js:29:11:29:62 | myArray | +| pako.js:29:36:29:42 | zipFile | pako.js:29:36:29:47 | zipFile.data | +| pako.js:29:36:29:47 | zipFile.data | pako.js:29:36:29:54 | zipFile.data.buffer | +| pako.js:29:36:29:54 | zipFile.data.buffer | pako.js:29:21:29:55 | new Uin ... buffer) | +| unbzip2.js:12:5:12:43 | fs.crea ... lePath) | unbzip2.js:12:50:12:54 | bz2() | +| unbzip2.js:12:5:12:43 | fs.crea ... lePath) | unbzip2.js:12:50:12:54 | bz2() | +| unbzip2.js:12:25:12:42 | req.query.FilePath | unbzip2.js:12:5:12:43 | fs.crea ... lePath) | +| unbzip2.js:12:25:12:42 | req.query.FilePath | unbzip2.js:12:5:12:43 | fs.crea ... lePath) | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:16:23:16:63 | unzippe ... ath' }) | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:16:23:16:63 | unzippe ... ath' }) | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:19:23:19:41 | unzipper.ParseOne() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:19:23:19:41 | unzipper.ParseOne() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:24:15:24:30 | unzipper.Parse() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:24:15:24:30 | unzipper.Parse() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:34:15:34:30 | unzipper.Parse() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:34:15:34:30 | unzipper.Parse() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:41:35:41:71 | unzippe ... true }) | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:41:35:41:71 | unzippe ... true }) | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:51:36:51:72 | unzippe ... true }) | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:51:36:51:72 | unzippe ... true }) | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:60:23:60:38 | unzipper.Parse() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:60:23:60:38 | unzipper.Parse() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:73:23:73:38 | unzipper.Parse() | +| unzipper.js:13:26:13:62 | Readabl ... e.data) | unzipper.js:73:23:73:38 | unzipper.Parse() | +| unzipper.js:13:40:13:48 | req.files | unzipper.js:13:40:13:56 | req.files.ZipFile | +| unzipper.js:13:40:13:48 | req.files | unzipper.js:13:40:13:56 | req.files.ZipFile | +| unzipper.js:13:40:13:56 | req.files.ZipFile | unzipper.js:13:40:13:61 | req.fil ... le.data | +| unzipper.js:13:40:13:61 | req.fil ... le.data | unzipper.js:13:26:13:62 | Readabl ... e.data) | +| yauzl.js:12:18:12:26 | req.files | yauzl.js:12:18:12:34 | req.files.zipFile | +| yauzl.js:12:18:12:26 | req.files | yauzl.js:12:18:12:34 | req.files.zipFile | +| yauzl.js:12:18:12:34 | req.files.zipFile | yauzl.js:12:18:12:39 | req.fil ... le.data | +| yauzl.js:12:18:12:34 | req.files.zipFile | yauzl.js:12:18:12:39 | req.fil ... le.data | +| yauzl.js:13:22:13:30 | req.files | yauzl.js:13:22:13:38 | req.files.zipFile | +| yauzl.js:13:22:13:30 | req.files | yauzl.js:13:22:13:38 | req.files.zipFile | +| yauzl.js:13:22:13:38 | req.files.zipFile | yauzl.js:13:22:13:43 | req.fil ... le.data | +| yauzl.js:13:22:13:38 | req.files.zipFile | yauzl.js:13:22:13:43 | req.fil ... le.data | +| yauzl.js:14:34:14:42 | req.files | yauzl.js:14:34:14:50 | req.files.zipFile | +| yauzl.js:14:34:14:42 | req.files | yauzl.js:14:34:14:50 | req.files.zipFile | +| yauzl.js:14:34:14:50 | req.files.zipFile | yauzl.js:14:34:14:55 | req.fil ... le.data | +| yauzl.js:14:34:14:50 | req.files.zipFile | yauzl.js:14:34:14:55 | req.fil ... le.data | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:39:9:39:27 | zipfile.readEntry() | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:39:9:39:27 | zipfile.readEntry() | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:39:9:39:27 | zipfile.readEntry() | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:39:9:39:27 | zipfile.readEntry() | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:41:64:41:73 | readStream | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:41:64:41:73 | readStream | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:41:64:41:73 | readStream | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:41:64:41:73 | readStream | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:43:21:43:39 | zipfile.readEntry() | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:43:21:43:39 | zipfile.readEntry() | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:43:21:43:39 | zipfile.readEntry() | +| yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:43:21:43:39 | zipfile.readEntry() | +| zlib.js:15:19:15:27 | req.files | zlib.js:15:19:15:39 | req.fil ... ombFile | +| zlib.js:15:19:15:27 | req.files | zlib.js:15:19:15:39 | req.fil ... ombFile | +| zlib.js:15:19:15:39 | req.fil ... ombFile | zlib.js:15:19:15:44 | req.fil ... le.data | +| zlib.js:15:19:15:44 | req.fil ... le.data | zlib.js:27:24:27:30 | zipFile | +| zlib.js:17:18:17:26 | req.files | zlib.js:17:18:17:38 | req.fil ... ombFile | +| zlib.js:17:18:17:26 | req.files | zlib.js:17:18:17:38 | req.fil ... ombFile | +| zlib.js:17:18:17:38 | req.fil ... ombFile | zlib.js:17:18:17:43 | req.fil ... le.data | +| zlib.js:17:18:17:43 | req.fil ... le.data | zlib.js:62:23:62:29 | zipFile | +| zlib.js:19:24:19:32 | req.files | zlib.js:19:24:19:44 | req.fil ... ombFile | +| zlib.js:19:24:19:32 | req.files | zlib.js:19:24:19:44 | req.fil ... ombFile | +| zlib.js:19:24:19:44 | req.fil ... ombFile | zlib.js:19:24:19:49 | req.fil ... le.data | +| zlib.js:19:24:19:49 | req.fil ... le.data | zlib.js:74:29:74:35 | zipFile | +| zlib.js:21:32:21:40 | req.files | zlib.js:21:32:21:52 | req.fil ... ombFile | +| zlib.js:21:32:21:40 | req.files | zlib.js:21:32:21:52 | req.fil ... ombFile | +| zlib.js:21:32:21:52 | req.fil ... ombFile | zlib.js:21:32:21:57 | req.fil ... le.data | +| zlib.js:21:32:21:57 | req.fil ... le.data | zlib.js:82:43:82:49 | zipFile | +| zlib.js:27:24:27:30 | zipFile | zlib.js:29:9:29:15 | zipFile | +| zlib.js:27:24:27:30 | zipFile | zlib.js:33:9:33:15 | zipFile | +| zlib.js:27:24:27:30 | zipFile | zlib.js:38:9:38:15 | zipFile | +| zlib.js:29:9:29:15 | zipFile | zlib.js:29:9:29:20 | zipFile.data | +| zlib.js:29:9:29:15 | zipFile | zlib.js:29:9:29:20 | zipFile.data | +| zlib.js:33:9:33:15 | zipFile | zlib.js:33:9:33:20 | zipFile.data | +| zlib.js:33:9:33:15 | zipFile | zlib.js:33:9:33:20 | zipFile.data | +| zlib.js:38:9:38:15 | zipFile | zlib.js:38:9:38:20 | zipFile.data | +| zlib.js:38:9:38:15 | zipFile | zlib.js:38:9:38:20 | zipFile.data | +| zlib.js:62:23:62:29 | zipFile | zlib.js:63:21:63:27 | zipFile | +| zlib.js:62:23:62:29 | zipFile | zlib.js:64:20:64:26 | zipFile | +| zlib.js:62:23:62:29 | zipFile | zlib.js:65:31:65:37 | zipFile | +| zlib.js:63:21:63:27 | zipFile | zlib.js:63:21:63:32 | zipFile.data | +| zlib.js:63:21:63:27 | zipFile | zlib.js:63:21:63:32 | zipFile.data | +| zlib.js:64:20:64:26 | zipFile | zlib.js:64:20:64:31 | zipFile.data | +| zlib.js:64:20:64:26 | zipFile | zlib.js:64:20:64:31 | zipFile.data | +| zlib.js:65:31:65:37 | zipFile | zlib.js:65:31:65:42 | zipFile.data | +| zlib.js:65:31:65:37 | zipFile | zlib.js:65:31:65:42 | zipFile.data | +| zlib.js:74:29:74:35 | zipFile | zlib.js:75:39:75:45 | zipFile | +| zlib.js:75:25:75:51 | Readabl ... e.data) | zlib.js:77:22:77:40 | zlib.createGunzip() | +| zlib.js:75:25:75:51 | Readabl ... e.data) | zlib.js:77:22:77:40 | zlib.createGunzip() | +| zlib.js:75:25:75:51 | Readabl ... e.data) | zlib.js:78:22:78:39 | zlib.createUnzip() | +| zlib.js:75:25:75:51 | Readabl ... e.data) | zlib.js:78:22:78:39 | zlib.createUnzip() | +| zlib.js:75:25:75:51 | Readabl ... e.data) | zlib.js:79:22:79:50 | zlib.cr ... press() | +| zlib.js:75:25:75:51 | Readabl ... e.data) | zlib.js:79:22:79:50 | zlib.cr ... press() | +| zlib.js:75:39:75:45 | zipFile | zlib.js:75:39:75:50 | zipFile.data | +| zlib.js:75:39:75:50 | zipFile.data | zlib.js:75:25:75:51 | Readabl ... e.data) | +| zlib.js:82:43:82:49 | zipFile | zlib.js:83:39:83:45 | zipFile | +| zlib.js:83:11:83:51 | inputStream | zlib.js:86:9:86:19 | inputStream | +| zlib.js:83:25:83:51 | Readabl ... e.data) | zlib.js:83:11:83:51 | inputStream | +| zlib.js:83:39:83:45 | zipFile | zlib.js:83:39:83:50 | zipFile.data | +| zlib.js:83:39:83:50 | zipFile.data | zlib.js:83:25:83:51 | Readabl ... e.data) | +| zlib.js:86:9:86:19 | inputStream | zlib.js:87:9:87:27 | zlib.createGunzip() | +| zlib.js:86:9:86:19 | inputStream | zlib.js:87:9:87:27 | zlib.createGunzip() | +#select +| adm-zip.js:28:25:28:42 | zipEntry.getData() | adm-zip.js:13:13:13:21 | req.files | adm-zip.js:28:25:28:42 | zipEntry.getData() | This Decompression depends on a $@. | adm-zip.js:13:13:13:21 | req.files | potentially untrusted source | +| adm-zip.js:32:17:32:41 | admZip. ... "10GB") | adm-zip.js:13:13:13:21 | req.files | adm-zip.js:32:17:32:41 | admZip. ... "10GB") | This Decompression depends on a $@. | adm-zip.js:13:13:13:21 | req.files | potentially untrusted source | +| adm-zip.js:34:5:34:55 | admZip. ... , true) | adm-zip.js:13:13:13:21 | req.files | adm-zip.js:34:5:34:55 | admZip. ... , true) | This Decompression depends on a $@. | adm-zip.js:13:13:13:21 | req.files | potentially untrusted source | +| adm-zip.js:36:5:36:38 | admZip. ... , true) | adm-zip.js:13:13:13:21 | req.files | adm-zip.js:36:5:36:38 | admZip. ... , true) | This Decompression depends on a $@. | adm-zip.js:13:13:13:21 | req.files | potentially untrusted source | +| decompress.js:11:16:11:33 | req.query.filePath | decompress.js:11:16:11:33 | req.query.filePath | decompress.js:11:16:11:33 | req.query.filePath | This Decompression depends on a $@. | decompress.js:11:16:11:33 | req.query.filePath | potentially untrusted source | +| jszip.js:33:22:33:33 | zipFile.data | jszip.js:12:13:12:21 | req.files | jszip.js:33:22:33:33 | zipFile.data | This Decompression depends on a $@. | jszip.js:12:13:12:21 | req.files | potentially untrusted source | +| node-tar.js:24:9:24:15 | tar.x() | node-tar.js:15:13:15:21 | req.files | node-tar.js:24:9:24:15 | tar.x() | This Decompression depends on a $@. | node-tar.js:15:13:15:21 | req.files | potentially untrusted source | +| node-tar.js:30:9:33:10 | tar.x({ ... }) | node-tar.js:15:13:15:21 | req.files | node-tar.js:30:9:33:10 | tar.x({ ... }) | This Decompression depends on a $@. | node-tar.js:15:13:15:21 | req.files | potentially untrusted source | +| node-tar.js:48:9:50:10 | tar.x({ ... }) | node-tar.js:15:13:15:21 | req.files | node-tar.js:48:9:50:10 | tar.x({ ... }) | This Decompression depends on a $@. | node-tar.js:15:13:15:21 | req.files | potentially untrusted source | +| node-tar.js:58:19:58:30 | tarFile.name | node-tar.js:15:13:15:21 | req.files | node-tar.js:58:19:58:30 | tarFile.name | This Decompression depends on a $@. | node-tar.js:15:13:15:21 | req.files | potentially untrusted source | +| node-tar.js:59:25:59:36 | tarFile.name | node-tar.js:15:13:15:21 | req.files | node-tar.js:59:25:59:36 | tarFile.name | This Decompression depends on a $@. | node-tar.js:15:13:15:21 | req.files | potentially untrusted source | +| pako.js:21:31:21:37 | myArray | pako.js:12:14:12:22 | req.files | pako.js:21:31:21:37 | myArray | This Decompression depends on a $@. | pako.js:12:14:12:22 | req.files | potentially untrusted source | +| pako.js:32:31:32:37 | myArray | pako.js:13:14:13:22 | req.files | pako.js:32:31:32:37 | myArray | This Decompression depends on a $@. | pako.js:13:14:13:22 | req.files | potentially untrusted source | +| unbzip2.js:12:50:12:54 | bz2() | unbzip2.js:12:25:12:42 | req.query.FilePath | unbzip2.js:12:50:12:54 | bz2() | This Decompression depends on a $@. | unbzip2.js:12:25:12:42 | req.query.FilePath | potentially untrusted source | +| unzipper.js:16:23:16:63 | unzippe ... ath' }) | unzipper.js:13:40:13:48 | req.files | unzipper.js:16:23:16:63 | unzippe ... ath' }) | This Decompression depends on a $@. | unzipper.js:13:40:13:48 | req.files | potentially untrusted source | +| unzipper.js:19:23:19:41 | unzipper.ParseOne() | unzipper.js:13:40:13:48 | req.files | unzipper.js:19:23:19:41 | unzipper.ParseOne() | This Decompression depends on a $@. | unzipper.js:13:40:13:48 | req.files | potentially untrusted source | +| unzipper.js:24:15:24:30 | unzipper.Parse() | unzipper.js:13:40:13:48 | req.files | unzipper.js:24:15:24:30 | unzipper.Parse() | This Decompression depends on a $@. | unzipper.js:13:40:13:48 | req.files | potentially untrusted source | +| unzipper.js:34:15:34:30 | unzipper.Parse() | unzipper.js:13:40:13:48 | req.files | unzipper.js:34:15:34:30 | unzipper.Parse() | This Decompression depends on a $@. | unzipper.js:13:40:13:48 | req.files | potentially untrusted source | +| unzipper.js:41:35:41:71 | unzippe ... true }) | unzipper.js:13:40:13:48 | req.files | unzipper.js:41:35:41:71 | unzippe ... true }) | This Decompression depends on a $@. | unzipper.js:13:40:13:48 | req.files | potentially untrusted source | +| unzipper.js:51:36:51:72 | unzippe ... true }) | unzipper.js:13:40:13:48 | req.files | unzipper.js:51:36:51:72 | unzippe ... true }) | This Decompression depends on a $@. | unzipper.js:13:40:13:48 | req.files | potentially untrusted source | +| unzipper.js:60:23:60:38 | unzipper.Parse() | unzipper.js:13:40:13:48 | req.files | unzipper.js:60:23:60:38 | unzipper.Parse() | This Decompression depends on a $@. | unzipper.js:13:40:13:48 | req.files | potentially untrusted source | +| unzipper.js:73:23:73:38 | unzipper.Parse() | unzipper.js:13:40:13:48 | req.files | unzipper.js:73:23:73:38 | unzipper.Parse() | This Decompression depends on a $@. | unzipper.js:13:40:13:48 | req.files | potentially untrusted source | +| yauzl.js:12:18:12:39 | req.fil ... le.data | yauzl.js:12:18:12:26 | req.files | yauzl.js:12:18:12:39 | req.fil ... le.data | This Decompression depends on a $@. | yauzl.js:12:18:12:26 | req.files | potentially untrusted source | +| yauzl.js:13:22:13:43 | req.fil ... le.data | yauzl.js:13:22:13:30 | req.files | yauzl.js:13:22:13:43 | req.fil ... le.data | This Decompression depends on a $@. | yauzl.js:13:22:13:30 | req.files | potentially untrusted source | +| yauzl.js:14:34:14:55 | req.fil ... le.data | yauzl.js:14:34:14:42 | req.files | yauzl.js:14:34:14:55 | req.fil ... le.data | This Decompression depends on a $@. | yauzl.js:14:34:14:42 | req.files | potentially untrusted source | +| yauzl.js:39:9:39:27 | zipfile.readEntry() | yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:39:9:39:27 | zipfile.readEntry() | This Decompression depends on a $@. | yauzl.js:37:16:37:33 | req.query.filePath | potentially untrusted source | +| yauzl.js:41:64:41:73 | readStream | yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:41:64:41:73 | readStream | This Decompression depends on a $@. | yauzl.js:37:16:37:33 | req.query.filePath | potentially untrusted source | +| yauzl.js:43:21:43:39 | zipfile.readEntry() | yauzl.js:37:16:37:33 | req.query.filePath | yauzl.js:43:21:43:39 | zipfile.readEntry() | This Decompression depends on a $@. | yauzl.js:37:16:37:33 | req.query.filePath | potentially untrusted source | +| zlib.js:29:9:29:20 | zipFile.data | zlib.js:15:19:15:27 | req.files | zlib.js:29:9:29:20 | zipFile.data | This Decompression depends on a $@. | zlib.js:15:19:15:27 | req.files | potentially untrusted source | +| zlib.js:33:9:33:20 | zipFile.data | zlib.js:15:19:15:27 | req.files | zlib.js:33:9:33:20 | zipFile.data | This Decompression depends on a $@. | zlib.js:15:19:15:27 | req.files | potentially untrusted source | +| zlib.js:38:9:38:20 | zipFile.data | zlib.js:15:19:15:27 | req.files | zlib.js:38:9:38:20 | zipFile.data | This Decompression depends on a $@. | zlib.js:15:19:15:27 | req.files | potentially untrusted source | +| zlib.js:63:21:63:32 | zipFile.data | zlib.js:17:18:17:26 | req.files | zlib.js:63:21:63:32 | zipFile.data | This Decompression depends on a $@. | zlib.js:17:18:17:26 | req.files | potentially untrusted source | +| zlib.js:64:20:64:31 | zipFile.data | zlib.js:17:18:17:26 | req.files | zlib.js:64:20:64:31 | zipFile.data | This Decompression depends on a $@. | zlib.js:17:18:17:26 | req.files | potentially untrusted source | +| zlib.js:65:31:65:42 | zipFile.data | zlib.js:17:18:17:26 | req.files | zlib.js:65:31:65:42 | zipFile.data | This Decompression depends on a $@. | zlib.js:17:18:17:26 | req.files | potentially untrusted source | +| zlib.js:77:22:77:40 | zlib.createGunzip() | zlib.js:19:24:19:32 | req.files | zlib.js:77:22:77:40 | zlib.createGunzip() | This Decompression depends on a $@. | zlib.js:19:24:19:32 | req.files | potentially untrusted source | +| zlib.js:78:22:78:39 | zlib.createUnzip() | zlib.js:19:24:19:32 | req.files | zlib.js:78:22:78:39 | zlib.createUnzip() | This Decompression depends on a $@. | zlib.js:19:24:19:32 | req.files | potentially untrusted source | +| zlib.js:79:22:79:50 | zlib.cr ... press() | zlib.js:19:24:19:32 | req.files | zlib.js:79:22:79:50 | zlib.cr ... press() | This Decompression depends on a $@. | zlib.js:19:24:19:32 | req.files | potentially untrusted source | +| zlib.js:87:9:87:27 | zlib.createGunzip() | zlib.js:21:32:21:40 | req.files | zlib.js:87:9:87:27 | zlib.createGunzip() | This Decompression depends on a $@. | zlib.js:21:32:21:40 | req.files | potentially untrusted source | diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/DecompressionBombs.qlref b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/DecompressionBombs.qlref new file mode 100644 index 00000000000..43c8f6043cc --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/DecompressionBombs.qlref @@ -0,0 +1 @@ +experimental/Security/CWE-522-DecompressionBombs/DecompressionBombs.ql \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/adm-zip.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/adm-zip.js new file mode 100644 index 00000000000..5370a4854ac --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/adm-zip.js @@ -0,0 +1,37 @@ +const AdmZip = require("adm-zip"); +const express = require('express') +const fileUpload = require("express-fileupload"); +const fs = require("fs"); +const app = express(); +const port = 3000; +app.use(fileUpload()); +app.listen(port, () => { + console.log(`Example app listening on port ${port}`) +}); + +app.post('/upload', (req, res) => { + zipBomb(req.files.zipBombFile) + res.send('Hello World!') +}); + +function zipBomb(tarFile) { + fs.writeFileSync(tarFile.name, tarFile.data); + // or using fs.writeFile + + // file path is a tmp file name that can get from DB after saving to DB with remote file upload + // so the input file name will come from a DB source + const admZip + = new AdmZip(tarFile.data); + const zipEntries = admZip.getEntries(); + zipEntries.forEach(function (zipEntry) { + if (zipEntry.entryName === "my_file.txt") { + console.log(zipEntry.getData().toString("utf8")); + } + }); + // outputs the content of file named 10GB + console.log(admZip.readAsText("10GB")); + // extracts the specified file to the specified location + admZip.extractEntryTo("10GB", "/tmp/", false, true); + // extracts everything + admZip.extractAllTo("./tmp", true); +} \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/decompress.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/decompress.js new file mode 100644 index 00000000000..360e29b2f51 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/decompress.js @@ -0,0 +1,16 @@ +const decompress = require('decompress'); +const express = require('express') +const fileUpload = require("express-fileupload"); + +const app = express(); +app.use(fileUpload()); +app.listen(3000, () => { +}); + +app.post('/upload', async (req, res) => { + decompress(req.query.filePath, 'dist').then(files => { + console.log('done!'); + }); + + res.send("OK") +}); diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/fflate.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/fflate.js new file mode 100644 index 00000000000..77eba7a89d7 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/fflate.js @@ -0,0 +1,63 @@ +const fflate = require('fflate'); +const express = require('express') +const fileUpload = require("express-fileupload"); + +const { writeFileSync } = require("fs"); +const app = express(); +app.use(fileUpload()); +app.listen(3000, () => { +}); + +app.post('/upload', async (req, res) => { + // NOT OK + fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data)); + fflate.unzip(new Uint8Array(new Uint8Array(req.files.CompressedFile.data))); + fflate.unzlib(new Uint8Array(req.files.CompressedFile.data)); + fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data)); + fflate.gunzip(new Uint8Array(req.files.CompressedFile.data)); + fflate.gunzipSync(new Uint8Array(req.files.CompressedFile.data)); + fflate.decompress(new Uint8Array(req.files.CompressedFile.data)); + fflate.decompressSync(new Uint8Array(req.files.CompressedFile.data)); + + // OK + fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data), { + filter(file) { + return file.originalSize <= 1_000_000; + } + }); + fflate.unzip(new Uint8Array(new Uint8Array(req.files.CompressedFile.data)), { + filter(file) { + return file.originalSize <= 1_000_000; + } + }); + fflate.unzlib(new Uint8Array(req.files.CompressedFile.data), { + filter(file) { + return file.originalSize <= 1_000_000; + } + }); + fflate.unzlibSync(new Uint8Array(req.files.CompressedFile.data), { + filter(file) { + return file.originalSize <= 1_000_000; + } + }); + fflate.gunzip(new Uint8Array(req.files.CompressedFile.data), { + filter(file) { + return file.originalSize <= 1_000_000; + } + }); + fflate.gunzipSync(new Uint8Array(req.files.CompressedFile.data), { + filter(file) { + return file.originalSize <= 1_000_000; + } + }); + fflate.decompress(new Uint8Array(req.files.CompressedFile.data), { + filter(file) { + return file.originalSize <= 1_000_000; + } + }); + fflate.decompressSync(new Uint8Array(req.files.CompressedFile.data), { + filter(file) { + return file.originalSize <= 1_000_000; + } + }); +}); diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/gunzip-maybe.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/gunzip-maybe.js new file mode 100644 index 00000000000..a022047d6db --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/gunzip-maybe.js @@ -0,0 +1,14 @@ +const gunzipmaybe = require("gunzip-maybe"); +const express = require('express') +const fileUpload = require("express-fileupload"); +const { Readable } = require('stream'); +const app = express(); +app.use(fileUpload()); +app.listen(3000, () => { +}); + +app.post('/upload', async (req, res) => { + // Unsafe + const RemoteStream = Readable.from(req.files.ZipFile.data); + RemoteStream.pipe(gunzipmaybe).createWriteStream("tmp") +}); \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/jszip.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/jszip.js new file mode 100644 index 00000000000..2da0757c276 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/jszip.js @@ -0,0 +1,44 @@ +const jszipp = require("jszip"); +const express = require('express') +const fileUpload = require("express-fileupload"); +const app = express(); +const port = 3000; +app.use(fileUpload()); +app.listen(port, () => { + console.log(`Example app listening on port ${port}`) +}); + +app.post('/upload', (req, res) => { + zipBomb(req.files.zipBombFile.data) + zipBombSafe(req.files.zipBombFile.data) + res.send("OK") +}); + +function zipBombSafe(zipFile) { + jszipp.loadAsync(zipFile.data).then(function (zip) { + if (zip.file("10GB")["_data"]["uncompressedSize"] > 1024 * 1024 * 8) { + console.log("error") + return + } + zip.files["10GB"].async("uint8array").then(function (u8) { + console.log(u8); + }); + zip.file("10GB").async("uint8array").then(function (u8) { + console.log(u8); + }); + }); +} + +function zipBomb(zipFile) { + jszipp.loadAsync(zipFile.data).then(function (zip) { + zip.files["10GB"].async("uint8array").then(function (u8) { + console.log(u8); + }); + zip.file("10GB").async("uint8array").then(function (u8) { + console.log(u8); + }); + }); +} + + +module.exports = { localZipLoad }; \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/node-tar.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/node-tar.js new file mode 100644 index 00000000000..53dd6c3d0a8 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/node-tar.js @@ -0,0 +1,67 @@ +const tar = require("tar"); +const express = require('express') +const fileUpload = require("express-fileupload"); +const { Readable, writeFileSync } = require("stream"); +const fs = require("fs"); +const { createGunzip } = require("zlib"); +const app = express(); +const port = 3000; +app.use(fileUpload()); +app.listen(port, () => { + console.log(`Example app listening on port ${port}`) +}); + +app.post('/upload', (req, res) => { + zipBomb(req.files.zipBombFile.data) + res.send('Hello World!') +}); + +function zipBomb(tarFile) { + // scenario 1 + const inputFile = Readable.from(tarFile.data); + const outputFile = fs.createWriteStream('/tmp/untar'); + inputFile.pipe( + tar.x() + ).pipe(outputFile); + + // scenario 2 + fs.writeFileSync(tarFile.name, tarFile.data); + fs.createReadStream(tarFile.name).pipe( + tar.x({ + strip: 1, + C: 'some-dir' + }) + ) + // safe https://github.com/isaacs/node-tar/blob/8c5af15e43a769fd24aa7f1c84d93e54824d19d2/lib/list.js#L90 + fs.createReadStream(tarFile.name).pipe( + tar.x({ + strip: 1, + C: 'some-dir', + maxReadSize: 16 * 1024 * 1024 // 16 MB + }) + ) + // scenario 3 + const decompressor = createGunzip(); + fs.createReadStream(tarFile.name).pipe( + decompressor + ).pipe( + tar.x({ + cwd: "dest" + }) + ) + + // scenario 4 + fs.writeFileSync(tarFile.name, tarFile.data); + // or using fs.writeFile + // file path is a tmp file name that can get from DB after saving to DB with remote file upload + // so the input file name will come from a DB source + tar.x({ file: tarFile.name }) + tar.extract({ file: tarFile.name }) + // safe https://github.com/isaacs/node-tar/blob/8c5af15e43a769fd24aa7f1c84d93e54824d19d2/lib/list.js#L90 + tar.x({ + file: tarFile.name, + strip: 1, + C: 'some-dir', + maxReadSize: 16 * 1024 * 1024 // 16 MB + }) +} \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/pako.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/pako.js new file mode 100644 index 00000000000..132d08e1f90 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/pako.js @@ -0,0 +1,37 @@ +const pako = require('pako'); +const express = require('express') +const fileUpload = require("express-fileupload"); +const app = express(); +const port = 3000; +app.use(fileUpload()); +app.listen(port, () => { + console.log(`Example app listening on port ${port}`) +}); + +app.post('/upload', (req, res) => { + zipBomb1(req.files.zipBombFile.data); + zipBomb2(req.files.zipBombFile.data); + res.send('Hello World!'); +}); + +function zipBomb1(zipFile) { + const myArray = Buffer.from(new Uint8Array(zipFile.data.buffer)); + let output; + try { + output = pako.inflate(myArray); + console.log(output); + } catch (err) { + console.log(err); + } +} + +function zipBomb2(zipFile) { + const myArray = new Uint8Array(zipFile.data.buffer).buffer; + let output; + try { + output = pako.inflate(myArray); + console.log(output); + } catch (err) { + console.log(err); + } +} \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unbzip2.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unbzip2.js new file mode 100644 index 00000000000..da560ca30f1 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unbzip2.js @@ -0,0 +1,13 @@ +var bz2 = require('unbzip2-stream'); +var fs = require('fs'); +const express = require('express') +const fileUpload = require("express-fileupload"); + +const app = express(); +app.use(fileUpload()); +app.listen(3000, () => { +}); + +app.post('/upload', async (req, res) => { + fs.createReadStream(req.query.FilePath).pipe(bz2()).pipe(process.stdout); +}); diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unzip.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unzip.js new file mode 100644 index 00000000000..88acb6a4917 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unzip.js @@ -0,0 +1,26 @@ +const unzip = require("unzip"); +const { createWriteStream } = require("fs"); +const express = require('express') +const fileUpload = require("express-fileupload"); +const { Readable } = require("stream"); + +const app = express(); +app.use(fileUpload()); +app.listen(3000, () => { +}); + +app.post('/upload', async (req, res) => { + const InputStream = Readable.from(req.files.ZipFile.data); + InputStream.pipe(unzip.Parse()) + .on('entry', function (entry) { + if (entry.uncompressedSize > 1024) { + throw "uncompressed size exceed" + } + }); + + + let writeStream = createWriteStream('output/path'); + InputStream + .pipe(unzip.Parse()) + .pipe(writeStream) +}); \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unzipper.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unzipper.js new file mode 100644 index 00000000000..79e03b9c181 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/unzipper.js @@ -0,0 +1,106 @@ +const unzipper = require("unzipper"); +const express = require('express') +const fileUpload = require("express-fileupload"); +const { Readable } = require('stream'); +const { createWriteStream, readFileSync } = require("fs"); +const stream = require("node:stream"); +const app = express(); +app.use(fileUpload()); +app.listen(3000, () => { +}); + +app.post('/upload', async (req, res) => { + const RemoteStream = Readable.from(req.files.ZipFile.data); + + // Unsafe + RemoteStream.pipe(unzipper.Extract({ path: 'output/path' })); + + // Unsafe + RemoteStream.pipe(unzipper.ParseOne()) + .pipe(createWriteStream('firstFile.txt')); + + // Safe because of uncompressedSize + RemoteStream + .pipe(unzipper.Parse()) + .on('entry', function (entry) { + const size = entry.vars.uncompressedSize; + if (size < 1024 * 1024 * 1024) { + entry.pipe(createWriteStream('output/path')); + } + }); + + // Unsafe + RemoteStream + .pipe(unzipper.Parse()) + .on('entry', function (entry) { + const size = entry.vars.uncompressedSize; + entry.pipe(createWriteStream('output/path')); + }); + + // Unsafe + const zip = RemoteStream.pipe(unzipper.Parse({ forceStream: true })); + for await (const entry of zip) { + const fileName = entry.path; + if (fileName === "this IS the file I'm looking for") { + entry.pipe(createWriteStream('output/path')); + } else { + entry.autodrain(); + } + } + // Safe + const zip2 = RemoteStream.pipe(unzipper.Parse({ forceStream: true })); + for await (const entry of zip2) { + const size = entry.vars.uncompressedSize; + if (size < 1024 * 1024 * 1024) { + entry.pipe(createWriteStream('output/path')); + } + } + + // Safe because of uncompressedSize + RemoteStream.pipe(unzipper.Parse()) + .pipe(stream.Transform({ + objectMode: true, + transform: function (entry, e, cb) { + const size = entry.vars.uncompressedSize; // There is also compressedSize; + if (size < 1024 * 1024 * 1024) { + entry.pipe(createWriteStream('output/path')) + .on('finish', cb); + } + } + })); + + // Unsafe + RemoteStream.pipe(unzipper.Parse()) + .pipe(stream.Transform({ + objectMode: true, + transform: function (entry, e, cb) { + entry.pipe(createWriteStream('output/path')) + .on('finish', cb); + } + })); + + let directory = await unzipper.Open.file('path/to/archive.zip'); + new Promise((resolve, reject) => { + directory.files[0] + .stream() + .pipe(fs.createWriteStream('firstFile')) + .on('error', reject) + .on('finish', resolve) + }); + + const request = require('request'); + // Unsafe + directory = await unzipper.Open.url(request, 'http://example.com/example.zip'); + const file = directory.files.find(d => d.path === 'example.xml'); + await file.buffer(); + + // Unsafe + const buffer = readFileSync(request.query.FilePath); + directory = await unzipper.Open.buffer(buffer); + directory.files[0].buffer(); + + // Unsafe + unzipper.Open.file(request.query.FilePath) + .then(d => d.extract({ path: '/extraction/path', concurrency: 5 })); + +}); diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/yauzl.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/yauzl.js new file mode 100644 index 00000000000..3b726650f76 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/yauzl.js @@ -0,0 +1,54 @@ +const { pipeline } = require('stream/promises'); +const yauzl = require("yauzl"); +const fs = require("fs"); +const express = require('express') +const fileUpload = require("express-fileupload"); +const app = express(); +app.use(fileUpload()); +app.listen(3000, () => { +}); + +app.post('/upload', (req, res) => { + yauzl.fromFd(req.files.zipFile.data) + yauzl.fromBuffer(req.files.zipFile.data) + yauzl.fromRandomAccessReader(req.files.zipFile.data) + // Safe + yauzl.open(req.query.filePath, { lazyEntries: true }, function (err, zipfile) { + if (err) throw err; + zipfile.readEntry(); + zipfile.on("entry", function (entry) { + zipfile.openReadStream(entry, async function (err, readStream) { + if (err) throw err; + if (entry.uncompressedSize > 1024 * 1024 * 1024) { + throw err + } + readStream.on("end", function () { + zipfile.readEntry(); + }); + const outputFile = fs.createWriteStream('testiness'); + await pipeline( + readStream, + outputFile + ) + }); + }); + }); + // Unsafe + yauzl.open(req.query.filePath, { lazyEntries: true }, function (err, zipfile) { + if (err) throw err; + zipfile.readEntry(); + zipfile.on("entry", function (entry) { + zipfile.openReadStream(entry, async function (err, readStream) { + readStream.on("end", function () { + zipfile.readEntry(); + }); + const outputFile = fs.createWriteStream('testiness'); + await pipeline( + readStream, + outputFile + ) + }); + }); + }); + res.send("OK") +}); \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/zlib.js b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/zlib.js new file mode 100644 index 00000000000..3954d991614 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-522-DecompressionBombs/zlib.js @@ -0,0 +1,98 @@ +const fs = require("fs"); +const zlib = require("node:zlib"); +const { Readable } = require('stream'); +const express = require('express'); +const fileUpload = require("express-fileupload"); +const app = express(); +const port = 3000; +const stream = require('stream/promises'); +app.use(fileUpload()); +app.listen(port, () => { + console.log(`Example app listening on port ${port}`) +}); + +app.post('/upload', async (req, res) => { + zlibBombAsync(req.files.zipBombFile.data) + zlibBombAsyncSafe(req.files.zipBombFile.data); + zlibBombSync(req.files.zipBombFile.data) + zlibBombSyncSafe(req.files.zipBombFile.data) + zlibBombPipeStream(req.files.zipBombFile.data) + zlibBombPipeStreamSafe(req.files.zipBombFile.data) + zlibBombPipeStreamPromises(req.files.zipBombFile.data).then(r => + console.log("sone")); + res.send('Hello World!') +}); + + +function zlibBombAsync(zipFile) { + zlib.gunzip( + zipFile.data, + (err, buffer) => { + }); + zlib.unzip( + zipFile.data, + (err, buffer) => { + }); + + zlib.brotliDecompress( + zipFile.data, + (err, buffer) => { + }); +} + +function zlibBombAsyncSafe(zipFile) { + zlib.gunzip( + zipFile.data, + { maxOutputLength: 1024 * 1024 * 5 }, + (err, buffer) => { + }); + zlib.unzip( + zipFile.data, + { maxOutputLength: 1024 * 1024 * 5 }, + (err, buffer) => { + }); + + zlib.brotliDecompress( + zipFile.data, + { maxOutputLength: 1024 * 1024 * 5 }, + (err, buffer) => { + }); +} + +function zlibBombSync(zipFile) { + zlib.gunzipSync(zipFile.data, { finishFlush: zlib.constants.Z_SYNC_FLUSH }); + zlib.unzipSync(zipFile.data); + zlib.brotliDecompressSync(zipFile.data); +} + +function zlibBombSyncSafe(zipFile) { + zlib.gunzipSync(zipFile.data, { finishFlush: zlib.constants.Z_SYNC_FLUSH, maxOutputLength: 1024 * 1024 * 5 }); + zlib.unzipSync(zipFile.data, { maxOutputLength: 1024 * 1024 * 5 }); + zlib.brotliDecompressSync(zipFile.data, { maxOutputLength: 1024 * 1024 * 5 }); +} + +function zlibBombPipeStream(zipFile) { + const inputStream = Readable.from(zipFile.data); + const outputFile = fs.createWriteStream('unzip.txt'); + inputStream.pipe(zlib.createGunzip()).pipe(outputFile); + inputStream.pipe(zlib.createUnzip()).pipe(outputFile); + inputStream.pipe(zlib.createBrotliDecompress()).pipe(outputFile); +} + +async function zlibBombPipeStreamPromises(zipFile) { + const inputStream = Readable.from(zipFile.data); + const outputFile = fs.createWriteStream('unzip.txt'); + await stream.pipeline( + inputStream, + zlib.createGunzip(), + outputFile + ) +} + +function zlibBombPipeStreamSafe(zipFile) { + const inputFile = Readable.from(zipFile.data); + const outputFile = fs.createWriteStream('unzip.txt'); + inputFile.pipe(zlib.createGunzip({ maxOutputLength: 1024 * 1024 * 5 })).pipe(outputFile); + inputFile.pipe(zlib.createUnzip({ maxOutputLength: 1024 * 1024 * 5 })).pipe(outputFile); + inputFile.pipe(zlib.createBrotliDecompress({ maxOutputLength: 1024 * 1024 * 5 })).pipe(outputFile); +} diff --git a/javascript/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.expected b/javascript/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.expected index 3635090cb43..fc41f193149 100644 --- a/javascript/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.expected +++ b/javascript/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.expected @@ -153,12 +153,12 @@ nodes | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | -| HardcodedCredentials.js:160:38:160:48 | "change_me" | -| HardcodedCredentials.js:160:38:160:48 | "change_me" | -| HardcodedCredentials.js:160:38:160:48 | "change_me" | -| HardcodedCredentials.js:161:41:161:51 | 'change_me' | -| HardcodedCredentials.js:161:41:161:51 | 'change_me' | -| HardcodedCredentials.js:161:41:161:51 | 'change_me' | +| HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | +| HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | +| HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | +| HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | +| HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | +| HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | | HardcodedCredentials.js:164:35:164:45 | 'change_me' | | HardcodedCredentials.js:164:35:164:45 | 'change_me' | | HardcodedCredentials.js:164:35:164:45 | 'change_me' | @@ -271,6 +271,18 @@ nodes | HardcodedCredentials.js:295:37:295:66 | `Basic ... 000001` | | HardcodedCredentials.js:295:37:295:66 | `Basic ... 000001` | | HardcodedCredentials.js:295:37:295:66 | `Basic ... 000001` | +| HardcodedCredentials.js:299:44:299:52 | 'mytoken' | +| HardcodedCredentials.js:299:44:299:52 | 'mytoken' | +| HardcodedCredentials.js:299:44:299:52 | 'mytoken' | +| HardcodedCredentials.js:300:44:300:56 | 'SampleToken' | +| HardcodedCredentials.js:300:44:300:56 | 'SampleToken' | +| HardcodedCredentials.js:300:44:300:56 | 'SampleToken' | +| HardcodedCredentials.js:301:44:301:55 | 'MyPassword' | +| HardcodedCredentials.js:301:44:301:55 | 'MyPassword' | +| HardcodedCredentials.js:301:44:301:55 | 'MyPassword' | +| HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | +| HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | +| HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | edges | HardcodedCredentials.js:5:15:5:22 | 'dbuser' | HardcodedCredentials.js:5:15:5:22 | 'dbuser' | | HardcodedCredentials.js:8:19:8:28 | 'hgfedcba' | HardcodedCredentials.js:8:19:8:28 | 'hgfedcba' | @@ -326,8 +338,8 @@ edges | HardcodedCredentials.js:130:44:130:53 | 'hgfedcba' | HardcodedCredentials.js:130:44:130:53 | 'hgfedcba' | | HardcodedCredentials.js:131:52:131:61 | 'hgfedcba' | HardcodedCredentials.js:131:52:131:61 | 'hgfedcba' | | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | -| HardcodedCredentials.js:160:38:160:48 | "change_me" | HardcodedCredentials.js:160:38:160:48 | "change_me" | -| HardcodedCredentials.js:161:41:161:51 | 'change_me' | HardcodedCredentials.js:161:41:161:51 | 'change_me' | +| HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | +| HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | | HardcodedCredentials.js:164:35:164:45 | 'change_me' | HardcodedCredentials.js:164:35:164:45 | 'change_me' | | HardcodedCredentials.js:171:11:171:25 | USER | HardcodedCredentials.js:173:35:173:38 | USER | | HardcodedCredentials.js:171:18:171:25 | 'sdsdag' | HardcodedCredentials.js:171:11:171:25 | USER | @@ -399,6 +411,10 @@ edges | HardcodedCredentials.js:293:37:293:65 | `Basic ... xxxxxx` | HardcodedCredentials.js:293:37:293:65 | `Basic ... xxxxxx` | | HardcodedCredentials.js:294:37:294:70 | `Basic ... gbbbbb` | HardcodedCredentials.js:294:37:294:70 | `Basic ... gbbbbb` | | HardcodedCredentials.js:295:37:295:66 | `Basic ... 000001` | HardcodedCredentials.js:295:37:295:66 | `Basic ... 000001` | +| HardcodedCredentials.js:299:44:299:52 | 'mytoken' | HardcodedCredentials.js:299:44:299:52 | 'mytoken' | +| HardcodedCredentials.js:300:44:300:56 | 'SampleToken' | HardcodedCredentials.js:300:44:300:56 | 'SampleToken' | +| HardcodedCredentials.js:301:44:301:55 | 'MyPassword' | HardcodedCredentials.js:301:44:301:55 | 'MyPassword' | +| HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | #select | HardcodedCredentials.js:5:15:5:22 | 'dbuser' | HardcodedCredentials.js:5:15:5:22 | 'dbuser' | HardcodedCredentials.js:5:15:5:22 | 'dbuser' | The hard-coded value "dbuser" is used as $@. | HardcodedCredentials.js:5:15:5:22 | 'dbuser' | user name | | HardcodedCredentials.js:8:19:8:28 | 'hgfedcba' | HardcodedCredentials.js:8:19:8:28 | 'hgfedcba' | HardcodedCredentials.js:8:19:8:28 | 'hgfedcba' | The hard-coded value "hgfedcba" is used as $@. | HardcodedCredentials.js:8:19:8:28 | 'hgfedcba' | password | @@ -448,8 +464,8 @@ edges | HardcodedCredentials.js:130:44:130:53 | 'hgfedcba' | HardcodedCredentials.js:130:44:130:53 | 'hgfedcba' | HardcodedCredentials.js:130:44:130:53 | 'hgfedcba' | The hard-coded value "hgfedcba" is used as $@. | HardcodedCredentials.js:130:44:130:53 | 'hgfedcba' | key | | HardcodedCredentials.js:131:52:131:61 | 'hgfedcba' | HardcodedCredentials.js:131:52:131:61 | 'hgfedcba' | HardcodedCredentials.js:131:52:131:61 | 'hgfedcba' | The hard-coded value "hgfedcba" is used as $@. | HardcodedCredentials.js:131:52:131:61 | 'hgfedcba' | key | | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | The hard-coded value "hgfedcba" is used as $@. | HardcodedCredentials.js:135:41:135:50 | "hgfedcba" | key | -| HardcodedCredentials.js:160:38:160:48 | "change_me" | HardcodedCredentials.js:160:38:160:48 | "change_me" | HardcodedCredentials.js:160:38:160:48 | "change_me" | The hard-coded value "change_me" is used as $@. | HardcodedCredentials.js:160:38:160:48 | "change_me" | key | -| HardcodedCredentials.js:161:41:161:51 | 'change_me' | HardcodedCredentials.js:161:41:161:51 | 'change_me' | HardcodedCredentials.js:161:41:161:51 | 'change_me' | The hard-coded value "change_me" is used as $@. | HardcodedCredentials.js:161:41:161:51 | 'change_me' | key | +| HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | The hard-coded value "oiuneawrgiyubaegr" is used as $@. | HardcodedCredentials.js:160:38:160:56 | "oiuneawrgiyubaegr" | key | +| HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | The hard-coded value "oiuneawrgiyubaegr" is used as $@. | HardcodedCredentials.js:161:41:161:59 | 'oiuneawrgiyubaegr' | key | | HardcodedCredentials.js:171:18:171:25 | 'sdsdag' | HardcodedCredentials.js:171:18:171:25 | 'sdsdag' | HardcodedCredentials.js:178:30:178:44 | `Basic ${AUTH}` | The hard-coded value "sdsdag" is used as $@. | HardcodedCredentials.js:178:30:178:44 | `Basic ${AUTH}` | authorization header | | HardcodedCredentials.js:171:18:171:25 | 'sdsdag' | HardcodedCredentials.js:171:18:171:25 | 'sdsdag' | HardcodedCredentials.js:188:30:188:44 | `Basic ${AUTH}` | The hard-coded value "sdsdag" is used as $@. | HardcodedCredentials.js:188:30:188:44 | `Basic ${AUTH}` | authorization header | | HardcodedCredentials.js:171:18:171:25 | 'sdsdag' | HardcodedCredentials.js:171:18:171:25 | 'sdsdag' | HardcodedCredentials.js:195:37:195:51 | `Basic ${AUTH}` | The hard-coded value "sdsdag" is used as $@. | HardcodedCredentials.js:195:37:195:51 | `Basic ${AUTH}` | authorization header | @@ -464,3 +480,4 @@ edges | HardcodedCredentials.js:245:22:245:44 | "myHard ... ateKey" | HardcodedCredentials.js:245:22:245:44 | "myHard ... ateKey" | HardcodedCredentials.js:246:42:246:51 | privateKey | The hard-coded value "myHardCodedPrivateKey" is used as $@. | HardcodedCredentials.js:246:42:246:51 | privateKey | key | | HardcodedCredentials.js:292:37:292:57 | `Basic ... sdsdag` | HardcodedCredentials.js:292:37:292:57 | `Basic ... sdsdag` | HardcodedCredentials.js:292:37:292:57 | `Basic ... sdsdag` | The hard-coded value "Basic sdsdag:sdsdag" is used as $@. | HardcodedCredentials.js:292:37:292:57 | `Basic ... sdsdag` | authorization header | | HardcodedCredentials.js:294:37:294:70 | `Basic ... gbbbbb` | HardcodedCredentials.js:294:37:294:70 | `Basic ... gbbbbb` | HardcodedCredentials.js:294:37:294:70 | `Basic ... gbbbbb` | The hard-coded value "Basic sdsdag:aaaiuogrweuibgbbbbb" is used as $@. | HardcodedCredentials.js:294:37:294:70 | `Basic ... gbbbbb` | authorization header | +| HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | The hard-coded value "iubfewiaaweiybgaeuybgera" is used as $@. | HardcodedCredentials.js:302:44:302:69 | 'iubfew ... ybgera' | key | diff --git a/javascript/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.js b/javascript/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.js index 8482d5106fe..d1543f16dc7 100644 --- a/javascript/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.js +++ b/javascript/ql/test/query-tests/Security/CWE-798/HardcodedCredentials.js @@ -157,8 +157,8 @@ })(); (function(){ - require("cookie-session")({ secret: "change_me" }); // NOT OK - require('crypto').createHmac('sha256', 'change_me'); // NOT OK + require("cookie-session")({ secret: "oiuneawrgiyubaegr" }); // NOT OK + require('crypto').createHmac('sha256', 'oiuneawrgiyubaegr'); // NOT OK var basicAuth = require('express-basic-auth'); basicAuth({users: { [adminName]: 'change_me' }}); // OK @@ -294,3 +294,10 @@ headers.append("Authorization", `Basic sdsdag:aaaiuogrweuibgbbbbb`); // NOT OK headers.append("Authorization", `Basic sdsdag:000000000000001`); // OK }); + +(function () { + require('crypto').createHmac('sha256', 'mytoken'); // OK + require('crypto').createHmac('sha256', 'SampleToken'); // OK + require('crypto').createHmac('sha256', 'MyPassword'); // OK + require('crypto').createHmac('sha256', 'iubfewiaaweiybgaeuybgera'); // NOT OK +})(); \ No newline at end of file diff --git a/misc/bazel/internal/git_lfs_probe.py b/misc/bazel/internal/git_lfs_probe.py index f0a4dfd4117..d22747e8547 100755 --- a/misc/bazel/internal/git_lfs_probe.py +++ b/misc/bazel/internal/git_lfs_probe.py @@ -18,14 +18,15 @@ from urllib.parse import urlparse import re import base64 from dataclasses import dataclass +from typing import Dict @dataclass class Endpoint: href: str - headers: dict[str, str] + headers: Dict[str, str] - def update_headers(self, d: dict[str, str]): + def update_headers(self, d: Dict[str, str]): self.headers.update((k.capitalize(), v) for k, v in d.items()) @@ -67,7 +68,7 @@ def get_endpoint(): # see https://github.com/actions/checkout/blob/44c2b7a8a4ea60a981eaca3cf939b5f4305c123b/src/git-auth-helper.ts#L56-L63 auth = git("config", f"http.{url.scheme}://{url.netloc}/.extraheader") endpoint.update_headers(get_env(auth, sep=": ")) - if "GITHUB_TOKEN" in os.environ: + if os.environ.get("GITHUB_TOKEN"): endpoint.headers["Authorization"] = f"token {os.environ['GITHUB_TOKEN']}" if "Authorization" not in endpoint.headers: # last chance: use git credentials (possibly backed by a credential helper like the one installed by gh) diff --git a/misc/scripts/accept-expected-changes-from-ci.py b/misc/scripts/accept-expected-changes-from-ci.py index a8c86d8f3e4..26e31c1169e 100755 --- a/misc/scripts/accept-expected-changes-from-ci.py +++ b/misc/scripts/accept-expected-changes-from-ci.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -""" +r""" This script can be used to go over `codeql test run` expected/actual log output from github actions, and apply patches locally to make the tests pass. diff --git a/misc/suite-helpers/CHANGELOG.md b/misc/suite-helpers/CHANGELOG.md index e97a0b0fe5f..94639d0249e 100644 --- a/misc/suite-helpers/CHANGELOG.md +++ b/misc/suite-helpers/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.16 + +No user-facing changes. + ## 0.7.15 No user-facing changes. diff --git a/misc/suite-helpers/change-notes/released/0.7.16.md b/misc/suite-helpers/change-notes/released/0.7.16.md new file mode 100644 index 00000000000..25e4d92a4a6 --- /dev/null +++ b/misc/suite-helpers/change-notes/released/0.7.16.md @@ -0,0 +1,3 @@ +## 0.7.16 + +No user-facing changes. diff --git a/misc/suite-helpers/codeql-pack.release.yml b/misc/suite-helpers/codeql-pack.release.yml index e56b7f6a7b1..1ba18ba0a0a 100644 --- a/misc/suite-helpers/codeql-pack.release.yml +++ b/misc/suite-helpers/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.7.15 +lastReleaseVersion: 0.7.16 diff --git a/misc/suite-helpers/qlpack.yml b/misc/suite-helpers/qlpack.yml index 1e5655889b8..ffc75a9145c 100644 --- a/misc/suite-helpers/qlpack.yml +++ b/misc/suite-helpers/qlpack.yml @@ -1,4 +1,4 @@ name: codeql/suite-helpers -version: 0.7.16-dev +version: 0.7.17-dev groups: shared warnOnImplicitThis: true diff --git a/python/ql/lib/CHANGELOG.md b/python/ql/lib/CHANGELOG.md index 3ca353c7506..e3be9877649 100644 --- a/python/ql/lib/CHANGELOG.md +++ b/python/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.12.1 + +### Major Analysis Improvements + +* Added modeling of the `pyramid` framework, leading to new remote flow sources and sinks. + ## 0.12.0 ### Breaking Changes diff --git a/python/ql/lib/change-notes/released/0.12.1.md b/python/ql/lib/change-notes/released/0.12.1.md new file mode 100644 index 00000000000..82ef5e330e1 --- /dev/null +++ b/python/ql/lib/change-notes/released/0.12.1.md @@ -0,0 +1,5 @@ +## 0.12.1 + +### Major Analysis Improvements + +* Added modeling of the `pyramid` framework, leading to new remote flow sources and sinks. diff --git a/python/ql/lib/codeql-pack.release.yml b/python/ql/lib/codeql-pack.release.yml index 5e2fb32b059..58783ccb26c 100644 --- a/python/ql/lib/codeql-pack.release.yml +++ b/python/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.12.0 +lastReleaseVersion: 0.12.1 diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index a06d9ac3d49..774fb7cf9ef 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-all -version: 0.12.1-dev +version: 0.12.2-dev groups: python dbscheme: semmlecode.python.dbscheme extractor: python diff --git a/python/ql/lib/semmle/python/ApiGraphs.qll b/python/ql/lib/semmle/python/ApiGraphs.qll index b89e5c24987..1ce04852f3a 100644 --- a/python/ql/lib/semmle/python/ApiGraphs.qll +++ b/python/ql/lib/semmle/python/ApiGraphs.qll @@ -226,6 +226,11 @@ module API { */ Node getASubclass() { result = this.getASuccessor(Label::subclass()) } + /** + * Gets a node representing an instance of the class (or a transitive subclass of the class) represented by this node. + */ + Node getAnInstance() { result = this.getASubclass*().getReturn() } + /** * Gets a node representing the result from awaiting this node. */ diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index 4b14a834b31..9ee3f787324 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -1025,6 +1025,114 @@ module Http { } } + /** + * A data-flow node that sets a header in an HTTP response. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `ResponseHeaderWrite::Range` instead. + */ + class ResponseHeaderWrite extends DataFlow::Node instanceof ResponseHeaderWrite::Range { + /** + * Gets the argument containing the header name. + */ + DataFlow::Node getNameArg() { result = super.getNameArg() } + + /** + * Gets the argument containing the header value. + */ + DataFlow::Node getValueArg() { result = super.getValueArg() } + + /** + * Holds if newlines are accepted in the header name argument. + */ + predicate nameAllowsNewline() { super.nameAllowsNewline() } + + /** + * Holds if newlines are accepted in the header value argument. + */ + predicate valueAllowsNewline() { super.valueAllowsNewline() } + } + + /** Provides a class for modeling header writes on HTTP responses. */ + module ResponseHeaderWrite { + /** + *A data-flow node that sets a header in an HTTP response. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `ResponseHeaderWrite` instead. + */ + abstract class Range extends DataFlow::Node { + /** + * Gets the argument containing the header name. + */ + abstract DataFlow::Node getNameArg(); + + /** + * Gets the argument containing the header value. + */ + abstract DataFlow::Node getValueArg(); + + /** + * Holds if newlines are accepted in the header name argument. + */ + abstract predicate nameAllowsNewline(); + + /** + * Holds if newlines are accepted in the header value argument. + */ + abstract predicate valueAllowsNewline(); + } + } + + /** + * A data-flow node that sets multiple headers in an HTTP response using a dict or a list of tuples. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `ResponseHeaderBulkWrite::Range` instead. + */ + class ResponseHeaderBulkWrite extends DataFlow::Node instanceof ResponseHeaderBulkWrite::Range { + /** + * Gets the argument containing the headers dictionary. + */ + DataFlow::Node getBulkArg() { result = super.getBulkArg() } + + /** + * Holds if newlines are accepted in the header name argument. + */ + predicate nameAllowsNewline() { super.nameAllowsNewline() } + + /** + * Holds if newlines are accepted in the header value argument. + */ + predicate valueAllowsNewline() { super.valueAllowsNewline() } + } + + /** Provides a class for modeling bulk header writes on HTTP responses. */ + module ResponseHeaderBulkWrite { + /** + * A data-flow node that sets multiple headers in an HTTP response using a dict. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `ResponseHeaderBulkWrite` instead. + */ + abstract class Range extends DataFlow::Node { + /** + * Gets the argument containing the headers dictionary. + */ + abstract DataFlow::Node getBulkArg(); + + /** + * Holds if newlines are accepted in the header name argument. + */ + abstract predicate nameAllowsNewline(); + + /** + * Holds if newlines are accepted in the header value argument. + */ + abstract predicate valueAllowsNewline(); + } + } + /** * A data-flow node that sets a cookie in an HTTP response. * diff --git a/python/ql/lib/semmle/python/Frameworks.qll b/python/ql/lib/semmle/python/Frameworks.qll index a6288dadc11..8a374a9ca7d 100644 --- a/python/ql/lib/semmle/python/Frameworks.qll +++ b/python/ql/lib/semmle/python/Frameworks.qll @@ -29,6 +29,7 @@ private import semmle.python.frameworks.FastApi private import semmle.python.frameworks.Flask private import semmle.python.frameworks.FlaskAdmin private import semmle.python.frameworks.FlaskSqlAlchemy +private import semmle.python.frameworks.Gradio private import semmle.python.frameworks.Httpx private import semmle.python.frameworks.Idna private import semmle.python.frameworks.Invoke @@ -56,6 +57,7 @@ private import semmle.python.frameworks.PyMongo private import semmle.python.frameworks.Pymssql private import semmle.python.frameworks.PyMySQL private import semmle.python.frameworks.Pyodbc +private import semmle.python.frameworks.Pyramid private import semmle.python.frameworks.Requests private import semmle.python.frameworks.RestFramework private import semmle.python.frameworks.Rsa diff --git a/python/ql/lib/semmle/python/frameworks/Flask.qll b/python/ql/lib/semmle/python/frameworks/Flask.qll index 3416d2db8b0..933fd87d670 100644 --- a/python/ql/lib/semmle/python/frameworks/Flask.qll +++ b/python/ql/lib/semmle/python/frameworks/Flask.qll @@ -220,6 +220,43 @@ module Flask { /** Gets a reference to an instance of `flask.Response`. */ DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + + /** An `Headers` instance that is part of a Flask response. */ + private class FlaskResponseHeadersInstances extends Werkzeug::Headers::InstanceSource { + FlaskResponseHeadersInstances() { + this.(DataFlow::AttrRead).getObject() = instance() and + this.(DataFlow::AttrRead).getAttributeName() = "headers" + } + } + + /** A class instantiation of `Response` that sets response headers. */ + private class ResponseClassHeadersWrite extends Http::Server::ResponseHeaderBulkWrite::Range, + ClassInstantiation + { + override DataFlow::Node getBulkArg() { + result = [this.getArg(2), this.getArgByName("headers")] + } + + override predicate nameAllowsNewline() { any() } + + override predicate valueAllowsNewline() { none() } + } + + /** A call to `make_response that sets response headers. */ + private class MakeResponseHeadersWrite extends Http::Server::ResponseHeaderBulkWrite::Range, + FlaskMakeResponseCall + { + override DataFlow::Node getBulkArg() { + result = this.getArg(2) + or + strictcount(this.getArg(_)) = 2 and + result = this.getArg(1) + } + + override predicate nameAllowsNewline() { any() } + + override predicate valueAllowsNewline() { none() } + } } // --------------------------------------------------------------------------- diff --git a/python/ql/lib/semmle/python/frameworks/Gradio.qll b/python/ql/lib/semmle/python/frameworks/Gradio.qll new file mode 100644 index 00000000000..11109e150bf --- /dev/null +++ b/python/ql/lib/semmle/python/frameworks/Gradio.qll @@ -0,0 +1,123 @@ +/** + * Provides classes modeling security-relevant aspects of the `gradio` PyPI package. + * See https://pypi.org/project/gradio/. + */ + +import python +import semmle.python.dataflow.new.RemoteFlowSources +import semmle.python.dataflow.new.TaintTracking +import semmle.python.ApiGraphs + +/** + * Provides models for the `gradio` PyPI package. + * See https://pypi.org/project/gradio/. + */ +module Gradio { + /** + * The event handlers, Interface and gradio.ChatInterface classes, which take untrusted data. + */ + private class GradioInput extends API::CallNode { + GradioInput() { + this = + API::moduleImport("gradio") + .getMember([ + "Button", "Textbox", "UploadButton", "Slider", "JSON", "HTML", "Markdown", "File", + "AnnotatedImage", "Audio", "BarPlot", "Chatbot", "Checkbox", "CheckboxGroup", + "ClearButton", "Code", "ColorPicker", "Dataframe", "Dataset", "DownloadButton", + "Dropdown", "DuplicateButton", "FileExplorer", "Gallery", "HighlightedText", + "Image", "ImageEditor", "Label", "LinePlot", "LoginButton", "LogoutButton", + "Model3D", "Number", "ParamViewer", "Plot", "Radio", "ScatterPlot", "SimpleImage", + "State", "Video" + ]) + .getReturn() + .getMember([ + "change", "input", "click", "submit", "edit", "clear", "play", "pause", "stop", + "end", "start_recording", "pause_recording", "stop_recording", "focus", "blur", + "upload", "release", "select", "stream", "like", "load", "key_up", + ]) + .getACall() + or + this = API::moduleImport("gradio").getMember(["Interface", "ChatInterface"]).getACall() + } + } + + /** + * The `inputs` parameters in Gradio event handlers, that are lists and are sources of untrusted data. + * This model allows tracking each element list back to source, f.ex. `gr.Textbox(...)`. + */ + private class GradioInputList extends RemoteFlowSource::Range { + GradioInputList() { + exists(GradioInput call | + // limit only to lists of parameters given to `inputs`. + ( + ( + call.getKeywordParameter("inputs").asSink().asCfgNode() instanceof ListNode + or + call.getParameter(1).asSink().asCfgNode() instanceof ListNode + ) and + ( + this = call.getKeywordParameter("inputs").getASubscript().getAValueReachingSink() + or + this = call.getParameter(1).getASubscript().getAValueReachingSink() + ) + ) + ) + } + + override string getSourceType() { result = "Gradio untrusted input" } + } + + /** + * The `inputs` parameters in Gradio event handlers, that are not lists and are sources of untrusted data. + */ + private class GradioInputParameter extends RemoteFlowSource::Range { + GradioInputParameter() { + exists(GradioInput call | + this = call.getParameter(0, "fn").getParameter(_).asSource() and + // exclude lists of parameters given to `inputs` + not call.getKeywordParameter("inputs").asSink().asCfgNode() instanceof ListNode and + not call.getParameter(1).asSink().asCfgNode() instanceof ListNode + ) + } + + override string getSourceType() { result = "Gradio untrusted input" } + } + + /** + * The `inputs` parameters in Gradio decorators to event handlers, that are sources of untrusted data. + */ + private class GradioInputDecorator extends RemoteFlowSource::Range { + GradioInputDecorator() { + exists(GradioInput call | + this = call.getReturn().getACall().getParameter(0).getParameter(_).asSource() + ) + } + + override string getSourceType() { result = "Gradio untrusted input" } + } + + /** + * Extra taint propagation for tracking `inputs` parameters in Gradio event handlers, that are lists. + */ + private class ListTaintStep extends TaintTracking::AdditionalTaintStep { + override predicate step(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { + exists(GradioInput node | + // handle cases where there are multiple arguments passed as a list to `inputs` + ( + ( + node.getKeywordParameter("inputs").asSink().asCfgNode() instanceof ListNode + or + node.getParameter(1).asSink().asCfgNode() instanceof ListNode + ) and + exists(int i | nodeTo = node.getParameter(0, "fn").getParameter(i).asSource() | + nodeFrom.asCfgNode() = + node.getKeywordParameter("inputs").asSink().asCfgNode().(ListNode).getElement(i) + or + nodeFrom.asCfgNode() = + node.getParameter(1).asSink().asCfgNode().(ListNode).getElement(i) + ) + ) + ) + } + } +} diff --git a/python/ql/lib/semmle/python/frameworks/Pyramid.qll b/python/ql/lib/semmle/python/frameworks/Pyramid.qll new file mode 100644 index 00000000000..52eab34dff1 --- /dev/null +++ b/python/ql/lib/semmle/python/frameworks/Pyramid.qll @@ -0,0 +1,299 @@ +/** + * Provides classes modeling security-relevant aspects of the `pyramid` PyPI package. + * See https://docs.pylonsproject.org/projects/pyramid/. + */ + +private import python +private import semmle.python.dataflow.new.RemoteFlowSources +private import semmle.python.dataflow.new.TaintTracking +private import semmle.python.Concepts +private import semmle.python.ApiGraphs +private import semmle.python.dataflow.new.FlowSummary +private import semmle.python.frameworks.internal.PoorMansFunctionResolution +private import semmle.python.frameworks.internal.InstanceTaintStepsHelper +private import semmle.python.frameworks.data.ModelsAsData +private import semmle.python.frameworks.Stdlib + +/** + * Provides models for the `pyramid` PyPI package. + * See https://docs.pylonsproject.org/projects/pyramid/. + */ +module Pyramid { + /** Provides models for pyramid View callables. */ + module View { + /** A dataflow node that sets up a route on a server using the Pyramid framework. */ + abstract private class PyramidRouteSetup extends Http::Server::RouteSetup::Range { + override string getFramework() { result = "Pyramid" } + } + + /** + * A Pyramid view callable, that handles incoming requests. + */ + class ViewCallable extends Function { + ViewCallable() { this = any(PyramidRouteSetup rs).getARequestHandler() } + + /** Gets the `request` parameter of this callable. */ + Parameter getRequestParameter() { + this.getPositionalParameterCount() = 1 and + result = this.getArg(0) + or + this.getPositionalParameterCount() = 2 and + result = this.getArg(1) + } + } + + /** A pyramid route setup using the `pyramid.view.view_config` decorator. */ + private class DecoratorSetup extends PyramidRouteSetup { + DecoratorSetup() { + this = API::moduleImport("pyramid").getMember("view").getMember("view_config").getACall() + } + + override Function getARequestHandler() { result.getADecorator() = this.asExpr() } + + override DataFlow::Node getUrlPatternArg() { none() } // there is a `route_name` arg, but that does not contain the url pattern + + override Parameter getARoutedParameter() { none() } + } + + /** A pyramid route setup using a call to `pyramid.config.Configurator.add_view`. */ + private class ConfiguratorSetup extends PyramidRouteSetup instanceof Configurator::AddViewCall { + override Function getARequestHandler() { + this.(Configurator::AddViewCall).getViewArg() = poorMansFunctionTracker(result) + } + + override DataFlow::Node getUrlPatternArg() { none() } // there is a `route_name` arg, but that does not contain the url pattern + + override Parameter getARoutedParameter() { none() } + } + } + + /** Provides models for `pyramid.config.Configurator` */ + module Configurator { + /** Gets a reference to the class `pyramid.config.Configurator`. */ + API::Node classRef() { + result = API::moduleImport("pyramid").getMember("config").getMember("Configurator") + } + + /** Gets a reference to an instance of `pyramid.config.Configurator`. */ + private DataFlow::TypeTrackingNode instance(DataFlow::TypeTracker t) { + t.start() and + result = classRef().getACall() + or + exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) + } + + /** Gets a reference to an instance of `pyramid.config.Configurator`. */ + DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + + /** A call to the `add_view` method of an instance of `pyramid.config.Configurator`. */ + class AddViewCall extends DataFlow::MethodCallNode { + AddViewCall() { this.calls(instance(), "add_view") } + + /** Gets the `view` argument of this call. */ + DataFlow::Node getViewArg() { result = [this.getArg(0), this.getArgByName("view")] } + } + } + + /** Provides modeling for pyramid requests. */ + module Request { + /** + * A source of instances of `pyramid.request.Request`, extend this class to model new instances. + * + * Use the predicate `Request::instance()` to get references to instances of `pyramid.request.Request`. + */ + abstract class InstanceSource extends DataFlow::LocalSourceNode { } + + /** Gets a reference to an instance of `pyramid.request.Request`. */ + private DataFlow::TypeTrackingNode instance(DataFlow::TypeTracker t) { + t.start() and + result instanceof InstanceSource + or + exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) + } + + /** Gets a reference to an instance of `pyramid.request.Request`. */ + DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + + private class RequestParameter extends InstanceSource, RemoteFlowSource::Range instanceof DataFlow::ParameterNode + { + RequestParameter() { this.getParameter() = any(View::ViewCallable vc).getRequestParameter() } + + override string getSourceType() { result = "Pyramid request parameter" } + } + + /** Taint steps for request instances. */ + private class InstanceTaintSteps extends InstanceTaintStepsHelper { + InstanceTaintSteps() { this = "pyramid.request.Request" } + + override DataFlow::Node getInstance() { result = instance() } + + override string getAttributeName() { + result in [ + "accept", "accept_charset", "accept_encoding", "accept_language", "application_url", + "as_bytes", "authorization", "body", "body_file", "body_file_raw", "body_file_seekable", + "cache_control", "client_addr", "content_type", "cookies", "domain", "headers", "host", + "host_port", "host_url", "GET", "if_match", "if_none_match", "if_range", + "if_none_match", "json", "json_body", "matchdict", "params", "path", "path_info", + "path_qs", "path_url", "POST", "pragma", "query_string", "range", "referer", "referrer", + "text", "url", "urlargs", "urlvars", "user_agent" + ] + } + + override string getMethodName() { + result in ["as_bytes", "copy", "copy_get", "path_info_peek", "path_info_pop"] + } + + override string getAsyncMethodName() { none() } + } + + /** A call to a method of a `request` that copies the request. */ + private class RequestCopyCall extends InstanceSource, DataFlow::MethodCallNode { + RequestCopyCall() { this.calls(instance(), ["copy", "copy_get"]) } + } + + /** A member of a request that is a file-like object. */ + private class RequestBodyFileLike extends Stdlib::FileLikeObject::InstanceSource instanceof DataFlow::AttrRead + { + RequestBodyFileLike() { + this.getObject() = instance() and + this.getAttributeName() = ["body_file", "body_file_raw", "body_file_seekable"] + } + } + } + + /** Provides modeling for pyramid responses. */ + module Response { + /** A response returned by a view callable. */ + private class PyramidReturnResponse extends Http::Server::HttpResponse::Range { + PyramidReturnResponse() { + this.asCfgNode() = any(View::ViewCallable vc).getAReturnValueFlowNode() and + not this = instance() + } + + override DataFlow::Node getBody() { result = this } + + override DataFlow::Node getMimetypeOrContentTypeArg() { none() } + + override string getMimetypeDefault() { result = "text/html" } + } + + /** Gets a reference to the class `pyramid.response.Response`. */ + API::Node classRef() { + result = API::moduleImport("pyramid").getMember("response").getMember("Response") + } + + /** + * A source of instances of `pyramid.response.Response`, extend this class to model new instances. + * + * This can include instantiations of the class, return values from function + * calls, or a special parameter that will be set when functions are called by an external + * library. + * + * Use the predicate `Response::instance()` to get references to instances of `pyramid.response.Response`. + */ + abstract class InstanceSource extends DataFlow::LocalSourceNode, + Http::Server::HttpResponse::Range + { } + + /** Gets a reference to an instance of `pyramid.response.Response`. */ + private DataFlow::TypeTrackingNode instance(DataFlow::TypeTracker t) { + t.start() and + result instanceof InstanceSource + or + exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) + } + + /** Gets a reference to an instance of `pyramid.response.Response`. */ + DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + + /** An instantiation of the class `pyramid.response.Response` or a subclass. */ + private class ClassInstantiation extends InstanceSource, DataFlow::CallCfgNode { + ClassInstantiation() { this = classRef().getACall() } + + override DataFlow::Node getBody() { result = [this.getArg(0), this.getArgByName("body")] } + + override DataFlow::Node getMimetypeOrContentTypeArg() { + result = [this.getArg(4), this.getArgByName("content_type")] + } + + override string getMimetypeDefault() { result = "text/html" } + } + + /** A write to a field that sets the body of a response. */ + private class ResponseBodySet extends Http::Server::HttpResponse::Range instanceof DataFlow::AttrWrite + { + string attrName; + + ResponseBodySet() { + this.getObject() = instance() and + this.getAttributeName() = attrName and + attrName in ["body", "body_file", "json", "json_body", "text", "ubody", "unicode_body"] + } + + override DataFlow::Node getBody() { result = this.(DataFlow::AttrWrite).getValue() } + + override DataFlow::Node getMimetypeOrContentTypeArg() { none() } + + override string getMimetypeDefault() { + if attrName in ["json", "json_body"] + then result = "application/json" + else result = "text/html" + } + } + + /** A use of the `response` attribute of a `Request`. */ + private class RequestResponseAttr extends InstanceSource instanceof DataFlow::AttrRead { + RequestResponseAttr() { + this.getObject() = Request::instance() and this.getAttributeName() = "response" + } + + override DataFlow::Node getBody() { none() } + + override DataFlow::Node getMimetypeOrContentTypeArg() { none() } + + override string getMimetypeDefault() { result = "text/html" } + } + + /** A call to `response.set_cookie`. */ + private class SetCookieCall extends Http::Server::CookieWrite::Range, DataFlow::MethodCallNode { + SetCookieCall() { this.calls(instance(), "set_cookie") } + + override DataFlow::Node getHeaderArg() { none() } + + override DataFlow::Node getNameArg() { result = [this.getArg(0), this.getArgByName("name")] } + + override DataFlow::Node getValueArg() { + result = [this.getArg(1), this.getArgByName("value")] + } + } + } + + /** Provides models for pyramid http redirects. */ + module Redirect { + /** Gets a reference to a class that represents an HTTP redirect response.. */ + API::Node classRef() { + result = + API::moduleImport("pyramid") + .getMember("httpexceptions") + .getMember([ + "HTTPMultipleChoices", "HTTPMovedPermanently", "HTTPFound", "HTTPSeeOther", + "HTTPUseProxy", "HTTPTemporaryRedirect", "HTTPPermanentRedirect" + ]) + } + + /** A call to a pyramid HTTP exception class that represents an HTTP redirect response. */ + class PyramidRedirect extends Http::Server::HttpRedirectResponse::Range, DataFlow::CallCfgNode { + PyramidRedirect() { this = classRef().getACall() } + + override DataFlow::Node getRedirectLocation() { + result = [this.getArg(0), this.getArgByName("location")] + } + + override DataFlow::Node getBody() { none() } + + override DataFlow::Node getMimetypeOrContentTypeArg() { none() } + + override string getMimetypeDefault() { result = "text/html" } + } + } +} diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index 97c112f58b4..3c23b392991 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -2183,17 +2183,35 @@ module StdlibPrivate { * for how a request is processed and given to an application. */ class WsgirefSimpleServerApplication extends Http::Server::RequestHandler::Range { + boolean validator; + WsgirefSimpleServerApplication() { exists(DataFlow::Node appArg, DataFlow::CallCfgNode setAppCall | ( setAppCall = - WsgirefSimpleServer::subclassRef().getReturn().getMember("set_app").getACall() + WsgirefSimpleServer::subclassRef().getReturn().getMember("set_app").getACall() and + validator = false or setAppCall .(DataFlow::MethodCallNode) - .calls(any(WsgiServerSubclass cls).getASelfRef(), "set_app") + .calls(any(WsgiServerSubclass cls).getASelfRef(), "set_app") and + validator = false + or + // assume an application that is passed to `wsgiref.validate.validator` is eventually passed to `set_app` + setAppCall = + API::moduleImport("wsgiref").getMember("validate").getMember("validator").getACall() and + validator = true ) and appArg in [setAppCall.getArg(0), setAppCall.getArgByName("application")] + or + // `make_server` calls `set_app` + setAppCall = + API::moduleImport("wsgiref") + .getMember("simple_server") + .getMember("make_server") + .getACall() and + appArg in [setAppCall.getArg(2), setAppCall.getArgByName("app")] and + validator = false | appArg = poorMansFunctionTracker(this) ) @@ -2202,6 +2220,9 @@ module StdlibPrivate { override Parameter getARoutedParameter() { none() } override string getFramework() { result = "Stdlib: wsgiref.simple_server application" } + + /** Holds if this simple server application was passed to `wsgiref.validate.validator`. */ + predicate isValidated() { validator = true } } /** @@ -2305,6 +2326,114 @@ module StdlibPrivate { override string getMimetypeDefault() { none() } } + + /** + * Provides models for the `wsgiref.headers.Headers` class + * + * See https://docs.python.org/3/library/wsgiref.html#module-wsgiref.headers. + */ + module Headers { + /** Gets a reference to the `wsgiref.headers.Headers` class. */ + API::Node classRef() { + result = API::moduleImport("wsgiref").getMember("headers").getMember("Headers") + or + result = ModelOutput::getATypeNode("wsgiref.headers.Headers~Subclass").getASubclass*() + } + + /** Gets a reference to an instance of `wsgiref.headers.Headers`. */ + private DataFlow::TypeTrackingNode instance(DataFlow::TypeTracker t) { + t.start() and + result = classRef().getACall() + or + exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) + } + + /** Gets a reference to an instance of `wsgiref.headers.Headers`. */ + DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + + /** Holds if there exists an application that is validated by `wsgiref.validate.validator`. */ + private predicate existsValidatedApplication() { + exists(WsgirefSimpleServerApplication app | app.isValidated()) + } + + /** A class instantiation of `wsgiref.headers.Headers`, conidered as a write to a response header. */ + private class WsgirefHeadersInstantiation extends Http::Server::ResponseHeaderBulkWrite::Range, + DataFlow::CallCfgNode + { + WsgirefHeadersInstantiation() { this = classRef().getACall() } + + override DataFlow::Node getBulkArg() { + result = [this.getArg(0), this.getArgByName("headers")] + } + + // TODO: These checks perhaps could be made more precise. + override predicate nameAllowsNewline() { not existsValidatedApplication() } + + override predicate valueAllowsNewline() { not existsValidatedApplication() } + } + + /** A call to a method that writes to a response header. */ + private class HeaderWriteCall extends Http::Server::ResponseHeaderWrite::Range, + DataFlow::MethodCallNode + { + HeaderWriteCall() { + this.calls(instance(), ["add_header", "set", "setdefault", "__setitem__"]) + } + + override DataFlow::Node getNameArg() { result = this.getArg(0) } + + override DataFlow::Node getValueArg() { result = this.getArg(1) } + + // TODO: These checks perhaps could be made more precise. + override predicate nameAllowsNewline() { not existsValidatedApplication() } + + override predicate valueAllowsNewline() { not existsValidatedApplication() } + } + + /** A dict-like write to a response header. */ + private class HeaderWriteSubscript extends Http::Server::ResponseHeaderWrite::Range, + DataFlow::Node + { + DataFlow::Node name; + DataFlow::Node value; + + HeaderWriteSubscript() { + exists(SubscriptNode subscript | + this.asCfgNode() = subscript and + value.asCfgNode() = subscript.(DefinitionNode).getValue() and + name.asCfgNode() = subscript.getIndex() and + subscript.getObject() = instance().asCfgNode() + ) + } + + override DataFlow::Node getNameArg() { result = name } + + override DataFlow::Node getValueArg() { result = value } + + // TODO: These checks perhaps could be made more precise. + override predicate nameAllowsNewline() { not existsValidatedApplication() } + + override predicate valueAllowsNewline() { not existsValidatedApplication() } + } + + /** + * A call to a `start_response` function that sets the response headers. + */ + private class WsgirefSimpleServerSetHeaders extends Http::Server::ResponseHeaderBulkWrite::Range, + DataFlow::CallCfgNode + { + WsgirefSimpleServerSetHeaders() { this.getFunction() = startResponse() } + + override DataFlow::Node getBulkArg() { + result = [this.getArg(1), this.getArgByName("headers")] + } + + // TODO: These checks perhaps could be made more precise. + override predicate nameAllowsNewline() { not existsValidatedApplication() } + + override predicate valueAllowsNewline() { not existsValidatedApplication() } + } + } } // --------------------------------------------------------------------------- diff --git a/python/ql/lib/semmle/python/frameworks/Werkzeug.qll b/python/ql/lib/semmle/python/frameworks/Werkzeug.qll index fb9a4e42c49..d9150c8cfec 100644 --- a/python/ql/lib/semmle/python/frameworks/Werkzeug.qll +++ b/python/ql/lib/semmle/python/frameworks/Werkzeug.qll @@ -12,6 +12,7 @@ private import semmle.python.ApiGraphs private import semmle.python.frameworks.Stdlib private import semmle.python.Concepts private import semmle.python.frameworks.internal.InstanceTaintStepsHelper +private import semmle.python.frameworks.data.ModelsAsData /** * Provides models for the `Werkzeug` PyPI package. @@ -144,6 +145,18 @@ module Werkzeug { * See https://werkzeug.palletsprojects.com/en/1.0.x/datastructures/#werkzeug.datastructures.Headers. */ module Headers { + /** Gets a reference to the `werkzeug.datastructures.Headers` class. */ + API::Node classRef() { + result = API::moduleImport("werkzeug").getMember("datastructures").getMember("Headers") + or + result = ModelOutput::getATypeNode("werkzeug.datastructures.Headers~Subclass").getASubclass*() + } + + /** A direct instantiation of `werkzeug.datastructures.Headers`. */ + private class ClassInstantiation extends InstanceSource, DataFlow::CallCfgNode { + ClassInstantiation() { this = classRef().getACall() } + } + /** * A source of instances of `werkzeug.datastructures.Headers`, extend this class to model new instances. * @@ -182,6 +195,61 @@ module Werkzeug { override string getAsyncMethodName() { none() } } + + /** A call to a method that writes to a header, assumed to be a response header. */ + private class HeaderWriteCall extends Http::Server::ResponseHeaderWrite::Range, + DataFlow::MethodCallNode + { + HeaderWriteCall() { + this.calls(instance(), ["add", "add_header", "set", "setdefault", "__setitem__"]) + } + + override DataFlow::Node getNameArg() { result = this.getArg(0) } + + override DataFlow::Node getValueArg() { result = this.getArg(1) } + + override predicate nameAllowsNewline() { any() } + + override predicate valueAllowsNewline() { none() } + } + + /** A dict-like write to a header, assumed to be a response header. */ + private class HeaderWriteSubscript extends Http::Server::ResponseHeaderWrite::Range, + DataFlow::Node + { + DataFlow::Node name; + DataFlow::Node value; + + HeaderWriteSubscript() { + exists(SubscriptNode subscript | + this.asCfgNode() = subscript and + value.asCfgNode() = subscript.(DefinitionNode).getValue() and + name.asCfgNode() = subscript.getIndex() and + subscript.getObject() = instance().asCfgNode() + ) + } + + override DataFlow::Node getNameArg() { result = name } + + override DataFlow::Node getValueArg() { result = value } + + override predicate nameAllowsNewline() { any() } + + override predicate valueAllowsNewline() { none() } + } + + /** A call to `Headers.extend`, assumed to be a response header. */ + private class HeaderExtendCall extends Http::Server::ResponseHeaderBulkWrite::Range, + DataFlow::MethodCallNode + { + HeaderExtendCall() { this.calls(instance(), "extend") } + + override DataFlow::Node getBulkArg() { result = this.getArg(0) } + + override predicate nameAllowsNewline() { any() } + + override predicate valueAllowsNewline() { none() } + } } /** diff --git a/python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsSpecific.qll b/python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsSpecific.qll index e7c61536aa9..ec79ce7391f 100644 --- a/python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsSpecific.qll +++ b/python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsSpecific.qll @@ -53,7 +53,7 @@ API::Node getExtraSuccessorFromNode(API::Node node, AccessPathTokenBase token) { result = node.getMember(token.getAnArgument()) or token.getName() = "Instance" and - result = node.getReturn() // In Python `Instance` is just an alias for `ReturnValue` + result = node.getAnInstance() or token.getName() = "Awaited" and result = node.getAwaited() diff --git a/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionCustomizations.qll new file mode 100644 index 00000000000..b3fe233629e --- /dev/null +++ b/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionCustomizations.qll @@ -0,0 +1,113 @@ +/** + * Provides default sources, sinks, and sanitizers for detecting + * "HTTP Header injection" vulnerabilities, as well as extension + * points for adding your own. + */ + +import python +private import semmle.python.Concepts +private import semmle.python.dataflow.new.DataFlow +private import semmle.python.dataflow.new.TaintTracking +private import semmle.python.dataflow.new.RemoteFlowSources + +/** + * Provides default sources, sinks, and sanitizers for detecting + * "HTTP Header injection" vulnerabilities, as well as extension + * points for adding your own. + */ +module HttpHeaderInjection { + /** + * A data flow source for "HTTP Header injection" vulnerabilities. + */ + abstract class Source extends DataFlow::Node { } + + /** + * A data flow sink for "HTTP Header injection" vulnerabilities. + */ + abstract class Sink extends DataFlow::Node { } + + /** + * A data flow sanitizer for "HTTP Header injection" vulnerabilities. + */ + abstract class Sanitizer extends DataFlow::Node { } + + /** + * A source of remote user input, considered as a flow source. + */ + class RemoteFlowSourceAsSource extends Source, RemoteFlowSource { } + + /** + * A HTTP header write, considered as a flow sink. + */ + class HeaderWriteAsSink extends Sink { + HeaderWriteAsSink() { + exists(Http::Server::ResponseHeaderWrite headerWrite | + headerWrite.nameAllowsNewline() and + this = headerWrite.getNameArg() + or + headerWrite.valueAllowsNewline() and + this = headerWrite.getValueArg() + ) + } + } + + /** A key-value pair in a literal for a bulk header update, considered as a single header update. */ + // TODO: We could instead consider bulk writes as sinks with an implicit read step of DictionaryKey/DictionaryValue content as needed. + private class HeaderBulkWriteDictLiteral extends Http::Server::ResponseHeaderWrite::Range instanceof Http::Server::ResponseHeaderBulkWrite + { + KeyValuePair item; + + HeaderBulkWriteDictLiteral() { + exists(Dict dict | DataFlow::localFlow(DataFlow::exprNode(dict), super.getBulkArg()) | + item = dict.getAnItem() + ) + } + + override DataFlow::Node getNameArg() { result.asExpr() = item.getKey() } + + override DataFlow::Node getValueArg() { result.asExpr() = item.getValue() } + + override predicate nameAllowsNewline() { + Http::Server::ResponseHeaderBulkWrite.super.nameAllowsNewline() + } + + override predicate valueAllowsNewline() { + Http::Server::ResponseHeaderBulkWrite.super.valueAllowsNewline() + } + } + + /** A tuple in a list for a bulk header update, considered as a single header update. */ + // TODO: We could instead consider bulk writes as sinks with implicit read steps as needed. + private class HeaderBulkWriteListLiteral extends Http::Server::ResponseHeaderWrite::Range instanceof Http::Server::ResponseHeaderBulkWrite + { + Tuple item; + + HeaderBulkWriteListLiteral() { + exists(List list | DataFlow::localFlow(DataFlow::exprNode(list), super.getBulkArg()) | + item = list.getAnElt() + ) + } + + override DataFlow::Node getNameArg() { result.asExpr() = item.getElt(0) } + + override DataFlow::Node getValueArg() { result.asExpr() = item.getElt(1) } + + override predicate nameAllowsNewline() { + Http::Server::ResponseHeaderBulkWrite.super.nameAllowsNewline() + } + + override predicate valueAllowsNewline() { + Http::Server::ResponseHeaderBulkWrite.super.valueAllowsNewline() + } + } + + /** + * A call to replace line breaks, considered as a sanitizer. + */ + class ReplaceLineBreaksSanitizer extends Sanitizer, DataFlow::CallCfgNode { + ReplaceLineBreaksSanitizer() { + this.getFunction().(DataFlow::AttrRead).getAttributeName() = "replace" and + this.getArg(0).asExpr().(StringLiteral).getText() = "\n" + } + } +} diff --git a/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionQuery.qll b/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionQuery.qll new file mode 100644 index 00000000000..1583ee70491 --- /dev/null +++ b/python/ql/lib/semmle/python/security/dataflow/HttpHeaderInjectionQuery.qll @@ -0,0 +1,22 @@ +/** + * Provides a taint tracking configuration for reasoning about HTTP header injection. + */ + +import python +private import semmle.python.dataflow.new.DataFlow +private import semmle.python.dataflow.new.TaintTracking +private import HttpHeaderInjectionCustomizations + +/** + * A taint-tracking configuration for detecting HTTP Header injection vulnerabilities. + */ +private module HeaderInjectionConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node node) { node instanceof HttpHeaderInjection::Source } + + predicate isSink(DataFlow::Node node) { node instanceof HttpHeaderInjection::Sink } + + predicate isBarrier(DataFlow::Node node) { node instanceof HttpHeaderInjection::Sanitizer } +} + +/** Global taint-tracking for detecting "HTTP Header injection" vulnerabilities. */ +module HeaderInjectionFlow = TaintTracking::Global; diff --git a/python/ql/lib/upgrades/4f1806347d7fafe2f78508da01c01e5aff5f7cbb/upgrade.properties b/python/ql/lib/upgrades/4f1806347d7fafe2f78508da01c01e5aff5f7cbb/upgrade.properties index a0c4ba602a1..3e361d800fb 100644 --- a/python/ql/lib/upgrades/4f1806347d7fafe2f78508da01c01e5aff5f7cbb/upgrade.properties +++ b/python/ql/lib/upgrades/4f1806347d7fafe2f78508da01c01e5aff5f7cbb/upgrade.properties @@ -1,4 +1,4 @@ description: Removed unused column from the `folders` and `files` relations compatibility: full -files.rel: reorder files.rel (int id, string name, string simple, string ext, int fromSource) id name -folders.rel: reorder folders.rel (int id, string name, string simple) id name \ No newline at end of file +files.rel: reorder files.rel (@file id, string name, string simple, string ext, int fromSource) id name +folders.rel: reorder folders.rel (@folder id, string name, string simple) id name \ No newline at end of file diff --git a/python/ql/src/CHANGELOG.md b/python/ql/src/CHANGELOG.md index 96a2c3cc7db..449a8ccf9b2 100644 --- a/python/ql/src/CHANGELOG.md +++ b/python/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.9.16 + +### New Queries + +* The `py/header-injection` query, originally contributed to the experimental query pack by @jorgectf, has been promoted to the main query pack and renamed to `py/http-response-splitting`. This query finds instances of http header injection / response splitting vulnerabilities. + ## 0.9.15 No user-facing changes. @@ -281,7 +287,7 @@ No user-facing changes. ### Bug Fixes -* The [View AST functionality](https://codeql.github.com/docs/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code/) no longer prints detailed information about regular expressions, greatly improving performance. +* The [View AST functionality](https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/exploring-the-structure-of-your-source-code) no longer prints detailed information about regular expressions, greatly improving performance. ## 0.0.8 diff --git a/python/ql/src/Security/CWE-113/HeaderInjection.qhelp b/python/ql/src/Security/CWE-113/HeaderInjection.qhelp new file mode 100644 index 00000000000..16f781d8a1a --- /dev/null +++ b/python/ql/src/Security/CWE-113/HeaderInjection.qhelp @@ -0,0 +1,41 @@ + + + + +

    Directly writing user input (for example, an HTTP request parameter) to an HTTP header +can lead to an HTTP response-splitting vulnerability.

    + +

    If user-controlled input is used in an HTTP header that allows line break characters, an attacker can +inject additional headers or control the response body, leading to vulnerabilities such as XSS or cache poisoning. +

    + +
    + + +

    Ensure that user input containing line break characters is not written to an HTTP header.

    +
    + + +

    In the following example, the case marked BAD writes user input to the header name. +In the GOOD case, input is first escaped to not contain any line break characters.

    + +
    + + +
  • +SecLists.org: HTTP response splitting. +
  • +
  • +OWASP: +HTTP Response Splitting. +
  • +
  • +Wikipedia: HTTP response splitting. +
  • +
  • +CAPEC: CAPEC-105: HTTP Request Splitting +
  • +
    +
    diff --git a/python/ql/src/experimental/Security/CWE-113/HeaderInjection.ql b/python/ql/src/Security/CWE-113/HeaderInjection.ql similarity index 56% rename from python/ql/src/experimental/Security/CWE-113/HeaderInjection.ql rename to python/ql/src/Security/CWE-113/HeaderInjection.ql index 6527df03339..c21ee549378 100644 --- a/python/ql/src/experimental/Security/CWE-113/HeaderInjection.ql +++ b/python/ql/src/Security/CWE-113/HeaderInjection.ql @@ -1,19 +1,19 @@ /** - * @name HTTP Header Injection - * @description User input should not be used in HTTP headers, otherwise a malicious user - * may be able to inject a value that could manipulate the response. + * @name HTTP Response Splitting + * @description Writing user input directly to an HTTP header + * makes code vulnerable to attack by header splitting. * @kind path-problem * @problem.severity error - * @id py/header-injection + * @security-severity 6.1 + * @precision high + * @id py/http-response-splitting * @tags security - * experimental * external/cwe/cwe-113 * external/cwe/cwe-079 */ -// determine precision above import python -import experimental.semmle.python.security.injection.HTTPHeaders +import semmle.python.security.dataflow.HttpHeaderInjectionQuery import HeaderInjectionFlow::PathGraph from HeaderInjectionFlow::PathNode source, HeaderInjectionFlow::PathNode sink diff --git a/python/ql/src/Security/CWE-113/examples/header_injection.py b/python/ql/src/Security/CWE-113/examples/header_injection.py new file mode 100644 index 00000000000..4ae429feb94 --- /dev/null +++ b/python/ql/src/Security/CWE-113/examples/header_injection.py @@ -0,0 +1,17 @@ +@app.route("/example_bad") +def example_bad(): + rfs_header = request.args["rfs_header"] + response = Response() + custom_header = "X-MyHeader-" + rfs_header + # BAD: User input is used as part of the header name. + response.headers[custom_header] = "HeaderValue" + return response + +@app.route("/example_good") +def example_bad(): + rfs_header = request.args["rfs_header"] + response = Response() + custom_header = "X-MyHeader-" + rfs_header.replace("\n", "").replace("\r","").replace(":","") + # GOOD: Line break characters are removed from the input. + response.headers[custom_header] = "HeaderValue" + return response \ No newline at end of file diff --git a/python/ql/src/change-notes/2024-04-05-gradio-models.md b/python/ql/src/change-notes/2024-04-05-gradio-models.md new file mode 100644 index 00000000000..261c25f9886 --- /dev/null +++ b/python/ql/src/change-notes/2024-04-05-gradio-models.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added models of `gradio` PyPI package. diff --git a/python/ql/src/change-notes/released/0.0.9.md b/python/ql/src/change-notes/released/0.0.9.md index 1136727b684..d50d846f53e 100644 --- a/python/ql/src/change-notes/released/0.0.9.md +++ b/python/ql/src/change-notes/released/0.0.9.md @@ -2,4 +2,4 @@ ### Bug Fixes -* The [View AST functionality](https://codeql.github.com/docs/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code/) no longer prints detailed information about regular expressions, greatly improving performance. +* The [View AST functionality](https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/exploring-the-structure-of-your-source-code) no longer prints detailed information about regular expressions, greatly improving performance. diff --git a/python/ql/src/change-notes/released/0.9.16.md b/python/ql/src/change-notes/released/0.9.16.md new file mode 100644 index 00000000000..715925895de --- /dev/null +++ b/python/ql/src/change-notes/released/0.9.16.md @@ -0,0 +1,5 @@ +## 0.9.16 + +### New Queries + +* The `py/header-injection` query, originally contributed to the experimental query pack by @jorgectf, has been promoted to the main query pack and renamed to `py/http-response-splitting`. This query finds instances of http header injection / response splitting vulnerabilities. diff --git a/python/ql/src/codeql-pack.release.yml b/python/ql/src/codeql-pack.release.yml index 4896915c215..5964e3ebe59 100644 --- a/python/ql/src/codeql-pack.release.yml +++ b/python/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.9.15 +lastReleaseVersion: 0.9.16 diff --git a/python/ql/src/experimental/Security/CWE-113/HeaderInjection.qhelp b/python/ql/src/experimental/Security/CWE-113/HeaderInjection.qhelp deleted file mode 100644 index 33337294b9a..00000000000 --- a/python/ql/src/experimental/Security/CWE-113/HeaderInjection.qhelp +++ /dev/null @@ -1,26 +0,0 @@ - - - -

    If an HTTP Header is built using string concatenation or string formatting, and the -components of the concatenation include user input, a user -is likely to be able to manipulate the response.

    -
    - - -

    User input should not be included in an HTTP Header.

    -
    - - -

    In the following example, the code appends a user-provided value into a header.

    - - -
    - - -
  • OWASP: HTTP Response Splitting.
  • -
  • Python Security: HTTP header injection.
  • -
  • SonarSource: RSPEC-5167.
  • -
    -
    diff --git a/python/ql/src/experimental/Security/CWE-113/header_injection.py b/python/ql/src/experimental/Security/CWE-113/header_injection.py deleted file mode 100644 index 117383710e3..00000000000 --- a/python/ql/src/experimental/Security/CWE-113/header_injection.py +++ /dev/null @@ -1,9 +0,0 @@ -from flask import Response, request, Flask, make_response - - -@app.route("/flask_Response") -def flask_Response(): - rfs_header = request.args["rfs_header"] - response = Response() - response.headers['HeaderName'] = rfs_header - return response diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index a289cedb6df..d768530fabd 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -216,45 +216,6 @@ class SqlEscape extends DataFlow::Node instanceof SqlEscape::Range { DataFlow::Node getAnInput() { result = super.getAnInput() } } -/** Provides classes for modeling HTTP Header APIs. */ -module HeaderDeclaration { - /** - * A data-flow node that collects functions setting HTTP Headers. - * - * Extend this class to model new APIs. If you want to refine existing API models, - * extend `HeaderDeclaration` instead. - */ - abstract class Range extends DataFlow::Node { - /** - * Gets the argument containing the header name. - */ - abstract DataFlow::Node getNameArg(); - - /** - * Gets the argument containing the header value. - */ - abstract DataFlow::Node getValueArg(); - } -} - -/** - * A data-flow node that collects functions setting HTTP Headers. - * - * Extend this class to refine existing API models. If you want to model new APIs, - * extend `HeaderDeclaration::Range` instead. - */ -class HeaderDeclaration extends DataFlow::Node instanceof HeaderDeclaration::Range { - /** - * Gets the argument containing the header name. - */ - DataFlow::Node getNameArg() { result = super.getNameArg() } - - /** - * Gets the argument containing the header value. - */ - DataFlow::Node getValueArg() { result = super.getValueArg() } -} - /** Provides classes for modeling Csv writer APIs. */ module CsvWriter { /** diff --git a/python/ql/src/experimental/semmle/python/CookieHeader.qll b/python/ql/src/experimental/semmle/python/CookieHeader.qll index 3a1437dff4a..dfa40b3d92a 100644 --- a/python/ql/src/experimental/semmle/python/CookieHeader.qll +++ b/python/ql/src/experimental/semmle/python/CookieHeader.qll @@ -6,6 +6,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TaintTracking import experimental.semmle.python.Concepts +import semmle.python.Concepts /** * Gets a header setting a cookie. @@ -26,13 +27,13 @@ import experimental.semmle.python.Concepts * * `isSameSite()` predicate would fail. * * `getName()` and `getValue()` results would be `"name=value; Secure;"`. */ -class CookieHeader extends Cookie::Range instanceof HeaderDeclaration { +class CookieHeader extends Cookie::Range instanceof Http::Server::ResponseHeaderWrite { CookieHeader() { exists(StringLiteral str | str.getText() = "Set-Cookie" and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) - .flowsTo(this.(HeaderDeclaration).getNameArg()) + .flowsTo(this.(Http::Server::ResponseHeaderWrite).getNameArg()) ) } @@ -41,7 +42,7 @@ class CookieHeader extends Cookie::Range instanceof HeaderDeclaration { str.getText().regexpMatch(".*; *Secure;.*") and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) - .flowsTo(this.(HeaderDeclaration).getValueArg()) + .flowsTo(this.(Http::Server::ResponseHeaderWrite).getValueArg()) ) } @@ -50,7 +51,7 @@ class CookieHeader extends Cookie::Range instanceof HeaderDeclaration { str.getText().regexpMatch(".*; *HttpOnly;.*") and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) - .flowsTo(this.(HeaderDeclaration).getValueArg()) + .flowsTo(this.(Http::Server::ResponseHeaderWrite).getValueArg()) ) } @@ -59,13 +60,17 @@ class CookieHeader extends Cookie::Range instanceof HeaderDeclaration { str.getText().regexpMatch(".*; *SameSite=(Strict|Lax);.*") and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) - .flowsTo(this.(HeaderDeclaration).getValueArg()) + .flowsTo(this.(Http::Server::ResponseHeaderWrite).getValueArg()) ) } - override DataFlow::Node getNameArg() { result = this.(HeaderDeclaration).getValueArg() } + override DataFlow::Node getNameArg() { + result = this.(Http::Server::ResponseHeaderWrite).getValueArg() + } - override DataFlow::Node getValueArg() { result = this.(HeaderDeclaration).getValueArg() } + override DataFlow::Node getValueArg() { + result = this.(Http::Server::ResponseHeaderWrite).getValueArg() + } override DataFlow::Node getHeaderArg() { none() } } diff --git a/python/ql/src/experimental/semmle/python/Frameworks.qll b/python/ql/src/experimental/semmle/python/Frameworks.qll index 2fc78b7f53b..50ce6929f68 100644 --- a/python/ql/src/experimental/semmle/python/Frameworks.qll +++ b/python/ql/src/experimental/semmle/python/Frameworks.qll @@ -5,7 +5,6 @@ private import experimental.semmle.python.frameworks.Stdlib private import experimental.semmle.python.frameworks.Flask private import experimental.semmle.python.frameworks.Django -private import experimental.semmle.python.frameworks.Werkzeug private import experimental.semmle.python.frameworks.LDAP private import experimental.semmle.python.frameworks.JWT private import experimental.semmle.python.frameworks.Csv diff --git a/python/ql/src/experimental/semmle/python/frameworks/Django.qll b/python/ql/src/experimental/semmle/python/frameworks/Django.qll index c1a5629ef68..703519c76c5 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Django.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Django.qll @@ -88,31 +88,6 @@ private module ExperimentalPrivateDjango { result = baseClassRef().getReturn().getAMember() } - class DjangoResponseSetItemCall extends DataFlow::CallCfgNode, HeaderDeclaration::Range { - DjangoResponseSetItemCall() { - this = baseClassRef().getReturn().getMember("__setitem__").getACall() - } - - override DataFlow::Node getNameArg() { result = this.getArg(0) } - - override DataFlow::Node getValueArg() { result = this.getArg(1) } - } - - class DjangoResponseDefinition extends DataFlow::Node, HeaderDeclaration::Range { - DataFlow::Node headerInput; - - DjangoResponseDefinition() { - headerInput = headerInstance().asSink() and - headerInput.asCfgNode() = this.asCfgNode().(DefinitionNode).getValue() - } - - override DataFlow::Node getNameArg() { - result.asExpr() = this.asExpr().(Subscript).getIndex() - } - - override DataFlow::Node getValueArg() { result = headerInput } - } - /** * Gets a call to `set_cookie()`. * diff --git a/python/ql/src/experimental/semmle/python/frameworks/Flask.qll b/python/ql/src/experimental/semmle/python/frameworks/Flask.qll index aa120dc1fcb..047ab794847 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Flask.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Flask.qll @@ -11,76 +11,6 @@ private import semmle.python.ApiGraphs private import semmle.python.frameworks.Flask module ExperimentalFlask { - /** - * A reference to either `flask.make_response` function, or the `make_response` method on - * an instance of `flask.Flask`. This creates an instance of the `flask_response` - * class (class-attribute on a flask application), which by default is - * `flask.Response`. - * - * See - * - https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.make_response - * - https://flask.palletsprojects.com/en/1.1.x/api/#flask.make_response - */ - private API::Node flaskMakeResponse() { - result = - [API::moduleImport("flask"), Flask::FlaskApp::instance()] - .getMember(["make_response", "jsonify", "make_default_options_response"]) - } - - /** Gets a reference to a header instance. */ - private DataFlow::LocalSourceNode headerInstance() { - result = - [Flask::Response::classRef(), flaskMakeResponse()] - .getReturn() - .getAMember() - .getAValueReachableFromSource() - } - - /** Gets a reference to a header instance call/subscript */ - private DataFlow::Node headerInstanceCall() { - headerInstance() in [result.(DataFlow::AttrRead), result.(DataFlow::AttrRead).getObject()] or - headerInstance().asExpr() = result.asExpr().(Subscript).getObject() - } - - class FlaskHeaderDefinition extends DataFlow::Node, HeaderDeclaration::Range { - DataFlow::Node headerInput; - - FlaskHeaderDefinition() { - this.asCfgNode().(DefinitionNode) = headerInstanceCall().asCfgNode() and - headerInput.asCfgNode() = this.asCfgNode().(DefinitionNode).getValue() - } - - override DataFlow::Node getNameArg() { result.asExpr() = this.asExpr().(Subscript).getIndex() } - - override DataFlow::Node getValueArg() { result = headerInput } - } - - private class FlaskMakeResponseExtend extends DataFlow::CallCfgNode, HeaderDeclaration::Range { - KeyValuePair item; - - FlaskMakeResponseExtend() { - this.getFunction() = headerInstanceCall() and - item = this.getArg(_).asExpr().(Dict).getAnItem() - } - - override DataFlow::Node getNameArg() { result.asExpr() = item.getKey() } - - override DataFlow::Node getValueArg() { result.asExpr() = item.getValue() } - } - - private class FlaskResponse extends DataFlow::CallCfgNode, HeaderDeclaration::Range { - KeyValuePair item; - - FlaskResponse() { - this = Flask::Response::classRef().getACall() and - item = this.getArg(_).asExpr().(Dict).getAnItem() - } - - override DataFlow::Node getNameArg() { result.asExpr() = item.getKey() } - - override DataFlow::Node getValueArg() { result.asExpr() = item.getValue() } - } - /** * Gets a call to `set_cookie()`. * diff --git a/python/ql/src/experimental/semmle/python/frameworks/Werkzeug.qll b/python/ql/src/experimental/semmle/python/frameworks/Werkzeug.qll deleted file mode 100644 index 20f751a8fb7..00000000000 --- a/python/ql/src/experimental/semmle/python/frameworks/Werkzeug.qll +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Provides classes modeling security-relevant aspects of the `Werkzeug` PyPI package. - * See - * - https://pypi.org/project/Werkzeug/ - * - https://werkzeug.palletsprojects.com/en/1.0.x/#werkzeug - */ - -private import python -private import semmle.python.frameworks.Flask -private import semmle.python.dataflow.new.DataFlow -private import experimental.semmle.python.Concepts -private import semmle.python.ApiGraphs - -private module Werkzeug { - module Datastructures { - module Headers { - class WerkzeugHeaderAddCall extends DataFlow::CallCfgNode, HeaderDeclaration::Range { - WerkzeugHeaderAddCall() { - this.getFunction().(DataFlow::AttrRead).getObject().getALocalSource() = - API::moduleImport("werkzeug") - .getMember("datastructures") - .getMember("Headers") - .getACall() and - this.getFunction().(DataFlow::AttrRead).getAttributeName() = "add" - } - - override DataFlow::Node getNameArg() { result = this.getArg(0) } - - override DataFlow::Node getValueArg() { result = this.getArg(1) } - } - } - } -} diff --git a/python/ql/src/experimental/semmle/python/security/injection/HTTPHeaders.qll b/python/ql/src/experimental/semmle/python/security/injection/HTTPHeaders.qll deleted file mode 100644 index 0768d7a84b2..00000000000 --- a/python/ql/src/experimental/semmle/python/security/injection/HTTPHeaders.qll +++ /dev/null @@ -1,21 +0,0 @@ -import python -import experimental.semmle.python.Concepts -import semmle.python.dataflow.new.DataFlow -import semmle.python.dataflow.new.TaintTracking -import semmle.python.dataflow.new.RemoteFlowSources - -/** - * A taint-tracking configuration for detecting HTTP Header injections. - */ -private module HeaderInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - predicate isSink(DataFlow::Node sink) { - exists(HeaderDeclaration headerDeclaration | - sink in [headerDeclaration.getNameArg(), headerDeclaration.getValueArg()] - ) - } -} - -/** Global taint-tracking for detecting "HTTP Header injection" vulnerabilities. */ -module HeaderInjectionFlow = TaintTracking::Global; diff --git a/python/ql/src/qlpack.yml b/python/ql/src/qlpack.yml index 4d4432b7fc2..be8589f9714 100644 --- a/python/ql/src/qlpack.yml +++ b/python/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-queries -version: 0.9.16-dev +version: 0.9.17-dev groups: - python - queries diff --git a/python/ql/test/experimental/meta/ConceptsTest.qll b/python/ql/test/experimental/meta/ConceptsTest.qll index 255923d4e7f..b552758582b 100644 --- a/python/ql/test/experimental/meta/ConceptsTest.qll +++ b/python/ql/test/experimental/meta/ConceptsTest.qll @@ -319,6 +319,66 @@ module HttpServerHttpResponseTest implements TestSig { } } +module HttpResponseHeaderWriteTest implements TestSig { + string getARelevantTag() { + result = + [ + "headerWriteNameUnsanitized", "headerWriteNameSanitized", "headerWriteValueUnsanitized", + "headerWriteValueSanitized", "headerWriteBulk" + ] + } + + predicate hasActualResult(Location location, string element, string tag, string value) { + exists(location.getFile().getRelativePath()) and + ( + exists(Http::Server::ResponseHeaderWrite write, DataFlow::Node node | + location = node.getLocation() and + element = node.toString() + | + node = write.getNameArg() and + ( + if write.nameAllowsNewline() + then tag = "headerWriteNameUnsanitized" + else tag = "headerWriteNameSanitized" + ) and + value = prettyNodeForInlineTest(node) + or + node = write.getValueArg() and + ( + if write.valueAllowsNewline() + then tag = "headerWriteValueUnsanitized" + else tag = "headerWriteValueSanitized" + ) and + value = prettyNodeForInlineTest(node) + ) + or + exists(Http::Server::ResponseHeaderBulkWrite write, DataFlow::Node node | + node = write.getBulkArg() and + location = node.getLocation() and + element = node.toString() and + ( + tag = "headerWriteBulk" and + value = prettyNodeForInlineTest(node) + or + ( + if write.nameAllowsNewline() + then tag = "headerWriteNameUnsanitized" + else tag = "headerWriteNameSanitized" + ) and + value = "" + or + ( + if write.valueAllowsNewline() + then tag = "headerWriteValueUnsanitized" + else tag = "headerWriteValueSanitized" + ) and + value = "" + ) + ) + ) + } +} + module HttpServerHttpRedirectResponseTest implements TestSig { string getARelevantTag() { result in ["HttpRedirectResponse", "redirectLocation"] } @@ -559,7 +619,8 @@ import MakeTest, MergeTests5, + HttpServerHttpRedirectResponseTest, + MergeTests>, MergeTests5, MergeTests5hello") # $HttpResponse mimetype=text/html responseBody="

    hello

    " - resp.headers["content-type"] = "text/plain" # $ MISSING: HttpResponse mimetype=text/plain + resp.headers["content-type"] = "text/plain" # $ headerWriteNameUnsanitized="content-type" headerWriteValueSanitized="text/plain" MISSING: HttpResponse mimetype=text/plain return resp # $ SPURIOUS: HttpResponse mimetype=text/html responseBody=resp @@ -147,7 +148,7 @@ def Response3(): # $requestHandler @app.route("/content-type/Response4") # $routeSetup="/content-type/Response4" def Response4(): # $requestHandler # note: capitalization of Content-Type does not matter - resp = Response("

    hello

    ", headers={"Content-TYPE": "text/plain"}) # $HttpResponse responseBody="

    hello

    " SPURIOUS: mimetype=text/html MISSING: mimetype=text/plain + resp = Response("

    hello

    ", headers={"Content-TYPE": "text/plain"}) # $ headerWriteBulk=Dict headerWriteNameUnsanitized headerWriteValueSanitized HttpResponse responseBody="

    hello

    " SPURIOUS: mimetype=text/html MISSING: mimetype=text/plain return resp # $ SPURIOUS: HttpResponse mimetype=text/html responseBody=resp @@ -155,7 +156,7 @@ def Response4(): # $requestHandler def Response5(): # $requestHandler # content_type argument takes priority (and result is text/plain) # note: capitalization of Content-Type does not matter - resp = Response("

    hello

    ", headers={"Content-TYPE": "text/html"}, content_type="text/plain; charset=utf-8") # $HttpResponse mimetype=text/plain responseBody="

    hello

    " + resp = Response("

    hello

    ", headers={"Content-TYPE": "text/html"}, content_type="text/plain; charset=utf-8") # $ headerWriteBulk=Dict headerWriteNameUnsanitized headerWriteValueSanitized HttpResponse mimetype=text/plain responseBody="

    hello

    " return resp # $ SPURIOUS: HttpResponse mimetype=text/html responseBody=resp @@ -163,7 +164,7 @@ def Response5(): # $requestHandler def Response6(): # $requestHandler # mimetype argument takes priority over header (and result is text/plain) # note: capitalization of Content-Type does not matter - resp = Response("

    hello

    ", headers={"Content-TYPE": "text/html"}, mimetype="text/plain") # $HttpResponse mimetype=text/plain responseBody="

    hello

    " + resp = Response("

    hello

    ", headers={"Content-TYPE": "text/html"}, mimetype="text/plain") # $ headerWriteBulk=Dict headerWriteNameUnsanitized headerWriteValueSanitized HttpResponse mimetype=text/plain responseBody="

    hello

    " return resp # $ SPURIOUS: HttpResponse mimetype=text/html responseBody=resp @@ -207,12 +208,45 @@ def setting_cookie(): # $requestHandler resp = make_response() # $ HttpResponse mimetype=text/html resp.set_cookie("key", "value") # $ CookieWrite CookieName="key" CookieValue="value" resp.set_cookie(key="key", value="value") # $ CookieWrite CookieName="key" CookieValue="value" - resp.headers.add("Set-Cookie", "key2=value2") # $ MISSING: CookieWrite CookieRawHeader="key2=value2" + resp.headers.add("Set-Cookie", "key2=value2") # $ headerWriteNameUnsanitized="Set-Cookie" headerWriteValueSanitized="key2=value2" MISSING: CookieWrite CookieRawHeader="key2=value2" resp.delete_cookie("key3") # $ CookieWrite CookieName="key3" resp.delete_cookie(key="key3") # $ CookieWrite CookieName="key3" return resp # $ SPURIOUS: HttpResponse mimetype=text/html responseBody=resp ################################################################################ +# Headers +################################################################################ + +@app.route("/headers") # $routeSetup="/headers" +def headers(): # $requestHandler + resp1 = Response() # $ HttpResponse mimetype=text/html + resp1.headers["X-MyHeader"] = "a" # $ headerWriteNameUnsanitized="X-MyHeader" headerWriteValueSanitized="a" + resp2 = make_response() # $ HttpResponse mimetype=text/html + resp2.headers["X-MyHeader"] = "aa" # $ headerWriteNameUnsanitized="X-MyHeader" headerWriteValueSanitized="aa" + resp2.headers.extend({"X-MyHeader2": "b"}) # $ headerWriteBulk=Dict headerWriteNameUnsanitized headerWriteValueSanitized + resp3 = make_response("hello", 200, {"X-MyHeader3": "c"}) # $ HttpResponse mimetype=text/html responseBody="hello" headerWriteBulk=Dict headerWriteNameUnsanitized headerWriteValueSanitized + resp4 = make_response("hello", {"X-MyHeader4": "d"}) # $ HttpResponse mimetype=text/html responseBody="hello" headerWriteBulk=Dict headerWriteNameUnsanitized headerWriteValueSanitized + resp5 = Response(headers={"X-MyHeader5":"e"}) # $ HttpResponse mimetype=text/html headerWriteBulk=Dict headerWriteNameUnsanitized headerWriteValueSanitized + return resp5 # $ SPURIOUS: HttpResponse mimetype=text/html responseBody=resp5 + +@app.route("/werkzeug-headers") # $routeSetup="/werkzeug-headers" +def werkzeug_headers(): # $requestHandler + response = Response() # $ HttpResponse mimetype=text/html + headers = Headers() + headers.add("X-MyHeader1", "a") # $ headerWriteNameUnsanitized="X-MyHeader1" headerWriteValueSanitized="a" + headers.add_header("X-MyHeader2", "b") # $ headerWriteNameUnsanitized="X-MyHeader2" headerWriteValueSanitized="b" + headers.set("X-MyHeader3", "c") # $ headerWriteNameUnsanitized="X-MyHeader3" headerWriteValueSanitized="c" + headers.setdefault("X-MyHeader4", "d") # $ headerWriteNameUnsanitized="X-MyHeader4" headerWriteValueSanitized="d" + headers.__setitem__("X-MyHeader5", "e") # $ headerWriteNameUnsanitized="X-MyHeader5" headerWriteValueSanitized="e" + headers["X-MyHeader6"] = "f" # $ headerWriteNameUnsanitized="X-MyHeader6" headerWriteValueSanitized="f" + h1 = {"X-MyHeader7": "g"} + headers.extend(h1) # $ headerWriteBulk=h1 headerWriteNameUnsanitized headerWriteValueSanitized + h2 = [("X-MyHeader8", "h")] + headers.extend(h2) # $ headerWriteBulk=h2 headerWriteNameUnsanitized headerWriteValueSanitized + response.headers = headers + return response # $ SPURIOUS: HttpResponse mimetype=text/html responseBody=response + +################################################################################ if __name__ == "__main__": diff --git a/python/ql/test/library-tests/frameworks/gradio/source_test.expected b/python/ql/test/library-tests/frameworks/gradio/source_test.expected new file mode 100644 index 00000000000..8ec8033d086 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/gradio/source_test.expected @@ -0,0 +1,2 @@ +testFailures +failures diff --git a/python/ql/test/library-tests/frameworks/gradio/source_test.py b/python/ql/test/library-tests/frameworks/gradio/source_test.py new file mode 100644 index 00000000000..3191f7c03ac --- /dev/null +++ b/python/ql/test/library-tests/frameworks/gradio/source_test.py @@ -0,0 +1,33 @@ +import gradio as gr + + +with gr.Blocks() as demo: + name = gr.Textbox(label="Name") + output = gr.Textbox(label="Output Box") + # static block - not used as a source + static_block = gr.HTML(""" +
    + """) + greet_btn = gr.Button("Hello") + + # decorator + @greet_btn.click(inputs=name, outputs=output) + def greet(name): # $ source=name + return "Hello " + name + "!" + + # `click` event handler with keyword arguments + def greet1(name): # $ source=name + return "Hello " + name + "!" + + greet1_btn = gr.Button("Hello") + greet1_btn.click(fn=greet1, inputs=name, outputs=output, api_name="greet") + + # `click` event handler with positional arguments + def greet2(name): # $ source=name + return "Hello " + name + "!" + + greet2_btn = gr.Button("Hello") + greet2_btn.click(fn=greet2, inputs=name, outputs=output, api_name="greet") + + +demo.launch() diff --git a/python/ql/test/library-tests/frameworks/gradio/source_test.ql b/python/ql/test/library-tests/frameworks/gradio/source_test.ql new file mode 100644 index 00000000000..65015afe4db --- /dev/null +++ b/python/ql/test/library-tests/frameworks/gradio/source_test.ql @@ -0,0 +1,20 @@ +import python +import semmle.python.dataflow.new.RemoteFlowSources +import TestUtilities.InlineExpectationsTest +private import semmle.python.dataflow.new.internal.PrintNode + +module SourceTest implements TestSig { + string getARelevantTag() { result = "source" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + exists(location.getFile().getRelativePath()) and + exists(RemoteFlowSource rfs | + location = rfs.getLocation() and + element = rfs.toString() and + value = prettyNode(rfs) and + tag = "source" + ) + } +} + +import MakeTest diff --git a/python/ql/test/library-tests/frameworks/gradio/taint_step_test.expected b/python/ql/test/library-tests/frameworks/gradio/taint_step_test.expected new file mode 100644 index 00000000000..2ebf825a19b --- /dev/null +++ b/python/ql/test/library-tests/frameworks/gradio/taint_step_test.expected @@ -0,0 +1,26 @@ +edges +| taint_step_test.py:5:5:5:8 | ControlFlowNode for path | taint_step_test.py:19:43:19:46 | ControlFlowNode for path | provenance | | +| taint_step_test.py:5:12:5:35 | ControlFlowNode for Attribute() | taint_step_test.py:5:5:5:8 | ControlFlowNode for path | provenance | | +| taint_step_test.py:6:5:6:8 | ControlFlowNode for file | taint_step_test.py:19:48:19:51 | ControlFlowNode for file | provenance | | +| taint_step_test.py:6:12:6:35 | ControlFlowNode for Attribute() | taint_step_test.py:6:5:6:8 | ControlFlowNode for file | provenance | | +| taint_step_test.py:11:18:11:21 | ControlFlowNode for path | taint_step_test.py:12:9:12:16 | ControlFlowNode for filepath | provenance | | +| taint_step_test.py:11:18:11:21 | ControlFlowNode for path | taint_step_test.py:12:9:12:16 | ControlFlowNode for filepath | provenance | AdditionalTaintStep | +| taint_step_test.py:11:24:11:27 | ControlFlowNode for file | taint_step_test.py:12:9:12:16 | ControlFlowNode for filepath | provenance | AdditionalTaintStep | +| taint_step_test.py:12:9:12:16 | ControlFlowNode for filepath | taint_step_test.py:13:19:13:26 | ControlFlowNode for filepath | provenance | | +| taint_step_test.py:19:43:19:46 | ControlFlowNode for path | taint_step_test.py:11:18:11:21 | ControlFlowNode for path | provenance | AdditionalTaintStep | +| taint_step_test.py:19:48:19:51 | ControlFlowNode for file | taint_step_test.py:11:24:11:27 | ControlFlowNode for file | provenance | AdditionalTaintStep | +nodes +| taint_step_test.py:5:5:5:8 | ControlFlowNode for path | semmle.label | ControlFlowNode for path | +| taint_step_test.py:5:12:5:35 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() | +| taint_step_test.py:6:5:6:8 | ControlFlowNode for file | semmle.label | ControlFlowNode for file | +| taint_step_test.py:6:12:6:35 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() | +| taint_step_test.py:11:18:11:21 | ControlFlowNode for path | semmle.label | ControlFlowNode for path | +| taint_step_test.py:11:24:11:27 | ControlFlowNode for file | semmle.label | ControlFlowNode for file | +| taint_step_test.py:12:9:12:16 | ControlFlowNode for filepath | semmle.label | ControlFlowNode for filepath | +| taint_step_test.py:13:19:13:26 | ControlFlowNode for filepath | semmle.label | ControlFlowNode for filepath | +| taint_step_test.py:19:43:19:46 | ControlFlowNode for path | semmle.label | ControlFlowNode for path | +| taint_step_test.py:19:48:19:51 | ControlFlowNode for file | semmle.label | ControlFlowNode for file | +subpaths +#select +| taint_step_test.py:13:19:13:26 | ControlFlowNode for filepath | taint_step_test.py:5:12:5:35 | ControlFlowNode for Attribute() | taint_step_test.py:13:19:13:26 | ControlFlowNode for filepath | This path depends on a $@. | taint_step_test.py:5:12:5:35 | ControlFlowNode for Attribute() | user-provided value | +| taint_step_test.py:13:19:13:26 | ControlFlowNode for filepath | taint_step_test.py:6:12:6:35 | ControlFlowNode for Attribute() | taint_step_test.py:13:19:13:26 | ControlFlowNode for filepath | This path depends on a $@. | taint_step_test.py:6:12:6:35 | ControlFlowNode for Attribute() | user-provided value | diff --git a/python/ql/test/library-tests/frameworks/gradio/taint_step_test.py b/python/ql/test/library-tests/frameworks/gradio/taint_step_test.py new file mode 100644 index 00000000000..eb1614e99b0 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/gradio/taint_step_test.py @@ -0,0 +1,22 @@ +import gradio as gr +import os + +with gr.Blocks() as demo: + path = gr.Textbox(label="Path") # $ source=gr.Textbox(..) + file = gr.Textbox(label="File") # $ source=gr.Textbox(..) + output = gr.Textbox(label="Output Box") + + + # path injection sink + def fileread(path, file): + filepath = os.path.join(path, file) + with open(filepath, "r") as f: + return f.read() + + + # `click` event handler with `inputs` containing a list + greet1_btn = gr.Button("Path for the file to display") + greet1_btn.click(fn=fileread, inputs=[path,file], outputs=output, api_name="fileread") + + +demo.launch() diff --git a/python/ql/test/library-tests/frameworks/gradio/taint_step_test.qlref b/python/ql/test/library-tests/frameworks/gradio/taint_step_test.qlref new file mode 100644 index 00000000000..d43482cc509 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/gradio/taint_step_test.qlref @@ -0,0 +1 @@ +Security/CWE-022/PathInjection.ql diff --git a/python/ql/test/library-tests/frameworks/pyramid/ConceptsTest.expected b/python/ql/test/library-tests/frameworks/pyramid/ConceptsTest.expected new file mode 100644 index 00000000000..8ec8033d086 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/pyramid/ConceptsTest.expected @@ -0,0 +1,2 @@ +testFailures +failures diff --git a/python/ql/test/library-tests/frameworks/pyramid/ConceptsTest.ql b/python/ql/test/library-tests/frameworks/pyramid/ConceptsTest.ql new file mode 100644 index 00000000000..b557a0bccb6 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/pyramid/ConceptsTest.ql @@ -0,0 +1,2 @@ +import python +import experimental.meta.ConceptsTest diff --git a/python/ql/test/library-tests/frameworks/pyramid/InlineTaintTest.expected b/python/ql/test/library-tests/frameworks/pyramid/InlineTaintTest.expected new file mode 100644 index 00000000000..366de37b867 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/pyramid/InlineTaintTest.expected @@ -0,0 +1,4 @@ +argumentToEnsureNotTaintedNotMarkedAsSpurious +untaintedArgumentToEnsureTaintedNotMarkedAsMissing +testFailures +failures diff --git a/python/ql/test/library-tests/frameworks/pyramid/InlineTaintTest.ql b/python/ql/test/library-tests/frameworks/pyramid/InlineTaintTest.ql new file mode 100644 index 00000000000..8524da5fe7d --- /dev/null +++ b/python/ql/test/library-tests/frameworks/pyramid/InlineTaintTest.ql @@ -0,0 +1,2 @@ +import experimental.meta.InlineTaintTest +import MakeInlineTaintTest diff --git a/python/ql/test/library-tests/frameworks/pyramid/pyramid_test.py b/python/ql/test/library-tests/frameworks/pyramid/pyramid_test.py new file mode 100644 index 00000000000..db6449123a6 --- /dev/null +++ b/python/ql/test/library-tests/frameworks/pyramid/pyramid_test.py @@ -0,0 +1,153 @@ +from pyramid.view import view_config +from pyramid.config import Configurator +from pyramid.response import Response +from pyramid.httpexceptions import HTTPMultipleChoices, HTTPMovedPermanently, HTTPFound, HTTPSeeOther, HTTPUseProxy, HTTPTemporaryRedirect, HTTPPermanentRedirect +from wsgiref.simple_server import make_server + +def ignore(*args, **kwargs): pass +ensure_tainted = ensure_not_tainted = ignore + +@view_config(route_name="test1") # $ routeSetup +def test1(request): # $ requestHandler + ensure_tainted( + request, # $ tainted + + request.accept, # $ tainted + request.accept_charset, # $ tainted + request.accept_encoding, # $ tainted + request.accept_language, # $ tainted + request.authorization, # $ tainted + request.cache_control, # $ tainted + request.client_addr, # $ tainted + request.content_type, # $ tainted + request.domain, # $ tainted + request.host, # $ tainted + request.host_port, # $ tainted + request.host_url, # $ tainted + request.if_match, # $ tainted + request.if_none_match, # $ tainted + request.if_range, # $ tainted + request.pragma, # $ tainted + request.range, # $ tainted + request.referer, # $ tainted + request.referrer, # $ tainted + request.user_agent, # $ tainted + + request.as_bytes, # $ tainted + + request.body, # $ tainted + request.body_file.read(), # $ tainted + request.body_file_raw.read(), # $ tainted + request.body_file_seekable.read(),# $ tainted + + request.json, # $ tainted + request.json_body, # $ tainted + request.json['a']['b'][0]['c'], # $ tainted + + request.text, # $ tainted + + request.matchdict, # $ tainted + + request.path, # $ tainted + request.path_info, # $ tainted + request.path_info_peek(), # $ tainted + request.path_info_pop(), # $ tainted + request.path_qs, # $ tainted + request.path_url, # $ tainted + request.query_string, # $ tainted + + request.url, # $ tainted + request.urlargs, # $ tainted + request.urlvars, # $ tainted + + request.GET['a'], # $ tainted + request.POST['b'], # $ tainted + request.cookies['c'], # $ tainted + request.params['d'], # $ tainted + request.headers['X-My-Header'], # $ tainted + request.GET.values(), # $ tainted + + request.copy(), # $ tainted + request.copy_get(), # $ tainted + request.copy().GET['a'], # $ tainted + request.copy_get().body # $ tainted + ) + + return Response("Ok") # $ HttpResponse responseBody="Ok" mimetype=text/html + +def test2(request): # $ requestHandler + ensure_tainted(request) # $ tainted + + resp = Response("Ok", content_type="text/plain") # $ HttpResponse responseBody="Ok" mimetype=text/plain + resp.body = "Ok2" # $ HttpResponse responseBody="Ok2" SPURIOUS: mimetype=text/html + return resp + +@view_config(route_name="test3", renderer="string") # $ routeSetup +def test3(ctx, req): # $ requestHandler + ensure_tainted(req) # $ tainted + resp = req.response # $ HttpResponse mimetype=text/html + resp.set_cookie("hi", "there") # $ CookieWrite CookieName="hi" CookieValue="there" + resp.set_cookie(value="there", name="hi") # $ CookieWrite CookieName="hi" CookieValue="there" + return "Ok" # $ HttpResponse responseBody="Ok" mimetype=text/html + +@view_config(route_name="test4", renderer="string") # $ routeSetup +def test4(request): # $ requestHandler + a = HTTPMultipleChoices("redirect") # $HttpResponse mimetype=text/html HttpRedirectResponse redirectLocation="redirect" + b = HTTPMovedPermanently(location="redirect") # $HttpResponse mimetype=text/html HttpRedirectResponse redirectLocation="redirect" + c = HTTPFound(location="redirect") # $HttpResponse mimetype=text/html HttpRedirectResponse redirectLocation="redirect" + d = HTTPSeeOther(location="redirect") # $HttpResponse mimetype=text/html HttpRedirectResponse redirectLocation="redirect" + e = HTTPUseProxy(location="redirect") # $HttpResponse mimetype=text/html HttpRedirectResponse redirectLocation="redirect" + f = HTTPTemporaryRedirect(location="redirect") # $HttpResponse mimetype=text/html HttpRedirectResponse redirectLocation="redirect" + g = HTTPPermanentRedirect(location="redirect") # $HttpResponse mimetype=text/html HttpRedirectResponse redirectLocation="redirect" + raise a + +# Unsupported cases +class Test5: + def __init__(self, request): # $ MISSING: requestHandler + ensure_tainted(request) # $ MISSING: tainted + self.req = request + + @view_config(route_name="test5", renderer="string") # $ routeSetup + def test5(self): # $ requestHandler + ensure_not_tainted(self) # $ SPURIOUS: tainted + ensure_tainted(self.req) # $ MISSING: tainted + return "Ok" # $ HttpResponse mimetype=text/html responseBody="Ok" + +@view_config(route_name="test6", attr="test6method", renderer="string") # $ routeSetup +class Test6: + def __init__(self, request): # $ MISSING: requestHandler + ensure_tainted(request) # $ MISSING: tainted + self.req = request + + def test6method(self): # $ MISSING: requestHandler + ensure_not_tainted(self) + ensure_tainted(self.req) # $ MISSING: tainted + return "Ok" # $ MISSING: HttpResponse mimetype=text/html responseBody="Ok" + +@view_config(route_name="test6", renderer="string") # $ routeSetup +class Test6: + def __init__(self, context, request): # $ MISSING: requestHandler + ensure_tainted(request) # $ MISSING: tainted + self.req = request + + def __call__(self): # $ MISSING: requestHandler + ensure_not_tainted(self) + ensure_tainted(self.req) # $ MISSING: tainted + return "Ok" # $ MISSING: HttpResponse mimetype=text/html responseBody="Ok" + +class Test7: + def __call__(self,context,request): # $ MISSING: requestHandler + ensure_tainted(request) # $ MISSING: tainted + return "Ok" # $ MISSING: HttpResponse mimetype=text/html responseBody="Ok" + + +if __name__ == "__main__": + with Configurator() as config: + for i in range(1,8): + config.add_route(f"test{i}", f"/test{i}") + config.add_view(test2, route_name="test2") # $ routeSetup + config.add_view(Test7(), route_name="test7", renderer="string") # $ routeSetup + config.scan() + server = make_server('127.0.0.1', 8080, config.make_wsgi_app()) + print("serving") + server.serve_forever() diff --git a/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py b/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py index c114e96df29..6a2031699f4 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py +++ b/python/ql/test/library-tests/frameworks/stdlib/wsgiref_simple_server_test.py @@ -2,6 +2,7 @@ # see https://docs.python.org/3/library/wsgiref.html#wsgiref.simple_server.WSGIServer import sys import wsgiref.simple_server +import wsgiref.headers def ignore(*arg, **kwargs): pass ensure_tainted = ensure_not_tainted = ignore @@ -17,7 +18,7 @@ def func(environ, start_response): # $ requestHandler environ, # $ tainted environ["PATH_INFO"], # $ tainted ) - write = start_response("200 OK", [("Content-Type", "text/plain")]) + write = start_response("200 OK", [("Content-Type", "text/plain")]) # $ headerWriteBulk=List headerWriteNameUnsanitized headerWriteValueUnsanitized write(b"hello") # $ HttpResponse responseBody=b"hello" write(data=b" ") # $ HttpResponse responseBody=b" " @@ -32,9 +33,17 @@ class MyServer(wsgiref.simple_server.WSGIServer): self.set_app(self.my_method) def my_method(self, _env, start_response): # $ requestHandler - start_response("200 OK", []) + start_response("200 OK", []) # $ headerWriteBulk=List headerWriteNameUnsanitized headerWriteValueUnsanitized return [b"my_method"] # $ HttpResponse responseBody=List +def func2(environ, start_response): # $ requestHandler + headers = wsgiref.headers.Headers([("Content-Type", "text/plain")]) # $ headerWriteBulk=List headerWriteNameUnsanitized headerWriteValueUnsanitized + headers.add_header("X-MyHeader", "a") # $ headerWriteNameUnsanitized="X-MyHeader" headerWriteValueUnsanitized="a" + headers.setdefault("X-MyHeader2", "b") # $ headerWriteNameUnsanitized="X-MyHeader2" headerWriteValueUnsanitized="b" + headers.__setitem__("X-MyHeader3", "c") # $ headerWriteNameUnsanitized="X-MyHeader3" headerWriteValueUnsanitized="c" + headers["X-MyHeader4"] = "d" # $ headerWriteNameUnsanitized="X-MyHeader4" headerWriteValueUnsanitized="d" + start_response(status, headers) # $ headerWriteBulk=headers headerWriteNameUnsanitized headerWriteValueUnsanitized + return [b"Hello"] # $ HttpResponse responseBody=List case = sys.argv[1] if case == "1": @@ -45,9 +54,11 @@ elif case == "2": elif case == "3": server = MyServer() def func3(_env, start_response): # $ requestHandler - start_response("200 OK", []) + start_response("200 OK", []) # $ headerWriteBulk=List headerWriteNameUnsanitized headerWriteValueUnsanitized return [b"foo"] # $ HttpResponse responseBody=List server.set_app(func3) +elif case == "4": + server = wsgiref.simple_server.make_server(ADDRESS[0], ADDRESS[1], func2) else: sys.exit("wrong case") diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.expected b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.expected new file mode 100644 index 00000000000..b5f4ff549c4 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.expected @@ -0,0 +1,43 @@ +edges +| flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | flask_tests.py:1:29:1:35 | ControlFlowNode for request | provenance | | +| flask_tests.py:1:29:1:35 | ControlFlowNode for request | flask_tests.py:9:18:9:24 | ControlFlowNode for request | provenance | | +| flask_tests.py:1:29:1:35 | ControlFlowNode for request | flask_tests.py:19:18:19:24 | ControlFlowNode for request | provenance | | +| flask_tests.py:1:29:1:35 | ControlFlowNode for request | flask_tests.py:20:36:20:42 | ControlFlowNode for request | provenance | | +| flask_tests.py:1:29:1:35 | ControlFlowNode for request | flask_tests.py:31:18:31:24 | ControlFlowNode for request | provenance | | +| flask_tests.py:9:5:9:14 | ControlFlowNode for rfs_header | flask_tests.py:13:17:13:26 | ControlFlowNode for rfs_header | provenance | | +| flask_tests.py:9:18:9:24 | ControlFlowNode for request | flask_tests.py:9:5:9:14 | ControlFlowNode for rfs_header | provenance | AdditionalTaintStep | +| flask_tests.py:19:18:19:24 | ControlFlowNode for request | flask_tests.py:20:36:20:61 | ControlFlowNode for Subscript | provenance | AdditionalTaintStep | +| flask_tests.py:20:36:20:42 | ControlFlowNode for request | flask_tests.py:20:36:20:61 | ControlFlowNode for Subscript | provenance | AdditionalTaintStep | +| flask_tests.py:31:5:31:14 | ControlFlowNode for rfs_header | flask_tests.py:33:11:33:20 | ControlFlowNode for rfs_header | provenance | | +| flask_tests.py:31:5:31:14 | ControlFlowNode for rfs_header | flask_tests.py:35:12:35:21 | ControlFlowNode for rfs_header | provenance | | +| flask_tests.py:31:18:31:24 | ControlFlowNode for request | flask_tests.py:31:5:31:14 | ControlFlowNode for rfs_header | provenance | AdditionalTaintStep | +| wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | wsgiref_tests.py:6:5:6:10 | ControlFlowNode for h_name | provenance | | +| wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | wsgiref_tests.py:7:5:7:9 | ControlFlowNode for h_val | provenance | | +| wsgiref_tests.py:6:5:6:10 | ControlFlowNode for h_name | wsgiref_tests.py:8:17:8:22 | ControlFlowNode for h_name | provenance | | +| wsgiref_tests.py:7:5:7:9 | ControlFlowNode for h_val | wsgiref_tests.py:8:42:8:46 | ControlFlowNode for h_val | provenance | | +nodes +| flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | semmle.label | ControlFlowNode for ImportMember | +| flask_tests.py:1:29:1:35 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| flask_tests.py:9:5:9:14 | ControlFlowNode for rfs_header | semmle.label | ControlFlowNode for rfs_header | +| flask_tests.py:9:18:9:24 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| flask_tests.py:13:17:13:26 | ControlFlowNode for rfs_header | semmle.label | ControlFlowNode for rfs_header | +| flask_tests.py:19:18:19:24 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| flask_tests.py:20:36:20:42 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| flask_tests.py:20:36:20:61 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| flask_tests.py:31:5:31:14 | ControlFlowNode for rfs_header | semmle.label | ControlFlowNode for rfs_header | +| flask_tests.py:31:18:31:24 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| flask_tests.py:33:11:33:20 | ControlFlowNode for rfs_header | semmle.label | ControlFlowNode for rfs_header | +| flask_tests.py:35:12:35:21 | ControlFlowNode for rfs_header | semmle.label | ControlFlowNode for rfs_header | +| wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | semmle.label | ControlFlowNode for environ | +| wsgiref_tests.py:6:5:6:10 | ControlFlowNode for h_name | semmle.label | ControlFlowNode for h_name | +| wsgiref_tests.py:7:5:7:9 | ControlFlowNode for h_val | semmle.label | ControlFlowNode for h_val | +| wsgiref_tests.py:8:17:8:22 | ControlFlowNode for h_name | semmle.label | ControlFlowNode for h_name | +| wsgiref_tests.py:8:42:8:46 | ControlFlowNode for h_val | semmle.label | ControlFlowNode for h_val | +subpaths +#select +| flask_tests.py:13:17:13:26 | ControlFlowNode for rfs_header | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | flask_tests.py:13:17:13:26 | ControlFlowNode for rfs_header | This HTTP header is constructed from a $@. | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | user-provided value | +| flask_tests.py:20:36:20:61 | ControlFlowNode for Subscript | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | flask_tests.py:20:36:20:61 | ControlFlowNode for Subscript | This HTTP header is constructed from a $@. | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | user-provided value | +| flask_tests.py:33:11:33:20 | ControlFlowNode for rfs_header | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | flask_tests.py:33:11:33:20 | ControlFlowNode for rfs_header | This HTTP header is constructed from a $@. | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | user-provided value | +| flask_tests.py:35:12:35:21 | ControlFlowNode for rfs_header | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | flask_tests.py:35:12:35:21 | ControlFlowNode for rfs_header | This HTTP header is constructed from a $@. | flask_tests.py:1:29:1:35 | ControlFlowNode for ImportMember | user-provided value | +| wsgiref_tests.py:8:17:8:22 | ControlFlowNode for h_name | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | wsgiref_tests.py:8:17:8:22 | ControlFlowNode for h_name | This HTTP header is constructed from a $@. | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | user-provided value | +| wsgiref_tests.py:8:42:8:46 | ControlFlowNode for h_val | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | wsgiref_tests.py:8:42:8:46 | ControlFlowNode for h_val | This HTTP header is constructed from a $@. | wsgiref_tests.py:4:14:4:20 | ControlFlowNode for environ | user-provided value | diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.qlref b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.qlref new file mode 100644 index 00000000000..7dbe28e4b59 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/HeaderInjection.qlref @@ -0,0 +1 @@ +Security/CWE-113/HeaderInjection.ql \ No newline at end of file diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/flask_tests.py b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/flask_tests.py new file mode 100644 index 00000000000..8fa81f036da --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/flask_tests.py @@ -0,0 +1,40 @@ +from flask import Response, request, Flask, make_response +from werkzeug.datastructures import Headers + +app = Flask(__name__) + + +@app.route('/werkzeug_headers') +def werkzeug_headers(): + rfs_header = request.args["rfs_header"] + response = Response() + headers = Headers() + headers.add("HeaderName", rfs_header) # GOOD: Newlines are rejected from header value. + headers.add(rfs_header, "HeaderValue") # BAD: User controls header name. + response.headers = headers + return response + +@app.route("/flask_make_response_header_arg2") +def flask_make_response_header_arg2(): + rfs_header = request.args["rfs_header"] + resp = make_response("hello", {request.args["rfs_header"]: "HeaderValue"}) # BAD + return resp + +@app.route("/flask_escaped") +def flask_escaped(): + rfs_header = request.args["rfs_header"] + resp = make_response("hello", {rfs_header.replace("\n", ""): "HeaderValue"}) # GOOD - Newlines are removed from the input. + return resp + +@app.route("/flask_extend") +def flask_extend(): + rfs_header = request.args["rfs_header"] + response = Response() + h1 = {rfs_header: "HeaderValue"} + response.headers.extend(h1) # BAD + h2 = [(rfs_header, "HeaderValue")] + response.headers.extend(h2) # BAD + return response + +# if __name__ == "__main__": +# app.run(debug=True) \ No newline at end of file diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/wsgiref_tests.py b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/wsgiref_tests.py new file mode 100644 index 00000000000..68fee2fd929 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests1/wsgiref_tests.py @@ -0,0 +1,15 @@ +from wsgiref.simple_server import make_server +from wsgiref.headers import Headers + +def test_app(environ, start_response): + status = "200 OK" + h_name = environ["source_n"] + h_val = environ["source_v"] + headers = [(h_name, "val"), ("name", h_val)] + start_response(status, headers) # BAD + return [b"Hello"] + +def main1(): + with make_server('', 8000, test_app) as httpd: + print("Serving on port 8000...") + httpd.serve_forever() \ No newline at end of file diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderInjection.expected b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderInjection.expected new file mode 100644 index 00000000000..e217064d1df --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderInjection.expected @@ -0,0 +1,4 @@ +edges +nodes +subpaths +#select diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderInjection.qlref b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderInjection.qlref new file mode 100644 index 00000000000..7dbe28e4b59 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderInjection.qlref @@ -0,0 +1 @@ +Security/CWE-113/HeaderInjection.ql \ No newline at end of file diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderWriteTest.expected b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderWriteTest.expected new file mode 100644 index 00000000000..1dcb484b8f4 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderWriteTest.expected @@ -0,0 +1,8 @@ +source +| wsgiref_tests.py:7:14:7:20 | ControlFlowNode for environ | +sink +headerWrite +| wsgiref_tests.py:12:5:12:35 | ControlFlowNode for start_response() | wsgiref_tests.py:11:17:11:22 | ControlFlowNode for h_name | wsgiref_tests.py:11:25:11:29 | ControlFlowNode for StringLiteral | false | false | +| wsgiref_tests.py:12:5:12:35 | ControlFlowNode for start_response() | wsgiref_tests.py:11:17:11:22 | ControlFlowNode for h_name | wsgiref_tests.py:11:42:11:46 | ControlFlowNode for h_val | false | false | +| wsgiref_tests.py:12:5:12:35 | ControlFlowNode for start_response() | wsgiref_tests.py:11:34:11:39 | ControlFlowNode for StringLiteral | wsgiref_tests.py:11:25:11:29 | ControlFlowNode for StringLiteral | false | false | +| wsgiref_tests.py:12:5:12:35 | ControlFlowNode for start_response() | wsgiref_tests.py:11:34:11:39 | ControlFlowNode for StringLiteral | wsgiref_tests.py:11:42:11:46 | ControlFlowNode for h_val | false | false | diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderWriteTest.ql b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderWriteTest.ql new file mode 100644 index 00000000000..a46d46e89c9 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/HeaderWriteTest.ql @@ -0,0 +1,20 @@ +import python +import semmle.python.security.dataflow.HttpHeaderInjectionCustomizations +import semmle.python.dataflow.new.DataFlow +import semmle.python.Concepts + +query predicate source(HttpHeaderInjection::Source src) { + src.getLocation().getFile().getBaseName() in ["wsgiref_tests.py", "flask_tests.py"] +} + +query predicate sink(HttpHeaderInjection::Sink sink) { any() } + +query predicate headerWrite( + Http::Server::ResponseHeaderWrite write, DataFlow::Node name, DataFlow::Node val, + boolean nameVuln, boolean valVuln +) { + name = write.getNameArg() and + val = write.getValueArg() and + (if write.nameAllowsNewline() then nameVuln = true else nameVuln = false) and + (if write.valueAllowsNewline() then valVuln = true else valVuln = false) +} diff --git a/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/wsgiref_tests.py b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/wsgiref_tests.py new file mode 100644 index 00000000000..834435f338c --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-113-HeaderInjection/Tests2-with-wsgi-validator/wsgiref_tests.py @@ -0,0 +1,18 @@ +# These tests use a wsgi validator; so are split into a separate directory from the other tests since the models only check for the presence of a validator in the database. + +from wsgiref.simple_server import make_server +from wsgiref.headers import Headers +from wsgiref.validate import validator + +def test_app(environ, start_response): + status = "200 OK" + h_name = environ["source_n"] + h_val = environ["source_v"] + headers = [(h_name, "val"), ("name", h_val)] + start_response(status, headers) # GOOD - the application is validated, so headers containing newlines will be rejected. + return [b"Hello"] + +def main1(): + with make_server('', 8000, validator(test_app)) as httpd: + print("Serving on port 8000...") + httpd.serve_forever() \ No newline at end of file diff --git a/ruby/ql/lib/CHANGELOG.md b/ruby/ql/lib/CHANGELOG.md index 685e9b24bd5..4aa350bd6aa 100644 --- a/ruby/ql/lib/CHANGELOG.md +++ b/ruby/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.1 + +No user-facing changes. + ## 0.9.0 ### Breaking Changes diff --git a/ruby/ql/lib/change-notes/released/0.9.1.md b/ruby/ql/lib/change-notes/released/0.9.1.md new file mode 100644 index 00000000000..5ab7a1ee037 --- /dev/null +++ b/ruby/ql/lib/change-notes/released/0.9.1.md @@ -0,0 +1,3 @@ +## 0.9.1 + +No user-facing changes. diff --git a/ruby/ql/lib/codeql-pack.release.yml b/ruby/ql/lib/codeql-pack.release.yml index 8b9fc185202..6789dcd18b7 100644 --- a/ruby/ql/lib/codeql-pack.release.yml +++ b/ruby/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.9.0 +lastReleaseVersion: 0.9.1 diff --git a/ruby/ql/lib/qlpack.yml b/ruby/ql/lib/qlpack.yml index 79ec8fc4fb5..e1298464500 100644 --- a/ruby/ql/lib/qlpack.yml +++ b/ruby/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-all -version: 0.9.1-dev +version: 0.9.2-dev groups: ruby extractor: ruby dbscheme: ruby.dbscheme diff --git a/ruby/ql/src/CHANGELOG.md b/ruby/ql/src/CHANGELOG.md index 317d8cf367f..514ffaf1310 100644 --- a/ruby/ql/src/CHANGELOG.md +++ b/ruby/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.16 + +No user-facing changes. + ## 0.8.15 No user-facing changes. diff --git a/ruby/ql/src/change-notes/released/0.8.16.md b/ruby/ql/src/change-notes/released/0.8.16.md new file mode 100644 index 00000000000..f11c58a3b38 --- /dev/null +++ b/ruby/ql/src/change-notes/released/0.8.16.md @@ -0,0 +1,3 @@ +## 0.8.16 + +No user-facing changes. diff --git a/ruby/ql/src/codeql-pack.release.yml b/ruby/ql/src/codeql-pack.release.yml index 2e3c183bb7a..c735422e23a 100644 --- a/ruby/ql/src/codeql-pack.release.yml +++ b/ruby/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.8.15 +lastReleaseVersion: 0.8.16 diff --git a/ruby/ql/src/qlpack.yml b/ruby/ql/src/qlpack.yml index b2d690177e0..4ac1f6e665e 100644 --- a/ruby/ql/src/qlpack.yml +++ b/ruby/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-queries -version: 0.8.16-dev +version: 0.8.17-dev groups: - ruby - queries diff --git a/shared/controlflow/CHANGELOG.md b/shared/controlflow/CHANGELOG.md index 7e1a517c4a9..af2eb1d4645 100644 --- a/shared/controlflow/CHANGELOG.md +++ b/shared/controlflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.16 + +No user-facing changes. + ## 0.1.15 No user-facing changes. diff --git a/shared/controlflow/change-notes/released/0.1.16.md b/shared/controlflow/change-notes/released/0.1.16.md new file mode 100644 index 00000000000..ec4eba91065 --- /dev/null +++ b/shared/controlflow/change-notes/released/0.1.16.md @@ -0,0 +1,3 @@ +## 0.1.16 + +No user-facing changes. diff --git a/shared/controlflow/codeql-pack.release.yml b/shared/controlflow/codeql-pack.release.yml index 74719634743..a01dca92161 100644 --- a/shared/controlflow/codeql-pack.release.yml +++ b/shared/controlflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.1.15 +lastReleaseVersion: 0.1.16 diff --git a/shared/controlflow/qlpack.yml b/shared/controlflow/qlpack.yml index 0cb89d3b416..99329245a84 100644 --- a/shared/controlflow/qlpack.yml +++ b/shared/controlflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/controlflow -version: 0.1.16-dev +version: 0.1.17-dev groups: shared library: true dependencies: diff --git a/shared/dataflow/CHANGELOG.md b/shared/dataflow/CHANGELOG.md index 180ffb85207..24e88db0fbf 100644 --- a/shared/dataflow/CHANGELOG.md +++ b/shared/dataflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.7 + +No user-facing changes. + ## 0.2.6 ### Major Analysis Improvements diff --git a/shared/dataflow/change-notes/released/0.2.7.md b/shared/dataflow/change-notes/released/0.2.7.md new file mode 100644 index 00000000000..80b98e73c70 --- /dev/null +++ b/shared/dataflow/change-notes/released/0.2.7.md @@ -0,0 +1,3 @@ +## 0.2.7 + +No user-facing changes. diff --git a/shared/dataflow/codeql-pack.release.yml b/shared/dataflow/codeql-pack.release.yml index 248dd0f4594..6d3c0021858 100644 --- a/shared/dataflow/codeql-pack.release.yml +++ b/shared/dataflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.6 +lastReleaseVersion: 0.2.7 diff --git a/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll b/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll index 89a2a23d53b..78950806f7d 100644 --- a/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll @@ -1286,10 +1286,8 @@ module Make< * be useful to include in the exposed local data-flow/taint-tracking relations. */ predicate summaryThroughStepValue(ArgNode arg, Node out, SummarizedCallable sc) { - exists(ReturnKind rk, SummaryNode ret, DataFlowCall call | - summaryLocalStep(summaryArgParam(call, arg, sc), ret, true, _) and - summaryReturnNode(ret, pragma[only_bind_into](rk)) and - out = getAnOutNode(call, pragma[only_bind_into](rk)) + exists(SummaryNode ret | + summaryLocalStep(summaryArgParamRetOut(arg, ret, out, sc), ret, true, _) ) } diff --git a/shared/dataflow/qlpack.yml b/shared/dataflow/qlpack.yml index 14e318dced6..42630dac091 100644 --- a/shared/dataflow/qlpack.yml +++ b/shared/dataflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/dataflow -version: 0.2.7-dev +version: 0.2.8-dev groups: shared library: true dependencies: diff --git a/shared/mad/CHANGELOG.md b/shared/mad/CHANGELOG.md index 6f1322a26ff..bfbe60bbef6 100644 --- a/shared/mad/CHANGELOG.md +++ b/shared/mad/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.16 + +No user-facing changes. + ## 0.2.15 No user-facing changes. diff --git a/shared/mad/change-notes/released/0.2.16.md b/shared/mad/change-notes/released/0.2.16.md new file mode 100644 index 00000000000..0e384109cab --- /dev/null +++ b/shared/mad/change-notes/released/0.2.16.md @@ -0,0 +1,3 @@ +## 0.2.16 + +No user-facing changes. diff --git a/shared/mad/codeql-pack.release.yml b/shared/mad/codeql-pack.release.yml index 0f574e080e4..2aa64d9ed07 100644 --- a/shared/mad/codeql-pack.release.yml +++ b/shared/mad/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.16 diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index 82dd88dcb56..ffeba23f887 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/mad -version: 0.2.16-dev +version: 0.2.17-dev groups: shared library: true dependencies: diff --git a/shared/rangeanalysis/CHANGELOG.md b/shared/rangeanalysis/CHANGELOG.md index 0c0ae0d04f6..13305f3ad42 100644 --- a/shared/rangeanalysis/CHANGELOG.md +++ b/shared/rangeanalysis/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.15 + +No user-facing changes. + ## 0.0.14 No user-facing changes. diff --git a/shared/rangeanalysis/change-notes/released/0.0.15.md b/shared/rangeanalysis/change-notes/released/0.0.15.md new file mode 100644 index 00000000000..7af9c05f23f --- /dev/null +++ b/shared/rangeanalysis/change-notes/released/0.0.15.md @@ -0,0 +1,3 @@ +## 0.0.15 + +No user-facing changes. diff --git a/shared/rangeanalysis/codeql-pack.release.yml b/shared/rangeanalysis/codeql-pack.release.yml index ca29e45d0a6..dff35216fc6 100644 --- a/shared/rangeanalysis/codeql-pack.release.yml +++ b/shared/rangeanalysis/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.14 +lastReleaseVersion: 0.0.15 diff --git a/shared/rangeanalysis/qlpack.yml b/shared/rangeanalysis/qlpack.yml index 309d8214fc0..02a771f2e5f 100644 --- a/shared/rangeanalysis/qlpack.yml +++ b/shared/rangeanalysis/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rangeanalysis -version: 0.0.15-dev +version: 0.0.16-dev groups: shared library: true dependencies: diff --git a/shared/regex/CHANGELOG.md b/shared/regex/CHANGELOG.md index a974d3bb9a1..91d49f98a5c 100644 --- a/shared/regex/CHANGELOG.md +++ b/shared/regex/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.16 + +No user-facing changes. + ## 0.2.15 No user-facing changes. diff --git a/shared/regex/change-notes/released/0.2.16.md b/shared/regex/change-notes/released/0.2.16.md new file mode 100644 index 00000000000..0e384109cab --- /dev/null +++ b/shared/regex/change-notes/released/0.2.16.md @@ -0,0 +1,3 @@ +## 0.2.16 + +No user-facing changes. diff --git a/shared/regex/codeql-pack.release.yml b/shared/regex/codeql-pack.release.yml index 0f574e080e4..2aa64d9ed07 100644 --- a/shared/regex/codeql-pack.release.yml +++ b/shared/regex/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.16 diff --git a/shared/regex/qlpack.yml b/shared/regex/qlpack.yml index bbd72f8b24c..a69bae51244 100644 --- a/shared/regex/qlpack.yml +++ b/shared/regex/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/regex -version: 0.2.16-dev +version: 0.2.17-dev groups: shared library: true dependencies: diff --git a/shared/ssa/CHANGELOG.md b/shared/ssa/CHANGELOG.md index 2126603d56a..b5c824327ee 100644 --- a/shared/ssa/CHANGELOG.md +++ b/shared/ssa/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.16 + +No user-facing changes. + ## 0.2.15 No user-facing changes. diff --git a/shared/ssa/change-notes/released/0.2.16.md b/shared/ssa/change-notes/released/0.2.16.md new file mode 100644 index 00000000000..0e384109cab --- /dev/null +++ b/shared/ssa/change-notes/released/0.2.16.md @@ -0,0 +1,3 @@ +## 0.2.16 + +No user-facing changes. diff --git a/shared/ssa/codeql-pack.release.yml b/shared/ssa/codeql-pack.release.yml index 0f574e080e4..2aa64d9ed07 100644 --- a/shared/ssa/codeql-pack.release.yml +++ b/shared/ssa/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.16 diff --git a/shared/ssa/qlpack.yml b/shared/ssa/qlpack.yml index a824d260d60..8310e36ffd9 100644 --- a/shared/ssa/qlpack.yml +++ b/shared/ssa/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ssa -version: 0.2.16-dev +version: 0.2.17-dev groups: shared library: true dependencies: diff --git a/shared/threat-models/CHANGELOG.md b/shared/threat-models/CHANGELOG.md index ad4781e2cbd..4f4b3189bb4 100644 --- a/shared/threat-models/CHANGELOG.md +++ b/shared/threat-models/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.15 + +No user-facing changes. + ## 0.0.14 No user-facing changes. diff --git a/shared/threat-models/change-notes/released/0.0.15.md b/shared/threat-models/change-notes/released/0.0.15.md new file mode 100644 index 00000000000..7af9c05f23f --- /dev/null +++ b/shared/threat-models/change-notes/released/0.0.15.md @@ -0,0 +1,3 @@ +## 0.0.15 + +No user-facing changes. diff --git a/shared/threat-models/codeql-pack.release.yml b/shared/threat-models/codeql-pack.release.yml index ca29e45d0a6..dff35216fc6 100644 --- a/shared/threat-models/codeql-pack.release.yml +++ b/shared/threat-models/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.14 +lastReleaseVersion: 0.0.15 diff --git a/shared/threat-models/qlpack.yml b/shared/threat-models/qlpack.yml index 915ae1b88fd..6a8eb8e6a7f 100644 --- a/shared/threat-models/qlpack.yml +++ b/shared/threat-models/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/threat-models -version: 0.0.15-dev +version: 0.0.16-dev library: true groups: shared dataExtensions: diff --git a/shared/tutorial/CHANGELOG.md b/shared/tutorial/CHANGELOG.md index 953f7f46f4e..ed27ac5df69 100644 --- a/shared/tutorial/CHANGELOG.md +++ b/shared/tutorial/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.16 + +No user-facing changes. + ## 0.2.15 No user-facing changes. diff --git a/shared/tutorial/change-notes/released/0.2.16.md b/shared/tutorial/change-notes/released/0.2.16.md new file mode 100644 index 00000000000..0e384109cab --- /dev/null +++ b/shared/tutorial/change-notes/released/0.2.16.md @@ -0,0 +1,3 @@ +## 0.2.16 + +No user-facing changes. diff --git a/shared/tutorial/codeql-pack.release.yml b/shared/tutorial/codeql-pack.release.yml index 0f574e080e4..2aa64d9ed07 100644 --- a/shared/tutorial/codeql-pack.release.yml +++ b/shared/tutorial/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.16 diff --git a/shared/tutorial/qlpack.yml b/shared/tutorial/qlpack.yml index 4c5c4ed20cd..e7eebf9a43f 100644 --- a/shared/tutorial/qlpack.yml +++ b/shared/tutorial/qlpack.yml @@ -1,7 +1,7 @@ name: codeql/tutorial description: Library for the CodeQL detective tutorials, helping new users learn to write CodeQL queries. -version: 0.2.16-dev +version: 0.2.17-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/typeflow/CHANGELOG.md b/shared/typeflow/CHANGELOG.md index ac82f761c1d..0ceea89ca25 100644 --- a/shared/typeflow/CHANGELOG.md +++ b/shared/typeflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.3 + +No user-facing changes. + ## 0.0.2 No user-facing changes. diff --git a/shared/typeflow/change-notes/released/0.0.3.md b/shared/typeflow/change-notes/released/0.0.3.md new file mode 100644 index 00000000000..af7864fc7d5 --- /dev/null +++ b/shared/typeflow/change-notes/released/0.0.3.md @@ -0,0 +1,3 @@ +## 0.0.3 + +No user-facing changes. diff --git a/shared/typeflow/codeql-pack.release.yml b/shared/typeflow/codeql-pack.release.yml index 55dc06fbd76..a24b693d1e7 100644 --- a/shared/typeflow/codeql-pack.release.yml +++ b/shared/typeflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.2 +lastReleaseVersion: 0.0.3 diff --git a/shared/typeflow/qlpack.yml b/shared/typeflow/qlpack.yml index 365c17b8304..70b911b19d8 100644 --- a/shared/typeflow/qlpack.yml +++ b/shared/typeflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeflow -version: 0.0.3-dev +version: 0.0.4-dev groups: shared library: true dependencies: diff --git a/shared/typetracking/CHANGELOG.md b/shared/typetracking/CHANGELOG.md index 57b0a29dd6c..0991b271075 100644 --- a/shared/typetracking/CHANGELOG.md +++ b/shared/typetracking/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.16 + +No user-facing changes. + ## 0.2.15 No user-facing changes. diff --git a/shared/typetracking/change-notes/released/0.2.16.md b/shared/typetracking/change-notes/released/0.2.16.md new file mode 100644 index 00000000000..0e384109cab --- /dev/null +++ b/shared/typetracking/change-notes/released/0.2.16.md @@ -0,0 +1,3 @@ +## 0.2.16 + +No user-facing changes. diff --git a/shared/typetracking/codeql-pack.release.yml b/shared/typetracking/codeql-pack.release.yml index 0f574e080e4..2aa64d9ed07 100644 --- a/shared/typetracking/codeql-pack.release.yml +++ b/shared/typetracking/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.16 diff --git a/shared/typetracking/qlpack.yml b/shared/typetracking/qlpack.yml index 5f568fad1c3..ae323b9ce21 100644 --- a/shared/typetracking/qlpack.yml +++ b/shared/typetracking/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typetracking -version: 0.2.16-dev +version: 0.2.17-dev groups: shared library: true dependencies: diff --git a/shared/typos/CHANGELOG.md b/shared/typos/CHANGELOG.md index 335d2558737..ebc537deaa0 100644 --- a/shared/typos/CHANGELOG.md +++ b/shared/typos/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.16 + +No user-facing changes. + ## 0.2.15 No user-facing changes. diff --git a/shared/typos/change-notes/released/0.2.16.md b/shared/typos/change-notes/released/0.2.16.md new file mode 100644 index 00000000000..0e384109cab --- /dev/null +++ b/shared/typos/change-notes/released/0.2.16.md @@ -0,0 +1,3 @@ +## 0.2.16 + +No user-facing changes. diff --git a/shared/typos/codeql-pack.release.yml b/shared/typos/codeql-pack.release.yml index 0f574e080e4..2aa64d9ed07 100644 --- a/shared/typos/codeql-pack.release.yml +++ b/shared/typos/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.16 diff --git a/shared/typos/qlpack.yml b/shared/typos/qlpack.yml index a50a2dae34b..6f6ce4fb46c 100644 --- a/shared/typos/qlpack.yml +++ b/shared/typos/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typos -version: 0.2.16-dev +version: 0.2.17-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/util/CHANGELOG.md b/shared/util/CHANGELOG.md index e583745ef4a..36324dff52d 100644 --- a/shared/util/CHANGELOG.md +++ b/shared/util/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.16 + +No user-facing changes. + ## 0.2.15 No user-facing changes. diff --git a/shared/util/change-notes/released/0.2.16.md b/shared/util/change-notes/released/0.2.16.md new file mode 100644 index 00000000000..0e384109cab --- /dev/null +++ b/shared/util/change-notes/released/0.2.16.md @@ -0,0 +1,3 @@ +## 0.2.16 + +No user-facing changes. diff --git a/shared/util/codeql-pack.release.yml b/shared/util/codeql-pack.release.yml index 0f574e080e4..2aa64d9ed07 100644 --- a/shared/util/codeql-pack.release.yml +++ b/shared/util/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.16 diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index 602b3353d90..e0c8046531f 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/util -version: 0.2.16-dev +version: 0.2.17-dev groups: shared library: true dependencies: null diff --git a/shared/xml/CHANGELOG.md b/shared/xml/CHANGELOG.md index 7668a5ba39d..d7831747b12 100644 --- a/shared/xml/CHANGELOG.md +++ b/shared/xml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.3 + +No user-facing changes. + ## 0.0.2 No user-facing changes. diff --git a/shared/xml/change-notes/released/0.0.3.md b/shared/xml/change-notes/released/0.0.3.md new file mode 100644 index 00000000000..af7864fc7d5 --- /dev/null +++ b/shared/xml/change-notes/released/0.0.3.md @@ -0,0 +1,3 @@ +## 0.0.3 + +No user-facing changes. diff --git a/shared/xml/codeql-pack.release.yml b/shared/xml/codeql-pack.release.yml index 55dc06fbd76..a24b693d1e7 100644 --- a/shared/xml/codeql-pack.release.yml +++ b/shared/xml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.2 +lastReleaseVersion: 0.0.3 diff --git a/shared/xml/qlpack.yml b/shared/xml/qlpack.yml index f4de1f7ea4f..f4c7c7568af 100644 --- a/shared/xml/qlpack.yml +++ b/shared/xml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/xml -version: 0.0.3-dev +version: 0.0.4-dev groups: shared library: true dependencies: diff --git a/shared/yaml/CHANGELOG.md b/shared/yaml/CHANGELOG.md index c2982987f8a..6a603e61c5f 100644 --- a/shared/yaml/CHANGELOG.md +++ b/shared/yaml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.16 + +No user-facing changes. + ## 0.2.15 No user-facing changes. diff --git a/shared/yaml/change-notes/released/0.2.16.md b/shared/yaml/change-notes/released/0.2.16.md new file mode 100644 index 00000000000..0e384109cab --- /dev/null +++ b/shared/yaml/change-notes/released/0.2.16.md @@ -0,0 +1,3 @@ +## 0.2.16 + +No user-facing changes. diff --git a/shared/yaml/codeql-pack.release.yml b/shared/yaml/codeql-pack.release.yml index 0f574e080e4..2aa64d9ed07 100644 --- a/shared/yaml/codeql-pack.release.yml +++ b/shared/yaml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.16 diff --git a/shared/yaml/qlpack.yml b/shared/yaml/qlpack.yml index 598b37055db..618fa2745a9 100644 --- a/shared/yaml/qlpack.yml +++ b/shared/yaml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/yaml -version: 0.2.16-dev +version: 0.2.17-dev groups: shared library: true warnOnImplicitThis: true diff --git a/swift/ql/lib/CHANGELOG.md b/swift/ql/lib/CHANGELOG.md index 48bd6414764..c4a8cd42016 100644 --- a/swift/ql/lib/CHANGELOG.md +++ b/swift/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.16 + +No user-facing changes. + ## 0.3.15 No user-facing changes. diff --git a/swift/ql/lib/change-notes/released/0.3.16.md b/swift/ql/lib/change-notes/released/0.3.16.md new file mode 100644 index 00000000000..caf44d179e9 --- /dev/null +++ b/swift/ql/lib/change-notes/released/0.3.16.md @@ -0,0 +1,3 @@ +## 0.3.16 + +No user-facing changes. diff --git a/swift/ql/lib/codeql-pack.release.yml b/swift/ql/lib/codeql-pack.release.yml index 469af066c19..0a6d86fa74f 100644 --- a/swift/ql/lib/codeql-pack.release.yml +++ b/swift/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.3.15 +lastReleaseVersion: 0.3.16 diff --git a/swift/ql/lib/qlpack.yml b/swift/ql/lib/qlpack.yml index 0db44bbb5da..319898af80c 100644 --- a/swift/ql/lib/qlpack.yml +++ b/swift/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-all -version: 0.3.16-dev +version: 0.3.17-dev groups: swift extractor: swift dbscheme: swift.dbscheme diff --git a/swift/ql/src/CHANGELOG.md b/swift/ql/src/CHANGELOG.md index c780f5cd286..b31da8afa3f 100644 --- a/swift/ql/src/CHANGELOG.md +++ b/swift/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.16 + +No user-facing changes. + ## 0.3.15 No user-facing changes. diff --git a/swift/ql/src/change-notes/released/0.3.16.md b/swift/ql/src/change-notes/released/0.3.16.md new file mode 100644 index 00000000000..caf44d179e9 --- /dev/null +++ b/swift/ql/src/change-notes/released/0.3.16.md @@ -0,0 +1,3 @@ +## 0.3.16 + +No user-facing changes. diff --git a/swift/ql/src/codeql-pack.release.yml b/swift/ql/src/codeql-pack.release.yml index 469af066c19..0a6d86fa74f 100644 --- a/swift/ql/src/codeql-pack.release.yml +++ b/swift/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.3.15 +lastReleaseVersion: 0.3.16 diff --git a/swift/ql/src/qlpack.yml b/swift/ql/src/qlpack.yml index 759f8ba34d1..7e18b644ccb 100644 --- a/swift/ql/src/qlpack.yml +++ b/swift/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-queries -version: 0.3.16-dev +version: 0.3.17-dev groups: - swift - queries diff --git a/swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected b/swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected index 5a1e142d945..4456b1a4ac2 100644 --- a/swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected +++ b/swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected @@ -794,8 +794,10 @@ | test.swift:680:10:680:11 | &... | test.swift:681:15:681:15 | x | | test.swift:680:11:680:11 | [post] x | test.swift:680:10:680:11 | &... | | test.swift:680:11:680:11 | x | test.swift:680:10:680:11 | &... | +| test.swift:680:11:680:11 | x | test.swift:680:15:680:15 | [post] y | | test.swift:680:14:680:15 | &... | test.swift:682:15:682:15 | y | | test.swift:680:15:680:15 | [post] y | test.swift:680:14:680:15 | &... | +| test.swift:680:15:680:15 | y | test.swift:680:11:680:11 | [post] x | | test.swift:680:15:680:15 | y | test.swift:680:14:680:15 | &... | | test.swift:686:9:686:9 | SSA def(arr1) | test.swift:687:15:687:15 | arr1 | | test.swift:686:9:686:9 | arr1 | test.swift:686:9:686:9 | SSA def(arr1) | diff --git a/swift/third_party/load.bzl b/swift/third_party/load.bzl index b6698520c38..8a16963f513 100644 --- a/swift/third_party/load.bzl +++ b/swift/third_party/load.bzl @@ -1,11 +1,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -_swift_prebuilt_version = "swift-5.10-RELEASE.316" +_swift_prebuilt_version = "swift-5.10-RELEASE.322" _swift_sha_map = { - "Linux-X64": "8c6769a39ec94517ed56a9bf437ffe391ab8d76268f7ece1464deb6cf414ef40", - "macOS-ARM64": "8541653cd3d78fd14a67150f12c96b9f522b2b51231b5d3085e356ed5f5f0a6b", - "macOS-X64": "69fafb0c93029e1824bc70e9d3b05d6359077da41d61eed014a4c82a35e9b56c", + "Linux-X64": "634497779e930a808489e5d472753b604c07085abf411356cae7921bde14130f", + "macOS-ARM64": "293df92da9a3cc79c595a28b1b4ec881a5fdb248ea7eac34c89943e94deff700", + "macOS-X64": "813c1746777701d30e716c130b0bb087a9c5b7ab025fd99afc695ec52cd432ad", } _swift_arch_map = {