Win32++ is great, I like how it doesn't hide the API but just augments it. This would be a good component to have.
Great project BTW. I found you can enable OpenGL following these instructions.
Hi, OpenFVM is mostly unmaintained now. You can check ENigMA which also has a PISO solver: https://github.com/bjaraujo/ENigMA If you are not getting the files with 000 you are probably using the serial version. The serial version does not name the files with 000, 001, etc. that is the parallel version only for partition purposes.
Thanks. That was the problem, it wasn't configured properly. I assumed it would pick up the library automatically.
cppcheck 1.90 doesn't recognize Q_DECLARE_METATYPE. Isn't this in qt.cfg? <error msg="There is an unknown macro here somewhere. Configuration is required. If Q_DECLARE_METATYPE is a macro then please configure it." verbose="There is an unknown macro here somewhere. Configuration is required. If Q_DECLARE_METATYPE is a macro then please configure it." id="unknownMacro" severity="error"></error>
Sure. Here are some in attachment. They all have buffer overruns and memory leaks. The buffer overruns are also very different to test cppcheck capability to deal with different code. I tried to keep them simple as possible.
That would cover the do ... while case as well? Also I downloaded 1.84 again and tested. It catches the issue as mentioned and the value flow is the same as master running with debug flag.
Makes sense. Any ideas why this might be happening though?
Yes, I looked into the issue stepping from valueFlowDynamicBufferSize but still don't understand what the code is doing at this point. It seems to work completely different if it is a for loop or a while loop. Another thing is that the buffer overrun in "while" case is just a warning when arrayIndexOutOfBoundsCond, in the "for" case it is arrayIndexOutOfBounds.
Yes, I looked into the issue stepping from valueFlowDynamicBufferSize but still don't understand what the code is doing at this point. It seems to work completely different if it is a for loop or a while loop.
Correct. Token::macth would return false and get out of the loop.
Is value flow correct? Value flow using "while" loop: Line 7 buf possible size=8 i possible {0,<9,!>10} 's' always 115 Value flow using "for" loop: Line 7 i possible {0,9} 's' always 115 It seems to be missing: buf possible size=8.
Is value flow correct? Value flow using "while" loop: Line 7 buf possible size=8 i possible {0,<9,!>10} 's' always 115 Value flow using "for" loop: Line 7 i possible {0,9} 's' always 115
Yes, I saw that. It returns null pointer for buf. Even like this it returns null pointer: #include <stdlib.h> void f() { char* buf = malloc(8); int i = 0; for (i = 0; i < 10; i++) { buf[20] = 's'; } buf[9] = 0; }
For the array out of bounds I suspect it is the malloc. For this code, the master does report 2 arrayIndexOutOfBounds errors: void f() { //char* buf = malloc(8); char buf[8]; int i = 0; for (i = 0; i < 10; i++) { buf[i] = 's'; } buf[9] = 's'; }
With while loop neither version catches the buffer over-run: include <stdlib.h> void f() { char* buf = malloc(8); int i = 0; while (i < 20) { buf[i] = 's'; i++; } free(buf); }
With while loop neither version catches the buffer over-run: include <stdlib.h> void f() { char* buf = malloc(8); int i = 0; while (i < 20) { buf[i] = 's'; i++; } free(buf); }</stdlib.h>
VS studio says it might be dereferencing a null pointer here. while (Token::Match(argtok, ".|::")) argtok = argtok->astOperand2(); it is not checked for null so it might be right. checkbufferoverrun.cpp:588
For the array out of bounds I suspect it is the malloc. For this code, the master does report 2 arrayIndexOutOfBounds errors: void f() { //char* buf = malloc(8); char buf[8]; int i = 0; for (i = 0; i < 10; i++) { buf[i] = 's'; } buf[9] = 's'; }
For the array out of bounds I suspect it is the malloc. For this code, the master does report 2 arrayIndexOutOfBounds errors but still doesn't pick up memory leak error: void f() { //char* buf = malloc(8); char buf[8]; int i = 0; for (i = 0; i < 10; i++) { buf[i] = 's'; } buf[9] = 's'; }
You are correct. Version 1.84 would flag 3 errors: [D:/Temp/test.c:6] (error) Array 'buf[8]' accessed at index 9, which is out of bounds. [arrayIndexOutOfBounds] [D:/Temp/test.c:8] (error) Array 'buf[8]' accessed at index 9, which is out of bounds. [arrayIndexOutOfBounds] [D:/Temp/test.c:9] (error) Memory leak: buf [memleak]
I don't have a Trac account. If you could create a ticket for me that would be great.
The unit tests don't seem to cover this case so I guess it can break.
I mean is it supposed to return NULL for these cases or is it also a defect in the parser code?
I mean is it supposed to return NULL for these cases or is it a defect in the parser code?
Yes, it cures the crash which is good but doen't address why this is returning null in these cases.
Yes, it cures the crash which is good but doen't address why this is returning null in these cases.
All these crashes are related with not checking if condTok is null. astutils.cpp:1649 if (condTok->hasKnownIntValue()) {
All these crashes are related with not checking if condTok is null. astutils.cpp:1649 if (condTok->hasKnownIntValue()) {
Same problem as nyquist and libmemcached_1.0.18. Good thing solving this bug solves several crashes. Cppcheck is accessing a null pointer so it will crash. This line: astutils.cpp:1649 if (condTok->hasKnownIntValue()) { (not checking if condTok is null) Maybe previous releases never returned a null astOperand2. Still the condition should be checked.
Seems fixed.
Same problem as libmemcached_1.0.18 : Cppcheck is accessing a null pointer so it will crash. This line: astutils.cpp:1649 if (condTok->hasKnownIntValue()) { (not checking if condTok is null) Maybe previous releases never returned a null astOperand2. Still the condition should be checked.
Cppcheck is accessing a null pointer so it will crash. This line: astutils.cpp:1649 if (condTok->hasKnownIntValue()) { (not checking if condTok is null)
Cppcheck version 1.84 flagged this code: void f() { char* buf = malloc(8); int i = 0; for (i = 0; i < 10; i++) { buf[i] = 's'; } } Summary: Array 'buf[8]' accessed at index 9, which is out of bounds. While the master doesn't. Was there some change?
I think it is now: svn checkout https://svn.code.sf.net/p/openfvm/code/trunk openfvm-code Regards, x-flow.
Assigning negative number to unsigned int
Hi, The best is to read the OpenFVM reference manual doc. If you want to activate...
I downloaded the NaroCAD wrapper dll and it has a size of around 9.6 Mb. Still the...
.
.
added backstep script.
.
added tutorial.scr
changed tutorial.par
Testing with metis 5.1.0 and petsc 3.7.4.
I have made a new version based on this fantastic bombermaaan game: A windows setup...
I have made a new version based on great bombermaaan game: A windows setup can be...
A windows setup can be downloaded at: https://github.com/bjaraujo/Bombermaaan/releases/...
I have made a new version based on great bombermaaan game: A windows setup can be...
Hi Karl, Thank you very much.
Hi, Haven't found any tutorial on how to insert elements in a compressed matrix....
Hi, Was going to ask the same thing. Wanted to interface amg with Eigen. Pitty it...
pressure units.
Github repo.