-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Description
Description
The following code:
<?php
$v_347379 = 'Q';
$v_347381 = 'utf-8';
$v_347383 = 'utf-8';
$v_347395 = PHP_INT_MAX;
$v_347396 = 86400;
$v_347397 = $v_347395 / $v_347396;
$v_347398 = 2440588;
$v_347399 = $v_347397 + $v_347398;
$v_347400 = (int)($v_347399);
$v_347387 = '\r\n';
$v_347377 = array('scheme' => $v_347379,'input-charset' => $v_347381,'output-charset' => $v_347383,'line-length' => $v_347400,'line-break-chars' => $v_347387,);
$v_347388 = 'subject';
$v_347389 = 'd obeybiubrsfqllpdtpge�~@�';
foreach($v_34377 as $v_347377){
}
$v_347377 = array('scheme' => $v_347379,'input-charset' => $v_347381,'output-charset' => $v_347383,'line-length' => $v_347400,'line-break-chars' => $v_347387,);
$v_347390 = iconv_mime_encode($v_347388,$v_347389,$v_347377,);Resulted in this output:
==2633691==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 112 byte(s) in 1 object(s) allocated from:
#0 0x6810bd in malloc (/home/w023dtc/nightly_php/php-src/sapi/cli/php+0x6810bd)
#1 0x150d7a06376c in __gconv_open iconv/./iconv/gconv_open.c:77:28
#2 0x150d7a0632b7 in iconv_open iconv/./iconv/iconv_open.c:39:13
#3 0x60200001a30f (<unknown module>)
Direct leak of 112 byte(s) in 1 object(s) allocated from:
#0 0x6810bd in malloc (/home/w023dtc/nightly_php/php-src/sapi/cli/php+0x6810bd)
#1 0x150d7a06376c in __gconv_open iconv/./iconv/gconv_open.c:77:28
#2 0x150d7a0632b7 in iconv_open iconv/./iconv/iconv_open.c:39:13
#3 0x60200001a28f (<unknown module>)
Indirect leak of 32640 byte(s) in 1 object(s) allocated from:
#0 0x6810bd in malloc (/home/w023dtc/nightly_php/php-src/sapi/cli/php+0x6810bd)
#1 0x150d7a0637e6 in __gconv_open iconv/./iconv/gconv_open.c:127:36
#2 0x150d7a0632b7 in iconv_open iconv/./iconv/iconv_open.c:39:13
#3 0x60200001a28f (<unknown module>)
Indirect leak of 32640 byte(s) in 1 object(s) allocated from:
#0 0x6810bd in malloc (/home/w023dtc/nightly_php/php-src/sapi/cli/php+0x6810bd)
#1 0x150d7a0637e6 in __gconv_open iconv/./iconv/gconv_open.c:127:36
#2 0x150d7a0632b7 in iconv_open iconv/./iconv/iconv_open.c:39:13
#3 0x60200001a30f (<unknown module>)
Indirect leak of 416 byte(s) in 2 object(s) allocated from:
#0 0x6810bd in malloc (/home/w023dtc/nightly_php/php-src/sapi/cli/php+0x6810bd)
#1 0x150d7a06e9d6 in __gconv_lookup_cache iconv/./iconv/gconv_cache.c:365:36
SUMMARY: AddressSanitizer: 65920 byte(s) leaked in 6 allocation(s).
But I expected this output instead:
PHP Version
nightly
Operating System
ubuntu 20.04