Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isctype.c(68) : Assertion failed: c >= -1 && c <= 255 #81

Open
mdavidsaver opened this issue Nov 26, 2022 · 1 comment
Open

isctype.c(68) : Assertion failed: c >= -1 && c <= 255 #81

mdavidsaver opened this issue Nov 26, 2022 · 1 comment
Assignees

Comments

@mdavidsaver
Copy link
Member

I noticed that one of the appveyor runs triggering an assertion failure in printer.cpp. The MS documentation is clear enough:

The behavior of isprint and _isprint_l is undefined if c isn't EOF or in the range 0 through 0xFF, inclusive.
When a debug CRT l>ibrary is used and c isn't one of these values, the functions raise an assertion.

https://ci.appveyor.com/project/epics-base-7/epics-base/builds/45492554/job/5tauw07hyhd8qn22

f:\dd\vctools\crt_bld\self_x86\crt\src\isctype.c(68) : Assertion failed: c >= -1 && c <= 255
Dumping a stack trace of thread 'win440':
[  74F35CF5]: c:\projects\epics-base\modules\libcom\src\osi\os\win32\osdbacktrace.cpp[line 23](epicsBackTrace+0x25)
[  74F35A25]: c:\projects\epics-base\modules\libcom\src\osi\epicsstacktrace.c[line 80](epicsStackTrace+0x85)
[  74F26EF4]: c:\projects\epics-base\modules\libcom\src\misc\epicsunittest.c[line 94](testReportHook+0x34)
[  7495E942](_VCrtDbgReportW+0x5c2)
[  74955CF4](_CrtDbgReportW+0x74)
[  74955CAD](_CrtDbgReportW+0x2d)
[  748F586C](_chvalidator+0x2c)
[  748F3C6A](isprint+0x1a)
[  74AB01B5]: c:\projects\epics-base\modules\pvdata\src\factory\printer.cpp[line 500](epics::pvData::operator<<+0xf5)
[  74AB0541]: c:\projects\epics-base\modules\pvdata\src\factory\printer.cpp[line 544](epics::pvData::operator<<+0x121)
[  74A5D502]: c:\projects\epics-base\modules\pvdata\src\factory\pvdatacreatefactory.cpp[line 147](epics::pvData::PVString::dumpValue+0x32)
[  74A50B67]: c:\projects\epics-base\modules\pvdata\src\factory\pvfield.cpp[line 94](epics::pvData::operator<<+0x17)
[  74A59CE2]: c:\projects\epics-base\modules\pvdata\src\factory\pvunion.cpp[line 191](epics::pvData::PVUnion::dumpValue+0x272)
[  74A50B67]: c:\projects\epics-base\modules\pvdata\src\factory\pvfield.cpp[line 94](epics::pvData::operator<<+0x17)
[  74A52F9E]: c:\projects\epics-base\modules\pvdata\src\factory\pvstructure.cpp[line 321](epics::pvData::PVStructure::dumpValue+0x2be)
[  74A50B67]: c:\projects\epics-base\modules\pvdata\src\factory\pvfield.cpp[line 94](epics::pvData::operator<<+0x17)
[  74A60076]: c:\projects\epics-base\modules\pvdata\src\factory\pvdatacreatefactory.cpp[line 778](std::operator<<+0x16)
[  00D64389]: c:\program files (x86)\microsoft visual studio 11.0\vc\include\memory[line 816](std::operator<<<char,std::char_traits<char>,epics::pvData::PVStructure>+0x19)
[  00D624D5]: c:\projects\epics-base\modules\pvdata\testapp\misc\testjson.cpp[line 175](`anonymous namespace'::testInto+0x525)
[  00D63285]: c:\projects\epics-base\modules\pvdata\testapp\misc\testjson.cpp[line 285](main+0x75)
[  00D72249]: f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c[line 536](__tmainCRTStartup+0x199)
[  00D7238D]: f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c[line 377](mainCRTStartup+0xd)
[  755A6A14](BaseThreadInitThunk+0x24)
[  77A8AD8F](RtlInitializeExceptionChain+0x8f)
[  77A8AD5A](RtlInitializeExceptionChain+0x5a)
f:\dd\vctools\crt_bld\self_x86\crt\src\isctype.c(56) : Assertion failed: c >= -1 && c <= 255
Dumping a stack trace of thread 'win440':

This is pointing to

const char C = Q.orig[pos];

...
if(!isprint(C)) {

@mdavidsaver
Copy link
Member Author

Should be fixed with 0b424a7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant