OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 10:56 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: There is no rule without exception...
PostPosted: Tue Jan 16, 2018 2:52 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7612
Location: Germany
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.


Top
 Profile  
 
 Post subject: Re: There is no rule without exception...
PostPosted: Tue Jan 16, 2018 2:59 am 
Offline
Member
Member
User avatar

Joined: Wed Dec 01, 2010 3:41 am
Posts: 1761
Location: Hong Kong
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.


Top
 Profile  
 
 Post subject: Re: There is no rule without exception...
PostPosted: Tue Jan 16, 2018 3:07 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7612
Location: Germany
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. ;-)

_________________
Every good solution is obvious once you've found it.


Last edited by Solar on Tue Jan 16, 2018 3:52 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: There is no rule without exception...
PostPosted: Tue Jan 16, 2018 3:29 am 
Offline
Member
Member
User avatar

Joined: Wed Dec 01, 2010 3:41 am
Posts: 1761
Location: Hong Kong
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


Top
 Profile  
 
 Post subject: Re: There is no rule without exception...
PostPosted: Tue Jan 16, 2018 4:35 am 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
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.


Top
 Profile  
 
 Post subject: Re: There is no rule without exception...
PostPosted: Tue Jan 16, 2018 6:10 pm 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
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].


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 43 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group