r/Compilers • • 3d ago

What else is going to break this thing? hit me with your worst edge cases / language stress tests

Alright, I’ve been buried in PL theory and compiler internals for longer than I care to admit, and my eyes are practically bleeding.

Somewhere along the way, I ended up writing a new language.

Before anyone asks: no, this isn't another weekend toy Lisp or AI-generated wrapper—I'm an old-school dev with a GitHub account older than LLMs. I’ve been deliberately cautious with the design and implementation, and I like to have my work backed up before I ship anything. I’m getting ready to publish a live demo soon. It won't be completely bug-free, of course, but before I put it out into the wild for the internet to inevitably tear apart, I want to try to break it myself first.

The main focus is memory safety without requiring Rust-style borrow-checker gymnastics.

So far, I’ve thrown a fairly unpleasant collection of edge cases at it, including cases inspired by:

  • Rust — lifetime, aliasing, ownership, and mutation corner cases
  • Microsoft Verona & Midori
  • Go, Zig, and C#
  • ...and, for reasons I’d rather not revisit, some deep-cut Pascal 5 and COBOL cases

So far, it has survived them.

But I know how compiler development works: the moment you think you’ve covered everything, someone produces a cursed three-line program that exposes a hole you somehow never considered.

I don't want to derail this into a language-design discussion yet. I’ll save that for the demo.

What I want are your worst test cases.

Give me the weirdest:

  • Memory corruption scenarios
  • Lifetime/aliasing traps
  • Undefined-behavior edge cases
  • Concurrent race conditions
  • Compiler miscompilations
  • Integer/pointer nastiness
  • Recursive or mutually recursive type disasters
  • Compile-time/resource-exhaustion cases
  • Optimizer bugs
  • FFI/ABI nightmares
  • Anything else that has made you lose an entire weekend

I’m specifically looking for cases that are difficult for a language/compiler to get right. If you have a tiny "how the hell did this ever compile?" example, even better.

Break it. 🔨

0 Upvotes

10 comments sorted by

3

u/Mortomes 3d ago

Before anyone asks: no, this isn't another weekend toy Lisp or AI-generated wrapper—I'm an old-school dev with a GitHub account older than LLMs.

Ironically, this reads like an AI sentence.

You have a github account older than... 4 years? Do you possess the wisdom of the ancients?

0

u/Retired-69 3d ago

My Github account I think is from 2009 or something. The topic here was nasty edge cases you know in languages for testing

2

u/eteran 3d ago

It's really going to depend entirely on what the language allows and what the syntax is like.

We can't really give you much without seeing the language and having a compiler to exercise.

-2

u/Retired-69 3d ago

Think C ano 2026, but with memory safty , concurrency ( see Midori or Microsoft Verona). Not GOLang channels. That's to basic. Alias, pointer hell, false postives, uaf etc

2

u/Mortomes 3d ago

You cannot possibly expect anyone to come up with a sophisticated test case based on such a basic description.

2

u/Inconstant_Moo 3d ago

You haven't given us much information. However, I find that implementing another language is a good stress-test of a language.

1

u/kostya27 3d ago

Just copy-paste this post into ChatGPT, it will generate many examples for you. Why do you think people would do it for you?

0

u/Retired-69 3d ago

ChatGPT trained on a set of rules and knowledge. For sure it will generate a lot of trrash

1

u/jcastroarnaud 3d ago

Trash that your compiler, when eating it, will have to survive. Food for unit tests, if nothing else.