[LLVMbugs] [Bug 12766] New: Wrong code while compiling glib-2.32.2

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 8 10:49:13 PDT 2012


             Bug #: 12766
           Summary: Wrong code while compiling glib-2.32.2
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: adam at NetBSD.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Compiling glib-2.32.2 (available here
http://ftp.gnome.org/pub/gnome/sources/glib/2.32/) with clang (trunk, revision
156379) fails with:

file_builder_allocate_for_hash(FileBuilder *, gsize, gsize, guint, gsize,
guint32_le **, guint32_le **, struct gvdb_hash_item **, struct gvdb_pointer *):
assertion failed: (size == 0)

While clang 3.1 (from Xcode 4.3.2) compiles correctly.

The problem lies in glib-2.32.2/gio/gvdb/gvdb-builder.c, line 339:

#define chunk(s) (size -= (s), data += (s), data - (s))
  memcpy (chunk (sizeof bloom_hdr), &bloom_hdr, sizeof bloom_hdr);

After memcpy(), 'size' gets decreased by 8, not by 4 (sizeof bloom_hdr).

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list