Re: [Mingw-w64-public] Custom toolchain build with gcc-4.4.5 (2010-05-15)

2010-05-16 Thread Wolfgang Glas
Hello Ozkan,

  Many thanks for your efforts, the 2010-05-15 seems to works for me ;-)

  However, I nedd the attacched patch to compile your current binutils version.
This patch fixes three occurrences of sprintf, which is obviously used instead
of strcpy. (Causes gcc errors like 'format argument to sprintf is not a string
literal...') I think this bug has been introduced by the MSVCRT compatibility
patch, which has recently been introduced.

  Please note, that this is not only a cosmetical fix, because the use of
arbitrary input data in sprintf may lead to memory corruption and crashes. (If
the input string incidentially contains %s, %d or something the like...

  So I kindly ask you to apply my patch to binutils

  Best regards,

Wolfgang

On 2010-05-15 10:45, Ozkan Sezer wrote:
 I updated my custom w32/w64 native and cross-compiler build with gcc-4.4
 with several backports and fixes from mainstream, and put them under the
 mingw-w64 sf.net file release system under the subdirectories:
 -  Toolchain sources - Personal Builds,
 -  Toolchains targetting Win32 - Personal Builds  and
 -  Toolchains targetting Win64 - Personal Builds
 
 Build 2010-05-15:
 
 Changes since the previous 2010-05-13 build:
 - Fixed a major linker issue.
 
 Changes since the previous 2010-04-28 build:
 - The mingw-w64 crt and headers updated to rev. 2373 / 2010-05-13,
 - Gcc updated to the 4.4.5 prerelease version, svn rev. 159365,
 - All other software has been updated to the latest available versions
   as of 2010-05-11 / 22:10 GMT.
 - Several binutils patches from Doug Semler which introduce import
   library compatibility with vendor compiler/linker. (See Doug Semler's
   repository at http://github.com/tpaxatb/buildscripts )
 - New included binutils (ld) version fixes a linker symbol underscoring
   problem.
 - Enabled shared libobjc and libgfortran dlls.
 - Fixes for the libobjc dll from Doug Semler.
 - Gcc updated to 4.4.5-prerelease rev. 159365 to fix several issues.
 - Fixes for gcc PR/44046 and PR/43953.
 - Fortran updates from upstream for win32 CONIO support and large file
   support, along with a mktemp fix.
 - Mingw-w64 updated to svn revision 2373 to fix several issues, such as
   a fix for the lack of __lc_codepage symbol in new windows versions,
   fixes for *time_r macros, updates to GL.h to include windows.h and to
   ws2tcpip.h to include winsock2.h.
 - Updated pthreads patch for mingw-w64.
 
 
 - Compatibility Notice:  ** No leading underscore **
 
 Unlike the other builds from mingw-w64 up to 2010-04-27, these new win64
 targetting toolchains do *not* prepend an undersocore to the symbols and
 follows the MSVC x64 convention.  Therefore, any of the link libraries
 from previous toolchains are incompatible with the ones created by these
 new builds.
 
 - Note: the install_dir/include path problem of the native builds is
   not looked into, yet. Maybe in the future builds.
 
 
 Versions:
 -
 
 Common in both cross- and native-toolchains:
 
 gcc : svn rev. 159365 (4.4.5 prerelease with many patches)
 binutils : 2.20.51 (cvs, 2010-05-11 / 22:10 GMT) with some
   patches.
 mingw-w64-crt : svn revision 2371 (2010-05-13)
 mingw-w64-headers : svn revision 2373 (2010-05-13), with a
   couple of patches.
 glext headers: 2010-03-17 (from the Khronos Group)
 pthreads-win32: 2.9.0 (cvs, 2010-02-28 20:00 GMT)
   with w64 patch applied.
 
 In native-toolchains only:
 
 gmp : 4.3.2 (with w64 patch applied)
 mpfr: 2.4.2-p3
 mpc : 0.8.1
 gdb : 7.1.50 (cvs, 2010-05-11 / 22:10 GMT, with
   minor w64 patches applied.)
 make: 3.81.90 (cvs, 2010-02-02 15:20 GMT, with
   w64 patches applied according to savannah bug
   items 27809 and 27825, and patched further to
   kill a horde of compiler warnings)
 gendef, libmangle: from mingw-w64 svn/trunk
 
 
 File names:
 ---
 
 * Source:
 
 - mingw-w64-src_20100515_sezero.tar.gz
 
 
 * Targetting Win64:
 
 - mingw-w64-bin_x86_64-mingw_20100515_sezero.zip
   native compiler toolchain for running on x64-windows
   host and creating x64-windows binaries.
 
 - mingw-w64-bin_i686-mingw_20100515_sezero.zip
   cross compiler toolchain for running on x86-windows
   host but creating x64-windows binaries.
 
 - mingw-w64-bin_i686-linux_20100515_sezero.tar.gz
   cross compiler toolchain for running on a i686-linux
   host and creating x64-windows binaries.
 
 - mingw-w64-bin_x86_64-linux_20100515_sezero.tar.gz
   cross compiler toolchain for running on a x86_64-linux
   host and creating x64-windows binaries.
 
 
 * Targetting Win32:
 
 - mingw-w32-bin_i686-mingw_20100515_sezero.zip
   native compiler toolchain for running on x86-windows
   host and creating x86-windows binaries.
 
 - mingw-w32-bin_i686-linux_20100515_sezero.tar.gz
   cross compiler toolchain for running on a i686-linux
   host and creating x86-windows binaries.
 
 - mingw-w32-bin_x86_64-linux_20100515_sezero.tar.gz
   cross compiler 

Re: [Mingw-w64-public] Custom toolchain build with gcc-4.4.5 (2010-05-15)

2010-05-16 Thread Wolfgang Glas
On 2010-05-16 22:43, Ozkan Sezer wrote:
 On Sun, May 16, 2010 at 11:03 PM, Wolfgang Glas wolfgang.g...@ev-i.at wrote:

[snip]

 For the next builds, I will include this, thanks.
 BTW, same effect can also be accomplished by
 adding a format string to the sprintf call, too.

Yes, 'sprintf(dest,%s,src)' is equal to 'strcpy(dest,src)', if that makes your
code honestly more readable ;-)

--

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Custom toolchain build with gcc-4.4.5 (2010-05-15)

2010-05-16 Thread Doug Semler
On Sun, May 16, 2010 at 4:52 PM, Wolfgang Glas wolfgang.g...@ev-i.at wrote:
 On 2010-05-16 22:43, Ozkan Sezer wrote:
 On Sun, May 16, 2010 at 11:03 PM, Wolfgang Glas wolfgang.g...@ev-i.at 
 wrote:

 [snip]

 For the next builds, I will include this, thanks.
 BTW, same effect can also be accomplished by
 adding a format string to the sprintf call, too.

 Yes, 'sprintf(dest,%s,src)' is equal to 'strcpy(dest,src)', if that makes 
 your
 code honestly more readable ;-)


Thanks, guys.  I'll change it, since that could expose security hole
if the dllname has a format specifier in it (which would be odd, but
possible since the only chars skipped for dll name are ':' '\' and
'/')...(I think this was a
copy-pasto-forgot-to-change-sprintf-to-strcpy).

BTW, from where is the compilation flag -Wformat-nonliteral coming,
since this is required to get this message from gcc...even -Wall
doesn't turn it on in 4.5 which is why this was missed ;-)

--

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Custom toolchain build with gcc-4.4.5 (2010-05-15)

2010-05-16 Thread Doug Semler
Posted.  sprintf now strcpy for the calls...

--

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public