Closed Bug 544433 Opened 15 years ago Closed 15 years ago

64-bit Mac OS X builds have broken plugin architecture detection

Categories

(Core Graveyard :: Plug-ins, defect)

x86_64
macOS
defect
Not set
normal

Tracking

(blocking2.0 beta1+)

RESOLVED FIXED
Tracking Status
blocking2.0 --- beta1+

People

(Reporter: jaas, Assigned: jaas)

References

Details

Attachments

(1 file)

64-bit Mac OS X builds have broken plugin detection. Gecko does not look for the correct type of mach-o binary header (MH_MAGIC_64). Additionally, we assume that any universal binary has a compatible architecture without actually checking.
Attached patch fix v1.0Splinter Review
As of Mac OS X 10.5 there is a CFBundle function that does exactly what we want so that we don't have to manually analyze mach headers - CFBundlePreflightExecutable. We should just use that and get rid of the code path for plugins that are not bundles. I don't think there are any plugins that aren't bundles any more.
Attachment #425391 - Flags: review?(smichaud)
Summary: 64-bit Mac OS X builds have broken plugin detection → 64-bit Mac OS X builds have broken plugin architecture detection
Note that this isn't the only reason plugins won't load in 64-bit builds - bug 544435 is also a problem.
Blocks: 544437
Josh, I've just started testing this, but I already have a suggestion: Why not make your changes specific to 64-bit builds, and leave existing code the same for 32-bit builds? This would be much less likely to cause compatibility problems -- plugin vendors who make the transition to 64-bit will find making their plugin a bundle is the least of their problems :-)
I don't think it is worth having two code paths. There aren't a lot of subtle issues here - the mach header matches or it doesn't, the new code works or it doesn't. The old code is broken in 32-bit mode too, see bug 544437.
Attachment #425391 - Flags: review?(smichaud) → review+
Comment on attachment 425391 [details] [diff] [review] fix v1.0 OK. Then this is fine with me. If we do have compatibility problems (with existing 32-bit plugins, which I agree is unlikely), we can always come back later to fix them.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: