There is no rule without exception...

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

There is no rule without exception...

Post by Solar »

When you see someone doing his first post ever, let's say on StackOverflow, complaining that some code of his segfaults when compiled with optimations enabled...

How would you figure the chances that this newcomer has actually found a bug in the compiler?

Microscopic, usually.

Well, it happens.

I found this... instructive. There is no rule without exception.

=D>
Every good solution is obvious once you've found it.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: There is no rule without exception...

Post by bluemoon »

I found SO reputation has nothing to do with the user ability.

In most situation you answered a tough question you got +25, while other answered a silly trivial for-loop over an array and get +200.

Parkinson's law of triviality is real.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: There is no rule without exception...

Post by Solar »

No, of course SO rep (or any "rep") is only a poor proxy for ability.

I was merely aiming at the old (and in one-out-of-a-million justified) saying that "it's not the compiler".

Except when it actually is. Which I thought funny, because it happens so very seldom. ;-)
Last edited by Solar on Tue Jan 16, 2018 3:52 am, edited 1 time in total.
Every good solution is obvious once you've found it.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: There is no rule without exception...

Post by bluemoon »

Compiler is so complex that it is more likely to have bug now.

I once found a bug in gcc -O3 vectorization generating nonsense code:

https://stackoverflow.com/questions/370 ... 6#37067436

And the bug report (still open):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70976
alexfru
Member
Member
Posts: 1111
Joined: Tue Mar 04, 2014 5:27 am

Re: There is no rule without exception...

Post by alexfru »

Solar wrote:When you see someone doing his first post ever, let's say on StackOverflow, complaining that some code of his segfaults when compiled with optimations enabled...

How would you figure the chances that this newcomer has actually found a bug in the compiler?

Microscopic, usually.

Well, it happens.

I found this... instructive. There is no rule without exception.

=D>
I've recently optimized a library. In the process I found a couple of compiler bugs and a kernel bug. Three too many. And I wasn't doing anything special I'd say. Just a few "interesting" coincidences. Things had worked until I hit those.
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: There is no rule without exception...

Post by Korona »

I found no invalid code generation bugs in GCC so far but I hit 100s of ICEs when writing heavily templated code in GCC.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Post Reply