Bug 1013110

Summary: memtest86+-5.01 is available
Product: [Fedora] Fedora Reporter: Upstream Release Monitoring <upstream-release-monitoring>
Component: memtest86+Assignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: b38617, bgray, c72578, davidm, jskarvad, kim-rh, stanley.king
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: memtest86+-5.01-1.fc20 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-17 12:34:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Patch fixes non-working binary with later GCC versions. none

Description Upstream Release Monitoring 2013-09-27 21:06:17 UTC
Latest upstream release: 5.01.usb.installer
Current version/release in Fedora Rawhide: 4.20-11.fc21
URL: http://www.memtest.org/

Please consult the package updates policy before you issue an update to a stable branch: https://fedoraproject.org/wiki/Updates_Policy

More information about the service that created this bug can be found at:
https://fedoraproject.org/wiki/Upstream_release_monitoring

Comment 1 Upstream Release Monitoring 2013-10-23 18:43:19 UTC
Latest upstream release: 5.01
Current version/release in Fedora Rawhide: 4.20-11.fc21
URL: http://www.memtest.org/download/5.01/

Please consult the package updates policy before you issue an update to a stable branch: https://fedoraproject.org/wiki/Updates_Policy

More information about the service that created this bug can be found at:
https://fedoraproject.org/wiki/Upstream_release_monitoring

Comment 2 Jaroslav Škarvada 2013-12-06 14:20:27 UTC
*** Bug 1014737 has been marked as a duplicate of this bug. ***

Comment 3 Jaroslav Škarvada 2013-12-06 14:20:57 UTC
It seems to crash if compiled with gcc-4.7.2 or newer. It works if compiled with gcc-4.4.7. Upstream ticket:

http://forum.canardpc.com/threads/83443-Memtest86-V5.01-crashes-with-gcc-4.7.2-or-later

Comment 4 Account closed by the user 2013-12-06 17:09:43 UTC
MemTest86_v5 is going to be released with UEFI support: http://www.memtest86.com/technical.htm#new

Is it worth changing from Memtest86+ to MemTest86 ??

Comment 5 Account closed by the user 2013-12-06 17:16:17 UTC
(In reply to Xose Vazquez Perez from comment #4)

> MemTest86_v5 is going to be released with UEFI support:
> http://www.memtest86.com/technical.htm#new
> 
> Is it worth changing from Memtest86+ to MemTest86 ??

Forget it. MemTest86_v5 is not GPL, the last one was 4.3.6.

Comment 6 Jaroslav Škarvada 2014-02-12 10:20:47 UTC
*** Bug 1057864 has been marked as a duplicate of this bug. ***

Comment 7 Jaroslav Škarvada 2014-02-12 10:22:10 UTC
The workaround could be to compile it with gcc-3.4.

Comment 8 Bill Gray 2014-02-12 19:23:52 UTC
Yes, please update memtest86+ in Fedora soon.  Version 4.2 does not work on new hardware...  Thanks!

Comment 9 Jaroslav Škarvada 2014-02-17 12:25:51 UTC
OK, I compiled it with gcc-3.4 and it seems to work. I will push it and I will focus on the gcc-4.8 fix later.

Comment 10 Fedora Update System 2014-02-17 12:57:02 UTC
memtest86+-5.01-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/memtest86+-5.01-1.fc20

Comment 11 Fedora Update System 2014-02-27 04:14:11 UTC
memtest86+-5.01-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 David McInnis 2014-10-20 05:15:51 UTC
Created attachment 948383 [details]
Patch fixes non-working binary with later GCC versions.

I have been working on this problem for a while.  Disabling the inline-functions called-once optimization fixes the problem.

I also ran the static analyzer Cppcheck, and solved an array out-of-bounds bug, and an incorrect pointer bug.


-Dave

Comment 13 David McInnis 2014-10-20 05:17:18 UTC
PS.  I've also sent this patch upstream, but I haven't heard much feedback from the developers.

-Dave

Comment 14 Jaroslav Škarvada 2014-10-20 14:45:26 UTC
(In reply to David McInnis from comment #12)
Hi,

thanks for the patch, I will apply it with one minor change. I have already used:
-	for(i = 0; i < sizeof(possible_nhm_bus); i++) {
+	for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {

I will keep it, because it is more generic solution than the hardcoded number of iterations.

Could you provide more information about the -fno-inline-functions-called-once. What it fixes and why?

Comment 15 David McInnis 2014-10-20 21:42:26 UTC
I like the more generic way of getting the size of an array in C.  I've never seen this technique before, and I'll have to look into it.


About the -fno-inline-functions-called-once optimization:  

I do not understand what it fixes or why.  I will do more research into the problem and report back what I discover.



This patch is part of my larger effort of improve Memtest86+'s SMP mode.  It always locks up hard on my Intel Core 2 Quad machine when in SMP.  Once I find the deadlock issue my goal will be to improveimprove SMP performance.

Here is my project page:  github.com/oraac/memtest86--SMP

If anyone here want's to help I'd be happy to get you a SSH key for commit access.

-Dave

Comment 16 Jaroslav Škarvada 2014-10-21 09:05:48 UTC
(In reply to David McInnis from comment #15)
> About the -fno-inline-functions-called-once optimization:  
> 
> I do not understand what it fixes or why.  I will do more research into the
> problem and report back what I discover.
> 
Thanks.

I probably haven't encountered this problem, because I am using -O0 instead of -O1, i.e. no inlining at all. I will also keep this as is, it may resolve other hidden problems.

Comment 17 Jaroslav Škarvada 2014-10-21 09:16:55 UTC
Fixed in memtest86+-5.01-8.fc22.