User Activity

  • Created ticket #386 on mpg123

    Add NULL check in streamdump.c

  • Posted a comment on discussion General Discussion on cppcheck

    Hmm. Sorry about that. There is a retrace server instance here: https://retrace.fedoraproject.org/faf/reports/2470624/ Backtrace is: Thread no. 1 (10 frames) 0 Token::tokAt at /usr/src/debug/cppcheck-1.87-1.fc29.x86_64/lib/token.cpp:332 2 TemplateSimplifier::simplifyTemplateAliases at /usr/src/debug/cppcheck-1.87-1.fc29.x86_64/lib/templatesimplifier.cpp:931 3 TemplateSimplifier::simplifyTemplates at /usr/src/debug/cppcheck-1.87-1.fc29.x86_64/lib/templatesimplifier.cpp:3106 4 Tokenizer::simplifyTemplates...

  • Posted a comment on discussion General Discussion on cppcheck

    Hello, I just recently pushed 1.87 into Fedora. Someone using the program got a program crash which was reported via the abort daemon. You can see the back trace here: https://bugzilla.redhat.com/show_bug.cgi?id=1679121 It looks like its related to commit 9490d0db8c323c16933da54e1c3621da1e9c335f but a different path resulting in the same crash. Is there another commit that also addresses this? Thanks!

  • Posted a comment on discussion General Discussion on cppcheck

    Hello, I have run across a false positive and have created a minimal reproducer. If I assign a string member of a struct inside a switch / case but return on default, it thinks there is a leak on the default path. typedef struct s { char *str; } attr_t; attr_t *function(int type) { attr_t subj; switch(type) { case NAME: subj.str = strdup("?"); break; default: return NULL; } return subject_add(&sub); } Which is tested thusly: cppcheck --library=posix break.c [break.c:15]: (error) Memory leak: subj.str...

  • Posted a comment on discussion General Discussion on cppcheck

    What I found is the problem showed up on 1.82 and it was OK in 1.81. Ticket 8103 was opened before the patch that git bisect found. My guess, now that I've had time to think about it, is that it missed the allocation in 1.81 and thus no report. The patch fixes a problem to catch memory allocations but does not account for an error condition that leads to no allocation. In doing more modelling of a bunch of linux kernel syscalls, I started to wonder if there should be some generic way to specify a...

  • Modified a comment on discussion General Discussion on cppcheck

    Hello, I was doing some testing and found that 1.83 is giving a false positive for code that checks OK on 1.80. The reproducer looks like this: void fopen_test(const char *filename) { FILE *fp; if (!filename || !(fp = fopen(filename, "r"))) return; fclose(fp); } On 1.80 it checks good. On 1.83 I get a message like this: : (error) Resource leak: fp Is this a known issue? Thanks, -Steve

  • Posted a comment on discussion General Discussion on cppcheck

    Hello, I am writing a cfg library to test pam usage on Linux. The pam_start function allocates memory in a pointer to a pointer as its fourth argument. This is very similar to the gettaddrinfo function found in posix.cfg. If I test the getaddrinfo leak detection with the following code: void test(void) { char tmp_name[255]; struct addrinfo *ai; struct addrinfo hints; memset(&hints, 0, sizeof(hints)); getaddrinfo(tmp_name, NULL, &hints, &ai); } It does not report the memory leak as ai goes out of...

  • Posted a comment on discussion General Discussion on cppcheck

    Hello, Git bisect says this is the first bad commit: 94031ef11d1821c4974e859c8df7bf5f2a1727ad -Steve

View All

Personal Data

Username:
sgrubb
Joined:
2018-04-22 19:41:47

Projects

  • No projects to display.

Personal Tools