Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leni536
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
511.
▲
by
leni536
4y ago
The point isn't that this is not secure. It's just that it isn't more secure, when it prevents setting the current, active password. An attacker could already just log in with that password.
512.
▲
by
leni536
4y ago
> We can do this once, and then binary search a safety interval around that position. Alas, this only gets rid of the fast jumps at the beginning of the binary search, and for some reason, it ends up being slightly slower than binary sea
513.
▲
by
leni536
4y ago
The whole reason of the display on the device is to show both the amount and destination before signing the transaction.
514.
▲
by
leni536
4y ago
In this particular case the broadcasting instruction can be replaced with builtin operations, allowing constexpr. https://godbolt.org/z/Td6vG9cqG edit: uh, the constant requires some hand adjustment edit2: fixed versio
515.
▲
by
leni536
4y ago
Would putting the bluetooth stack on a dedicated IC be an adequate securiry measure?
516.
▲
by
leni536
4y ago
If they pinned a cert in the application, why use the root store at all?
517.
▲
by
leni536
4y ago
Events themselves are discrete, but they might have contiguous properties, like the associated point in spacetime, assuming a the contiguous spacetime is not just an approximation.
518.
▲
by
leni536
4y ago
There is no reason to believe that spacetime is anything but an approximation, which breaks down at Planck-length scales. We have events, and causal relationship between events. Events may not have precise spacetime coordinates.
519.
▲
by
leni536
4y ago
So it's somehow OK to steal $0.01 each from 1000 people.
520.
▲
by
leni536
4y ago
How do you decide if i+1 is UB or not, unless the abstract machine reaches that line with a given value of i?
521.
▲
by
leni536
4y ago
The linux kernel compiles with no strict aliasing, so kernel code is unaffected. In userspace this is still dodgy, strict aliasing does affect generated code, and correctness of code that relies on UB this way. A pragmatic solution would be
522.
▲
by
leni536
4y ago
No, this breaks aliasing. The defined way to do something like this is to have the smaller struct as the first member of the larger one. The first member is guaranteed to have the same address as the outer object. The common initial sequenc
523.
▲
by
leni536
4y ago
Point 14 explicitly says UB in dead code. The implicit assumption is no UB in live code, otherwise the UB in dead code is a red herring. So the UB is never reached, by the definition of dead code. Unreachable UB is fine. If this wasn't
524.
▲
by
leni536
4y ago
It is. Or if it is unfeasible to implement then it can be considered to be a defect in the standard. Consider that something like (++*ptr1) + (++*ptr2) may or may not be UB, depending where the pointer points to. The required additional boo
525.
▲
by
leni536
4y ago
reading padding bytes is not UB. Comparing unrelated pointers is unspecified, not undefined. It's also an implementation detail of memmove. It can use a magical total order comparison of pointers that is otherwise unavailable to users
526.
▲
by
leni536
4y ago
While theoretically true, there are a whole bunch of undefined behaviors that are not caught in constexpr context in practice. In particular unsequenced operations on the same object are typically not caught. It's still super useful th
527.
▲
by
leni536
4y ago
The C++ standard calls these "ill-formed, no dioagnosrics required" instead of UB, although it's not always consistent. It is indeed more or less "translation-time UB". The difference is exactly that affected lines
528.
▲
by
leni536
4y ago
This reasoning falls apart for structs with array members.
529.
▲
by
leni536
4y ago
I agree, but this doesn't refute what I wrote. "If any step in a program’s execution has undefined behavior, then the entire execution is without meaning..." Yes. So UB is a property of a given execition, not a static propert
530.
▲
by
leni536
4y ago
UB "making dead code live again" is not an example of UB in dead code making the execution undefined. Yes UB in live code can have surprising effects, including executing dead code.
531.
▲
by
leni536
4y ago
UB is typically a property of the execution of a program. A program may bump into UB for one set of inputs, but not for an other set.
532.
▲
by
leni536
4y ago
It still has to be executed by the abstract machine for the given set inputs for the whole execution to be undefined. You are right that once the execution is undefined, you can't reason about the behavior. This includes ordering of si
533.
▲
by
leni536
4y ago
13. But if the line with UB isn't executed, then the program will work normally as if the UB wasn't there. 14. Okay, but if the line with UB is unreachable (dead) code, then it's as if the UB wasn't there. 15. If the li
534.
▲
by
leni536
4y ago
No, it isn't. The line with UB has to be reached in the execution for the execution to be undefined.
535.
▲
by
leni536
4y ago
In gcc you can use the -ftrapv or -fwrapv compiler options to get defined signed integer overflow arithmetic.
536.
▲
by
leni536
4y ago
9-5 with a .5 hour lunch break comes out 37.5 hours.
537.
▲
by
leni536
4y ago
Me and many of my collagues do this. We have a drying room at the workplace where we can hang our drenched raincoats.
538.
▲
by
leni536
4y ago
> These corporations that are being robbed already build shrinkage into their budgets. Doesn't this just mean that it is priced in? So thiefs are stealing from paying customers.
539.
▲
by
leni536
4y ago
That could probably work, but I'm glad that is handled by changing the timezone instead. Otherwise inventors of unix and ntp times would have got the bright idea to rewind or forward those times by a full hour twice a year.
540.
▲
by
leni536
4y ago
unix timestemp is unaffected by DST
More ›