Skip to content

Commit 55f23ff

Browse files
authored
Merge branch 'main' into redsun82/swift-logging-assertions-and-prints
2 parents e93686c + 239a763 commit 55f23ff

File tree

118 files changed

+3807
-1961
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3807
-1961
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0
1+
6.1.2

.github/workflows/go-tests-other-os.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Go 1.20
1616
uses: actions/setup-go@v4
1717
with:
18-
go-version: 1.20.0
18+
go-version: '1.20'
1919
id: go
2020

2121
- name: Check out code
@@ -50,7 +50,7 @@ jobs:
5050
- name: Set up Go 1.20
5151
uses: actions/setup-go@v4
5252
with:
53-
go-version: 1.20.0
53+
go-version: '1.20'
5454
id: go
5555

5656
- name: Check out code

.github/workflows/go-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Go 1.20
2424
uses: actions/setup-go@v4
2525
with:
26-
go-version: 1.20.0
26+
go-version: '1.20'
2727
id: go
2828

2929
- name: Check out code

.github/workflows/ruby-build.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ jobs:
5858
id: cache-extractor
5959
with:
6060
path: |
61-
ruby/extractor/target/release/autobuilder
62-
ruby/extractor/target/release/autobuilder.exe
63-
ruby/extractor/target/release/extractor
64-
ruby/extractor/target/release/extractor.exe
61+
ruby/extractor/target/release/codeql-extractor-ruby
62+
ruby/extractor/target/release/codeql-extractor-ruby.exe
6563
ruby/extractor/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
6664
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}--${{ hashFiles('ruby/extractor/**/*.rs') }}
6765
- uses: actions/cache@v3
@@ -88,15 +86,13 @@ jobs:
8886
run: |
8987
cd extractor
9088
cross build --release
91-
mv target/x86_64-unknown-linux-gnu/release/extractor target/release/
92-
mv target/x86_64-unknown-linux-gnu/release/autobuilder target/release/
93-
mv target/x86_64-unknown-linux-gnu/release/generator target/release/
89+
mv target/x86_64-unknown-linux-gnu/release/codeql-extractor-ruby target/release/
9490
- name: Release build (windows and macos)
9591
if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os != 'Linux'
9692
run: cd extractor && cargo build --release
9793
- name: Generate dbscheme
9894
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
99-
run: extractor/target/release/generator --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
95+
run: extractor/target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
10096
- uses: actions/upload-artifact@v3
10197
if: ${{ matrix.os == 'ubuntu-latest' }}
10298
with:
@@ -111,10 +107,8 @@ jobs:
111107
with:
112108
name: extractor-${{ matrix.os }}
113109
path: |
114-
ruby/extractor/target/release/autobuilder
115-
ruby/extractor/target/release/autobuilder.exe
116-
ruby/extractor/target/release/extractor
117-
ruby/extractor/target/release/extractor.exe
110+
ruby/extractor/target/release/codeql-extractor-ruby
111+
ruby/extractor/target/release/codeql-extractor-ruby.exe
118112
retention-days: 1
119113
compile-queries:
120114
runs-on: ubuntu-latest-xl
@@ -172,13 +166,10 @@ jobs:
172166
mkdir -p ruby
173167
cp -r codeql-extractor.yml tools ql/lib/ruby.dbscheme.stats ruby/
174168
mkdir -p ruby/tools/{linux64,osx64,win64}
175-
cp linux64/autobuilder ruby/tools/linux64/autobuilder
176-
cp osx64/autobuilder ruby/tools/osx64/autobuilder
177-
cp win64/autobuilder.exe ruby/tools/win64/autobuilder.exe
178-
cp linux64/extractor ruby/tools/linux64/extractor
179-
cp osx64/extractor ruby/tools/osx64/extractor
180-
cp win64/extractor.exe ruby/tools/win64/extractor.exe
181-
chmod +x ruby/tools/{linux64,osx64}/{autobuilder,extractor}
169+
cp linux64/codeql-extractor-ruby ruby/tools/linux64/extractor
170+
cp osx64/codeql-extractor-ruby ruby/tools/osx64/extractor
171+
cp win64/codeql-extractor-ruby.exe ruby/tools/win64/extractor.exe
172+
chmod +x ruby/tools/{linux64,osx64}/extractor
182173
zip -rq codeql-ruby.zip ruby
183174
- uses: actions/upload-artifact@v3
184175
with:

