problem with compilation

Bug #246885 reported by Pavol Klačanský
2
Affects Status Importance Assigned to Milestone
gcc
Fix Released
Medium
gcc-4.3 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

when i was compiling transmission project, then i had problem (compiling stop => cc1 run on 100 % CPU):
In function ‘memset’,
    inlined from ‘tr_malloc0’ at utils.c:697:
/usr/include/bits/string3.h:82: warning: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters

when i commented /usr/include/bits/string3.h:82 compilation will run

Related branches

Revision history for this message
Matthias Klose (doko) wrote :

please always include a self-contained testcase (preprocessed code) and the command line options used.

Changed in gcc-defaults:
status: New → Incomplete
Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

i compile lastest SVN version
./autogen.sh
make
make install

no options
"self-contained testcase (preprocessed code)" i don't understand.

Revision history for this message
Colin Watson (cjwatson) wrote :

I reproduced this with SVN trunk of transmission (svn://svn.m0k.org/Transmission/trunk, revision 6324):

gcc -DPACKAGE_NAME=\"transmission\" -DPACKAGE_TARNAME=\"transmission\" -DPACKAGE_VERSION=\"1.22Z\" -DPACKAGE_STRING=\"transmission\ 1.22Z\" -DPACKAGE_BUGREPORT=\"http://trac.transmissionbt.com/newticket\" -DPACKAGE=\"transmission\" -DVERSION=\"1.22Z\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DAEMON=1 -DHAVE_DIRNAME=1 -DHAVE_BASENAME=1 -DHAVE_DAEMON=1 -DHAVE_STRCASECMP=1 -DSIZEOF_VOIDP=4 -DHAVE_PTHREAD=1 -D_FILE_OFFSET_BITS=64 -DHAVE_GIO=1 -DHAVE_LIBNOTIFY=1 -DHAVE_DBUS_GLIB=1 -DHAVE_LIBINTL_H=1 -DGETTEXT_PACKAGE=\"transmission\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -I. -I. -I.. -I../third-party/ -D__TRANSMISSION__ -I../third-party/libevent -pthread -g -Wall -W -O3 -funroll-loops -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
utils.c: In function ‘tr_deepLog’:
utils.c:193: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
In function ‘memset’,
    inlined from ‘tr_malloc0’ at utils.c:697:
/usr/include/bits/string3.h:82: warning: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters

... and, as the reporter describes, it seems to hang there. The third parameter to memset does *not* seem to be a constant zero. I've attached preprocessed source.

Revision history for this message
Colin Watson (cjwatson) wrote :
Download full text (5.5 KiB)

gcc -v -save-temps says:

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.1-5ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.1 (Ubuntu 4.3.1-5ubuntu1)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-DPACKAGE_NAME="transmission"' '-DPACKAGE_TARNAME="transmission"' '-DPACKAGE_VERSION="1.22Z"' '-DPACKAGE_STRING="transmission 1.22Z"' '-DPACKAGE_BUGREPORT="http://trac.transmissionbt.com/newticket"' '-DPACKAGE="transmission"' '-DVERSION="1.22Z"' '-DSTDC_HEADERS=1' '-DHAVE_SYS_TYPES_H=1' '-DHAVE_SYS_STAT_H=1' '-DHAVE_STDLIB_H=1' '-DHAVE_STRING_H=1' '-DHAVE_MEMORY_H=1' '-DHAVE_STRINGS_H=1' '-DHAVE_INTTYPES_H=1' '-DHAVE_STDINT_H=1' '-DHAVE_UNISTD_H=1' '-DHAVE_DLFCN_H=1' '-DSTDC_HEADERS=1' '-DTIME_WITH_SYS_TIME=1' '-DHAVE_DAEMON=1' '-DHAVE_DIRNAME=1' '-DHAVE_BASENAME=1' '-DHAVE_DAEMON=1' '-DHAVE_STRCASECMP=1' '-DSIZEOF_VOIDP=4' '-DHAVE_PTHREAD=1' '-D_FILE_OFFSET_BITS=64' '-DHAVE_GIO=1' '-DHAVE_LIBNOTIFY=1' '-DHAVE_DBUS_GLIB=1' '-DHAVE_LIBINTL_H=1' '-DGETTEXT_PACKAGE="transmission"' '-DHAVE_LOCALE_H=1' '-DHAVE_LC_MESSAGES=1' '-DHAVE_BIND_TEXTDOMAIN_CODESET=1' '-DHAVE_GETTEXT=1' '-DHAVE_DCGETTEXT=1' '-DENABLE_NLS=1' '-I.' '-I.' '-I..' '-I../third-party/' '-D__TRANSMISSION__' '-I../third-party/libevent' '-pthread' '-g' '-Wall' '-W' '-O3' '-funroll-loops' '-MT' 'utils.o' '-MD' '-MP' '-MF' '.deps/utils.Tpo' '-c' '-o' 'utils.o' '-mtune=generic'
 /usr/lib/gcc/i486-linux-gnu/4.3.1/cc1 -E -quiet -v -I. -I. -I.. -I../third-party/ -I../third-party/libevent -MD utils.d -MF .deps/utils.Tpo -MP -MT utils.o -D_REENTRANT -DPACKAGE_NAME="transmission" -DPACKAGE_TARNAME="transmission" -DPACKAGE_VERSION="1.22Z" -DPACKAGE_STRING="transmission 1.22Z" -DPACKAGE_BUGREPORT="http://trac.transmissionbt.com/newticket" -DPACKAGE="transmission" -DVERSION="1.22Z" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DAEMON=1 -DHAVE_DIRNAME=1 -DHAVE_BASENAME=1 -DHAVE_DAEMON=1 -DHAVE_STRCASECMP=1 -DSIZEOF_VOIDP=4 -DHAVE_PTHREAD=1 -D_FILE_OFFSET_BITS=64 -DHAVE_GIO=1 -DHAVE_LIBNOTIFY=1 -DHAVE_DBUS_GLIB=1 -DHAVE_LIBINTL_H=1 -DGETTEXT_PACKAGE="transmission" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -D__TRANSMISSION__ utils.c -D_FORTIFY_SOURCE=2 -mtune=generic -Wall -W -funroll-loops -fworking-directory -O3 -fpch-preprocess -o utils.i
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/i486-linux-gnu/4.3.1/../../../../...

Read more...

Changed in gcc:
status: Unknown → New
Revision history for this message
Matthias Klose (doko) wrote :

seen with the 4.3 branch and trunk 20080711; please use -O2 (instead of -O3) for the package build for now.

Changed in gcc-defaults:
importance: Undecided → Medium
status: Incomplete → Confirmed
Changed in gcc:
status: New → Fix Released
Matthias Klose (doko)
Changed in gcc-defaults:
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.3 - 4.3.1-6ubuntu1

---------------
gcc-4.3 (4.3.1-6ubuntu1) intrepid; urgency=low

  * Merge with Debian; remaining changes:
    - Built from upstream tarball, regenerate the control file.
  * Update to SVN 20080716 from the gcc-4_3-branch.
    - Fix PR middle-end/36811, infinite loop building with -O3. LP: #246885.
  * gij/gcj: Don't remove alternatives on upgrade. Addresses: #479950.

gcc-4.3 (4.3.1-6) unstable; urgency=low

  * Start the logwatch script on alpha as well to avoid timeouts in
    the testsuite.

 -- Matthias Klose <email address hidden> Wed, 16 Jul 2008 13:21:38 +0200

Changed in gcc-4.3:
status: In Progress → Fix Released
Hoper (denispal)
Changed in gcc-4.3 (Ubuntu):
status: Fix Released → Fix Committed
status: Fix Committed → Fix Released
Changed in gcc:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.