It's probably a bug in the GCC optimizer. Please try to track down which 
piece of code is causing the segv, and disable optimization on it. If you 
can't figure it out, let me know and I'll look into it myself.

On Thu, Nov 07, 2002 at 11:39:55AM -0700, D. R. Evans wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Using source checked out of CVS a few days ago, compiled under g++ 3.2 on a 
> PC running Mandrake 9.0.
> 
> The following code fragment runs fine when the library is built with a 
> debug build, but gives a segv when using a release library.
> 
> That is, the code works if the CXXFLAGS and LDFLAGS lines are commented 
> out, but gives a segv if the lines are uncommented:
> 
> # uncomment the next two lines to do a release build
> #CXXFLAGS = -O2 -DNDEBUG -ffunction-sections -fdata-sections
> #LDFLAGS = -Wl,--gc-sections.
> 
> Here's the code fragment:
> 
> { CryptoPP::AutoSeededRandomPool randpool;
>   unsigned char* ucp = new unsigned char [1];
>   randpool.GenerateBlock(ucp, 1);
> }
> 
> The documentation gives no suggestion that there are any disallowed values 
> of size (== 1 in the above fragment). In fact it suggests that there is no 
> such limit (by saying that the default implementation is to repeatedly call 
> GenerateByte().
> 
>   Doc
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 6.0.2 -- QDPGP 2.60 
> Comment: Key obtainable from servers: ID 0x362912B8
> 
> iQA/AwUBPcqzfGnXrLw2KRK4EQKoRQCgwMq4tk5kRrHWtyxNFnbrHOfCUCkAoKIA
> 5etDdqeZ+W8T1BoyWtyLSJCP
> =jUTU
> -----END PGP SIGNATURE-----

Reply via email to