cpp/ql/test/library-tests/attributes/type_attributes/type_attributes.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
| file://:0:0:0:0 | short __attribute((__may_alias__)) | type_attributes.c:25:30:25:42 | may_alias |
22
| type_attributes.c:5:36:5:51 | my_packed_struct | type_attributes.c:5:23:5:32 | packed |
3-
| type_attributes.c:10:54:10:54 | union <unnamed> | type_attributes.c:10:30:10:50 | transparent_union |
4-
| type_attributes.c:16:54:16:54 | union <unnamed> | type_attributes.c:16:30:16:50 | transparent_union |
3+
| type_attributes.c:10:54:10:54 | (unnamed class/struct/union) | type_attributes.c:10:30:10:50 | transparent_union |
4+
| type_attributes.c:16:54:16:54 | (unnamed class/struct/union) | type_attributes.c:16:30:16:50 | transparent_union |
55
| type_attributes.c:21:37:21:45 | unusedInt | type_attributes.c:21:24:21:29 | unused |
66
| type_attributes.c:23:13:23:18 | depInt | type_attributes.c:23:36:23:45 | deprecated |
77
| type_attributes_ms.cpp:1:29:1:29 | X | type_attributes_ms.cpp:1:19:1:26 | novtable |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
| (unnamed class/struct/union) |
12
| float[3] |
23
| float[3][3] |
34
| foo[1] |
4-
| struct <unnamed> |

cpp/ql/test/library-tests/structs/compatible_c/compatible.expected

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| a1.c:6:16:6:16 | struct <unnamed> | 0 members | 2 locations | -1 | <none> |
2-
| a1.c:10:16:10:16 | struct <unnamed> | 1 members | 2 locations | 0 | x |
3-
| a1.c:17:16:17:16 | struct <unnamed> | 1 members | 2 locations | 0 | x |
1+
| a1.c:6:16:6:16 | (unnamed class/struct/union) | 0 members | 2 locations | -1 | <none> |
2+
| a1.c:10:16:10:16 | (unnamed class/struct/union) | 1 members | 2 locations | 0 | x |
3+
| a1.c:17:16:17:16 | (unnamed class/struct/union) | 1 members | 2 locations | 0 | x |
44
| a1.c:24:8:24:10 | Foo | 3 members | 2 locations | 0 | empty |
55
| a1.c:24:8:24:10 | Foo | 3 members | 2 locations | 1 | nonempty |
66
| a1.c:24:8:24:10 | Foo | 3 members | 2 locations | 2 | i |
@@ -9,9 +9,9 @@
99
| a1.c:36:8:36:10 | Bar | 3 members | 2 locations | 0 | empty |
1010
| a1.c:36:8:36:10 | Bar | 3 members | 2 locations | 1 | nonempty |
1111
| a1.c:36:8:36:10 | Bar | 3 members | 2 locations | 2 | i |
12-
| a2.c:6:16:6:16 | struct <unnamed> | 0 members | 2 locations | -1 | <none> |
13-
| a2.c:10:16:10:16 | struct <unnamed> | 1 members | 2 locations | 0 | x |
14-
| a2.c:17:16:17:16 | struct <unnamed> | 1 members | 2 locations | 0 | x |
12+
| a2.c:6:16:6:16 | (unnamed class/struct/union) | 0 members | 2 locations | -1 | <none> |
13+
| a2.c:10:16:10:16 | (unnamed class/struct/union) | 1 members | 2 locations | 0 | x |
14+
| a2.c:17:16:17:16 | (unnamed class/struct/union) | 1 members | 2 locations | 0 | x |
1515
| a2.c:24:8:24:10 | Foo | 3 members | 2 locations | 0 | empty |
1616
| a2.c:24:8:24:10 | Foo | 3 members | 2 locations | 1 | nonempty |
1717
| a2.c:24:8:24:10 | Foo | 3 members | 2 locations | 2 | i |

