tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Is -fsanitize=address working?



    Date:        Thu, 2 Oct 2025 06:19:56 +0000 (UTC)
    From:        RVP <rvp%SDF.ORG@localhost>
    Message-ID:  <b808b2ef-7fbd-c5a5-4cb8-4862db9b9300%SDF.ORG@localhost>

  | Linux doesn't support O_CLOFORK at all, at the mo':

That's what I thought, but I have no sources for it anywhere to check.

  | No such constant anywhere.

Which is why I suggested (in an off list reply to an off list message)
that tzcode could #undef O_CLOFORK not #define it to 0 ... then just
let tzcode do what it does on systems which don't have the symbol at all.

While I agree with Mouse that the most likely outcome of this might be
to separate clone() and fork() for CLOFORK semantics (which would need
some review of the current code, and significant testing) I'd personally
at least prefer not to attempt to guess what the linux kernel developers
will do when they do eventually implement CLOFORK, which I have no doubt
will eventually happen.   That is, if they even consider the issues involved.

And lastly, name games, like:

  | And, it's O_CLOFORK, not O_CLOCLONE.

don't really work.   It isn't O_CLOSPAWN either, yet definitely
applies to posix_spawn().   It also (at least currently) applies to
clone() as well, it just doesn't work if that is used with the
CLONE_FILES flag.   Absent that flag, clone() closes O_CLOFORK fds.
(Which, I admit is also guessing at what linux will do in the future.)

kre




Home | Main Index | Thread Index | Old Index