Pre-New-Year Check of PostgreSQL
viva64.com
viva64.com
http://www.postgresql.org/message-id/CAASwCXe2rQX66Wzw10KMEh... http://www.postgresql.org/message-id/CAASwCXfgFsMt31c1srj=Fs... http://www.postgresql.org/message-id/CAASwCXeKeVpJi03mjzdY6A...
Some of the rules seem brilliant, like successive assignment detection.
About the memset bug, I wonder if this couldn't be solved by some kind of compiler directive in the function signature saying "you can't remove this" (or something to that effect)
Whenever you call an external function that is not in the standard library, the compiler can't know what it does and, hence, can't optimize it away.
The linker, on the other hand, might do across-library optimizations that lead to it removing the call. So, at worst, you need a linker directive.
Also, I am not sure you want this tagged to the function signature. There may be cases where optimizing the call away is perfectly valid.
asm volatile("" : : : "memory");
(see https://en.wikipedia.org/wiki/Memory_ordering#Memory_barrier...)Disclaimer: I didn't check the code
But maybe the sizeof(buf) is right? - if you want the size of the pointer (maybe if you're using wide chars?)
Especially since it's an 'Error_message_buf' type
EDIT: probably not, I'm thinking of sizeof(buf[0]), sizeof(buf) makes even less sense, it's a bug unless someone has a very good reason for it
Amazing that the tool detects collections of similar blocks, it's not wrong per se, but it's a common source of copy-paste bugs.
Talking to a vendor a couple months ago, they wanted $15k for a tool whose bug/security problem coverage they couldn't enumerate.
But without any pricing guidelines published on http://www.viva64.com/en/order/, it could be anywhere between $1k to $100k, and people assume without even asking that they cannot afford it.
And what do you mean by "hard time?" How can a temporal concept take on attributes of a physical surface?
beep boop
Viva64 is not cheap, but it looks like an extremely solid tool; I'd imagine that for anyone with a reasonably large C/C++ codebase, it'd quickly pay for itself by offsetting time developers would otherwise spend troubleshooting, tracking down, and fixing bugs.
I have worked in a similar project myself. We developed a very specialized tool for developers. Our boss decided that he did not want to mention prices on the website at first. Once we did some people complained publicly about the price although we invested months of development and the tool was pretty neat...
In general I think it makes more sense to tell the prices upfront and try to come up with a simple price model even if it means making compromises. You can always have something like this on your website: "If you think you do not fit in any price tier please contact us to find an individual price. The prices listed are meant to show what we have in mind for the general customers."
I would love to know the reason why some people think not having prices is a good idea. Care to elaborate?