cpp/ql/test/library-tests/structs/compatible_c/compatible_types.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
| a1.c:10:16:10:16 | struct <unnamed> | 0 | file://:0:0:0:0 | int | 1 types |
2-
| a1.c:17:16:17:16 | struct <unnamed> | 0 | file://:0:0:0:0 | int | 1 types |
1+
| a1.c:10:16:10:16 | (unnamed class/struct/union) | 0 | file://:0:0:0:0 | int | 1 types |
2+
| a1.c:17:16:17:16 | (unnamed class/struct/union) | 0 | file://:0:0:0:0 | int | 1 types |
33
| a1.c:24:8:24:10 | Foo | 0 | file://:0:0:0:0 | anon_empty_t * | 1 types |
44
| a1.c:24:8:24:10 | Foo | 1 | file://:0:0:0:0 | anon_nonempty_t * | 1 types |
55
| a1.c:24:8:24:10 | Foo | 2 | file://:0:0:0:0 | int | 1 types |
66
| a1.c:32:8:32:15 | NonEmpty | 0 | file://:0:0:0:0 | int | 1 types |
77
| a1.c:36:8:36:10 | Bar | 0 | file://:0:0:0:0 | Empty * | 1 types |
88
| a1.c:36:8:36:10 | Bar | 1 | file://:0:0:0:0 | NonEmpty * | 1 types |
99
| a1.c:36:8:36:10 | Bar | 2 | file://:0:0:0:0 | int | 1 types |
10-
| a2.c:10:16:10:16 | struct <unnamed> | 0 | file://:0:0:0:0 | int | 1 types |
11-
| a2.c:17:16:17:16 | struct <unnamed> | 0 | file://:0:0:0:0 | int | 1 types |
10+
| a2.c:10:16:10:16 | (unnamed class/struct/union) | 0 | file://:0:0:0:0 | int | 1 types |
11+
| a2.c:17:16:17:16 | (unnamed class/struct/union) | 0 | file://:0:0:0:0 | int | 1 types |
1212
| a2.c:24:8:24:10 | Foo | 0 | file://:0:0:0:0 | anon_empty_t * | 1 types |
1313
| a2.c:24:8:24:10 | Foo | 1 | file://:0:0:0:0 | anon_nonempty_t * | 1 types |
1414
| a2.c:24:8:24:10 | Foo | 2 | file://:0:0:0:0 | int | 1 types |

cpp/ql/test/query-tests/Critical/MemoryFreed/MemoryFreed.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@
8989
| test_free.cpp:216:10:216:10 | a |
9090
| test_free.cpp:220:10:220:10 | a |
9191
| test_free.cpp:227:24:227:45 | memory_descriptor_list |
92+
| test_free.cpp:233:14:233:15 | * ... |
93+
| test_free.cpp:239:14:239:15 | * ... |
94+
| test_free.cpp:245:10:245:11 | * ... |
9295
| virtual.cpp:18:10:18:10 | a |
9396
| virtual.cpp:19:10:19:10 | c |
9497
| virtual.cpp:38:10:38:10 | b |

