This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/37154] New: static inline function problem


i am getting SIGSEGV while starting two glib2 applications.
please take a look at glib2/gogject/gsignal.c code:

-----------------
2280      gboolean continue_emission;
2281
2282      if (!accumulator)
2283        return TRUE;
2284
2285      continue_emission = accumulator->func (ihint, return_accu,
handler_return, accumulator->data);
2286      g_value_reset (handler_return);
------------------

gdb claims that problem is at line 2285, variable "accumulator" is 0x0,
which should not happen due to lines 228{2,3}.

the function is declared as 'static inline'. removing inline keyword and
recompilation helps. commmand used to compile gsignal.c file:

--------------------
ppc-pld-linux-gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GObject\" -I..
-I../glib -I.. -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED
-DGOBJECT_COMPILATION -DG_DISABLE_CONST_RETURNS -D_FORTIFY_SOURCE=2 -pthread
-O2 -fno-strict-aliasing -fwrapv -fsigned-char -gdwarf-2 -g2 -Wall -MT
gsignal.lo -MD -MP -MF .deps/gsignal.Tpo -c gsignal.c  -fPIC -DPIC -o
.libs/gsignal.o
---------------------


-- 
           Summary: static inline function problem
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wrobell at pld-linux dot org
 GCC build triplet: ppc-pld-linux-gcc
  GCC host triplet: ppc-pld-linux-gcc
GCC target triplet: ppc-pld-linux-gcc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37154


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]