Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f14362959 |
No files matched your search
@@ -38,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||||
with:
|
with:
|
||||||
languages: c-cpp
|
languages: c-cpp
|
||||||
# Analyze the sources without compiling them. Autobuild compiled the
|
# Analyze the sources without compiling them. Autobuild compiled the
|
||||||
@@ -47,4 +47,4 @@ jobs:
|
|||||||
build-mode: none
|
build-mode: none
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||||
@@ -48,6 +48,6 @@ jobs:
|
|||||||
output: 'flawfinder_results.sarif'
|
output: 'flawfinder_results.sarif'
|
||||||
|
|
||||||
- name: Upload analysis results to GitHub Security tab
|
- name: Upload analysis results to GitHub Security tab
|
||||||
uses: github/codeql-action/upload-sarif@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||||
with:
|
with:
|
||||||
sarif_file: ${{github.workspace}}/flawfinder_results.sarif
|
sarif_file: ${{github.workspace}}/flawfinder_results.sarif
|
||||||
@@ -80,6 +80,6 @@ jobs:
|
|||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
|
|
||||||
# Upload SARIF file generated in previous step
|
# Upload SARIF file generated in previous step
|
||||||
- name: Upload SARIF file
|
- name: Upload SARIF file
|
||||||
uses: github/codeql-action/upload-sarif@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||||
with:
|
with:
|
||||||
sarif_file: semgrep.sarif
|
sarif_file: semgrep.sarif
|
||||||
if: always()
|
if: always()
|
||||||
@@ -1510,7 +1510,19 @@ class serializer
|
|||||||
{
|
{
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
std::memcpy(write_buffer.data() + write_buffer_pos, s, length);
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
std::size_t copy_length = length;
|
||||||
|
// GCC knows from the test above that the length is below the size of
|
||||||
|
// the write buffer, and with that bound it may expand the memcpy into
|
||||||
|
// "rep movsq" (seen with -march=x86-64-v3 and -mtune=generic) instead
|
||||||
|
// of calling memcpy. For the short runs written here its start-up cost
|
||||||
|
// is far above that of the call (dump() with ensure_ascii 80 % slower
|
||||||
|
// on Sapphire Rapids), so hide the bound from the optimizer.
|
||||||
|
__asm__("" : "+r"(copy_length));
|
||||||
|
#else
|
||||||
|
const std::size_t copy_length = length;
|
||||||
|
#endif
|
||||||
|
std::memcpy(write_buffer.data() + write_buffer_pos, s, copy_length);
|
||||||
write_buffer_pos += length;
|
write_buffer_pos += length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Generated
+13
-1
@@ -39101,7 +39101,19 @@ class serializer
|
|||||||
{
|
{
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
std::memcpy(write_buffer.data() + write_buffer_pos, s, length);
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
std::size_t copy_length = length;
|
||||||
|
// GCC knows from the test above that the length is below the size of
|
||||||
|
// the write buffer, and with that bound it may expand the memcpy into
|
||||||
|
// "rep movsq" (seen with -march=x86-64-v3 and -mtune=generic) instead
|
||||||
|
// of calling memcpy. For the short runs written here its start-up cost
|
||||||
|
// is far above that of the call (dump() with ensure_ascii 80 % slower
|
||||||
|
// on Sapphire Rapids), so hide the bound from the optimizer.
|
||||||
|
__asm__("" : "+r"(copy_length));
|
||||||
|
#else
|
||||||
|
const std::size_t copy_length = length;
|
||||||
|
#endif
|
||||||
|
std::memcpy(write_buffer.data() + write_buffer_pos, s, copy_length);
|
||||||
write_buffer_pos += length;
|
write_buffer_pos += length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user