<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>621</bug_id>
          
          <creation_ts>2010-12-28 21:36:15 +0000</creation_ts>
          <short_desc>libglib-2.0: g_mem_profle() return a error result</short_desc>
          <delta_ts>2010-12-28 23:41:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Xiaofeng Yan">Xiaofeng.yan</reporter>
          <assigned_to name="Dongxiao Xu">dongxiao.xu</assigned_to>
          <cc>jingdong.lu</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11343</commentid>
    <comment_count>0</comment_count>
    <who name="Xiaofeng Yan">Xiaofeng.yan</who>
    <bug_when>2010-12-28 21:36:15 +0000</bug_when>
    <thetext>During Desktop-T2C test from lsb test suite I get a error from libglib-2.0. 

The detailed information is belows:

/glib-t2c/tests/glib_memory/glib_memory	
Message from the test:

Target interface(s):
 g_mem_profile
--------
g_mem_profile: no summary was produced by this call.
 
Requirement failed:
{g_mem_profile.01}
Outputs a summary of memory usage. 
================================================================================
The next c program is an example to apply function g_mem_progfile()

Host: ubuntu 10.04 x86_32
Compile environment:i586-poky-linux-gcc, pkg-config point to poky sysroot
Target Platform: qemux86  
PC$:Operation on Host
Target# Operation on qemux86
================================================================================

PC$ vim g_mem.c
#include &lt;stdlib.h&gt; /* atexit() */
#include &lt;glib.h&gt;

int main() {
    GList *list;

    atexit(g_mem_profile);
    g_mem_set_vtable(glib_mem_profiler_table);

    list = 0;
    list = g_list_append(list,0);
    g_list_free(list);

    return 0;
}
===============================================================================
PC$i586-poky-linux-gcc `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` g_mem.c -o g_mem 
PC$./g_mem
GLib Memory statistics (successful operations):
 blocks of | allocated  | freed      | allocated  | freed      | n_bytes   
  n_bytes  | n_times by | n_times by | n_times by | n_times by | remaining 
           | malloc()   | free()     | realloc()  | realloc()  |           
===========|============|============|============|============|===========
       508 |          3 |          0 |          0 |          0 |      +1524
      2040 |          1 |          0 |          0 |          0 |      +2040
GLib Memory statistics (failing operations):
 --- none ---
Total bytes: allocated=3564, zero-initialized=3564 (100.00%), freed=0 (0.00%), remaining=3564
===============================================================================
I copy this binary program to qemux86

Target#./g_mem
Target#

So It&apos;s nothing when running &quot;./g_mem&quot; on qemux86 platform.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11349</commentid>
    <comment_count>1</comment_count>
    <who name="Jingdong Lu">jingdong.lu</who>
    <bug_when>2010-12-28 23:31:54 +0000</bug_when>
    <thetext>Source code:
glib-2.27.3/glib/gmem.c
/* notes on macros:
 * having G_DISABLE_CHECKS defined disables use of glib_mem_profiler_table and
 * g_mem_profile().

glib-2.0_2.27.3.bb
|-- glib.inc
    |-- EXTRA_OECONF = &quot;--disable-debug --enable-included-printf=no&quot;

So, remove &quot;--disable-debug&quot;, this will be fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11350</commentid>
    <comment_count>2</comment_count>
    <who name="Xiaofeng Yan">Xiaofeng.yan</who>
    <bug_when>2010-12-28 23:41:54 +0000</bug_when>
    <thetext>Thanks Jingdong Lu. perhaps We should add this modification to libglib bb file.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>