ID: 13399
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Open
Bug Type: mcrypt related
Operating System: Linux
PHP Version: 4.0.6, 4.0.8-dev
New Comment:

  I downloaded CVS and tried that yesterday an I just downloaded a snapshot and both 
still have the same problem.
I'm not sure, but I think the gdb backtrace shows the same information as it was 
before:

(gdb) bt
#0  0x0 in ?? ()
#1  0x1201bcba4 in mcrypt_enc_is_block_algorithm_mode (td=0x120283820) at 
mcrypt_modules.c:440
Cannot access memory at address 0x20


Previous Comments:
------------------------------------------------------------------------

[2001-12-13 15:43:39] [EMAIL PROTECTED]

Should be fixed in CVS, can you try (in about a day) the 
latest snapshot from snaps.php.net ?

Derick

------------------------------------------------------------------------

[2001-10-26 04:02:24] [EMAIL PROTECTED]

Found the prob, fix is under way.

Derick

------------------------------------------------------------------------

[2001-10-25 23:35:50] [EMAIL PROTECTED]

 Just as an update, I upgraded glibc to glibc-2.2.4-19 and I used a Compaq C/C++ 
compiler (it's an Alpha), I still get this error, even though the backtrace is 
different now (I've got CVS tree, PHP Version 4.2.0-dev). Here's the code I used:

#!/usr/local/bin/php -q
<?
function encrypt_pass($ascii_pass)
{
if ($ascii_pass) {
   $keystr="Veni, vidi, vici!!!";

   $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB,
"");
   $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
     mcrypt_generic_init ($td, $keystr, $iv);
   $enc_pas= mcrypt_generic ($td, $ascii_pass);
     mcrypt_generic_end ($td);

}else {$enc_pas="";}

     return $enc_pas;
}

echo encrypt_pass("It$myPass");
?>

Here's the gdb's backtrace:
(gdb) bt
#0  0x0 in ?? ()
#1  0x1201b97b4 in mcrypt_enc_is_block_algorithm_mode (td=0x12036ea50) at 
mcrypt_modules.c:440
Cannot access memory at address 0x20

  Please, let me know if you would like an additional information or maybe a shell on 
my machine.

  Thank you.

------------------------------------------------------------------------

[2001-09-23 17:32:24] [EMAIL PROTECTED]

Ooops :((( Sorry, I just refreshed the page. Anyway, the whole script is an include 
file with a lot of functions defined, here's the exact function I use to encrypt the 
passwords:

function encrypt_pass($ascii_pass)
{
if ($ascii_pass) {
   $keystr="Veni, vidi, vici!!!";

   $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
   $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
     mcrypt_generic_init ($td, $keystr, $iv);
   $enc_pas= mcrypt_generic ($td, $ascii_pass);
     mcrypt_generic_end ($td);

}else {$enc_pas="";}

     return $enc_pas;
}

  Then I just call it anywhere I want in my scripts. 

------------------------------------------------------------------------

[2001-09-23 17:30:02] [EMAIL PROTECTED]

 I dowloaded and recompiled CVS (4.0.8-dev) and still have the same error. However, I 
couldn't get core file, because when I reconfigure with --enable-debug option, make 
reported and error:

cc -shared  stub.lo -Wl,--whole-archive Zend/.libs/libZend.al 
sapi/apache/.libs/libsapi.al main/.libs/libmain.al regex/
.libs/libregex.al ext/bz2/.libs/libbz2.al ext/mcrypt/.libs/libmcrypt.al 
ext/mysql/.libs/libmysql.al ext/pcre/.libs/libpc
re.al ext/posix/.libs/libposix.al ext/session/.libs/libsession.al 
ext/standard/.libs/libstandard.al ext/xml/.libs/libxml
.al TSRM/.libs/libtsrm.al /usr/local/lib/libmcrypt.a -Wl,--no-whole-archive  
-Wl,--rpath -Wl,/usr/local/lib  -L/usr/lib
-L/usr/local/lib Zend/.libs/libZend.al -ldl -ldl -ldl -lcrypt -lresolv -ldl -lresolv 
-lcrypt sapi/apache/.libs/libsapi.a
l main/.libs/libmain.al regex/.libs/libregex.al ext/bz2/.libs/libbz2.al 
ext/mcrypt/.libs/libmcrypt.al ext/mysql/.libs/li
bmysql.al ext/pcre/.libs/libpcre.al ext/posix/.libs/libposix.al 
ext/session/.libs/libsession.al ext/standard/.libs/libst
andard.al ext/xml/.libs/libxml.al TSRM/.libs/libtsrm.al -lpam -ldl 
/usr/local/lib/libmcrypt.a /usr/lib/libltdl.so -lbz2
-lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt               -Wl,-soname 
-Wl,libphp4.so -o .libs/libphp4.so
/usr/local/lib/libmcrypt.a(mcrypt_extra.o): In function `mcrypt_algorithm_module_ok':
:292: multiple definition of `mcrypt_algorithm_module_ok'
Zend/.libs/libZend.al(mcrypt_extra.o)::292: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_extra.o): In function `mcrypt_mode_module_ok':
:334: multiple definition of `mcrypt_mode_module_ok'
Zend/.libs/libZend.al(mcrypt_extra.o)::334: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_extra.o): In function `mcrypt_readdir':
:37: multiple definition of `mcrypt_readdir'
Zend/.libs/libZend.al(mcrypt_extra.o)::37: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_extra.o): In function `mcrypt_list_algorithms':
:74: multiple definition of `mcrypt_list_algorithms'
Zend/.libs/libZend.al(mcrypt_extra.o)::74: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_extra.o): In function `mcrypt_list_modes':
:179: multiple definition of `mcrypt_list_modes'
Zend/.libs/libZend.al(mcrypt_extra.o)::179: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_extra.o): In function `mcrypt_free_p':
:281: multiple definition of `mcrypt_free_p'
Zend/.libs/libZend.al(mcrypt_extra.o)::281: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_extra.o): In function `mcrypt_check_version':
:415: multiple definition of `mcrypt_check_version'
Zend/.libs/libZend.al(mcrypt_extra.o)::415: first defined here
/usr/local/lib/libmcrypt.a(mcrypt.o): In function `mcrypt_generic_init':
:154: multiple definition of `mcrypt_generic_init'
Zend/.libs/libZend.al(mcrypt.o)::154: first defined here
/usr/local/lib/libmcrypt.a(mcrypt.o): In function `mcrypt_generic':
:160: multiple definition of `mcrypt_generic'
Zend/.libs/libZend.al(mcrypt.o)::160: first defined here
/usr/local/lib/libmcrypt.a(mcrypt.o): In function `mdecrypt_generic':
:169: multiple definition of `mdecrypt_generic'
Zend/.libs/libZend.al(mcrypt.o)::169: first defined here
/usr/local/lib/libmcrypt.a(mcrypt.o): In function `mcrypt_generic_end':
:177: multiple definition of `mcrypt_generic_end'
Zend/.libs/libZend.al(mcrypt.o)::177: first defined here
/usr/local/lib/libmcrypt.a(mcrypt.o): In function `mcrypt_generic_deinit':
:188: multiple definition of `mcrypt_generic_deinit'
Zend/.libs/libZend.al(mcrypt.o)::188: first defined here
/usr/local/lib/libmcrypt.a(mcrypt.o): In function `mcrypt_perror':
:197: multiple definition of `mcrypt_perror'
Zend/.libs/libZend.al(mcrypt.o)::197: first defined here
/usr/local/lib/libmcrypt.a(mcrypt.o): In function `mcrypt_strerror':
:226: multiple definition of `mcrypt_strerror'
Zend/.libs/libZend.al(mcrypt.o)::226: first defined here
/usr/local/lib/libmcrypt.a(mcrypt.o): In function `mcrypt_free':
:254: multiple definition of `mcrypt_free'
Zend/.libs/libZend.al(mcrypt.o)::254: first defined here
/usr/local/lib/libmcrypt.a(bzero.o): In function `Bzero':
:27: multiple definition of `Bzero'
Zend/.libs/libZend.al(bzero.o)::27: first defined here
/usr/local/lib/libmcrypt.a(xmemory.o): In function `LOCKMEM':
:35: multiple definition of `LOCKMEM'
Zend/.libs/libZend.al(xmemory.o)::35: first defined here
/usr/local/lib/libmcrypt.a(xmemory.o): In function `mxmalloc':
:50: multiple definition of `mxmalloc'
Zend/.libs/libZend.al(xmemory.o)::50: first defined here
/usr/local/lib/libmcrypt.a(xmemory.o): In function `mxcalloc':
:63: multiple definition of `mxcalloc'
Zend/.libs/libZend.al(xmemory.o)::63: first defined here
/usr/local/lib/libmcrypt.a(xmemory.o): In function `mxrealloc':
:75: multiple definition of `mxrealloc'
Zend/.libs/libZend.al(xmemory.o)::75: first defined here
/usr/local/lib/libmcrypt.a(xmemory.o): In function `mxfree':
:88: multiple definition of `mxfree'
Zend/.libs/libZend.al(xmemory.o)::88: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_module_close':
:106: multiple definition of `mcrypt_module_close'
Zend/.libs/libZend.al(mcrypt_modules.o)::106: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `end_mcrypt':
:379: multiple definition of `end_mcrypt'
Zend/.libs/libZend.al(mcrypt_modules.o)::379: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_mode_get_size':
:233: multiple definition of `mcrypt_mode_get_size'
Zend/.libs/libZend.al(mcrypt_modules.o)::233: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_set_key':
:250: multiple definition of `mcrypt_set_key'
Zend/.libs/libZend.al(mcrypt_modules.o)::250: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_enc_get_block_size':
:295: multiple definition of `mcrypt_enc_get_block_size'
Zend/.libs/libZend.al(mcrypt_modules.o)::295: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_enc_get_iv_size':
:313: multiple definition of `mcrypt_enc_get_iv_size'
Zend/.libs/libZend.al(mcrypt_modules.o)::313: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_enc_get_key_size':
:323: multiple definition of `mcrypt_enc_get_key_size'
Zend/.libs/libZend.al(mcrypt_modules.o)::323: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_enc_get_supported_key_sizes':
:332: multiple definition of `mcrypt_enc_get_supported_key_sizes'
Zend/.libs/libZend.al(mcrypt_modules.o)::332: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_enc_is_block_algorithm':
:351: multiple definition of `mcrypt_enc_is_block_algorithm'
Zend/.libs/libZend.al(mcrypt_modules.o)::351: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_enc_get_algorithms_name':
:360: multiple definition of `mcrypt_enc_get_algorithms_name'
Zend/.libs/libZend.al(mcrypt_modules.o)::360: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `init_mcrypt':
:370: multiple definition of `init_mcrypt'
Zend/.libs/libZend.al(mcrypt_modules.o)::370: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt':
:388: multiple definition of `mcrypt'
Zend/.libs/libZend.al(mcrypt_modules.o)::388: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mdecrypt':
:398: multiple definition of `mdecrypt'
Zend/.libs/libZend.al(mcrypt_modules.o)::398: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_enc_get_modes_name':
:408: multiple definition of `mcrypt_enc_get_modes_name'
Zend/.libs/libZend.al(mcrypt_modules.o)::408: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_enc_is_block_mode':
:417: multiple definition of `mcrypt_enc_is_block_mode'
Zend/.libs/libZend.al(mcrypt_modules.o)::417: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_enc_mode_has_iv':
:426: multiple definition of `mcrypt_enc_mode_has_iv'
Zend/.libs/libZend.al(mcrypt_modules.o)::426: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_enc_is_block_algorithm_mode':
:435: multiple definition of `mcrypt_enc_is_block_algorithm_mode'
Zend/.libs/libZend.al(mcrypt_modules.o)::435: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_module_algorithm_version':
:489: multiple definition of `mcrypt_module_algorithm_version'
Zend/.libs/libZend.al(mcrypt_modules.o)::489: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_module_mode_version':
:522: multiple definition of `mcrypt_module_mode_version'
Zend/.libs/libZend.al(mcrypt_modules.o)::522: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_get_size':
:216: multiple definition of `mcrypt_get_size'
Zend/.libs/libZend.al(mcrypt_modules.o)::216: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_dlsym':
:93: multiple definition of `mcrypt_dlsym'
Zend/.libs/libZend.al(mcrypt_modules.o)::93: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_dlclose':
:85: multiple definition of `mcrypt_dlclose'
Zend/.libs/libZend.al(mcrypt_modules.o)::85: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`_mcrypt_search_symlist_lib':
:51: multiple definition of `_mcrypt_search_symlist_lib'
Zend/.libs/libZend.al(mcrypt_modules.o)::51: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`_mcrypt_search_symlist_sym':
:65: multiple definition of `_mcrypt_search_symlist_sym'
Zend/.libs/libZend.al(mcrypt_modules.o)::65: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_dlopen':
:128: multiple definition of `mcrypt_dlopen'
Zend/.libs/libZend.al(mcrypt_modules.o)::128: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_module_open':
:162: multiple definition of `mcrypt_module_open'
Zend/.libs/libZend.al(mcrypt_modules.o)::162: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_enc_set_state':
:279: multiple definition of `mcrypt_enc_set_state'
Zend/.libs/libZend.al(mcrypt_modules.o)::279: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_get_algo_iv_size':
:304: multiple definition of `mcrypt_get_algo_iv_size'
Zend/.libs/libZend.al(mcrypt_modules.o)::304: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_enc_self_test':
:444: multiple definition of `mcrypt_enc_self_test'
Zend/.libs/libZend.al(mcrypt_modules.o)::444: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function `mcrypt_module_self_test':
:454: multiple definition of `mcrypt_module_self_test'
Zend/.libs/libZend.al(mcrypt_modules.o)::454: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_module_is_block_algorithm':
:555: multiple definition of `mcrypt_module_is_block_algorithm'
Zend/.libs/libZend.al(mcrypt_modules.o)::555: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_module_is_block_algorithm_mode':
:588: multiple definition of `mcrypt_module_is_block_algorithm_mode'
Zend/.libs/libZend.al(mcrypt_modules.o)::588: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_module_is_block_mode':
:621: multiple definition of `mcrypt_module_is_block_mode'
Zend/.libs/libZend.al(mcrypt_modules.o)::621: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_module_get_algo_block_size':
:654: multiple definition of `mcrypt_module_get_algo_block_size'
Zend/.libs/libZend.al(mcrypt_modules.o)::654: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_module_get_algo_key_size':
:687: multiple definition of `mcrypt_module_get_algo_key_size'
Zend/.libs/libZend.al(mcrypt_modules.o)::687: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_modules.o): In function 
`mcrypt_module_get_algo_supported_key_sizes':
:720: multiple definition of `mcrypt_module_get_algo_supported_key_sizes'
Zend/.libs/libZend.al(mcrypt_modules.o)::720: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_threads.o): In function `mcrypt_mutex_register':
:44: multiple definition of `mcrypt_mutex_register'
Zend/.libs/libZend.al(mcrypt_threads.o)::44: first defined here
/usr/local/lib/libmcrypt.a(mcrypt_symb.o)(.rodata+0x0): multiple definition of `mps'
Zend/.libs/libZend.al(mcrypt_symb.o)(.rodata+0x0): first defined here
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/usr/src/php4'
make: *** [all-recursive] Error 1
yakov:/usr/src/php4$

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/?id=13399


Edit this bug report at http://bugs.php.net/?id=13399&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to