ctest icon indicating copy to clipboard operation
ctest copied to clipboard

Asserting wchar_t strings

Open Isty001 opened this issue 6 years ago • 4 comments

Hello,

This PR adds another assertion, same as ASSERT_STR but accepts and compares wchar_t * types instead of char *.

Isty001 avatar Sep 17 '18 19:09 Isty001

merged

bvdberg avatar May 23 '19 20:05 bvdberg

what issue did you run into to need the sanitizer attribute?

bvdberg avatar May 23 '19 20:05 bvdberg

Oh, sorry, originally I didn't want to include that in the PR. I get the following report:

==16618==ERROR: AddressSanitizer: global-buffer-overflow on address 0x555af21e1d1c at pc 0x555af1fae6c4 bp 0x7ffcfd09d020 sp 0x7ffcfd09d010
READ of size 4 at 0x555af21e1d1c thread T0
    #0 0x555af1fae6c3 in ctest_main deps/ctest/ctest.h:483
...
Address 0x555af21e1d1c is a wild pointer.
SUMMARY: AddressSanitizer: global-buffer-overflow deps/ctest/ctest.h:483 in ctest_main

Compiler: gcc Sanitizer flags: -fsanitize=address -fsanitize=leak -fsanitize=undefined

Unfortunately I couldn' solve the problem yet, but had to disable the check for that function to debug the actual code I'm testing.

Isty001 avatar May 24 '19 06:05 Isty001

I don't think it will break anything.. maybe more people can test it.. (mac?)

bvdberg avatar May 24 '19 08:05 bvdberg