Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Bug Linux

Linus Torvalds: "GCC 4.9.0 Seems To Be Terminally Broken" 739

hypnosec (2231454) writes to point out a pointed critique from Linus Torvalds of GCC 4.9.0. after a random panic was discovered in a load balance function in Linux 3.16-rc6. in an email to the Linux kernel mailing list outlining two separate but possibly related bugs, Linus describes the compiler as "terminally broken," and worse ("pure and utter sh*t," only with no asterisk). A slice: "Lookie here, your compiler does some absolutely insane things with the spilling, including spilling a *constant*. For chrissake, that compiler shouldn't have been allowed to graduate from kindergarten. We're talking "sloth that was dropped on the head as a baby" level retardation levels here .... Anyway, this is not a kernel bug. This is your compiler creating completely broken code. We may need to add a warning to make sure nobody compiles with gcc-4.9.0, and the Debian people should probably downgrate their shiny new compiler."
This discussion has been archived. No new comments can be posted.

Linus Torvalds: "GCC 4.9.0 Seems To Be Terminally Broken"

Comments Filter:
  • Not just version 4.9 (Score:5, Informative)

    by kthreadd ( 1558445 ) on Sunday July 27, 2014 @02:50PM (#47544503)

    According to the actual bug report this problem seams to have started in 4.5. They only triggered it in 4.9.

    https://gcc.gnu.org/bugzilla/s... [gnu.org]

  • by perpenso ( 1613749 ) on Sunday July 27, 2014 @03:11PM (#47544637)

    Debian people should probably downgrate their shiny new compiler.

    Or upgrade to llvm. Being [able] to compile with either gcc or llvm would be a nice option.

    How could you _upgrade_ from GPLv3 to BSD? Sounds like the reverse.

    Compiling with a BSD licensed compiler does not change the license of the software being compiled. Linux would remain gpl regardless of whether gcc or llvm is used.

  • Already fixed. (Score:5, Informative)

    by Bananenrepublik ( 49759 ) on Sunday July 27, 2014 @03:14PM (#47544653)

    ... and they already fixed the bug two weeks ago, see the bug report [gnu.org]

  • by Anonymous Coward on Sunday July 27, 2014 @03:16PM (#47544669)

    rbp is a stack pointer [hackerschool.com] it is negative because it grows down.

  • by profplump ( 309017 ) <zach-slashjunk@kotlarek.com> on Sunday July 27, 2014 @03:46PM (#47544849)

    %rpb is the base pointer. The offset is negative because the local variables live below the base pointer (being in-scope only after the base pointer is moved to the current function); -X(%rbp) points to a local variable.

    http://stackoverflow.com/quest... [stackoverflow.com]

  • by perpenso ( 1613749 ) on Sunday July 27, 2014 @04:13PM (#47545037)

    That may be an upgrade if all you program in is a C-derivative.

    "Originally implemented for C and C++, the language-agnostic design (and the success) of LLVM has since spawned a wide variety of front ends: languages with compilers that use LLVM include ActionScript, Ada, D, Fortran, OpenGL Shading Language, Haskell, Java bytecode, Julia, Objective-C, Swift, Python, Ruby, Rust, Scala, and C#."
    http://en.wikipedia.org/wiki/L... [wikipedia.org]

  • by johnjaydk ( 584895 ) on Sunday July 27, 2014 @04:23PM (#47545109)

    And Mussolini made the trains run on time?

    Actually, he didn't. That myth have been repeatedly busted my historians.

  • by brianerst ( 549609 ) on Sunday July 27, 2014 @04:28PM (#47545139) Homepage

    To be fair, the tirade occurred on the Linux Kernel mailing list and was intra-kernel team bitching. This wasn't directed at the gcc devs personally - he was telling another kernel dev that the output of from his version of gcc was crap. It's a snapshot of a mailing list conversation, not an official statement.

    His actual bug report [gnu.org] was professional and courteous. He thanked the gcc devs for quickly coming up with a fix.

  • by Jesus_666 ( 702802 ) on Sunday July 27, 2014 @04:51PM (#47545307)

    Care to take a wager that it will be fixed in 4.9.1?

    You'd lose that wager. The bug was fixed in the trunk before Linus even reported it but the fix didn't make it into 4.9.1.

    For those who didn't bother reading through the LKML discussion and GCC bug reports: GCC 4.5.0 started doing bad things when a certain combination of flags was set, causing it to potentially use the stack pointer red zone [wikipedia.org] even if explicitly told not to. This usually didn't lead to problems because the most programs can afford not to care about whether the red zone is used. The kernel can't; if you use the red zone in the wrong place your system crashes. This was only noticed in 4.9.0 because that version changed around some unrelated code which now caused the kernel to be compiled in such a way that the bug became relevant.

  • by oji-sama ( 1151023 ) on Sunday July 27, 2014 @05:09PM (#47545477)

    His manner is coarse

    It's not "coarse", it's abusive. Namecalling, mocking, ridicule, hyperbole. That's abuse.

    If you read the message, you may have noticed that he called the code shit, not any person coding it. Same with all other colorful language. I wouldn't get offended.

  • Re:Strawman argument (Score:0, Informative)

    by Anonymous Coward on Sunday July 27, 2014 @05:11PM (#47545507)

    Then I'm sure you won't mind when I call you an idiot, because the question is obviously if being abusive is morally correct and helpful. No one's saying you *can't* act like a jerk, they're saying you shouldn't, especially when holding a respected position.

  • by Anonymous Coward on Sunday July 27, 2014 @05:16PM (#47545567)

    If you'd actually read the linked mailing list post (or even just read the quotes of it in the summary) you'd see that none of the abusive comments are aimed at people, they're aimed at the code. He calls the code a bunch of mean, nasty, insulting things, but he doesn't say anything about the people who worked or released that code. I think the distinction is important here. It's not abuse if there's nobody to be abused.

    Secondarily: if you read the rest of the thread, he goes on to work with everyone very productively on tracking down the exact nature of the underlying bugs, posts deep analyses of the code generation differences, proposes a patch for his own kernel to work around this GCC bug, and goes and files the upstream Bugzilla report with the GCC team himself. On the whole I'd say this is pretty responsible and cooperative behavior.

  • by Forever Wondering ( 2506940 ) on Sunday July 27, 2014 @05:19PM (#47545587)

    Perhaps. But, if you cared to look at the other posts on the thread, you'd see how calm and rationale he was. Or look at the gcc bug report he filed. The gcc bug has gotten fixed

    I've met Linus in the flesh a number of years back and he is truly a calm and mellow guy. He only does the "bullying" for the "shock effect" to get people [with strong egos] to actually start _thinking_.

    And there is some precedent for this. A number of years back, gcc was doing an illegal code motion optimization across a spinlock. After literally hundreds of posts on the gcc mailing list about how this wasn't a bug, Linus started using muscle. I would have, too, at that point. When somebody finally pointed out that the optimization was actually violating requirements in the memory model of the [then] upcoming ISO C spec, it took another hundred or so posts before they actually believed one of their own [gcc people].

    Since that time, the gcc folks have become more receptive to [rather than dismissive of] bugs filed by the kernel people--which is a good thing.

  • by walshy007 ( 906710 ) on Sunday July 27, 2014 @09:27PM (#47546909)

    From a prior discussion from linus.

    Oh, I'll be polite when it's called for. But when people who know better send me crap, I'll curse at them. I suspect you'll notice me cursing *way* more at top developers than random people on the list. I expect more from them, and conversely I'll be a lot more upset when they do something that I really think was not great. For example, my latest cursing explosion was for the x86 maintainers, and it comes from the fact that I *know* they know to do better. The x86 tip pulls have generally been through way more testing than most other pulls I get (not just compiling, but even booting randconfigs etc). So when an x86 pull request comes in that clearly missed that expected level of quality, I go to town. Similarly, you will see fireworks if some long-term maintainer makes excuses for breaking user space etc. That will make me go into incoherent rages. The "polite Linus" example that you point to? That was a maintainer asking for direction for when things went wrong and *before* sending me something dubious. Of course I'm polite then. Sarah, I don't have Tourettes syndrome. You seem to think that my cursing is uncontrolled and random. I argue that it has causes. Big difference.

    Yes. And I do it partly (mostly) because it's who I am, and partly because I honestly despise being subtle or "nice". The fact is, people need to know what my position on things are. And I can't just say "please don't do that", because people won't listen. I say "On the internet, nobody can hear you being subtle," and I mean it. And I definitely am not willing to string people along, either. I've had that happen too—not telling people clearly enough that I don't like their approach, they go on to re-architect something, and get really upset when I am then not willing to take their work. Sarah, first off, I don't have that many tools at hand. Secondly, I simply don't believe in being polite or politically correct. And you can point at all those cultural factors where some cultures are not happy with confrontation (and feel free to make it about gender too—I think that's almost entirely cultural too). And please bring up "cultural sensitivity" while at it. And I'll give you back that same "cultural sensitivity". Please be sensitive to _my_ culture too.

    some people don't believe in going "oh I'm sorry dear, you are an awesome sugar plum fairy but your performance in this little area was below expectations, especially when it is quite clear said person should know far better given their position of responsibility.

    He is clear, to the point, and gets things done.

    This is not abuse, this is quite clearly saying that it is screwed, and how it is screwed. It is productive conversation.

    All of linus' tirades are followed by an in-depth message detailing in what way they are wrong, being direct and to the point is his style, which he is entitled to.

    If calling for standards of quality in a very direct way is abuse.. well.. start a new kernel where you accept any old tripe and see how it goes? And only interact/depend on with projects who have a similar standard and means of management.

    Linus is a very pragmatic, practical engineer. Don't let feelings get in the way of practical needs people. His style works far better than most.

  • Re:Already fixed. (Score:4, Informative)

    by SharpFang ( 651121 ) on Monday July 28, 2014 @03:13AM (#47547955) Homepage Journal

    ...in 4.8.3. Then it resurfaced in 4.9.0 and .1

  • by Anonymous Coward on Monday July 28, 2014 @05:38AM (#47548281)

    The register spills are related, because they are indicative of the overall level of quality of this compiler. The point is, it's not "just a bug". The fault caused Linus to review gcc 4.90 and he found it wanting in other areas too. The real point is, if you can't compile Linux, you aren't ready to release your compiler, and what other signs are there that they weren't ready to release the compiler? Suboptimal behaviour from the optimizer does count, I'm afraid, and the "job done" is raising awareness of this issue. gcc should be grateful he still cares. There's no real news here, after all. It's just yet another fuckup from the cathedral model of software development. The sooner everyone moves to the LLVM bazaar, the better.

New York... when civilization falls apart, remember, we were way ahead of you. - David Letterman

Working...