When I run the the openssl evptest suite in purify runtime memory usage analysis tool it reports lots of memory segment errors in the AES crypto functions. If I build openssl with AES assembler code disabled (e.i AES in c-code) the same test runs without any errors from purify. The test was performed on a RedHat Enterprise Linux 3.0 x86 32-bit system Code compiled with gcc version 3.2.3
/Leif Output from purify below: > > rh3:~/src/openssl-0.9.8a/test:45> ./evp_test evptests.txt > Purify or PureCoverage slave: Warning: Can't open display "", using > tty mode. > **** Purify instrumented ./evp_test (pid 505 at Mon Apr 10 15:45:44 2006) > * Purify 2003a.06.12 Linux (32-bit) (c) Copyright IBM Corp. 1992, > 2004 All rights reserved. > * For contact information type: "purify -help" > * For Purify Viewer output, set the DISPLAY environment variable. > * Options settings: -purify \ > -purify-home=/opt/rational/releases/purify.i386_linux2.2003a.06.12 \ > -gcc3_path=/usr/bin/gcc \ > -cache-dir=/opt/rational/releases/purify.i386_linux2.2003a.06.12/cache > * License successfully checked out. > * Command-line: ./evp_test evptests.txt > Testing digest SHA1 > Plaintext > 0000 61 62 63 > Digest > 0000 a9 99 3e 36 47 06 81 6a ba 3e 25 71 78 50 c2 6c > 0010 9c d0 d8 9d > > Testing digest MD5 > Plaintext > Digest > 0000 d4 1d 8c d9 8f 00 b2 04 e9 80 09 98 ec f8 42 7e > > Testing digest MD5 > Plaintext > 0000 61 > Digest > 0000 0c c1 75 b9 c0 f1 b6 a8 31 c3 99 e2 69 77 26 61 > > Testing digest MD5 > Plaintext > 0000 61 62 63 > Digest > 0000 90 01 50 98 3c d2 4f b0 d6 96 3f 7d 28 e1 7f 72 > > Testing digest MD5 > Plaintext > 0000 6d 65 73 73 61 67 65 20 64 69 67 65 73 74 > Digest > 0000 f9 6b 69 7d 7c b7 93 8d 52 5a 2f 31 aa f1 61 d0 > > Testing digest MD5 > Plaintext > 0000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 > 0010 71 72 73 74 75 76 77 78 79 7a > Digest > 0000 c3 fc d3 d7 61 92 e4 00 7d fb 49 6c ca 67 e1 3b > > Testing digest MD5 > Plaintext > 0000 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 > 0010 51 52 53 54 55 56 57 58 59 5a 61 62 63 64 65 66 > 0020 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 > 0030 77 78 79 7a 30 31 32 33 34 35 36 37 38 39 > Digest > 0000 d1 74 ab 98 d2 77 d9 f5 a5 61 1c 2c 9f 41 9d 9f > > Testing digest MD5 > Plaintext > 0000 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 > 0010 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 > 0020 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 > 0030 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 > 0040 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 > Digest > 0000 57 ed f4 a2 2b e3 c9 55 ac 49 da 2e 21 07 b6 7a > > Testing cipher AES-128-ECB(encrypt) > Key > 0000 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f > Plaintext > 0000 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff > Ciphertext > 0000 69 c4 e0 d8 6a 7b 04 30 d8 cd b7 80 70 b4 c5 5a > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > AES_encrypt [libcrypto.a] > __libc_start_main [libc.so.6] > _start [crt1.o] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6d4 for 4 bytes ending at 0xbfffb6d8, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6cc for 4 bytes ending at 0xbfffb6d0, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6d0 for 4 bytes ending at 0xbfffb6d4, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6c4 for 4 bytes ending at 0xbfffb6c8, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6c8 for 4 bytes ending at 0xbfffb6cc, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6cc for 4 bytes ending at 0xbfffb6d0, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6c4 for 4 bytes ending at 0xbfffb6c8, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6c8 for 4 bytes ending at 0xbfffb6cc, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6d0 for 4 bytes ending at 0xbfffb6d4, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6cc for 4 bytes ending at 0xbfffb6d0, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6c4 for 4 bytes ending at 0xbfffb6c8, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6c8 for 4 bytes ending at 0xbfffb6cc, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6cc for 4 bytes ending at 0xbfffb6d0, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6c4 for 4 bytes ending at 0xbfffb6c8, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > _x86_AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6c8 for 4 bytes ending at 0xbfffb6cc, > beginning in the stack which ends at 0xbffff000. > > **** Purify instrumented ./evp_test (pid 505) **** > MSE: Memory segment error: > * This is occurring while in: > AES_encrypt [libcrypto.a] > * Accessing a memory range that crosses a memory segment boundary. > Addressing 0xbfffb6d4 for 4 bytes ending at 0xbfffb6d8, > beginning in the stack which ends at 0xbffff000. > Ciphertext mismatch > Got > 0000 06 93 93 51 b4 da 5d 35 2c 31 5b 71 ea 65 a1 08 > Expected > 0000 69 c4 e0 d8 6a 7b 04 30 d8 cd b7 80 70 b4 c5 5a > > **** Purify instrumented ./evp_test (pid 505) **** > Current file descriptors in use: 6 > FIU: file descriptor 0: <stdin> > FIU: file descriptor 1: <stdout> > FIU: file descriptor 2: <stderr> > FIU: file descriptor 3: "evptests.txt", O_RDONLY > * File info: -rw-r--r-- 1 leif dev 16929 Apr 10 15:37 > * File position: 4096 > * This file descriptor was allocated from: > open [rtlib.o] > _IO_file_open [libc.so.6] > _IO_file_fopen@@GLIBC_2.1 [libc.so.6] > __fopen_internal [libc.so.6] > fopen@@GLIBC_2.1 [libc.so.6] > main [evp_test.c:336] > FIU: file descriptor 26: <reserved for Purify internal use> > FIU: file descriptor 27: <reserved for Purify internal use> > > **** Purify instrumented ./evp_test (pid 505) **** > Purify: Searching for all memory leaks... > > Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%) > > Purify Heap Analysis (combining suppressed and unsuppressed blocks) > Blocks Bytes > Leaked 0 0 > Potentially Leaked 0 0 > In-Use 2302 50852 > ---------------------------------------- > Total Allocated 2302 50852 > > **** Purify instrumented ./evp_test (pid 505) **** > * Program exited with status code 9. > * 16 access errors, 72 total occurrences. > * 0 bytes leaked. > * 0 bytes potentially leaked. > * Basic memory usage (including Purify overhead): > 2784168 code > 265408 data/bss > 271168 heap (peak use) > 14504 stack > * Shared library memory usage (including Purify overhead): > 19824 libdl.so.2_pure_p3_c0_103152015_2421-4EL_32 (shared code) > 628 libdl.so.2_pure_p3_c0_103152015_2421-4EL_32 (private data) > 13618 libinternal_stubs.so.1.0 (shared code) > 1404 libinternal_stubs.so.1.0 (private data) > 3022468 libc.so.6_pure_p3_c0_103152015_2421-4EL_32 (shared code) > 22444 libc.so.6_pure_p3_c0_103152015_2421-4EL_32 (private data) > 85968 ld-linux.so.2 (shared code) > 1876 ld-linux.so.2 (private data) > * Memory mapped usage: > 4096 mmap'd at 0xb6c52000 > > > -- Leif Thuresson Email: [EMAIL PROTECTED] Fox Technologies ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]