site banner

Culture War Roundup for the week of December 15, 2025

This weekly roundup thread is intended for all culture war posts. 'Culture war' is vaguely defined, but it basically means controversial issues that fall along set tribal lines. Arguments over culture war issues generate a lot of heat and little light, and few deeply entrenched people ever change their minds. This thread is for voicing opinions and analyzing the state of the discussion while trying to optimize for light over heat.

Optimistically, we think that engaging with people you disagree with is worth your time, and so is being nice! Pessimistically, there are many dynamics that can lead discussions on Culture War topics to become unproductive. There's a human tendency to divide along tribal lines, praising your ingroup and vilifying your outgroup - and if you think you find it easy to criticize your ingroup, then it may be that your outgroup is not who you think it is. Extremists with opposing positions can feed off each other, highlighting each other's worst points to justify their own angry rhetoric, which becomes in turn a new example of bad behavior for the other side to highlight.

We would like to avoid these negative dynamics. Accordingly, we ask that you do not use this thread for waging the Culture War. Examples of waging the Culture War:

  • Shaming.

  • Attempting to 'build consensus' or enforce ideological conformity.

  • Making sweeping generalizations to vilify a group you dislike.

  • Recruiting for a cause.

  • Posting links that could be summarized as 'Boo outgroup!' Basically, if your content is 'Can you believe what Those People did this week?' then you should either refrain from posting, or do some very patient work to contextualize and/or steel-man the relevant viewpoint.

In general, you should argue to understand, not to win. This thread is not territory to be claimed by one group or another; indeed, the aim is to have many different viewpoints represented here. Thus, we also ask that you follow some guidelines:

  • Speak plainly. Avoid sarcasm and mockery. When disagreeing with someone, state your objections explicitly.

  • Be as precise and charitable as you can. Don't paraphrase unflatteringly.

  • Don't imply that someone said something they did not say, even if you think it follows from what they said.

  • Write like everyone is reading and you want them to be included in the discussion.

On an ad hoc basis, the mods will try to compile a list of the best posts/comments from the previous week, posted in Quality Contribution threads and archived at /r/TheThread. You may nominate a comment for this list by clicking on 'report' at the bottom of the post and typing 'Actually a quality contribution' as the report reason.

6
Jump in the discussion.

No email address required.

You are correct.

I would still say that in C, under a few circumstances you can depend on a null pointer access crashing, e.g. if all of the following apply:
(1) You are in standard userland where nothing is normally mapped to 0.
(2) You know that your code will not be run in other settings (for example, you are not writing a library).
(3) You are not handling untrusted data.
(4) You are not in a privilege elevated mode (like in the kernel)

Then you can usually count on getting a segmentation violation for null pointer access, so that failing to do

if (!ptr)
    abort();

will be of limited badness. (Given all these caveats, it is probably less bad

Compare and contrast with another source of undefined behavior: out-of-bounds array accesses. These will typically not cause segfaults, but will instead silently corrupt program data and flow, often leading to arbitrary code execution if exploited. It is the difference between getting killed from smoking and getting killed from smoking while filling up your gas tank.

Now, you could make the point that anyone treating a segfault as a safety net (instead of ruining one's day as much as one's car airbag firing) should not be programming with raw pointers, and I might even agree. In my defense, my baseline is physicists who self-taught C while programming with ROOT, and most of whom have no business coding in any language unsafer than Python, who still happily use C arrays and for whom a segfault on every third compile is just normal.

I would still say that in C, under a few circumstances you can depend on a null pointer access crashing, e.g. if all of the following apply:

(5) Your compiler hasn't (ab)used the fact null pointer accesses are undefined behavior to "simplify" code in unexpected ways.

Eg, consider

int foo( int *p )
{
  if ( p ) function_with_side_effects();
  return *p < INT_MIN;
}

Since p is unconditionally dereferenced in the return statement which results in undefined behavior if p is null, the compiler is free to assume that it is never null and generate code that unconditionally calls function_with_side_effects() rather than inserting a branch as if ( p ) is only ever not true in the presence of undefined behavior. That is, it can treat the code as if it were instead written as

int foo( int *p )
{
  function_with_side_effects();
  return *p < INT_MIN;
}

Depending on exactly what function_with_side_effects() does, that could result in a lot of unsafe outcomes even in "unprivileged user code that never handles untrusted data". Even more fun, since *p < INT_MIN evaluates to 0 for all possible values of *p, the compiler can completely remove the dereference that you'd expect to cause a segfault, thereby treating the code as if it were written as

int foo( int *p )
{
  function_with_side_effects();
  return 0;
}

Thanks, that is a good point.

(Also, I am pretty sure that compiler developers who use undefined behavior that way to 'optimize' code will go to hell eventually, but that will not help me if I am stuck debugging such a thing.)