php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35472 Defferent GCC make different result
Submitted: 2005-11-29 11:46 UTC Modified: 2005-11-29 14:37 UTC
From: hunreal at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.1.1 OS: FreeBSD Windows
Private report: No CVE-ID: None
 [2005-11-29 11:46 UTC] hunreal at gmail dot com
Description:
------------
Defferent version of GCC make the script different result.

When compile php with gcc2.95, my script got result A.
When compile php with gcc3.4.4 or gcc 4.0.3, my script got result B.

Download php windows binary from php.net, my script got result A.

I was already tried php 5.0.4/5.0.6-CVS/5.1.1.


gcc -v
Using builtin specs.
gcc version 2.95.4 20020320 [FreeBSD]

gcc40 -v
Using built-in specs.
Target: i386-portbld-freebsd4.11
Configured with: ./..//gcc-4.0-20051110/configure --disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local --program-suffix=40 --libdir=/usr/local/lib/gcc/i386-portbld-freebsd4.11/4.0.3 --with-gxx-include-dir=/usr/local/lib/gcc/i386-portbld-freebsd4.11/4.0.3/include/c++/ --disable-shared --prefix=/usr/local i386-portbld-freebsd4.11
Thread model: posix
gcc version 4.0.3 20051110 (prerelease) [FreeBSD]

gcc -v
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.4 [FreeBSD] 20050518

Reproduce code:
---------------
http://hshh.org/test.tar.bz2

Expected result:
----------------
Result A:
db7f8466d02744ba96a3b189cd22583646b0aaad2f4486c242f37e1206e5f47413a4087c2d5348e3

Result B:
362ea8a064e8e401302f0ebb079eb9af3e7459630e102d17dad9800b414bce730ca02dbcf1215e1c


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-29 11:56 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2005-11-29 12:14 UTC] hunreal at gmail dot com
Please check the code

http://hshh.org/test.tar.bz2
 [2005-11-29 12:30 UTC] tony2001@php.net
We need a short and clear reproduce case.
The one you're reffering to is certainly not short.
 [2005-11-29 14:09 UTC] hunreal at gmail dot com
I reduce the codes,
http://hshh.org/test.php.gz
 [2005-11-29 14:13 UTC] tony2001@php.net
You must be kidding, huh?
 [2005-11-29 14:29 UTC] hunreal at gmail dot com
well, re-edit the script,

gcc2 or windows, result:
124202525

gcc3 or gcc4
-1073206014

http://hshh.org/test.php.gz
 [2005-11-29 14:37 UTC] sniper@php.net
Please, nobody will look into this before you have a SHORT script. Short == less than 20 lines..

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 21:01:32 2025 UTC