fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

11K
active users

HOWTO idiot, in 4 easy steps:

1. save the code in [1] as nonexistent.c
2. gcc -O2 -o nonexistent nonexistent.c
3. run and profile the binary
4. wonder why the profiles don't look at all as claimed

[1] https://lore.kernel.org/all/CAHk-%3DwhYOOdM7jWy5jdrAm8LxcgCMFyk2bt8fYYvZzM4U-zAQA@mail.gmail.com/
lore.kernel.orgRe: [PATCH RFC 1/4] fs/locks: Fix file lock cache accounting, again - Linus Torvalds

@vbabka according to the instructions, you should remove compiled binary before launching it

/me runs

@oleksandr Yes, run, run! That's not what the instructions say. They say: “Don't create a file called that for the test.“ Strictly speaking, once @vbabka ran the gcc command, the instructions can no longer be followed.

/me runs

Petr Tesarik

@oleksandr @vbabka No, I've merely seen too much of this world. I can imagine a QA engineer who writes a workaround which removes the binary in the small race window between execve(2) and open(2). The idea is painfully real.