Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thomashabets2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
thomashabets2
4mo ago
> There is* a common trap as the cron PATH is usually just /usr/bin:/bin so anything in /usr/local/bin, or in /sbin won't be there. There will always be a default. Is systemd timer's default i
62.
▲
by
thomashabets2
4mo ago
A man who was bitten by a radioactive man.
63.
▲
by
thomashabets2
4mo ago
I am not agreeing with egorfine. Indeed, why not improve what we can improve? > cron did a job, but had shortcomings. Systemd addresses many of those shortcomings Right, but what are those "many" shortcomings? The article lists
64.
▲
by
thomashabets2
4mo ago
Yup, entirely agree. That's why I thought it odd of jeroenhd to bring it up as if it's an argument against cron or cron time specs. From what I see not better or worse, it's just different.
65.
▲
by
thomashabets2
4mo ago
Per other comments though, it looks like systemd's syntax when you want to specify something that's not just that one number is at least as complex. Is your example (which I agree, looks cryptic) any less cryptic in systemd? I a
66.
▲
by
thomashabets2
4mo ago
I haven't used systemd timers enough to disagree, but > Ambiguous $PATH settings make cron script execution difficult to predict. What makes you say that? You can set the PATH right in the crontab. Is that harder to "predict&qu
67.
▲
by
thomashabets2
4mo ago
That sounds like wiring the RAM information into order of magnitude same number of transistors. A modern CPU has (quick googling) 184B transistors. If they were bits then that's 23GB. But presumably a model bit needs more than one tran
68.
▲
by
thomashabets2
4mo ago
Sure. But that's not where we are. Also there are other safety and security critical reasons why you'd want to exempt some processes. Arguably (and it definitely has been argued) the real architectural misstep is the Linux kernel
69.
▲
by
thomashabets2
4mo ago
Hey, that's me! (suggesting an OOM pardon feature) It's a funny reply. But what was not funny was the OOM killer killing my screen locker. Joke all you want, but 22 years later I still stand by that I'd rather get a kernel pa
70.
▲
by
thomashabets2
4mo ago
Well, you'll still need to build unveil/pledge on top of it, because it's not just "the version of Linux". It's all libraries used, directly and indirectly (incl config-based list of libraries, like in PAM), an
71.
▲
by
thomashabets2
4mo ago
No, landlock is a separate thing. It's the first of its kind on Linux that doesn't completely suck, like seccomp does ( https://blog.habets.se/2022/03/seccomp-unsafe-at-any-speed.h... ).
72.
▲
by
thomashabets2
5mo ago
Ah, I misunderstood what you meant by "is an error". Agree.
73.
▲
by
thomashabets2
5mo ago
Sorry, by "de facto defines" I meant that it factually does something , even if that "something" is "segfault the compiler at build time". That "de facto" did some heavy lifting.
74.
▲
by
thomashabets2
5mo ago
Not all projects are green field. But sure, new modules can be written in other languages. And C is, as cross-language barriers go, fairly easy to interface with.
75.
▲
by
thomashabets2
5mo ago
> C is pretty close to translating directly to machine code The C standard defines only its abstract machine, not actual hardware. > The language means different things on different platforms but it's still defined exactly on the
76.
▲
by
thomashabets2
5mo ago
No. This is more like if strcmp compared null terminates strings, but can only compare strings that are in fact equal.
77.
▲
by
thomashabets2
5mo ago
> Second, nobody needs perfection and "UB-freeness" Sure. You only care about the ones that manifest security issues, stability issues, or other corruption. But of course those change over time as compilers change. So while far
78.
▲
by
thomashabets2
5mo ago
> UB was coined only in the first C standard, in 1989 Pre 1989, when C did not have a standard, was the behavior unspecified or undefined? That is, of course, a trick question. Because in this context the very definitions of the words co
79.
▲
by
thomashabets2
5mo ago
If that's an error then so is passing in a non number. So catch 22. You can only check for valid numbers if the number is valid?
80.
▲
by
thomashabets2
5mo ago
I think parent commenter made a joke. UB can be seen as "implementation defines this to reformat your hard drive. No we don't document it". That is, the compiler de facto defines what happens when you compile UB code. So you&
81.
▲
by
thomashabets2
5mo ago
Indeed. That's why I didn't deem it worth reporting. But in my code, I would have fixed for the reasons you mention. Sprinkle enough of these around, and some low percentage will in the future have its assumption invalidated.
82.
▲
by
thomashabets2
5mo ago
Fair enough. For strtoul and friends, maybe? 7.24.1 is pretty dense, but the key parts are "the expected form of the subject sequence is a sequence of letters and digits representing an integer with the radix specified by base, optiona
83.
▲
by
thomashabets2
5mo ago
I think I would defer to someone more of a language lawyer than we, but I'm not sure what you're describing can be expressed in the C abstract machine. If a pointer is invalid, not pointing to an object, then I'm not sure it
84.
▲
by
thomashabets2
5mo ago
The point of this post, though, is even something as simple as "give me this string as an integer" doesn't have an answer that doesn't come with "are you OK with this best effort parse under these edge cases? Oh and
85.
▲
by
thomashabets2
5mo ago
Only literally. 7.24.1 in the C programming language spec has these poor parsers.
86.
▲
by
thomashabets2
5mo ago
While snprintf() is better than sprintf(), I find that it's easy for people to not check if the return value is bigger than the provided size. Sure, it prevents a buffer overflow, but there could still be a string truncation problem. S
87.
▲
by
thomashabets2
5mo ago
For unsigned that could work, but signed overflow is UB.
88.
▲
by
thomashabets2
5mo ago
> they don't like seem to like that unsigned parsing will accept negative numbers and then automatically wrap them to their unsigned equivalents, nor do they like that C number parsing often bails with best effort on non-numeric tra
89.
▲
by
thomashabets2
5mo ago
Yup. Sorry about that.
90.
▲
by
thomashabets2
5mo ago
As I mentioned in the post, I only did a brief exploration of OpenBSD in order to cheer myself up. I took some findings, confirmed them being true bugs, and ended there. As I said in the out of bounds null termination write patch, I don
More ›