cpp/ql/test/query-tests/Critical/MemoryFreed/UseAfterFree.expected

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ edges
1515
| test_free.cpp:101:10:101:10 | a | test_free.cpp:102:23:102:23 | a |
1616
| test_free.cpp:152:27:152:27 | a | test_free.cpp:153:5:153:5 | a |
1717
| test_free.cpp:152:27:152:27 | a | test_free.cpp:153:5:153:5 | a |
18+
| test_free.cpp:233:14:233:15 | * ... | test_free.cpp:236:9:236:10 | * ... |
19+
| test_free.cpp:233:14:233:15 | * ... | test_free.cpp:236:9:236:10 | * ... |
20+
| test_free.cpp:233:14:233:15 | * ... | test_free.cpp:236:9:236:10 | * ... |
21+
| test_free.cpp:233:14:233:15 | * ... | test_free.cpp:236:9:236:10 | * ... |
22+
| test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:9:241:10 | * ... |
23+
| test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:9:241:10 | * ... |
24+
| test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:9:241:10 | * ... |
25+
| test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:9:241:10 | * ... |
26+
| test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:10:241:10 | b |
27+
| test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:10:241:10 | b |
28+
| test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... |
29+
| test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... |
30+
| test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... |
31+
| test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... |
1832
nodes
1933
| test_free.cpp:11:10:11:10 | a | semmle.label | a |
2034
| test_free.cpp:11:10:11:10 | a | semmle.label | a |
@@ -39,6 +53,19 @@ nodes
3953
| test_free.cpp:152:27:152:27 | a | semmle.label | a |
4054
| test_free.cpp:152:27:152:27 | a | semmle.label | a |
4155
| test_free.cpp:153:5:153:5 | a | semmle.label | a |
56+
| test_free.cpp:233:14:233:15 | * ... | semmle.label | * ... |
57+
| test_free.cpp:233:14:233:15 | * ... | semmle.label | * ... |
58+
| test_free.cpp:236:9:236:10 | * ... | semmle.label | * ... |
59+
| test_free.cpp:236:9:236:10 | * ... | semmle.label | * ... |
60+
| test_free.cpp:239:14:239:15 | * ... | semmle.label | * ... |
61+
| test_free.cpp:239:14:239:15 | * ... | semmle.label | * ... |
62+
| test_free.cpp:241:9:241:10 | * ... | semmle.label | * ... |
63+
| test_free.cpp:241:9:241:10 | * ... | semmle.label | * ... |
64+
| test_free.cpp:241:10:241:10 | b | semmle.label | b |
65+
| test_free.cpp:245:10:245:11 | * ... | semmle.label | * ... |
66+
| test_free.cpp:245:10:245:11 | * ... | semmle.label | * ... |
67+
| test_free.cpp:246:9:246:10 | * ... | semmle.label | * ... |
68+
| test_free.cpp:246:9:246:10 | * ... | semmle.label | * ... |
4269
subpaths
4370
#select
4471
| test_free.cpp:12:5:12:5 | a | test_free.cpp:11:10:11:10 | a | test_free.cpp:12:5:12:5 | a | Memory may have been previously freed by $@. | test_free.cpp:11:5:11:8 | call to free | call to free |
@@ -57,3 +84,17 @@ subpaths
5784
| test_free.cpp:102:23:102:23 | a | test_free.cpp:101:10:101:10 | a | test_free.cpp:102:23:102:23 | a | Memory may have been previously freed by $@. | test_free.cpp:101:5:101:8 | call to free | call to free |
5885
| test_free.cpp:153:5:153:5 | a | test_free.cpp:152:27:152:27 | a | test_free.cpp:153:5:153:5 | a | Memory may have been previously freed by $@. | test_free.cpp:152:22:152:25 | call to free | call to free |
5986
| test_free.cpp:153:5:153:5 | a | test_free.cpp:152:27:152:27 | a | test_free.cpp:153:5:153:5 | a | Memory may have been previously freed by $@. | test_free.cpp:152:22:152:25 | call to free | call to free |
87+
| test_free.cpp:236:9:236:10 | * ... | test_free.cpp:233:14:233:15 | * ... | test_free.cpp:236:9:236:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:233:9:233:12 | call to free | call to free |
88+
| test_free.cpp:236:9:236:10 | * ... | test_free.cpp:233:14:233:15 | * ... | test_free.cpp:236:9:236:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:233:9:233:12 | call to free | call to free |
89+
| test_free.cpp:236:9:236:10 | * ... | test_free.cpp:233:14:233:15 | * ... | test_free.cpp:236:9:236:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:233:9:233:12 | call to free | call to free |
90+
| test_free.cpp:236:9:236:10 | * ... | test_free.cpp:233:14:233:15 | * ... | test_free.cpp:236:9:236:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:233:9:233:12 | call to free | call to free |
91+
| test_free.cpp:241:9:241:10 | * ... | test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:9:241:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:239:9:239:12 | call to free | call to free |
92+
| test_free.cpp:241:9:241:10 | * ... | test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:9:241:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:239:9:239:12 | call to free | call to free |
93+
| test_free.cpp:241:9:241:10 | * ... | test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:9:241:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:239:9:239:12 | call to free | call to free |
94+
| test_free.cpp:241:9:241:10 | * ... | test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:9:241:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:239:9:239:12 | call to free | call to free |
95+
| test_free.cpp:241:10:241:10 | b | test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:10:241:10 | b | Memory may have been previously freed by $@. | test_free.cpp:239:9:239:12 | call to free | call to free |
96+
| test_free.cpp:241:10:241:10 | b | test_free.cpp:239:14:239:15 | * ... | test_free.cpp:241:10:241:10 | b | Memory may have been previously freed by $@. | test_free.cpp:239:9:239:12 | call to free | call to free |
97+
| test_free.cpp:246:9:246:10 | * ... | test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:245:5:245:8 | call to free | call to free |
98+
| test_free.cpp:246:9:246:10 | * ... | test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:245:5:245:8 | call to free | call to free |
99+
| test_free.cpp:246:9:246:10 | * ... | test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:245:5:245:8 | call to free | call to free |
100+
| test_free.cpp:246:9:246:10 | * ... | test_free.cpp:245:10:245:11 | * ... | test_free.cpp:246:9:246:10 | * ... | Memory may have been previously freed by $@. | test_free.cpp:245:5:245:8 | call to free | call to free |

0 commit comments

Comments
 (0)