cppcheck head currently coredumps on the attached file with:
Checking 21-04-20.cpp ...
/usr/include/c++/7/debug/vector:417:
Error: attempt to subscript container with out-of-bounds index 1, but
container only holds 1 elements.
Objects involved in the operation:
sequence "this" @ 0x0x56474ab3de28 {
type = std::__debug::vector<templatesimplifier::tokenandname, std::allocator<templatesimplifier::tokenandname=""> >;
}
Aborted (core dumped)</templatesimplifier::tokenandname,>
Hi,
cppcheck head currently coredumps on the attached file with:
Checking 21-04-20.cpp ...
/usr/include/c++/7/debug/vector:417:
Error: attempt to subscript container with out-of-bounds index 1, but
container only holds 1 elements.
Objects involved in the operation:
sequence "this" @ 0x0x56474ab3de28 {
type = std::__debug::vector<templatesimplifier::tokenandname, std::allocator<templatesimplifier::tokenandname=""> >;
}
Aborted (core dumped)</templatesimplifier::tokenandname,>
Could you please check?
Thanks,
Martin
I can confirm the issue and have created a ticket for it: https://trac.cppcheck.net/ticket/10258
Can you git bisect this to a commit?
I ran my previous analysis with
https://github.com/danmar/cppcheck/commit/f62d9d585324de5ecfc347a46a1ed0eb96b11c1e
and this went fine.
The next one with
https://github.com/danmar/cppcheck/commit/db5f00a16ad5423d473623f0f825f8ecef5ba7c3
failed.
It does work now, thanks for fixing it so quickly!