Ticket #1323 (closed defect: fixed)
segfault with style in CheckClass::operatorEqRetRefThis()
| Reported by: | aggro80 | Owned by: | robertreif |
|---|---|---|---|
| Priority: | Milestone: | 1.41 | |
| Component: | Other | Keywords: | |
| Cc: |
Description (last modified by aggro80) (diff)
class szp
{
szp &operator =(int *other) {};
};
int main()
{}
$ ./cppcheck p.cpp --enable=style Checking p.cpp... Segmentation fault
==29594== Invalid read of size 4 ==29594== at 0x40D6B15: std::string::compare(char const*) const (in /usr/lib/libstdc++.so.6.0.10) ==29594== by 0x8054C29: bool std::operator==<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*) (basic_string.h:2189) ==29594== by 0x805FF5E: CheckClass::operatorEqRetRefThis() (checkclass.cpp:937) ==29594== by 0x8062F5E: CheckClass::runSimplifiedChecks(Tokenizer const*, Settings const*, ErrorLogger*) (checkclass.h:61) ==29594== by 0x808F323: CppCheck::checkFile(std::string const&, char const*) (cppcheck.cpp:615) ==29594== by 0x8090549: CppCheck::check() (cppcheck.cpp:522) ==29594== by 0x804B977: CppCheckExecutor::check(int, char const* const*) (cppcheckexecutor.cpp:60) ==29594== by 0x804EB6C: main (main.cpp:97) ==29594== Address 0x4 is not stack'd, malloc'd or (recently) free'd
Found from:
http://downloads.sourceforge.net/odamex/odamex-src-0.4.4.tar.bz2
From file: common/d_dehacked.cpp
Attachments
Change History
Note: See
TracTickets for help on using
tickets.