Chromium Being Ported To VC++, Scrubbed of Compiler Bugs 93
jones_supa writes: Moving a big software project to a new compiler can be a lot of work, and few projects are bigger than the Chromium web browser. In addition to the main Chromium repository, which includes all of WebKit, there are over a hundred other open-source projects which Chromium incorporates by reference, totaling more than 48,000 C/C++ files and 40,000 header files. As of March 11th, Chromium has switched to Visual C++ 2015, and it doesn't look like it's looking back. The tracking bug for this effort currently has over 330 comments on it, with contributions from dozens of developers. Bruce Dawson has written an interesting showcase of some VC++ compiler bugs that the process has uncovered. His job was to investigate them, come up with a minimal reproduce case, and report them to Microsoft. The Google and Microsoft teams get praise for an excellent symbiotic relationship, and the compiler bugs have been fixed quickly by the Visual Studio team.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Those of us so old we have 5-digit ID's, that's who! Now Get Off My Lawn!
Re: (Score:2)
Re:And all so they can sell you to advertisers... (Score:5, Informative)
>"As of March 11th, Chromium has switched to Visual C++ 2015..."
This should have been written as: ..."
"As of March 11th, WINDOWS Chromium build has switched supported compilers FROM Visual C++ 2013 TO Visual C++ 2015
This has nothing to do with OSX or linux builds and is not that much important news.
Re: (Score:1)
Fair enough. I didn't realize how ambiguous that sentence would appear, especially when the slashdot summary omitted '2015'. I fixed the sentence in my blog post.
> and is not that much important news
I thought it was interesting, which was why I wrote it. Whether it is important is up to each reader to decide.
Why? (Score:1, Insightful)
Most developers know VC++ compilers are full of bugs and weird stuff. Why didn't they just stay with the compilers that are well supported across all platforms?
Re:Why? (Score:4, Interesting)
All compilers have 'weird bugs and stuff' - staying with compilers 'that are well support across all platforms' is another matter altogether. I'm not sure why you are asserting the fact that VC++ has bugs - your text reads as if you are trying to convey it's the only compiler that does contain bugs, therefore you can't fathom as to why on earth a development team would move from one dev platform to another because of the bugs. Because it's Microsoft, it must be shit right? That's what you're saying?
Re: (Score:1, Insightful)
I'm not saying they are the only compiler with bugs, it's just that VC++ is known (at least in academia that write shitty software to begin with) to generate a lot more errors/bugs for software that's not directly Win32 related than eg. GCC or Clang. Not sure what the rationale was behind going to a closed software compiler with possible patent issues/assertions.
Re:Why? (Score:5, Insightful)
A lot of times compiler bugs fall into categories that aren't bugs at all. 1. Stuff that people think is standard C, but it's really a GCC-ism. 2. Stuff people didn't know about standard C, such as the order of argument evaluation being unspecified. 3. Default settings on one compiler being forgiving and/or handling uninitialized variables in a particular way, and the other compiler not being so forgiving.
I can't remember who said so first, but it's generally given that the first people to scream "compiler bug" are usually doing something wrong with their code. I wouldn't be surprised if a lot of the people in academia who you say write shitty software are doing that kind of thing. "Oh! compiler bug!" Nope. You just had something that "worked on my machine" and now it doesn't.
Re: (Score:2, Informative)
I have ported around thru a bunch of different compilers over the years a few codebases.
I can count on one hand the number of VC compiler bugs I have come across. They are seriously nasty to root out as my assumption is the compiler is usually right. MS usually had it fixed in under a week with a hotfix. When you buy visual studio you get some fairly top notch support.
Now the other bugs. I lost count of. All of those were usually a misunderstanding of how C/C++ works. A few cases were like you said GC
Re: (Score:1)
>> Also most optimizer compiler bugs come down to you passing in the same memory space as two different parameters into a function. Dont do that.
This is called memory aliasing. And compilers are usually pessimistic about optimizing when memory references can't be identified to be of each other.
Just do not use "restrict" keyword if you are not sure. https://en.wikipedia.org/wiki/Restrict
Re: (Score:3)
I don't know, GCC has a lot of quirks that make it a pretty poor standard to code by. By making it compile with VC++ they open the door to elminiting the GCC workarounds, and possibly open the door for more platforms. As someone who has tried to port software in the past, GCC is really a thorn in my side.
Re: (Score:3)
Another benefit is using multiple compilers helps find tricky bugs due to assumptions in the programming language.
Enabling all warnings can easily help find those parts of code that are iffy but look normal
Re: (Score:2)
I expect it is a point of optimization.
While VC++ may have a bunch of bugs, it may be due to over optimization, for faster performance on Windows Platforms.
Re: (Score:2)
Microsofts compilers have always been conservative when it comes to optimization. And frankly in most cases a smart compiler using the best optimization possible* will be at most a few percentages faster than the one that only does basic optimizations (like register allocation, common subexpression elimination etc.).
GCC and Clang/LLVM have switched to the idea that all undefined types of code shouldn't produce what is likely to be the programmers intent like C compilers of old, nor should they flag undefine
Re: (Score:3)
Re: (Score:2)
If an opensource developer must target Windows he or she can use clang with VS 2015 community edition [microsoft.com] just fine or vim?
Still it is good to use a standards compliant api and c++ that is not tied too heavy on one product.
In other news
But the big elephant in the room is the switch to VC2015 means the death of XP and Vista.
Is Chrome dropping support for XP finally? Will these users get ransomware from using an unpatched and unsupported browser now if Chromium (the foundation of Chrome) is not compatible?
Re: (Score:2)
Most developers know VC++ compilers are full of bugs and weird stuff. Why didn't they just stay with the compilers that are well supported across all platforms?
I do cross-platform development for code that has to run on everything (literally). It's plain C, not C++, so I'm saved from seeing various bugs by that. The VC++ compilers are some of the least buggy compilers I've ever used. I've actually never found a compiler by in VC++ 6.0 in nearly 20 years of use. In contrast, gcc is one of the buggiest (mainstream) compilers I've used, every new release seems to contain a new collection of code-generation bugs.
In terms of more obscure compilers, even gcc pales i
Re:From what to VC? (Score:4, Informative)
As near as I can tell they switched the Windows build from VC++ old version to VC++ new version. Because:
- Improved C++11/14 support /analyze checked rolled into main compile
- Security improvements
- Some
- Possibly some improved support for "cloud" builds
Re: (Score:3)
So Microsoft tools are so difficult to use across different tool versions that it becomes a news story when someone manages to upgrade?
Re: (Score:3)
What, from Borland Turbo C++ 3.0?
From thesecond link it seems as if they were upgrading from VC++ 2013
Re: (Score:2)
Re: (Score:2)
Windows @ Google (Score:2)
Chrome + Windows = Mirror (Score:5, Funny)
Can't see anything but your reflection..
Re: (Score:2)
that's actually silver + windows = mirror. #FTFY
Re: (Score:3)
Chrome + Windows = suboptimal mirror.
Re: (Score:2)
That's huge! (Score:3)
...there are over a hundred other open-source projects which Chromium incorporates by reference, totaling more than 48,000 C/C++ files and 40,000 header files....
That's a lot of files for a single, relatively trivial application..
Re:That's huge! (Score:5, Insightful)
Chrome is not an application. It is an entire operating system, that just happens to include a browser. Think of it as ChromeOS VM.
Re:That's huge! (Score:5, Funny)
Chrome is not an application. It is an entire operating system, that just happens to include a browser.
How does it compare to emacs?
Re: (Score:2)
/hat tip
Re: (Score:3)
It's GUI-based instead of ncurses-based, and is scripted with Javascript instead of Lisp.
Re:That's huge! (Score:5, Funny)
It's GUI-based instead of ncurses-based
Moderate advantage to Chrome on that one, I think.
and is scripted with Javascript instead of Lisp.
Err, we'll call that one a draw.
Re: (Score:2)
Emacs is GUI based, it's only ncurses based if you're using it from a terminal. For GUI is it not tied to one particular type of GUI either.
Lisp is a real language with lots of history and theory, JavaScript is a hack, it's not a draw it's a clear advantage to Emacs there.
Re: (Score:1)
Emacs Lisp is sort of a special beast. It only looks like Lisp to people that don't program in other Lisp varieties.
Re: (Score:2)
Or if you are using the one built without X support. I wouldn't have that bloat on my system for a fucking TEXT EDITOR. Not even on a system which has X; let alone a server with no X.
Re: (Score:2)
I really like my Aquamacs though. Also having multiple open windows is nice. Using it only from a terminal would feel clumsy, even though that's what I used to do.
Re: (Score:2)
Chrome is not an application.
https://www.chromium.org/Home [chromium.org]
. ..."
"...Chromium is an open-source browser project
Re: (Score:2)
Chrome is not an application.
https://www.chromium.org/Home [chromium.org]
.
"...Chromium is an open-source browser project ..."
Which is why I weighted my words and went with Chrome which is mainly a branded binary from the Chromium project. Where "Chromium" can be either the application or the project.
Re: (Score:1)
There's nothing "relatively trivial" about the modern web browser. A modern JIT optimizing javascript engine and basic class libraries alone make it as complicated as many compilers. DOM implementation + layout + rendering is also hugely complex. Quick and efficient local caching, plus history recall requires the complexity of a mid-range database server.
There are many more parts I haven't even touched on.
Re:Odd choice of tools (Score:5, Informative)
Impossible (Score:1)
Are you implying that the submission was flat out wrong? That's impossible.
Re: (Score:3)
The summary, especially the title, omitted a really important detail: it's not that they are porting it to VC++, it's that they are making it work with VC++ *2015*.
IOW they apparently already had the build working with an earlier version of VC++, and this is all about them changing things to work with this newer version of VC++.
Re: (Score:2)
Isn't Visual Studio free for open source projects?
It sounds like the compiler is looking OK now. (Score:1)
Who cares about VC++? (Score:1)
Re: (Score:1)
Re: (Score:1)
Re: (Score:2)
No it doesn't. At last check it supports building code which targets x86, x64, ARM and ARM64.
Re: (Score:2)
You're free to provide these fixes yourself if you care.
Re: (Score:1)
Chromium Development (Score:2)
I don't know if you've looked at what it takes to set up a developer environment for Chromium, but that [chromium.org], to me, seems like a hell of a lot of time investment. It might be worth it if you really wanted something done, but for me that's crossing the line into "I want to be paid for that kind of work," and verging on, "You couldn't pay me to work on that." I don't have a lot of comparative experience with complex build environments, and it does seem to be well documented, but still...it seems quite the ordeal.
Re: (Score:2)
But that's the point; if someone who need these big changes to happen won't go through it (and I completely understand why, it's not a reproach), asking for the people that didn't need these changes to work on them is kinda rude.
Re: (Score:2)
There should be some harsh physical punishment for the idiots that put sudo calls in Makefiles. And for sudo-heads in general. Why would you need root just to build some fucking binary, should it be a hello-world or your browser/os of
Re: (Score:1)
Slow news day or what (Score:1)
So Chromium is switching from an older version of VC-- to a newer version and this is considered news for nerds? WTF /.?
Mozilla guys doing the same thing (Score:1)
Mozilla Firefox has a "bug" open for same purpose and there are several reasons for the switch, build performance increase and increased security.
https://bugzilla.mozilla.org/s... [mozilla.org]