ports/76875: security/cryptopp crashes if build with default optimization -O

Thomas Melzer tmelzer at tomesoft.de
Sun Jan 30 23:30:24 UTC 2005


>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 at 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:



More information about the freebsd-ports-bugs mailing list