mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Rust: address review
Also fix some minor things in `bulk_generate_mad.py`.
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
strategy: dca
|
||||
language: rust
|
||||
destination: rust/ql/lib/ext/generated
|
||||
# targets must have name specified and corresponding to the name in the DCA suite
|
||||
# they can optionally specify any of
|
||||
# with-sinks: false
|
||||
# with-sources: false
|
||||
# with-summaries: false
|
||||
# if a target has a dependency in this same list, it should be listed after that dependency
|
||||
targets:
|
||||
- name: rust
|
||||
- name: libc
|
||||
|
||||
@@ -526,3 +526,4 @@ nodes
|
||||
subpaths
|
||||
testFailures
|
||||
| main.rs:202:32:202:38 | realloc | Unexpected result: Alert=arg1 |
|
||||
| main.rs:202:52:202:96 | //... | Missing result: Alert[rust/uncontrolled-allocation-size] |
|
||||
|
||||
@@ -199,7 +199,7 @@ unsafe fn test_system_alloc(v: usize) {
|
||||
|
||||
let l3 = std::alloc::Layout::array::<u8>(10).unwrap();
|
||||
let m3 = std::alloc::System.alloc(l3);
|
||||
let _ = std::alloc::System.realloc(m3, l3, v); // $ MISSING: Alert[rust/uncontrolled-allocation-size]
|
||||
let _ = std::alloc::System.realloc(m3, l3, v); // $ Alert[rust/uncontrolled-allocation-size]
|
||||
|
||||
let l4 = std::alloc::Layout::array::<u8>(10).unwrap();
|
||||
let m4 = std::ptr::NonNull::<u8>::new(std::alloc::alloc(l4)).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user