Add asserts to some TokenStreamBase methods, protect against out-of-bounds
ClosedPublic

Authored by kossebau on May 29 2017, 2:45 PM.

Details

Summary

ASAN-enabled tests on KDE CI show out-of-bounds access issues at least
with kdev-css, so better have this fail for developers with normal
debug builds as well.

Diff Detail

Repository
R51 KDevelop: PG Qt
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.May 29 2017, 2:45 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptMay 29 2017, 2:45 PM
kfunk accepted this revision.May 29 2017, 3:15 PM
kfunk added a subscriber: kfunk.

+1, but please add the other asserts, too

include/kdev-pg-token-stream.h
199 ↗(On Diff #14937)

assert non-empty?

207 ↗(On Diff #14937)

dito

This revision is now accepted and ready to land.May 29 2017, 3:15 PM
This revision was automatically updated to reflect the committed changes.
kossebau marked 2 inline comments as done.May 29 2017, 3:34 PM