Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jan 2005 23:27:37 GMT
From:      Thomas Melzer <tmelzer@tomesoft.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/76875: security/cryptopp crashes if build with default optimization -O
Message-ID:  <200501302327.j0UNRbZV067314@www.freebsd.org>
Resent-Message-ID: <200501302330.j0UNUN36041300@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         76875
>Category:       ports
>Synopsis:       security/cryptopp crashes if build with default optimization -O
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 30 23:30:23 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Melzer
>Release:        FreeBSD 5.3-RELEASE-p5 i386
>Organization:
Thomas Melzer Softwareentwicklung
>Environment:
FreeBSD terra.ddns.tomesoft.de 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #0: Thu Jan 27 20:31:57 CET 2005     root@terra.ddns.tomesoft.de:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Building security/cryptopp with the default compile options yields to 
to a build with 'g++ -O -pipe -march=pentium -fPIC -msse2 -pipe'.
Option -O optimizes for speed and size. This produces incorrect code with some encryption algoritmns and yield to crashes.

>How-To-Repeat:
- build port
- run cryptest v
cryptes crashes with core dump after executing 
'BlumBlumShub validation suite running...' test
>Fix:
add the following patch (which supresses optimization) to the port and all tests succeed

--- Makefile.orig       Sun Jan 30 14:05:17 2005
+++ Makefile    Mon Jan 31 00:24:57 2005
@@ -25,7 +25,7 @@
 EXTRACT_BEFORE_ARGS=   -aq
 USE_GMAKE=             yes
 MAKEFILE=              GNUmakefile
-CXXFLAGS+=             -fPIC
+CXXFLAGS+=             -fPIC -O0

 .include <bsd.port.pre.mk>

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501302327.j0UNRbZV067314>