Skip to content

Commit 3c4ae68

Browse files
committed
asan
1 parent fdbf36d commit 3c4ae68

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

CMakeSettings.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"cmakeCommandArgs": "-DBUILD_SAMPLES=true -DUSE_CPPRESTSDK=true",
1111
"buildCommandArgs": "-v",
1212
"ctestCommandArgs": "",
13-
"cmakeToolchain": "${projectDir}\\submodules\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake",
14-
"variables": []
13+
"cmakeToolchain": "${projectDir}\\submodules\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake"
1514
},
1615
{
1716
"name": "x64-Release",
@@ -23,8 +22,20 @@
2322
"buildCommandArgs": "-v",
2423
"ctestCommandArgs": "",
2524
"cmakeToolchain": "${projectDir}\\submodules\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake",
26-
"inheritEnvironments": [ "msvc_x64_x64" ],
27-
"variables": []
25+
"inheritEnvironments": [ "msvc_x64_x64" ]
26+
},
27+
{
28+
"name": "x64-Release-AddressSanitizer",
29+
"generator": "Ninja",
30+
"configurationType": "RelWithDebInfo",
31+
"buildRoot": "${projectDir}\\out\\build\\${name}",
32+
"installRoot": "${projectDir}\\out\\install\\${name}",
33+
"cmakeCommandArgs": "-DBUILD_SAMPLES=true -DUSE_CPPRESTSDK=false",
34+
"buildCommandArgs": "-v",
35+
"ctestCommandArgs": "",
36+
"addressSanitizerEnabled": true,
37+
"cmakeToolchain": "${projectDir}\\submodules\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake",
38+
"inheritEnvironments": [ "msvc_x64_x64" ]
2839
}
2940
]
3041
}

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ stages:
9090
agentOs: Windows
9191
jobName: Windows_Build_Test
9292
useCppRestSDK: false
93-
cMakeRunArgs: '-A x64'
93+
cMakeRunArgs: '-A x64 -E env CXXFLAGS="/fsanitize=address"'
9494

9595
- template: .azure/default-build.yml
9696
parameters:

src/signalrclient/logger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace signalr
5050

5151
// add millisecond part
5252
// 5 = 3 digits of millisecond precision + 'Z' + null character ending
53-
snprintf(timeString + sizeof(timeString) - 5, 5, "%03dZ", (int)milliseconds.count());
53+
snprintf(timeString + sizeof(timeString) - 2, 5, "%03dZ", (int)milliseconds.count());
5454

5555
std::stringstream os;
5656
os << timeString;

0 commit comments

Comments
 (0)