Commit 01d7279
committed
suppress erroneous buffer-overrun warning in msvc
The msvc optimizer runs into a bug in the mutable lambda tests for
move_only_function where it believes we're placing a large object into
the small buffer, resulting in compiler errors:
D:\a\compat\boost-root\boost\compat\move_only_function.hpp(400) :
error C2220: the following warning is treated as an error
D:\a\compat\boost-root\boost\compat\move_only_function.hpp(400) :
warning C4789: in function 'void __cdecl test_mutable_lambda(void)'
buffer 'func2' of size 32 bytes will be overrun; 256 bytes will be
written starting at offset 0
The code, however, is correct and eschews the SBO path for sufficiently
large Callables, as if one manually adds a `throw 1234;` statement to
the SBO paths, they are not hit when the test case in question is run.
We choose to manually suppress the warning as no other compiler emits it
nor is it found by any of our sanitizer CI jobs, including locally.1 parent 945b286 commit 01d7279
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
0 commit comments