Closed Bug 12148 Opened 25 years ago Closed 25 years ago

xpidl crashes on xpcom/io/nsIFileSpec.idl

Categories

(Core :: XPCOM, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: tomi.leppikangas, Assigned: shaver)

Details

(Keywords: crash)

xpidl crashes on linux (RedHat 6.0/libIDL 0.6.5)

Here is backtrace:
(gdb) bt
#0  0x7461090a in ?? ()
#1  0x400f5856 in _IO_vfprintf (s=0x40199500,
    format=0x40050944 "%s:%d: Warning: %s\n", ap=0xbffff7dc) at vfprintf.c:1018
#2  0x400fd6f7 in fprintf (stream=0x40199500,
    format=0x40050944 "%s:%d: Warning: %s\n") at fprintf.c:32
#3  0x40041ba1 in __IDL_warningl (level=2,
    s=0x8058b28 "%{ .. %} code fragment within interface ignored when generating
NS_DECL_IFOO macro; if the code fragment contains method declarations, the macro
probably isn't complete.", ofs=0) at util.c:541
#4  0x40041bfd in __IDL_warning (level=2,
    s=0x8058b28 "%{ .. %} code fragment within interface ignored when generating
NS_DECL_IFOO macro; if the code fragment contains method declarations, the macro
probably isn't complete.") at util.c:554
#5  0x40041de1 in IDL_tree_warning (p=0x8072080, level=2,
    fmt=0x8055400 "%%{ .. %%} code fragment within interface ignored when
generating NS_DECL_IFOO macro; if the code fragment contains method
declarations, the macro probably isn't complete.") at util.c:663
#6  0x804bb39 in interface (state=0xbffff93c)
    at ../../../../xpcom/typelib/xpidl/xpidl_header.c:183
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Mike shaver reports that tree_warning sometimes busts with libIDL 6.5:

Index: xpidl_header.c
===================================================================
RCS file: /cvsroot/mozilla/xpcom/typelib/xpidl/xpidl_header.c,v
retrieving revision 1.55
diff -u -r1.55 xpidl_header.c
--- xpidl_header.c      1999/08/19 13:02:07     1.55
+++ xpidl_header.c      1999/08/19 20:59:07
@@ -180,12 +180,16 @@
               continue;

           case IDLN_CODEFRAG:
+/* IDL_tree_warning crashes in libIDL 0.6.5, sometimes */
+#if !(LIBIDL_MAJOR_VERSION == 0 && LIBIDL_MINOR_VERSION == 6 && \
+      LIBIDL_MICRO_VERSION == 5)
               IDL_tree_warning(iter, IDL_WARNING1,
-                               "%%{ .. %%} code fragment within interface "
+                               "%%{ ... %%} code fragment within interface "
                                "ignored when generating NS_DECL_IFOO macro; "
                                "if the code fragment contains method "
                                "declarations, the macro probably isn't "
                                "complete.");
+#endif
               break;

           default:


... and he reports that the fix is checked in.

Marking resolved.
Status: RESOLVED → REOPENED
this didnt fix that crash. I removed that #if/#endif block and then its ok.
So i think that #if line isnt quite right, it doesnt detect idl version right.
I reopen bug.
Assignee: mccabe → shaver
Status: REOPENED → NEW
If you're really using libIDL 0.6.5 to build, and you still crash in the
IDL_tree_warning stuff with that patch, please post the results of:

grep LIBIDL_[A-Z]*_VERSION /usr/include/libIDL/IDL.h

I get:
#define LIBIDL_MAJOR_VERSION            0
#define LIBIDL_MINOR_VERSION            6
#define LIBIDL_MICRO_VERSION            5
which is where the #if comes from.
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Ok, now i get it.. i installed my own idl, wich is 0.6.5, but rh 6.0
has its own too, thats 0.6.6. So... i really dont know witch one is
used...

I guess it could be that includes comes from 0.6.6 and libs
from 0.6.5.. not a good thing.


Looks like it fixes my crash if i remove my own libs and use that what
comes with rh. Thanks for pointing this out.
I mark that fixed now.
Adding crash keyword
Keywords: crash
Component: xpidl → XPCOM
QA Contact: mike+mozilla → xpcom
You need to log in before you can comment on or make changes to this bug.