Closed Bug 315163 Opened 19 years ago Closed 19 years ago

x86 Mac JEP crashes, no Java


(Core Graveyard :: Plug-ins, defect)

Not set


(Not tracked)



(Reporter: mcafee, Assigned: mark)



(Keywords: fixed1.8.0.2, fixed1.8.1, Whiteboard: [camino-1.0])


(3 files)

8F1111/i386 (latest seed)

FF1.5rc1/intel/josh-build crashes with JEP 0.9.4+a, crash log to follow.
We may just need a recompile here, both the josh-firefox binary and the JEP
were pre-8F1111 for me.  We may be getting bitten by either the jni.h or
the dyld problems from earlier 8F* builds.
Severity: normal → critical
JEP: 0.9.4+a, steven mailed this to me 10/3/2005
FF15rc1: the binary from josh's blog site:

Firefox ( (2005.10.21, contains patch from bug 312929 (
-> core
Component: General → Plug-ins
Product: Firefox → Core
Version: unspecified → Trunk
I've got this covered.
Assignee: smichaud → mark
Summary: Mac/i386: Universal JEP java plugin crashes on 8F1111 → x86 Mac JEP crashes, no Java
Patch against JEP 0.9.5+b, MRJPlugin in-tree portion.  A test build with this plugin is available at .
JEP still doesn't work with Cocoa on x86.  It crashes with an evil $ebp and resultant garbage stack.  Dumping from $esp gave some clues.  At the very least, direct use of objc_msgSend_stret is causing problems because the calling convention varies.

If [normal objc] is out of the question (I see why it's difficult where it's not used), we can do something like:

#ifdef __ppc__
#define objc_msgSend_stret_NSRect objc_msgSend_stret
#elif defined (__i386__)
static const NSRect (*objc_msgSend_stret_NSRect)(NSRect*, id, SEL, ...) = &objc


objc_msgSend_stret_NSRect(&dirty, self, @selector(_dirtyRect));

These changes prevent $ebp from getting trashed due to not following the ABI and allows something resembling normal flow.  I still see crashes in objc_msgSend_stret called by something in AppKit, usually on something overridden by JEP where JEP calls back into AppKit with objc_msgSendSuper.

I can get the first frame of the applet to display by skipping the call into [NSView _propagateDirtyRectsToOpaqueAncestors].  And I can bypass the crashes entirely by skipping the call into [NSView _drawRect:clip:], but of course nothing draws then.
Making these calls through [normal objc] allows JEP to function in Camino.
objc_msgSend_stret was the only culprit.  I wasn't able to successfully send messages by calling that function directly, so I adapted it to standard Objective-C and added category interfaces to handle private methods that aren't defined by the system headers.
Blocks: 324651
A fat JEP has been checked into CAMINO_1_0_BRANCH.  This is JEP 0.9.5+c with x86 bits produced using these patches merged in using lipo.
Whiteboard: [camino-1.0]
Flags: blocking1.8.0.2?
Flags: blocking1.8.0.2? → blocking1.8.0.2+
This was fixed on the trunk, 1_8, and 1_8_0 branches by checking in a universal JEP 0.9.5+c with these patches in bug 327785.  Bug 327785 contains details about what exactly was checked in.  This bug will remain open until the patches or something else that accounts for the bugs makes it upstream to the JEP.
This is SO fixed.
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.