Gecode won the minizinc challenges from inception of the challenge in 2008 until 2012, but these days or-tools wins gold every year 2013 to 2024, and in 2024 swept gold in all categories. Why is gecode interesting? Why…
Set e-graphs apart from e-matchers. An e-graph is a vector-of-sets, where each set contains equal representations of the same thing. What makes it space efficient is that your representation refers to things by index…
> I was bitten by one that injected timing attacks into certain integer operations by branching on the integer data in order to optimize 32-bit multiplications on 8-bit microcontrollers. FWIW, I think this should be…
> No, literally nobody has ever wanted to be directed to "foundem", which is a scam. Could you defend the statement that "foundem" is a scam? If it really was then that adds important context to the ruling, but I'll…
2020 was one outlier data point caused by COVID?
> > the epilogue is only correct if the function has void return type > That's a lie. All C functions return via a return statement with expression (only for non-void functions), a return statement without an expression…
I'm a huge proponent of UBSan and ASan. Genuine curiosity, what don't you like about them? FWIW, there once was a real good-faith effort to clean up the problems, Friendly C by Prof Regehr,…
This is the most normal case though, isn't it? Suppose a very simple compiler, one that sees a function so it writes out the prologue, it sees the switch so it writes out the jump tables, it sees each return statement…
This construction is called a "false range" in English. https://www.chicagomanualofstyle.org/qanda/data/faq/topics/C... https://www.cjr.org/language_corner/out_of_range.php The wording change from Permissible to…
Why isn't that fine? The compiler ignored the undefined behavior it didn't detect.
> The continuity of physical processes is not something that can be proved. I agree with you, but is there any peer-reviewed publication that can be cited? The idea makes sense to me, firstly the Reals \ Inaccessible…
From the abstract, "simulations of such systems are usually done on digital computers, which are able to compute with finite sequences of rational numbers only." Not at all! Digital computers can use computable reals…
The compiler may remove the nullptr check in: ptr->foo = 1; if (ptr == nullptr) return; but it may not remove the nullptr check in: if (ptr == nullptr) return; ptr->foo = 1;
> If the print blocks indefinitely then that division will never execute, and GCC must compile a binary that behaves correctly in that case. Is `printf` allowed to loop infinitely? Its behaviour is defined in the…
> You're right, most times organizations need a fire lit underneath them to change, for Google, it probably was the NSA annotation "SSL added and removed here :^)" on a slide showing Google's architecture from the…
The symptoms match my experience with a mid-network firewall/router that is not aware of TCP window scaling stripping out the scaling factor while leaving the window scaling feature enabled. See…
It caused a problem when building inline assembly heavy code that tried to use all the registers, frame pointer register included.
> If I put in a dereference, I expect a dereference to happen. Not dereferencing the pointer when I wrote a dereference operator seems like going too far. Surely not? I mean, you probably didn't intend to include…
The hard part of UB isn't where it's mentioned in the standard. The problem is when the standard says "in case A, X occurs, in case B, Y occurs" then somebody invents a situation where neither A nor B apply.
> Deleting code that isn’t dead, it just doesn’t have a universally defined behavior, is the issue. Can I delete "if (x & 3 == 16)" without a warning? There is no 'x' which makes that expression true, so I can safely…
> I've forgotten if 'address of' ( & ) is signed or unsigned. Neither, pointers are their own types which have no sign, only integral types come in signed and unsigned. There exist intptr_t (signed) and uintptr_t…
I can offer you -fsanitize=undefined -fsanitize-trap=undefined, which you'd need to put in your configuration for release builds, presumably you have other flags in your build system (like -O2) already. It's possible…
> -Wub # Warn _anytime_ there is detected potential undefined behavior, irrespective of if there is an associated optimization. Can I ask you, have you tried any existing tools? Coverity static analysis, Klocwork,…
Dead code happens all the time. Adjusting the example in my comment you're replying to: vector<t> v; v.push_back(a); v.push_back(b); v.push_back(c); v.push_back(d); Let's suppose the definition of our vector here looks…
bool overflowed = (x+1)<x; I was convinced that some warning, probably -Wtautological-compare, already handled this and I plugged it into godbolt to see which one, but got no warnings with either gcc or clang. Frankly,…
Gecode won the minizinc challenges from inception of the challenge in 2008 until 2012, but these days or-tools wins gold every year 2013 to 2024, and in 2024 swept gold in all categories. Why is gecode interesting? Why…
Set e-graphs apart from e-matchers. An e-graph is a vector-of-sets, where each set contains equal representations of the same thing. What makes it space efficient is that your representation refers to things by index…
> I was bitten by one that injected timing attacks into certain integer operations by branching on the integer data in order to optimize 32-bit multiplications on 8-bit microcontrollers. FWIW, I think this should be…
> No, literally nobody has ever wanted to be directed to "foundem", which is a scam. Could you defend the statement that "foundem" is a scam? If it really was then that adds important context to the ruling, but I'll…
2020 was one outlier data point caused by COVID?
> > the epilogue is only correct if the function has void return type > That's a lie. All C functions return via a return statement with expression (only for non-void functions), a return statement without an expression…
I'm a huge proponent of UBSan and ASan. Genuine curiosity, what don't you like about them? FWIW, there once was a real good-faith effort to clean up the problems, Friendly C by Prof Regehr,…
This is the most normal case though, isn't it? Suppose a very simple compiler, one that sees a function so it writes out the prologue, it sees the switch so it writes out the jump tables, it sees each return statement…
This construction is called a "false range" in English. https://www.chicagomanualofstyle.org/qanda/data/faq/topics/C... https://www.cjr.org/language_corner/out_of_range.php The wording change from Permissible to…
Why isn't that fine? The compiler ignored the undefined behavior it didn't detect.
> The continuity of physical processes is not something that can be proved. I agree with you, but is there any peer-reviewed publication that can be cited? The idea makes sense to me, firstly the Reals \ Inaccessible…
From the abstract, "simulations of such systems are usually done on digital computers, which are able to compute with finite sequences of rational numbers only." Not at all! Digital computers can use computable reals…
The compiler may remove the nullptr check in: ptr->foo = 1; if (ptr == nullptr) return; but it may not remove the nullptr check in: if (ptr == nullptr) return; ptr->foo = 1;
> If the print blocks indefinitely then that division will never execute, and GCC must compile a binary that behaves correctly in that case. Is `printf` allowed to loop infinitely? Its behaviour is defined in the…
> You're right, most times organizations need a fire lit underneath them to change, for Google, it probably was the NSA annotation "SSL added and removed here :^)" on a slide showing Google's architecture from the…
The symptoms match my experience with a mid-network firewall/router that is not aware of TCP window scaling stripping out the scaling factor while leaving the window scaling feature enabled. See…
It caused a problem when building inline assembly heavy code that tried to use all the registers, frame pointer register included.
> If I put in a dereference, I expect a dereference to happen. Not dereferencing the pointer when I wrote a dereference operator seems like going too far. Surely not? I mean, you probably didn't intend to include…
The hard part of UB isn't where it's mentioned in the standard. The problem is when the standard says "in case A, X occurs, in case B, Y occurs" then somebody invents a situation where neither A nor B apply.
> Deleting code that isn’t dead, it just doesn’t have a universally defined behavior, is the issue. Can I delete "if (x & 3 == 16)" without a warning? There is no 'x' which makes that expression true, so I can safely…
> I've forgotten if 'address of' ( & ) is signed or unsigned. Neither, pointers are their own types which have no sign, only integral types come in signed and unsigned. There exist intptr_t (signed) and uintptr_t…
I can offer you -fsanitize=undefined -fsanitize-trap=undefined, which you'd need to put in your configuration for release builds, presumably you have other flags in your build system (like -O2) already. It's possible…
> -Wub # Warn _anytime_ there is detected potential undefined behavior, irrespective of if there is an associated optimization. Can I ask you, have you tried any existing tools? Coverity static analysis, Klocwork,…
Dead code happens all the time. Adjusting the example in my comment you're replying to: vector<t> v; v.push_back(a); v.push_back(b); v.push_back(c); v.push_back(d); Let's suppose the definition of our vector here looks…
bool overflowed = (x+1)<x; I was convinced that some warning, probably -Wtautological-compare, already handled this and I plugged it into godbolt to see which one, but got no warnings with either gcc or clang. Frankly,…