Skip to content
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

g++ 4.8 and higher segfaults using -O3 on mmx optimization #8

Closed
bas-t opened this issue Oct 11, 2013 · 7 comments
Closed

g++ 4.8 and higher segfaults using -O3 on mmx optimization #8

bas-t opened this issue Oct 11, 2013 · 7 comments

Comments

@bas-t
Copy link
Owner

bas-t commented Oct 11, 2013

When using g++ 4.8 or snapshot from 4.9 on Debian, the PARALLEL_64_MMX and PARALLEL_128_2MMX tests segfault with optimization level -O3

Don't have a clue right now.

@bas-t
Copy link
Owner Author

bas-t commented Oct 12, 2013

Tested on Ubuntu Saucy. Same negative result.

I suspect that it could have something to do with different gcc version used to compile the kernel.
In Debian as well as Ubuntu, it is common practice to ship a higher default gcc version in any given release then the kernel was compiled with.

Up until gcc 4.7 version, this was not much of an issue, but it seems that gcc 4.8 makes the difference.

Still investigating.

@ghost ghost assigned bas-t Oct 12, 2013
@bas-t
Copy link
Owner Author

bas-t commented Oct 14, 2013

Tested again on Saucy.
cat /proc/version shows that the kernel is build with gcc version 4.8.1
No segfaults.

@bas-t bas-t closed this as completed Oct 15, 2013
@bas-t
Copy link
Owner Author

bas-t commented Oct 21, 2013

Tested again, different results. Using gcc/g++ version 4.8.1 compiler on Ubuntu Saucy, Debian Wheezy and Debian Jessie, testing mmx optimization with optimization level 3 (-O3)

Mobile AMD Sempron(tm) Processor 3000+, 1 cores --> failed test
Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 4 cores --> failed too
AMD Geode NX 1750 , 1 cores --> success!

Same tests done using a lower gcc/g++ version (4.7 or 4.6) allways lead to success

I don't know what to think of it, except that I'm nowhere near a conclusive anwer to this issue right now.

A hypothetical answer: wether or not segfaulting while testing mmx optimization (level 3) could very well depend on the processor the tests are done with (that is, while using 4.8 compiler).

I only have these three processors to test with, I need feedback from people with other processors.

@bas-t bas-t reopened this Oct 21, 2013
@DingoSEAD
Copy link

mythbuntu 12.04 LTS 3.2 gcc 4.6

command : ./configure --compiletype=release

http://pastebin.com/gTFV0tLD

@bas-t
Copy link
Owner Author

bas-t commented Oct 22, 2013

@DingoSEAD: I've opened a new ticket for this, your issue has nothing to do with g++ 4.8 and mmx optimization segfaults.

Thanks for finding a bug in the code, I pushed a workaround, I need to rework the new optimization code anyway to fix this and maybe other issues in a more permanent way. It's on my to-do list with high priority

Opened ticket #12 as a reminder to myself.

@bas-t
Copy link
Owner Author

bas-t commented Nov 12, 2013

"A hypothetical answer: wether or not segfaulting while testing mmx optimization (level 3) could very well depend on the processor the tests are done with (that is, while using 4.8 compiler)."

Not so much hypothetical anymore, this is clearly a bug in gcc 4.8. Some CPU's suffer from it, but most don't
Sadly, most of my cpu's are in the wrong list.

As it is now, it's not even a biggy, optimization with level -O2 is much faster with gcc 4.8, allmost as fast as -O3 in gcc 4.6

@bas-t bas-t closed this as completed Nov 12, 2013
@bas-t
Copy link
Owner Author

bas-t commented Nov 19, 2013

Seems to be related to 32 bits os, afaik amd64 systems are not affected.

@bas-t bas-t reopened this Nov 19, 2013
@bas-t bas-t closed this as completed in bc33ac4 Nov 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants