r/Compilers • • Sep 29 '26

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 Sep 29 '26

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 Sep 29 '26

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 Sep 29 '26

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 Sep 29 '26

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 Sep 29 '26

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

2

u/Inconstant_Moo Sep 29 '26

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

0

u/Retired-69 Sep 30 '26

I did not give much info of the language and I agree there coz most of it is inovation. Basicla 1) never done before 2) Without saying to much - a pure math monster - 900 KB - that easy can handle the same things and more than other compilers except WEB coz I used this for low level development. I ran through all NLL tests and block the same, and allow all valid programs to pass. Same with Polonius, and GOLang concurrency, and other edge cases like XOR, alias, MMIO, then again created tests to make sure covered the same as Microsoft Verona (research) tried to arcieve with concurrency and regions, and latest now I validated against Mojo and LLM. And there is no LLVM backend, still I archieve similar results .

1

u/kostya27 Sep 29 '26

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 Sep 29 '26

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

1

u/jcastroarnaud Sep 29 '26

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