-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization bug on atom processors and/or subtarget for atom #2078
Comments
Confirmed. If I configure with --disable-optimized, it completes 'make check': result: ok. 142 passed; 0 failed; 0 ignored followed by the known valgrind complaint. My machine is an Intel Atom N475. |
Mine is an Atom D525. |
Confirmed: One Atom 330 running Ubuntu Natty, one running Ubuntu Maverick.
|
I have managed to get this working with optimization on by doing horrible, horrible things.
so it does look like something about the atom code is messing rust up. next step is to make it so I can pass in feature strings, to see in which atom feature this problem occurs (assuming a non-blank feature string overrides the standard featureset the cpu comes with). |
Oh weird. So it works on atom when you force it to pretend it's not on an atom? |
So part of the problem is that the current code sniffs the host cpu in all cases. It might be that the right thing to do here is to just assume the most generic cpu we can (i686, x86-64) in cases where --opt-level is < 2, instead of having a special wide-distribution option or having to differentiate the targets in these simple cases. I am digging around in LLVM to see how this stuff is used and set. A couple of things would be useful here:
|
A few more words about my strategy here: At this point I am removing features from the LLVM impl of atom to see which of them is causing the segfault. There is likely a cleaner way to do this, but this was the simplest and most likely to work cleanly (if most time-consuming). I need to understand better what LLVM is doing internally with the feature string. I figure that if we can figure out which optimization is causing the failure, we should be able to figure out why it's failing and perhaps fix it. |
The feature that's causing the issue is "ProcIntelAtom". Going to try to figure out what it actually does. |
Even more specifically, the line: generating some binaries with hopefully the smallest possible code change so someone can look at them side by side. |
Just to confirm I have also have the segfault : debian squeeze with a N270 (non x64 ) |
I too have the segfault, Atom D510, Gentoo GCC 4.4.5. As requested, /proc/cpuinfo reads processor : 0 |
It appears the LLVM project has a patch for this now. http://permalink.gmane.org/gmane.comp.compilers.llvm.cvs/112078 |
Now that LLVM has been updated, I tried to rebuild from the master branch today and got the same error as before. Can someone else give it a try? compile_and_link: x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore.so /bin/sh: line 1: 5388 Segmentation fault x86_64-unknown-linux-gnu/stage1/bin/rustc -O --cfg=ndebug --target=x86_64-unknown-linux-gnu -o x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore.so /home/donp/src/rust/repo/src/libcore/core.rc |
trying a totally clean build now, will update in a few hours. On Wed, May 2, 2012 at 4:46 PM, Don Park
|
Failing in the same place, presumably for the same reason. On Thu, May 3, 2012 at 7:25 AM, Evan McClanahan mcclanahan@gmail.com wrote:
|
Just tried a clean rust checkout and build. Its running fine now on my ATOM system. |
I just build in a QEMU Pentium II (pre-SSE!) emulator image running debian squeeze and it's fine now. The "generic" fix worked, at least for the time being. I'll be sure to get a bunch of old-CPU images into the new build farm to catch regressions on this when we move to a new driver. Closing. |
@rillian and @evanmcc have both encountered a build failure -- same place -- stage1 segfaults when building optimized on atom. Seems independent of distribution, (happens on FC17 and Ubuntu oneiric). Both machines were atoms. Tried builds on emulated non-atoms, same distros, no fault. Think it's atom-specific. Might be a duplicate of #1879 (requirement for subtargets).
The text was updated successfully, but these errors were encountered: